tetex-brev-4.22.8/0002755000000000000000000000000012227612273010570 5ustar tetex-brev-4.22.8/demo.tex0000644000000000000000000000143707614356530012246 0ustar \documentclass[a4paper,english]{brev} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \name{\texttt{\textbackslash name\{\}}} \address{\texttt{\textbackslash address\{\}}\\1234 City} \telephone{\texttt{\textbackslash telephone\{\}}} \location{\texttt{\textbackslash location\{\}}} \signature{\texttt{\textbackslash signature\{\}}} \begin{document} \date{\texttt{\textbackslash date\{\}}} \yourref{\texttt{\textbackslash yourref\{\}}} \ourref{\texttt{\textbackslash ourref\{\}}} \begin{letter}{Recipient\\mailing\\address\\1234 city} \opening{\texttt{\textbackslash opening\{\}}} This is the text of the letter \closing{\texttt{\textbackslash closing\{\}}} \cc{\texttt{\textbackslash cc\{\}}} \encl{\texttt{\textbackslash encl\{\}}} \ps \texttt{\textbackslash ps} \end{letter} \end{document} tetex-brev-4.22.8/eksempel.tex0000644000000000000000000000113507614334357013125 0ustar \documentclass[a4paper,norsk]{brev} \begin{document} \name{Arne Avsender} \address{Veien 133\\\ \\9999\ \ LANGTVEKKISTAN} \location{Hjemme} % Denne daterer brevet til 16. oktober 2002, og formaterer dato til % gjeldende språk (norsk) % Hvis du fjerner denne, får brevet dagens dato. % Alternativt kan du bruke \date{ } og skrive inn datoen akkurat som % den blir vist. \LetterDate{2002-10-16} \begin{letter}{Mottaker\\ Veien 1\\ \ \\ N-0000\ \ BY} \opening{Hei!} Dette er et lite eksempelbrev. \closing{Med vennlig hilsen} \end{letter} \end{document} tetex-brev-4.22.8/debian/0002755000000000000000000000000012227612273012012 5ustar tetex-brev-4.22.8/debian/dirs0000644000000000000000000000007707613451537012707 0ustar usr/share/texmf/tex/latex/latex-brev usr/share/emacs/site-lisp tetex-brev-4.22.8/debian/rules0000755000000000000000000000120512227612170013062 0ustar #!/usr/bin/make -f %: dh $@ --with tex override_dh_auto_install: dh_auto_install -- prefix=/usr buildfromcvs: PACKAGE=`dpkg-parsechangelog | awk '/^Source: / { print $$2}'` ; \ version=`dpkg-parsechangelog | awk '/^Version: / {print $$2}'`; \ module=`cat CVS/Repository`; \ rm -rf -- "../$$PACKAGE-$$version" "$$PACKAGE-$$version;" \ echo cvs export -rHEAD -d$$PACKAGE-$$version $$module; \ cvs export -rHEAD -d$$PACKAGE-$$version $$module; \ find $$PACKAGE-$$version -name .cvsignore |xargs rm ; \ mv $$PACKAGE-$$version ..; \ cp debian/changelog ../$$PACKAGE-$$version/debian/changelog; \ (cd ../$$PACKAGE-$$version && debuild) tetex-brev-4.22.8/debian/changelog0000644000000000000000000001174612227612273013673 0ustar tetex-brev (4.22.8) unstable; urgency=low * Add homepage info in the control file now that the upstream project is available from github. * Update copyright file with new URL and email address. * Really drop postinst reintroduced by mistake in 4.22.7. -- Petter Reinholdtsen Thu, 17 Oct 2013 00:34:40 +0200 tetex-brev (4.22.7) unstable; urgency=low * Acknowlege NMU. Thank you very much, Andrew Starr-Bochicchio. :) * Build-depend on texlive-lang-european | texlive-latex-base (<< 2013.20130918-1) to make sure the needed language rules are available (Closes: #712358). Thank you Norbert Preining for the tip. * Update standards-version from 3.8.4 to 3.9.4. No changes needed. * Adjust copyright file to make the copyright status clearer. * Rewrite rules file to use dh and build-depend on debhelper (>= 7.0.50~) to get it working. -- Petter Reinholdtsen Mon, 14 Oct 2013 23:07:20 +0200 tetex-brev (4.22.6+nmu1) unstable; urgency=low * Non-maintainer upload. * Drop debian/postinst, call dh_installtex in debian/rules, and build depend on tex-common. This causes the package to no longer create files in /usr/local (Closes: #669393). -- Andrew Starr-Bochicchio Sun, 24 Jun 2012 19:07:14 -0400 tetex-brev (4.22.6) unstable; urgency=low * Change build depend from tetex-bin and tetex-extra to texlive-latex-base and texlive-latex-recommended to find latex and the ecrm1000 font (Closes: #562379). * Update standards-version from 3.7.2 to 3.8.4. No changes needed. * Increase debhelper compat level from 4 to 7. Adjust build rules to behave better. -- Petter Reinholdtsen Thu, 11 Feb 2010 20:31:11 +0100 tetex-brev (4.22.5) unstable; urgency=low * Update dependencies to use texlive-latex-base as an alterntive to tetex-bin, and drop tetex-base. (Closes: #419234) * Update from standards-version 3.6.2 to 3.7.2. No changes needed. -- Petter Reinholdtsen Fri, 22 Jun 2007 13:36:57 +0100 tetex-brev (4.22.4) unstable; urgency=low * Add giro.text from upstream to have a example for the giro class. -- Petter Reinholdtsen Fri, 9 Feb 2007 22:25:43 +0100 tetex-brev (4.22.3) unstable; urgency=low * Move to Standards-Version 3.6.2. No change needed. * Increase debhelper compat level from 3 to 4. * New rules target buildfromcvs to build package without the CVS directories and get rid of lintian errors. * Make package a native package. There is no upstream tarball. -- Petter Reinholdtsen Fri, 23 Dec 2005 19:10:13 +0100 tetex-brev (4.22-2) unstable; urgency=low * debian/rules: Remove unused code. * debian/control: Changed to use latest standard version (3.6.1.0). * debian/control: Improved short description a bit, and got rid of lintian warning. * debian/copyright: Get rid of lintian warning. -- Petter Reinholdtsen Thu, 26 Feb 2004 09:54:09 +0100 tetex-brev (4.22-1) unstable; urgency=low * New upstream version. - Added danish translation. - Minor LaTeX code fixes. -- Petter Reinholdtsen Mon, 1 Dec 2003 00:28:20 +0100 tetex-brev (4.19-4) unstable; urgency=low * Add tetex-extra to build-depend-indep to find the ecrm1000 font. (Closes: #191543) -- Petter Reinholdtsen Thu, 1 May 2003 23:39:47 +0200 tetex-brev (4.19-3) unstable; urgency=low * Fix makefile target for building of demo.dvi. * Add tetex-bin to build-depends-indep. (Closes: #190702) -- Petter Reinholdtsen Fri, 25 Apr 2003 10:49:14 +0200 tetex-brev (4.19-2) unstable; urgency=low * Updated eksempel.tex and brev.el from upstream. * Added README and demo.tex now included in upstream. * Remove patch to undo \Letter@Date change in v4.19. The correct fix is to change the date format in eksempel.tex to use ISO formatted dates (YYYY-MM-DD). -- Petter Reinholdtsen Sat, 25 Jan 2003 10:39:37 +0100 tetex-brev (4.19-1) unstable; urgency=low * New upstream v4.19, this time with GPL license. * First upload into Debian (Closes: #177645). * Made new debian/ subdirectory using dh_make. Now build-depends on debhelper. * Updated description. * Changed Section from 'unknown' to 'tex'. * Updated URL to upstream source. * Changed architecture from any to all, as this package isn't platform dependent. * Upgraded standards-version from 3.2.1 to 3.5.8. * Install giro.cls and brev.el too. * Change install location for class from /usr/share/texmf/tex/latex/misc/ to /usr/share/texmf/tex/latex/latex-brev/. * Add postinst script to regenerate the LaTeX index files. * Undo \Letter@Date change in v4.19 to avoid error from latex. -- Petter Reinholdtsen Thu, 23 Jan 2003 00:54:01 +0100 tetex-brev (4.16-1) unstable; urgency=low * Initial release, used by Skolelinux. -- Petter Reinholdtsen Mon, 29 Oct 2001 15:30:48 +0100 tetex-brev-4.22.8/debian/compat0000644000000000000000000000000211335052747013211 0ustar 7 tetex-brev-4.22.8/debian/control0000644000000000000000000000130212227302274013404 0ustar Source: tetex-brev Section: tex Priority: optional Maintainer: Petter Reinholdtsen Build-Depends: debhelper (>= 7.0.50~) , tex-common Build-Depends-Indep: texlive-latex-base, texlive-lang-european | texlive-latex-base (<< 2013.20130918-1), texlive-latex-recommended Standards-Version: 3.9.4 Homepage: https://github.com/asgeirn/brev-cls Package: tetex-brev Architecture: all Depends: ${misc:Depends}, texlive-latex-base, texlive-latex-recommended Description: Norwegian A4 letter style for LaTeX A little LaTeX letter class for personal letters. It is called ``brev'' because that is the Norwegian name for letter, and for avoiding name clashes with the standard LaTeX letter class. tetex-brev-4.22.8/debian/copyright0000644000000000000000000000115212227302274013737 0ustar This package was debianized by Petter Reinholdtsen on Mon, 29 Oct 2001 15:30:48 +0100. It was downloaded from https://github.com/asgeirn/brev-cls Copyright (c) 1999-2013 Asgeir Nilsen Copyright: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. tetex-brev-4.22.8/COPYING0000644000000000000000000004313107613622227011626 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. tetex-brev-4.22.8/giro.cls0000644000000000000000000001465707762476412012261 0ustar % giro.cls,v 1.6 2001/10/29 19:26:05 ambolt Exp % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2 of the License, or % (at your option) any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software % Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA % %% Latex requirement part: \NeedsTeXFormat{LaTeX2e}[1995/12/01] % %% Identification part: % \ProvidesClass{giro}[2001/10/29 19:26:05 v1.6 Klasse for utfylling av giro] % %% Initial code part: % %\newcommand{\name}[1]{\def\fromname{#1}} %\newcommand{\address}[1]{\def\fromaddress{#1}} %\newcommand{\location}[1]{\def\fromlocation{#1}} %\name{} %\address{} %\location{} \def\@mount(#1,#2){\global\def\AmountIP{#1}\global\def\AmountFP{#2}} \newcommand{\amount}[2][]{\global\def\TheAmount{#2}\global\def\AmountCS{#1}\@mount(#2)} \newcommand{\account}[1]{\global\def\fromaccount{#1}} \newcommand{\forfall}[1]{\global\def\Forfall{#1}} \newcommand{\gjelder}[1]{\global\def\Regarding{#1}} \newcommand{\kid}[1]{\global\def\TheKID{#1}} \account{} \def\Letter@Date(#1/#2/#3){% \ifx\@empty#1\ClassWarning{giro}{Invalid date for \protect\LetterDate}\else% \ifx\@empty#2\ClassWarning{giro}{Invalid date for \protect\LetterDate}\else% \ifx\@empty#3\ClassWarning{giro}{Invalid date for \protect\LetterDate}\else% \def\Date@Year{#1}\def\Date@Month{#2}\def\Date@Day{#3}\fi\fi\fi} \newcommand*{\LetterDate}[1]{\Letter@Date(#1)} % %% Package loading part: % %\LoadClassWithOptions{article} \LoadClassWithOptions{letter} %\RequirePackage[latin1]{inputenc} %\RequirePackage[T1]{fontenc} \RequirePackage{ocr} %%% \pagestyle{empty} \newsavebox{\lettercontents} \newlength{\Letter@width} \setlength{\Letter@width}{\paperwidth} \newlength{\Letter@leftmargin} \setlength{\Letter@leftmargin}{\oddsidemargin} %\addtolength{\Letter@leftmargin}{1in} \newlength{\Letter@rightmargin} \setlength{\Letter@rightmargin}{\paperwidth} \addtolength{\Letter@rightmargin}{-1in} \addtolength{\Letter@width}{-\Letter@leftmargin} \addtolength{\Letter@width}{-1in} \newlength{\Letter@top} \setlength{\Letter@top}{\paperheight} \addtolength{\Letter@top}{-75mm} \setlength{\voffset}{0pt} \setlength{\topmargin}{-1in} \setlength{\headheight}{0pt} \setlength{\headsep}{0pt} \setlength{\topskip}{0pt} \setlength{\footskip}{0pt} \setlength{\hoffset}{0pt} \setlength{\parindent}{0pt} \setlength{\oddsidemargin}{-1in} \setlength{\evensidemargin}{-1in} \setlength{\unitlength}{1mm} \setlength{\textwidth}{\paperwidth} \setlength{\textheight}{\paperheight} \newlength{\Letter@toaddress} \newlength{\Letter@fromaddress} \newlength{\middlefoldline} \newlength{\topfoldline} \newlength{\picwidth} \newlength{\picheight} \setlength{\picwidth}{\textwidth} \setlength{\picheight}{\textheight} \setlength{\Letter@toaddress}{\textheight} \addtolength{\Letter@toaddress}{-55mm} \setlength{\Letter@fromaddress}{\textheight} \addtolength{\Letter@fromaddress}{-38mm} \newlength{\Rule@width} \setlength{\Rule@width}{\picwidth} \addtolength{\Rule@width}{-22mm} \divide\Rule@width\unitlength \setlength{\middlefoldline}{\textheight} \divide\middlefoldline by 2 \divide\middlefoldline\unitlength \setlength{\topfoldline}{\textheight} \divide\topfoldline by 3 \multiply\topfoldline by 2 \divide\topfoldline\unitlength \divide\picwidth\unitlength \divide\picheight\unitlength \divide\Letter@leftmargin\unitlength \divide\Letter@rightmargin\unitlength \divide\Letter@top\unitlength \divide\Letter@toaddress\unitlength \divide\Letter@fromaddress\unitlength \newenvironment{giro}[1]% %\begin: {\def\Mottaker{#1} \amount{0,00} \forfall{} \gjelder{} \kid{} \begin{letter}{#1} \begin{picture}(\number\picwidth,\number\picheight) % Brevdel: \put(20,\number\Letter@toaddress){\makebox(0,0)[l]{\begin{minipage}[c][20mm][c]{85mm} #1 \end{minipage}}}% \put(20,\number\Letter@fromaddress){\makebox(0,0)[bl]{\begin{minipage}{\textwidth} \ifx\@empty\fromname % In case you don't use \name \else % \fromname\\ \fi \fromaddress \end{minipage}}}% \put(\number\Letter@rightmargin,\number\Letter@fromaddress){\makebox(0,0)[br]{\begin{minipage}{85mm} \raggedleft\ifx\@empty\fromlocation \else \fromlocation,\ \fi% % In case you don't use \location {\ifx\@empty\Date@Year\else% \def\year{\Date@Year}% \def\month{\Date@Month}% \def\day{\Date@Day}\fi% \@date} \end{minipage}}}% % \put(0,0){\vector(1,0){\number\box@width}}% % \put(0,0){\vector(0,1){\number\box@height}}% \put(15,\number\topfoldline){\makebox(0,0)[cl]{\line(-1,0){20}}}% \put(15,\number\middlefoldline){\makebox(0,0)[cl]{\line(-1,0){20}}}% % Tekst: \begin{lrbox}{\lettercontents}\begin{minipage}{\Letter@width} }% %\end: {% \end{minipage}\end{lrbox} \put(\number\Letter@leftmargin,\number\Letter@top){\makebox(0,0)[tl]{\usebox{\lettercontents}}} \put(11,113){\line(1,0){\number\Rule@width}} \put(11,110){} % Girodel: \put(15,105){\makebox(0,0)[bl]{\textocrb{\fromaccount}}} \put(113,105){\makebox(0,0)[br]{\textocrb{\TheAmount}}} \put(0,21.5){\makebox(0,0)[bl]{\textocrb{H}}} \put(131,21.5){\makebox(0,0)[bl]{\textocrb{\fromaccount}}} \put(70,21.5){\makebox(0,0)[br]{\textocrb{\TheKID}}} \put(182,96){\makebox(0,0){\textocrb{\Forfall}}} \put(102,21.5){\makebox(0,0)[br]{\textocrb{\AmountIP}}} \put(106,21.5){\makebox(0,0)[bl]{\textocrb{\AmountFP}}} \put(119,21.5){\makebox(0,0)[b]{\textocrb{\AmountCS}}} \put(15,65){\makebox(0,0)[tl]{\begin{minipage}[t][22mm][c]{80mm} \texttt{\Mottaker} \end{minipage}}} \put(115,65){\makebox(0,0)[tl]{\begin{minipage}[t][22mm][c]{80mm} \texttt{\ifx\@empty\fromname % In case you don't use \name \else % \fromname\\ \fi \fromaddress} \end{minipage}}} \put(15,95){\makebox(0,0)[tl]{\begin{minipage}[t][22mm][t]{80mm} \texttt{\Regarding} \end{minipage}}} \end{picture} \end{letter} \clearpage} tetex-brev-4.22.8/README0000644000000000000000000000555307762476412011471 0ustar README file for the package brev.cls. brev.cls is a modified letter.cls which formats letters for use with the window envelopes used for A4 format letters. Folding lines for fitting the letter in E65 or C5 envelopes are supplied. It also has options to create mailing labels, using 3x7 (letterpaper) or 3x8 (A4) label sheets. The class supports (and requires!) babel for the caption texts of ``Your ref.'' and ``Our ref.''. Currently, english, norsk, nynorsk, danish and swedish are supplied. Any contributions from other languages are welcome. This directory contains these files: brev.cls The letter class itself demo.dvi A DVI file showing where the different commands place text with this class. eksempel.tex A small example letter to get you started. brev.el An AucTeX style file for creating letters with addresses from BBDB. giro.cls A *very* alpha class for printing out Norwegian F60 "giro" invoices. For special interests only. The class is basically used just like the standard letter.cls, but have some extra features: All of the elements in the header of the first page are placed within separate minipage environments within a picture environment. Because of this, there is a large degree of freedom on what is really put inside the various elements. As an example, the \date{} and \telephone{} commands could include small postscript files for company logos, pictures of the sender and such. The class adds two new commands for adding ``Our ref.'' and ``Your ref.'' to letters. This package has shamelessly stolen the mailing label definitions from Sebastian Rahtz' labels package. The original copyright is within the redefinition of letter.cls' \startlabels at the end of this file. Mr. Rahtz has not supplied an email address in his class file, and I have therefore not asked for permission to do so. If anybody could direct me to his address, the help would very much be appreciated. The author of this class can be contacted at brevcls@asgeirnilsen.com The latest version of this class is available from http://www.asgeirnilsen.com/latex/ This class is Copyright © 1998-2003 Asgeir Nilsen. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA tetex-brev-4.22.8/giro.tex0000644000000000000000000000135310563163416012253 0ustar \documentclass[a4paper]{giro} \usepackage[norsk]{babel} \usepackage[latin1]{inputenc} \usepackage[OT1]{fontenc} \begin{document} \name{Asgeir Nilsen} \address{Vollsveien 133\\\ \\1358\ \ JAR} \location{Øvrevoll} \account{8601 60 60838} \LetterDate{1999/04/16} \begin{giro}{Tore Testesen\\Testeveien 1\\\ \\1234\ \ BYEN} \kid{1234567890} \forfall{17.04.99} \begin{tabular}[t]{lp{8cm}rlrr@{\,}l} \bf Varenr & \bf Tekst & \bf Enh.pris & \bf Enh & \bf Antall & \bf Pris & \\\hline 1234 & Arbeid med ulike saker og ting & 1200,00 & tim & 8,5 & 10200,00 & \\ & Rabatt & & & & 1200,00 & - \\ & Merverdiavgift 23,00 \% & & & & 2346,00 & \\\hline & \bf Sum & & & & \bf 12546,00 \\\hline \end{tabular} \amount[7]{12546,00} \end{giro} \end{document} tetex-brev-4.22.8/Makefile0000644000000000000000000000167410563163416012237 0ustar # Nothing to be done for target 'all'. all: demo.dvi eksempel.dvi clean: $(RM) -f eksempel.log eksempel.aux eksempel.dvi $(RM) -f demo.log demo.aux demo.dvi $(RM) -f .#* debian/.#* tests: ekempel.dvi eksempel.dvi: eksempel.tex brev.cls latex eksempel demo.dvi: demo.tex brev.cls latex demo giro.dvi: giro.tex giro.cls latex giro debs: fakeroot debian/rules binary PACKAGE = tetex-brev DESTDIR = / prefix = /usr/local clsdir = $(DESTDIR)$(prefix)/share/texmf/tex/latex/latex-brev docdir = $(DESTDIR)$(prefix)/share/doc/$(PACKAGE) sitelispdir = $(DESTDIR)$(prefix)/share/emacs/site-lisp install: eksempel.dvi demo.dvi mkdir -p $(clsdir) $(docdir) cp brev.cls giro.cls $(clsdir) cp brev.el $(sitelispdir) cp README eksempel.tex eksempel.dvi demo.tex demo.dvi $(docdir) update-upstream: for f in brev.cls giro.cls eksempel.tex demo.tex brev.el giro.tex ; do \ rm -f $$f ; \ wget http://home.online.no/~asgeinil/latex/$$f ; \ done tetex-brev-4.22.8/brev.cls0000644000000000000000000004002307762476412012241 0ustar % brev.cls,v 4.22 2003/11/18 17:07:55 ambolt Exp % % Copyright © 1999-2003 Asgeir Nilsen . % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2 of the License, or % (at your option) any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software % Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA % % This package has shamelessly stolen the mailing label definitions % from Sebastian Rahtz' and Grant Gustafson's labels package. The % original copyright is within the redefinition of letter.cls' % \startlabels at the end of this file. % % A little letter class for personal letters. It is called ``brev'' % because that is the Norwegian name for letter, and for avoiding name % clashes with the standard LaTeX letter class. % % Note: This class loads the babel package. % Specify the language in the \documentclass command: % \documentclass[norsk,...]{brev} % or % \documentclass[nynorsk,...]{brev} % or % \documentclass[english,...]{brev} % or % \documentclass[american,...]{brev} % % Feel free to add more languages as necessary (and please do inform me) % % This class left-justifies the text (with \raggedright) by default. % To override this, use the `blockadjust' class option. % % The to-address is placed 5.4mm to the left of the left margin of the % letter, to place it correctly with respect to window envelopes. To % disable this, use the 'nowindow' class option. % % This class introduces three new commands: % \yourref{text} Inserts a ``Your ref'' caption with text at an % appropriate place. % \ourref{text} Does the same for ``Our ref''. % \LetterDate{yyyy/mm/dd} This command makes it easier to date a % letter at a fixed date in a babel-compatible % way. If this command is used (and \date is % not), the class will insert the given date % in the default form for the selected % language. % % This class also supports mailing labels via two class options and % two new commands. % The label sheets supported are the ones with 7x3 labels on letter % paper, and 8x3 labels on A4 paper. % % labels Creates mailing labels for the recipient of % each letter environment. To create extra % labels, insert empty letter environments. % returnlabels Creates mailing labels for the return % addresses of each letter environment. % \skiplabels{num} Skips the given number of labels before % starting populating the labels. This is handy % for using the same label sheet several times. % WARNING: If you insert a label sheet with some % of the labels removed, the paper might jam in % your printer. Use with caution! % This command must be given in the preamble. % \labelsheet{dim} Gives the dimensions of the label sheet. % Default is \labelsheet{3x8}, which gives a % sheet with 8 rows with 3 labels each (quite % standard for A4 sheets). % % The special characteristics of this class is the addresses field at % the top of the first page. This one is placed within a 7cm by 8cm % picture element adjusted to the paper edge at the top and 1in from % the paper edge at the left. The recipient address should be placed % within the window of window envelopes, and the sender address above % the window. % Two folding lines is also provided for folding the letter correctly % both in C5 og E65 envelopes. These lines are placed 10.5cm and % 14.8cm from the top edge of the paper. % The class is made and tested with A4 paper, but should be portable % to other dimensions as well. % % This class assumes that the window is placed 40mm from the top edge % of the envelope, 15mm from the left edge and is 95mm wide and 30mm % tall. % % The newest version of this class is always available at % http://www.asgeirnilsen.com/latex/ % % Written by Asgeir Nilsen % With thanks to % Sebastian Rahtz and Grant Gustafson % Dag Langmyhr % Svend Tollak Munkejord % Hans Peter Verne % Harald Hanche-Olsen % Morten Simonsen % Helge Avlesen % Tage Stabell-Kulø % Anders Andersen % Nikolai Langfeldt % Knut Anders Hatlen % Petter Reinholdtsen % Toni Brkic % Dennis Jørgensen % Hans Fredrik Nordhaug % %% Latex requirement part: % \NeedsTeXFormat{LaTeX2e}[1995/12/01] % %% Identification part: % \ProvidesClass{brev}[2003/11/18 17:07:55 v4.22 Class for private letters] % %% Initial code part: % \newlength{\box@width} \newlength{\box@height} \newlength{\half@box} \newlength{\window@top} \newlength{\FIRST@textheight} \newlength{\OLD@textheight} \newlength{\OLD@headsep} \newlength{\to@address} \newcommand*{\ourref}[1]{\def\O@ref{#1}} \newcommand*{\yourref}[1]{\def\Y@ref{#1}} \def\Letter@Date(#1-#2-#3){% \ifx\@empty#1\ClassWarning{brev}{Invalid date for \protect\LetterDate}\else% \ifx\@empty#2\ClassWarning{brev}{Invalid date for \protect\LetterDate}\else% \ifx\@empty#3\ClassWarning{brev}{Invalid date for \protect\LetterDate}\else% \def\Date@Year{#1}\def\Date@Month{#2}\def\Date@Day{#3}\fi\fi\fi} \newcommand*{\LetterDate}[1]{\Letter@Date(#1)} \def\Date@Year{} \ourref{} \yourref{} \def\O@nofoldinglines{} \newif\ifl@bels \newif\ifl@@bels \newif\ifl@@@bels \newif\ifr@gged \l@belsfalse \l@@belsfalse \l@@@belsfalse \r@ggedtrue % %% Options declaration part: % \DeclareOption{returnlabels}{\l@belstrue\l@@@belstrue} \DeclareOption{labels}{\l@belstrue\l@@belstrue} \DeclareOption{blockadjust}{\r@ggedfalse} \DeclareOption{window}{\setlength{\to@address}{-5.4mm}} \DeclareOption{nowindow}{\setlength{\to@address}{0mm}} \DeclareOption{nofoldinglines}{\def\O@nofoldinglines{true}} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}} % %% Options execution part: % \ExecuteOptions{window} \ProcessOptions % %% Package loading part: % \LoadClass{letter} \RequirePackage{babel} % %% Babel part: % \addto\extrasswedish{% \def\captionO@ref{{\small V{\aa}r ref.:}}% \def\captionY@ref{{\small Er ref.:}}% } \addto\extrasnynorsk{% \def\captionO@ref{{\small V{\aa}r ref.:}}% \def\captionY@ref{{\small Dykkar ref.:}}% } \addto\extrasnorsk{% \def\captionO@ref{{\small V{\aa}r ref.:}}% \def\captionY@ref{{\small Deres ref.:}}% } \addto\extrasenglish{% \def\captionO@ref{{\small Our ref.:}}% \def\captionY@ref{{\small Your ref.:}}% } \addto\extrasamerican{% \def\captionO@ref{{\small Our ref.:}}% \def\captionY@ref{{\small Your ref.:}}% } \addto\extrasdanish{% \def\captionO@ref{{\small Vores ref.:}}% \def\captionY@ref{{\small Deres ref.:}}% } % %% Modification part: % \addtolength{\textwidth}{\oddsidemargin} \setlength{\oddsidemargin}{0pt} \addtolength{\textwidth}{\evensidemargin} \setlength{\evensidemargin}{0pt} \setlength{\longindentation}{0pt} \setlength{\FIRST@textheight}{\textheight} \addtolength{\FIRST@textheight}{-85mm} \addtolength{\FIRST@textheight}{1in} \addtolength{\FIRST@textheight}{\topmargin} \setlength{\OLD@textheight}{\textheight} \addtolength{\OLD@textheight}{\headheight} \addtolength{\OLD@textheight}{\headsep} \setlength{\OLD@headsep}{\headsep} \addtolength{\FIRST@textheight}{\topskip} \addtolength{\FIRST@textheight}{\headsep} \global\topskip=0pt \global\headsep=0pt \global\textheight\FIRST@textheight \ifr@gged\raggedright\fi %\def\@texttop{} % % Modify the first page layout: % \def \ps@firstpage{% \setlength\unitlength{1mm}% \setlength\topmargin{-1in} % The 1in space given in the dvi drivers \setlength\box@width{\textwidth}% \divide\box@width\unitlength % This will be the width of the picture % environment \setlength\half@box{\textwidth}% \addtolength\half@box{-8cm} % This is the room left for the % \telephone field without clashing % with the window of the envelope. \setlength{\headheight}{85mm} \setlength\box@height{\headheight} \setlength\window@top{\box@height} \divide\box@height\unitlength \addtolength{\window@top}{-40mm} \divide\window@top\unitlength % \setlength{\headsep}{\OLD@headsep} \divide\to@address\unitlength \def \@evenhead{% \begin{picture}(\number\box@width,\number\box@height)% \put(\number\to@address,\number\window@top){\makebox(0,0)[tl]{\begin{minipage}[c][20mm][c]{85mm} \toname\\ \toaddress \end{minipage}}}% \put(0,55){\makebox(0,0)[bl]{\begin{minipage}{\textwidth} \ifx\@empty\fromname % In case you don't use \name \else % \fromname\\ \fi \fromaddress \end{minipage}}}% \put(\number\box@width,55){\makebox(0,0)[br]{\begin{minipage}{\half@box} \raggedleft\ifx\@empty\fromlocation \else \fromlocation,\ \fi% % In case you don't use \location {\ifx\@empty\Date@Year\else% \def\year{\Date@Year}% \def\month{\Date@Month}% \def\day{\Date@Day}% \fi% \@date} \end{minipage}}}% \ifx\@empty\telephonenum\else % \put(\number\box@width,15){\makebox(0,0)[br]{\begin{minipage}{\half@box} \raggedleft\telephonenum \end{minipage}}}% \fi% \ifx\@empty\Y@ref\else % \put(0,5){\makebox(0,0)[cl]{\captionY@ref\ \Y@ref}}% \fi% \ifx\@empty\O@ref\else % \put(70,5){\makebox(0,0)[cl]{\captionO@ref\ \O@ref}}% \fi% % \put(0,0){\vector(1,0){\number\box@width}}% % \put(0,0){\vector(0,1){\number\box@height}}% % These two folding lines are placed at 10.4mm from the left % edge of the paper, running left way off the edge. \ifx\@empty\O@nofoldinglines \put(-15,-20){\makebox(0,0)[cl]{\line(-1,0){20}}}% \put(-15,-63){\makebox(0,0)[cl]{\line(-1,0){20}}}% \fi% \end{picture}}% \def \@oddhead{\@evenhead}% \def \@oddfoot{% \global\headheight=0pt% \global\headsep=0pt}% \def \@evenfoot{}% } % % Modify layout of other pages: % \def \ps@plain{% \def \@oddhead{}% \def \@evenhead{}% \def \@evenfoot{\normalfont\rmfamily\normalsize\mdseries\upshape\hfil -- \thepage\ --\hfil} \def \@oddfoot{\@evenfoot}% } % % Modify \opening: % \renewcommand{\opening}[1]{% \thispagestyle{firstpage} \global\textheight\OLD@textheight% {#1\par\nobreak}} % % Modify \closing: % \renewcommand{\closing}[1]{\par\nobreak\vspace{5\parskip}% \stopbreaks \noindent \ifx\@empty\fromaddress\else \hspace*{\longindentation}\fi \raggedright \ignorespaces #1\\[6\medskipamount]% \ifx\@empty\fromsig \fromname \else \fromsig \fi\strut \par \global\textheight\FIRST@textheight} % \pagestyle{plain} % % Mailing labels: % \renewcommand*{\startlabels}{\pagestyle{empty}% %% %% This is file `labels.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% labels.dtx (with options: `package') %% Copyright (C) 1993-1994-1995 by Sebastian Rahtz %% All rights reserved. %% %% Permission is granted to to customize the declarations in this file to %% serve the needs of your installation. However, no permission is %% granted to distribute a modified version of this file under its %% original name. %% \def\LabelsFileInfo{1995/06/22\space10} %% File: labels.dtx Copyright (C) 1993-1994-1995 by Sebastian Rahtz %% and Grant Gustafson %% All rights reserved. \newdimen\LeftBorder \newdimen\RightBorder \newdimen\TopBorder \newdimen\BottomBorder \newcount\numberoflabels \newdimen\label@width \newdimen\label@height \newdimen\half@label \newdimen\area@width \newdimen\addr@width \newdimen\LabTmp \newsavebox{\this@label} \newcount\label@number \newcount\skip@labels \newcount\l@so@far \newif\ifLabelGrid \newif\iffirst@label \newif\ifLabelInfo \first@labeltrue \LabelGridfalse \LabelInfofalse \LeftBorder=8mm \RightBorder=8mm \TopBorder=9mm \BottomBorder=2mm \textwidth=\paperwidth \textheight=\paperheight \topmargin=-1in \headheight=0em \headsep=0em \topskip=0em \footskip=0em \oddsidemargin=-1in \evensidemargin=-1in \pagestyle{empty} \parindent=0em \parskip=0pt \def\@LabelSetup{% \global\label@width\textwidth% \global\divide\label@width by\LabelCols% \global\label@height\textheight% \global\advance\label@height by-\TopBorder% \global\advance\label@height by-\BottomBorder% \global\divide\label@height by\LabelRows% \global\topmargin=-1in\global\advance\topmargin by\TopBorder% \global\area@width=\label@width% \global\advance\area@width by -\LeftBorder% \global\advance\area@width by -\RightBorder% \ifLabelGrid% \global\advance\area@width by-2\fboxsep% \global\advance\area@width by-2\fboxrule% \fi% \ifLabelGrid% \global\advance\label@height by-2\fboxsep% \global\advance\label@height by-2\fboxrule% \fi% \global\half@label=\label@height\divide\half@label by2\relax \global\label@number=1\relax } \def\LabelSetup{\@LabelSetup} \numberoflabels=1 \def\sticky@label{\l@so@far=0% \loop\ifnum\l@so@far<\numberoflabels\advance\l@so@far by 1\make@label% \repeat} \def\make@label{% \ifLabelGrid% \let\boxing@type\framebox% \else% \let\boxing@type\makebox% \fi% \settowidth{\LabTmp}{\usebox{\this@label}}% \ifdim\LabTmp=0cm\let\action=\relax\else\let\action=\BuildB@x\fi% \advance\LabTmp by -\area@width% \ifdim\LabTmp>0cm\relax\fi% \settoheight{\LabTmp}% {\begin{tabular}{l}\usebox{\this@label}\end{tabular}}% \advance\LabTmp by -\half@label% \ifdim\LabTmp>0cm\relax% \LabTmp=2\LabTmp\fi% \ifnum\skip@labels<\sk@pped\let\action=\BuildB@x\fi% \action } \def\BuildB@x{% \boxing@type[\label@width][c]{% \rule{0pt}{\label@height}% \raisebox{\half@label}[0pt][0pt]{% \rule{\LeftBorder}{0pt}% \usebox{\this@label}% \rule{\RightBorder}{0pt}% }}% \ifnum\theskiplabels>0\message{x}\else\message{+}\fi% \ifnum\label@number=\LabelCols% \message{|}% \endgraf\nointerlineskip% \global\label@number=1\else\global\advance\label@number by 1\fi% }% % \ifnum\theskiplabels>0 \numberoflabels=\theskiplabels \addresslabel{\rule{0pt}{0pt}} \setcounter{skiplabels}{0} \numberoflabels=1 \fi } % \newcount\@Milli \def\ToMilli#1{\@Milli=#1\advance\@Milli by93225\relax \divide\@Milli by 186450\relax} \newcommand{\genericlabel}[1]{% \iffirst@label\LabelSetup\first@labelfalse\fi% \savebox{\this@label}{#1}\sticky@label\@gobblecr} \long\def\L@dblarg#1{\@ifnextchar[{#1}{\L@xdblarg{#1}}} \long\def\L@xdblarg#1#2{#1[]{#2}} \long\def\addresslabel{\L@dblarg{\@addresslabel}} \long\def\@addresslabel[#1]#2{\genericlabel{#1% \begin{tabular}{@{}p{\area@width}@{}}\raggedright #2\end{tabular}}} \long\def\boxedaddresslabel{\L@dblarg{\@boxedaddresslabel}} \long\def\@boxedaddresslabel[#1]#2{\genericlabel{#1% \addr@width=\area@width\advance\addr@width by-2\fboxsep% \advance\addr@width by-2\fboxrule\fbox{% \begin{tabular}{@{}p{\addr@width}@{}}\raggedright #2\end{tabular}}}} \newcount\sk@pped \newcounter{skiplabels} \def\skiplabels#1{\setcounter{skiplabels}{#1}} % \newcount\LabelCols \newcount\LabelRows \ifdim\paperwidth=210mm\relax% \LabelCols=3\relax\LabelRows=8\relax% a4paper \else \LabelCols=3\relax\LabelRows=7\relax% letterpaper \fi% \def\l@belsheet(#1x#2){\LabelCols=#1\LabelRows=#2} \newcommand{\labelsheet}[1]{\l@belsheet(#1)} % \renewcommand*{\mlabel}[2]{% \ifx#1\@empty\else\addresslabel{#1}\fi \ifl@@bels\addresslabel{#2}\fi} % \ifl@bels\makelabels\fi \ifl@@@bels\renewcommand*{\returnaddress}{\fromname\\\fromaddress}\fi % % End of brev.cls tetex-brev-4.22.8/brev.el0000644000000000000000000002253010044744462012051 0ustar ;;; brev.el - Special code for brev style. ;; $Id: brev.el,v 1.3 2004-05-01 15:58:42 pere Exp $ ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2 of the License, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, write to the Free Software ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ;;; Code: (require 'cl) ; Autoloadings (autoload 'bbdb-completing-read-record "bbdb-com" t nil) (autoload 'bbdb-record-name "bbdb" nil nil) (autoload 'bbdb-record-company "bbdb" nil t) (autoload 'bbdb-record-addresses "bbdb" nil t) (autoload 'tomorrow "ambolt" t nil) (defconst LaTeX-letter-magic "*" "The \`magic\' character being looked for in address locations.") (defconst LaTeX-letter-empty-line (concat "~" TeX-esc TeX-esc) "An \`empty\' line of text.") ;; You may want to define these in ~/.emacs (defcustom LaTeX-letter-attn "Attn.:~" "*Attention label when sending nonpersonal letters to a company" :type '(string)) (defcustom LaTeX-letter-sender-address nil "*Initial value when prompting for a sender address in the letter style." :type '(string)) (defcustom LaTeX-letter-closing nil "*Initial value when prompting for \\closing in the letter style." :type '(string)) (defcustom LaTeX-letter-location nil "*Initial value when prompting for \\location in the letter style." :type '(string)) (defvar LaTeX-letter-point (point-min) "*Initial point position when creating a new letter.") ;(defcustom LaTeX-letter-telephone nil ; "*Initial value when prompting for \\telephone in the letter style.") (defcustom LaTeX-use-bbdb nil "*If non-nil, the Inisidious Big Brother Database is used to find and insert the recipient's address." :type '(boolean)) (TeX-add-style-hook "brev" (function (lambda () (setq LaTeX-default-environment "letter") (LaTeX-add-environments '("letter" LaTeX-env-recipient)) (TeX-add-symbols '("name" "Sender") '("address" "Sender address") '("signature" "Signature") '("location" "Location") '("telephone" "Telephone") '("cc" "Copy recipients") '("encl" "Enclosures") '("yourref" "Your ref.") '("ourref" "Our ref.") '("LetterDate" (TeX-arg-eval read-input "Date: " (LaTeX-today))) '("date" "Date text") '("opening" "Opening") '("closing" "Closing"))))) (defun LaTeX-env-recipient (environment) "Insert ENVIRONMENT and prompt for recipient and address." (let ((sender (read-input "Sender: " (user-full-name))) (sender-address (read-input "Sender address: " LaTeX-letter-sender-address)) (recipient (LaTeX-bbdb-recipient)) (address nil) (signature nil) ;(read-input "Signature: ")) (location (read-input "Location: " LaTeX-letter-location)) (telephone nil) ;(read-input "Telephone: " LaTeX-letter-telephone)) (opening (read-input "Opening: ")) (closing (read-input "Closing: " LaTeX-letter-closing)) (date (read-input "Date: " (LaTeX-today)))) (if (not (zerop (length sender))) (progn (insert TeX-esc "name" TeX-grop sender TeX-grcl) (newline-and-indent))) (if (not (zerop (length sender-address))) (progn (setq LaTeX-letter-sender-address sender-address) (insert TeX-esc "address" TeX-grop sender-address TeX-grcl) (newline-and-indent))) (if (not (zerop (length signature))) (progn (insert TeX-esc "signature" TeX-grop signature TeX-grcl) (newline-and-indent))) (if (not (zerop (length location))) (progn (insert TeX-esc "location" TeX-grop location TeX-grcl) (newline-and-indent))) (if (not (zerop (length telephone))) (progn (insert TeX-esc "telephone" TeX-grop telephone TeX-grcl) (newline-and-indent))) (if (not (zerop (length date))) (progn (insert TeX-esc "LetterDate" TeX-grop date TeX-grcl) (newline-and-indent))) (newline-and-indent) (let ((indentation (current-column)) (auto-fill-function nil)) (LaTeX-insert-environment environment (concat TeX-grop recipient (if (not (zerop (length address))) (concat (if (not (zerop (length recipient))) (concat " " TeX-esc TeX-esc " ")) address)) TeX-grcl)) (save-excursion ; Fix indentation of address (if (search-backward TeX-grcl nil 'move) (let ((addr-end (point-marker))) (if (search-backward TeX-grop nil 'move) (progn (forward-char) (let ((addr-column (current-column))) (insert TeX-esc "large") (newline) (indent-to addr-column) (while (search-forward (concat TeX-esc TeX-esc) (marker-position addr-end) 'move) (progn (newline) (indent-to addr-column))))))))) (insert "\n") (indent-to indentation)) (if (not (zerop (length opening))) (insert TeX-esc "opening" TeX-grop TeX-esc "textbf" TeX-grop opening TeX-grcl TeX-grcl "\n")) (indent-relative-maybe) (save-excursion (if (not (zerop (length closing))) (insert "\n" TeX-esc "closing" TeX-grop closing TeX-grcl "\n")) (indent-relative-maybe)))) (defun LaTeX-today nil "Return a string representing todays date according to flavor." (interactive) (format-time-string "%Y-%m-%d" (current-time))) (defun LaTeX-bbdb-recipient nil "Reads a recipient from either the Inisidious Big Brother Database or the user and returns name and address." (save-window-excursion (let* (;(bbdb-completion-type 'name) (record (and LaTeX-use-bbdb (bbdb-completing-read-record "Recipient (BBDB): "))) (foo (and record (bbdb-display-records-1 record))) (record (and record (car record))) (name (if record (bbdb-record-name record) (read-input "Recipient: "))) (company (and record (bbdb-record-company record))) (address (if (null record) ;; Allow the user to type an address in the ;; minibuffer. This uses BBDB's own address ;; editing capabilites. (let ((addr (make-vector bbdb-address-length nil))) (bbdb-record-edit-address addr "Brev") addr) (let* ((addresses (bbdb-record-addresses record)) (addr-alist (and (listp addresses) (> (length addresses) 0) (mapcar (lambda (l) (append (list (bbdb-address-location l)) l)) addresses))) (completion-ignore-case t) (addr (and addr-alist (completing-read "Recipient address (BBDB): " addr-alist nil t (try-completion LaTeX-letter-magic addr-alist))))) (if addr (cdr (assoc addr addr-alist)) (setq addr (make-vector bbdb-address-length nil)) (bbdb-record-edit-address addr) addr))))) (mapconcat 'identity (append (list (cond ((and company name (bbdb-address-location address) (not (equal (substring (bbdb-address-location address) -1) LaTeX-letter-magic))) (if (y-or-n-p "Personal letter? ") (concat name TeX-esc TeX-esc company) (concat company TeX-esc TeX-esc LaTeX-letter-attn name))) (name name) (t company))) (bbdb-address-streets address) (list (concat TeX-esc " ") (if (> (length (bbdb-address-zip-string address)) 0) (concat (bbdb-address-zip-string address) TeX-esc " " TeX-esc " " (upcase (bbdb-address-city address))) (message "No zip.") (upcase (bbdb-address-city address))))) (concat TeX-esc TeX-esc))))) ;;; brev.el ends here