% \iffalse meta-comment % % Copyright (C) 1999,2000,2001,2002 Paul Thompson % 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 is file `newlfm.dtx'. It provides newlfm.cls, after processing % latex newlfm.ins % It provides the documentation after processing % latex newlfm.dtx % At this time, the documentation is divided into three sections: % a) manual - pp. 1-12 % b) command summary - pp. 13 % c) code - pp. 14-35 % % This is modified from % fax.sty -- John Conover % letter.cls -- LaTeX 2e team % lettre.sty -- D. Megevand % ltrfax.cls -- Paul A. Thompson % % Copyright 1998,1999,2000,2001,2002 Paul A. Thompson % % IMPORTANT NOTICE: % % You are not allowed to change this file. % % If you do change the file, you must change the name. % \fi % % \CheckSum{978} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} % % \iffalse % \section{Identification} % % \askforoverwritefalse % % This document class can only be used with \LaTeXe, so we make % sure that an appropriate message is displayed when another \TeX{} % format is used. % \begin{macrocode} %<+package>\NeedsTeXFormat{LaTeX2e}[1996/06/01] %<+addrset>\NeedsTeXFormat{LaTeX2e}[1996/06/01] % \end{macrocode} % % Announce the Class name and its version. % \begin{macrocode} %<+package>\ProvidesClass{newlfm} %<+addrset>\ProvidesPackage{addrset} %<*driver> \ProvidesFile{newlfm.drv} % %<+package> [2002/3/16 v3.4 %<+package> Letter-Fax-Memo LaTeX Document Class] %<+addrset> [2002/3/16 v3.4 %<+addrset> Address macros] % \end{macrocode} % % \section{The documentation driver file} % % We have our own document class to format the \LaTeXe{} % documentation. % \fi % \changes{v1.0}{1998/11/11}{Final cls file version of newlfm set up. Class % file set as a docstrip file, so that proper documentation could be % maintained with the file. Class file set up to inherit all definitions % from letter.cls, the standard \LaTeX\ letter class. Class file posted to % CTAN 1998/12/01.} % \changes{v1.3}{1999/03/25}{Removed the streamlist and here packages from % the list of required packages. These were not actually used.} % \changes{v1.4}{1999/03/25}{Fixed the timestamp macro, using a fix from % Michael Dritschel, Purdue University. Posted 5/5/99. Viva Las % Revolution!! Viva Mexico!!! Viva Las Cinco de Mayo!!!} % \changes{v1.5}{1999/07/25}{Fixed the Blank macros, enabling the header and % footer information to be properly blanked. Added two macros to print form % letters.} % \changes{v1.6}{1999/07/27}{Fixed the specification of @f@f, which was set % to blank, rather than to 0in. Added specifications for different orders % of the printing of dates, from-block and to-block.} % \changes{v1.7}{1999/09/16}{Added ability to specify different point sizes, % which was not present before. In addition, different paper types are now % able to be specified as well. Bug noted by William Slough, cfwas@eiu.edu, % Department of Mathematics, Eastern Illinois University, Charleston, IL % 61920. Thanks, William!!!} % \changes{v1.8}{1999/09/16}{Many of the options, macros and terms have been % rewritten to a more ``user-friendly'' approach, thanks to a Friendly user, % who is Michael Friendly. Thanks for your suggestion, Mike!!! NOTE TO % PREVIOUS NEWLFM USERS: Some of these changes (space and skip commands) are % not upward compatible.} % \changes{v3.0}{2000/10/30}{Package substantially revised. Items in % wrapper macros are now neutral, rather than ``from'' or ``to'' items. In % that way, the address items are used for storage, not letter preparation. % Two new service macros, {\tt setadrfr} and {\tt setadrto}, convert the % items in the wrapper into either ``from'' or ``to'' items. The % {\tt memosec} command has been revised and simplified. Commands set up % to change terms for the words used in letters. Manual entirely % rewritten.} % \changes{v3.1}{2001/3/01}{Several errors in handling margin items are % fixed. Documentation revised.} % \changes{v3.2}{2001/11/15}{Incorporated all functionality of envlab package % into newlfm. Documentation margins and text width adjusted to something % approximating a nice document. Documentation extensively edited to % incorporate all new commands. Example files edited to display new % functions.} % \changes{v3.4}{2002/3/15}{Allow printing of addresses side-by-side. Fixed up % several small errors. Essentially a minor features upgrade.} % \iffalse % \begin{macrocode} %<*driver> \documentclass{ltxdoc} \textwidth6.5in\oddsidemargin0in \usepackage{geometry,mdwlist} % \end{macrocode} % %\DocInput{multicol,fancyvrb,mdwlist} % % We don't want everything to appear in the index. % \begin{macrocode} \DoNotIndex{\@Alph,\@alph,\@arabic,\@badmath} \DoNotIndex{\@centercr} \DoNotIndex{\@empty,\@ignoretrue} \DoNotIndex{\@ixpt} \DoNotIndex{\@M,\@minus,\@ne,\@plus} \DoNotIndex{\\,\addtolength} \DoNotIndex{\advance} \DoNotIndex{\ast,\begin,\begingroup,\bfseries,\bgroup,\box} \DoNotIndex{\bullet} \DoNotIndex{\cdot,\cr,\day,\DeclareOption} \DoNotIndex{\def,\DocInput,\documentclass} \DoNotIndex{\DoNotIndex,\egroup,\ifx,\else,\fi,\endtrivlist} \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} \DoNotIndex{\endlist,\everycr,\ExecuteOptions} \DoNotIndex{\filedate,\filename,\fileversion} \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} \DoNotIndex{\hsize,\hskip,\hspace,\hss,\ifcase,\or,\fi} \DoNotIndex{\ifvmode,\fi,\ifnum,\fi,\input} \DoNotIndex{\kern,\leavevmode,\let,\leftmark} \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark} \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} \DoNotIndex{\NeedsTeXFormat,\newdimen} \DoNotIndex{\newpage,\nobreak,\noindent,\number} \DoNotIndex{\p@} \DoNotIndex{\pagestyle,\par} \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font} \DoNotIndex{\rightmargin,\rlap,\rmfamily} \DoNotIndex{\setbox,\setcounter,\setlength} \DoNotIndex{\skip,\slshape,\space} \DoNotIndex{\trivlist,\typeout,\tw@} \DoNotIndex{\vskip,\vspace,\year,\z@} % \CodelineNumbered \CodelineIndex \EnableCrossrefs \RecordChanges % \end{macrocode} % Set the \texttt{StandardModuleDepth} counter to 1. % \begin{macrocode} \setcounter{StandardModuleDepth}{1} % \end{macrocode} % Some commonly used abbreviations % \begin{macrocode} \newcommand*{\Lopt}[1]{\textsf {#1}} \newcommand*{\file}[1]{\texttt {#1}} \newcommand*{\Lcount}[1]{\textsl {\small#1}} \newcommand*{\pstyle}[1]{\textsl {#1}} % \end{macrocode} % We also want the full details. % \begin{macrocode} \begin{document} \DocInput{newlfm.dtx} \PrintIndex % ^^A\PrintChanges \end{document} % % \end{macrocode} % \fi % % \iffalse % Copyright (C) 1998 Paul A. Thompson, Ph.D., all rights reserved. % \fi % % \author{Paul A. Thompson, Ph.D.} % % \title{|newlfm.cls| \\ A New Letter, Fax, Memo Document Class for \LaTeX2e{}} % % \newcommand{\rec}{recipient} % \newcommand{\tabr}[1]{Table #1} % \newcommand{\info}{information} % \newcommand{\Info}{Information} % \newcommand{\tabref}[1]{Table \ref{tab:#1}} % \newcommand{\tabpage}[1]{Table \ref{page:#1}} % \newcommand{\mx}[1]{{\ensuremath{#1}}} % \newcounter{mytabs}\setcounter{mytabs}{0} % \newcommand{\tabset}[2]{\vspace*{.0625in} % \addtocounter{mytabs}{1} % \begin{flushleft} % Table \arabic{mytabs}: #2 % \end{flushleft} % \vspace*{-.25in}} % \newcommand{\tabsetx}[3]{\vspace*{.0625in} % \addtocounter{mytabs}{1} \label{tab:#3} % \begin{flushleft} % Table \arabic{mytabs}: #2 % \end{flushleft} % \vspace*{-.025in}} % \hyphenation{Lan-guage lan-guage choi-ces prin-ted de-fi-ni-tion} % % \maketitle % \begin{multicols}{2} % % \tableofcontents % % \newpage % % \section{The {\tt newlfm.cls} class} % \subsection{{\tt newlfm} class functions} % |newlfm| is a {\tt new} {\tt l}etter, {\tt f}ax and {\tt m}emo class. % \begin{itemize*} % \item It defines four classes of letter, three classes of memo and % several options for including fax \info. % \item It considerably enlarges upon the control of a standard letter % offered by the standard letter class. % \item It is fully customizable, offering a class of lengths which % define all distances in the letter. These include all possible % spacings between letter elements at the top, side and bottom of % normal letters. % \item Letterhead \info{} (such as logos, etc., defined as encapsulated % PostScript objects) in several places on the letterhead, and % automatically adjusts the letter characteristics and page dimensions % to accomodate them. % Options are also available which blank the letterhead % \info{} (when the letterhead \info{} is used to set % the margins for the letter). % \item It also offers the option of including a text column on the right % or left margins. This is a frequent component of letterhead % stationary. % \item The user can set up a ``letter database,'' and % import this \info{} easily into letters. % \item Multiple letters can be printed in a ``boilerplate'' approach. % \item Support for several types of address printing onto Avery % labels is included. This enables several types of standard labels % to be easily printed. % \item Full functionality of the |envlab| package is incorporated % into |newlfm|, which further expands the letter-addressing % capabilities of the system. % \end{itemize*} % % \subsection{Using {\tt newlfm}} % |newlfm| ({\itshape new} {\itshape l}etter % {\itshape f}ax {\itshape m}emo class) is a replacement for the \LaTeX\ % |letter| class, and is a class itself. % The general framework of a |newlfm| document is: % \begin{verbatim} % \documentclass{newlfm} % \begin{document} % \begin{newlfm} % text text text % \end{newlfm} % \end{document} % \end{verbatim} % This will result in the production of a % standard letter, on letterpaper, in 10pt type size. % % \newpage % % \section{Available styles} % \subsection{Letter styles} % |newlfm| defines a series of standard letter styles, which can be further % customized these. These styles are defined as options % to the |\documentstyle| command. Letters include the following items: % 1) date, 2) from-address, 3) to-address, 4) opening salutation, 5) % closing salutation, 6) signature, and 7) name and title of signer. % \begin{itemize*} % \item |busletter:| This is a business letter style. Justification: % \begin{itemize*} % \item Date:left \item From-address:left \item To-address:left % \item Opening salutation:left % \item Closing salutation:left \item Signature:left \item Signer name:left % \end{itemize*} % \item|busletternofrom:| This is a business letter style, with no % ``from'' block (as ``from'' information is likely incorporated into % letterhead components). Justification: % \begin{itemize*} % \item Date:left \item From-address:omitted \item To-address:left % \item Opening salutation:left % \item Closing salutation:left \item Signature:left \item Signer name:left % \end{itemize*} % \item|stdletter:| This is a standard letter style, equivalent % to the letter style produced by |letter.cls|. Justification: % \begin{itemize*} % \item Date:right \item From-address:right \item To-address:left % \item Opening salutation:left % \item Closing salutation:right \item Signature:right \item Signer name:right % \end{itemize*} % \item|stdletternofrom:| This is a standard letter style, with % no ``from'' block. Justification: % \begin{itemize*} % \item Date:right \item From-address:omitted \item To-address:left % \item Opening salutation:left % \item Closing salutation:right \item Signature:right \item Signer name:right % \end{itemize*} % \end{itemize*} % % \subsection{Memo styles} % In |newlfm.cls|, the memo \info{} block is defined as follows: % \begin{flushleft} % \begin{tabular}{lll} % To: & J Smith & \today \\ % From: & P A Thom & \\ % Re: & Gnu info & \\ % \end{tabular} % \end{flushleft} % A number of options control whether more \info{} is printed for the % memo, including printing the address, phone number and FAX number of % both the ``from'' and ``to'' persons (after the % name). There are two forms of the memo style. % % \paragraph*{|stdmemo:|} This is the standard memo style. |To:|, |From:| % and |Re:| are printed, with no address, telephone, email or other % information. No salutations are used. % % \paragraph*{|fullmemo:|} This is the full memo style. |To:|, |From:| and % |Re:| are % printed. Address, e-mail, fax and telephone \info{} for both the % ``from'' and ``to'' persons are printed. % % \subsection{FAX cover pages} % A FAX cover page can be used for either the letter or the memo style. This % page shows the page count, time and date of composition, and the addresses % of sender and recipient. In addition, the letter can include a FAX message % in a message line. % % \newpage % % \section{Modifying letters} % \subsection{Information placement} % Although the letter and memo styles define placement of components, % |newlfm| allows the components to be modified. % All options are placed in the ``options'' section of the |documentclass| % statement. The following example illustrates option placement. % \begin{verbatim} % \documentclass[busletter,% % nofromaddress,dateright,% % dvips,dateyes]{newlfm}% % \end{verbatim} % This prints a business letter, with no ``from''-address, and date printed % right-justified. Since some options are contradictory, % the options are executed in the order placed, with the right-most option % of contradictory choices being executed. Long specifications which % cannot nicely fit on a single line should be terminated with the commend % character \verb|%|, which omits spaces in the specification list. % % Memo options are shown in \tabr{1}, letter options in % \tabr{2}, and fax options in \tabr{3}. % % \tabsetx{3}{Memo options}{memoopt} % \label{page:memoo} % \begin{flushleft} % \begin{tabular}{p{1in}l} % \hline % Memo option & |To:| memo block \\ % \hline % |memoaddrto| & Address \\ % |memoemailto| & E-mail \\ % |memophoneto| & Telephone \# \\ % |memopagerto| & Pager \# \\ % |memofaxto| & FAX \# \\ % \hline % Memo option & |From:| memo block \\ % \hline % |memoaddrfrom| & Address \\ % |memoemailfrom| & E-mail \\ % |memopagerfrom| & Pager \# \\ % |memophonefrom| & Telephone \# \\ % |memofaxfrom| & FAX \# \\ % \hline % \end{tabular} % \end{flushleft} % % \tabsetx{3}{FAX options}{faxopt} % \label{page:faxo} % \begin{flushleft} % \begin{tabular}{p{1in}p{1.15in}} % \hline % Option & FAX item \\ % \hline % |faxheaderpage| & Print \\ % |faxhba| & In Rheader \\ % |faxhbb| & In RUheader \\ % |faxblocka| & Block A style \\ % |faxblockb| & Block B style \\ % \hline % \end{tabular} % \end{flushleft} % % \vfill\columnbreak % % \tabsetx{3}{Letter options}{letteropt} % \label{page:lettero} % \begin{flushleft} % \begin{tabular}{p{1in}l} % \hline % Option & ``from-address'' \\ % \hline % |noaddrfrom| & Omit \\ % |printallfrom| & All \\ % |addrfromleft| & Left-justified \\ % |addrfromright| & Right-justified \\ % \hline % Option & ``to-address'' \\ % \hline % |printallto| & All \\ % |addrtoleft| & Left-justified \\ % |addrtoright| & Right-justified \\ % \hline % Option & Date \\ % \hline % |dateright| & Right-justified \\ % |dateleft| & Left-justified \\ % |datecenter| & Centered \\ % |dateno| & Omit \\ % |dateyes| & Print \\ % \hline % Option & Signature \\ % \hline % |sigright| & Right-justified \\ % |sigleft| & Left-justified \\ % |sigcenter| & Centered \\ % \hline % \end{tabular} % \end{flushleft} % % \subsection{Memo block structure} % The default memo block code was shown previously. If an % alternative structure is desired, the user may feel free to hack % the code found in |smemosec.tex|. As |\newlfm| is processed, it % looks for a file |memosec.tex|, and reads the definition in that file % if it is found. Thus, you may alter that file to make changes in the memo % block. To simplify the process, you may wish to 1) set up the main % parameters for |\newlfm| successfully, and 2) alter the code in % |memosec.tex| to look as you wish. Using this approach, you may % find that the alteration process works in a more dependable fashion. No % support for modification of code is able to be offered, unfortunately. % The code for |\memosec| is presented and commented on Page % \pageref{page:memosec}. % % \newpage % % \section{Letter commands} % Information about the names, addresses, telephone numbers and the % other types of data are specified using commands. These are shown here. % \subsection{Addresses} % When writing letters, address \info{} is very important. The commands % for this class of \info{} are shown here. % % \tabsetx{5}{Address item commands}{adrtoc} % \begin{flushleft} % \begin{tabular}{p{1in}l} \hline % Command & Stores ... \\ \hline % |\name| & Name \\ % |\address| & Address \\ % |\position| & Position \\ % |\phone| & Telephone \# \\ % |\phonea| & Telephone \# a \\ % |\phoneb| & Telephone \# b \\ % |\phonec| & Telephone \# c \\ % |\phoned| & Telephone \# d \\ % |\phoneo| & Office \# \\ % |\phoneh| & Home \# \\ % |\fax| & FAX \# \\ % |\email| & E-mail address \\ % |\emailb| & E-mail address b \\ % |\emailc| & E-mail address c \\ % |\regarding| & ``Regarding'' line \\ % |\greet| & Greeting \\ % |\pager| & Pager \# \\ \hline % \end{tabular} % \end{flushleft} % % \subsection{Spacing} % A variety of spaces in the letter may be controlled in |newlfm|, using % the command listed in \tabr{5}. When using these commands, be % careful to use only legitimate space commands, which are defined as a % value-unit string (i.e., 1in, 12pt, 2cm). Default % values are shown in the column headings. % % \vfill\columnbreak % % \label{page:skipc} % \tabsetx{8}{Spacing commands}{spacecom} % \begin{flushleft} % \begin{tabular}{p{.85in}p{1.3in}} \hline % Command & 10pt \\ \hline % |\splmargl| & Page left to left margin block left \\ % |\splmargr| & Left margin block to text left \\ % |\sztmarg| & Top margin size \\ \hline % Command & 20pt \\ \hline % |\spbmarg| & Text bottom to footer \\ % |\sphmarg| & Header block to text \\ \hline % Command & 72pt \\ \hline % |\szrmarg| & Right margin size \\ % |\szlmarg| & Left margin size \\ \hline % Command & 0pt \\ \hline % |\splmargt| & Page top to left margin block top \\ \hline % Command & |\baselineskip| \\ \hline % |\spaftmemo| & After memo block \\ \hline % Command & 2|\baselineskip| \\ \hline % |\spbefdate| & Before date \\ % |\spaftdate| & After date \\ % |\spaftfraddr| & After ``from'' address \\ % |\spbeffraddr| & After ``from'' address \\ % |\spafttoaddr| & After ``to'' address \\ % |\spaftgreet| & After greeting \\ % |\spbefsig| & Before signature \\ \hline % Command & 4|\baselineskip| \\ \hline % |\sigspace| & Signature \\ % Command & |\parskip| \\ \hline % |\spaftsig| & After signature block \\ % |\sppostsig| & Before |Ps|, |Pps|) \\ \hline % \end{tabular} % \end{flushleft} % % These various spaces are used for fine adjustments of % text blocks placement. Most are self-explanatory. For the left margin text block, % |splmargt| sets the space that the left margin block is placed % from the top of the page. By default, the left margin is placed flush % with the bottom of the header section. Any choice here sets the top % of the header block a certain distance from the top of the page. % % \subsection{Phrases} % Letters and memos have certain phrases which identify sections. These % include the terms for ``To'' and ``From'' in the memo, and the phrases % identifying the other sections of letters. These phrases may be modified % using the commands listed here. They are used as: % \begin{verbatim} % \begin{newlfm} % .... % \PhrPhone{Telephone Number} % .... % \end{verbatim} % This term will be used whenever telephone phrases are printed. % \tabsetx{4}{Phrase commands}{phraseopt} % \label{page:lmterms} % \begin{flushleft} % \begin{tabular}{p{.9in}l} % \hline % Command & Use \\ % \hline % |\PhrFAXcovp| & FAX Cover page \\ % |\PhrFAXpgcnt| & FAX Page Count \\ % |\PhrPager| & Pager \\ % |\PhrEmail| & E-mail \\ % |\PhrDocument| & Document\\ % |\PhrPhone| & Telephone \\ % |\PhrRe| & re \\ % |\PhrSubre| & re \\ % |\PhrCc| & cc \\ % |\PhrPs| & ps \\ % |\PhrMessage| & Message \\ % |\PhrPps| & pps \\ % |\PhrPpps| & ppps \\ % |\PhrEncl| & Encl \\ % |\PhrPage| & page \\ % |\PhrTo| & To \\ % |\PhrFrom| & From \\ % |\PhrRegard| & Regarding \\ % \hline % \end{tabular} % \end{flushleft} % % \subsection{Ordering address items} % Usually, date, from-address and to-address are printed % in that order. Other orders that are sometimes used include % from-address, date, to-address and from-address, to-address, date. % Each of these may be set up using ordering options: |orderdatefromto| % sets the standard order of date, from-address, to-address; % |orderfromdateto| sets from-address, date, to-address; and % |orderfromtodate| sets up the order from-address, to-address, date. % % \subsection{Blanking items} % In some cases, the user wishes to use the included graphical objects to % size the header and footer areas, and then not print the objects % {\itshape per se}. For instance, the letter may be printed on letterhead % stock, using the letterhead objects included to size the letter. In that % case, the options shown in \tabr{} are available to blank out the various % parts of the letterhead \info{} after it is used to set margin sizes. % % \tabsetx{4}{Options for blanking}{blankopt} % \label{page:blanks} % \begin{flushleft} % \begin{tabular}{p{.9in}l} % \hline % Option & Blanks ... \\ \hline % |blankheader| & |r,l,cheader| \\ % |blankfooter| & |r,l,cfooter| \\ % |blanklmargin| & |lmargin| \\ % |blankrmargin| & |rmargin| \\ % |Blankheader| & |R,L,Cheader| \\ % |Blankfooter| & |R,L,Cfooter| \\ % |Blanklmargin| & |Lmargin| \\ % |Blankrmargin| & |Rmargin| \\ % |Blankall| & All upper-case \\ % |blankall| & All lower-case \\ % |Blank| & All \\ % \hline % \end{tabular} % \end{flushleft} % % \newpage % % \section{Letterhead tools} % \subsection{Inclusion of logos} % Logos and other \info{}, stored as encapsulated PostScript objects, % can be placed in the header and footer of letters. However, sizing the % resulting letter can be challenging. |newlfm| automatically adjusts % letter dimensions to accomodate the inclusion of such objects, if these % objects are included as boxed text (|\sbox|, |\fbox|, |\parbox|, % |minipage|, etc.). % % Using |fancyhdr.sty| of Piet van Oostrom, |newlfm| handles letterhead % \info{} in a simple and straightforward manner. In |newlfm|, % \info{} for the letterhead page is entered using the % commands shown in \tabr{4}. % % \tabsetx{4}{Letterhead commands}{letterhopt} % \label{page:ltrhdc} % \begin{flushleft} % \begin{tabular}{p{.8in}l} % \hline % Command & Letterhead page \\ % \hline % |\Lfooter| & Left footer \\ % |\Cfooter| & Center footer \\ % |\Rfooter| & Right footer \\ % |\Lheader| & Left header \\ % |\Cheader| & Center header \\ % |\Rheader| & Right header \\ % |\Lmargin| & Left margin \\ % |\Rmargin| & Right margin \\ % \hline % Command & Letter body \\ % \hline % |\lfooter| & Left footer \\ % |\cfooter| & Center footer \\ % |\rfooter| & Right footer \\ % |\lheader| & Left header \\ % |\cheader| & Center header \\ % |\rheader| & Right header \\ % |\lmargin| & Left margin \\ % |\rmargin| & Right margin \\ % \hline % \end{tabular} % \end{flushleft} % % In order to simply use letterhead logos and other PostScript pictorial % \info{} (logos, etc.), the program automatically calculates the % heights of the header and footer and optimally places them on the page. % In order for this to work, {\bfseries \itshape all \info{} for the % header and footer must be included in boxed formats}. That is, to use a % letterhead, logos, pictures, addresses, whatever must be placed in a % box. In addition, the boxed formats % may be included in a wrapper program. % % \subsection{Marginal material} % The left margin may also contain a box of text. This is placed in % |\Lmargin|. The size of this margin is automatically calculated from % the box size. The box is placed a very small distance from the left edge % of the paper (10pt), and the margin gap is set to be 10pt as well. % the future, more fine control will be given for the size of this gap; a % 20pt gap may be used if that option is selected. % % \subsection{Graphical objects} % \paragraph{Inserting graphical objects:} % Use a method of including the graphical object into the document % (i.e., |\includegraphics|). % \paragraph{Check the graphical object:} % Ensure that the graphical object is included correctly. Prior to % attempting to use |newlfm| to print the object, ensure that % |\includegraphics| has printed the \info{} correctly. Using the % |\fbox| specification to allow the box edges to be examined carefully, % print the boxed \info{} to ensure that the object is correctly % specified. If the appearance is appropriate, use the wide range of % options in the |\includegraphics| command, such as |clip|, to make the % object appear as you wish it. % \paragraph{Using the object:} % Use the resulting trimmed, clipped and selected object in one of the % commands for inclusion in a |newlfm| letter or memo. % \paragraph{Usage tip:} % Run \LaTeX{} twice to ensure that dimensions are correctly % interpreted. % % \paragraph{Example use of external object:} % \begin{verbatim} % \newsavebox{\Logob} % \sbox{\Logob}{\parbox[t]{\vdim}% % {\includegraphics[scale=.8]% % {wulogo3.eps}}% % } % \makeaddress{PAT}{% % \name{Paul A. Thompson, Ph.D.}% % \addr{\parbox[b]{2.65in}{ % Washington University % School of Medicine \\ % at Washington University % Medical Center \\ % Box 8067, 660 S. Euclid \\ % St. Louis, MO 63110-1093}} % \phone{(314) 747-3793} % \fax{(314) 362-2693} % \email{paul@wubios.wustl.edu} % } % \makeletterhead{WULHb}{% % \setadrfr{\adrPAT}% % \Lheader{\usebox{\Logob}}% % \Rheader{{\large\bf % Division of Biostatistics}}% % \rheader{\@name@fr}% % \lheader{Page \thepage}% % \Lfooter{\smallform}% % \closeline{Sincerely yours,}% % }% % \end{verbatim} % % The two |makeaddress| specificiations set up wrapper commands which % encapsulate the relevant information. The |\setadrfr| % specification in the example converts the % address information in |\adrPAT| from neutral to ``from-address'' % formats. % % In a letter, this is used as: % \begin{verbatim} % \begin{document} % .... % \lthWULHb % .... % \begin{newlfm} % \end{verbatim} % For this example, the object found in |wulogo3.eps| was boxed up using % the |\sbox| specification. It will be placed in the % left section of the header block for the letterhead page. Prior to using % the |newlfm| specification, the logo was examined to ensure that the logo % is printed exactly as needed. The \verb|\makeaddress| and % \verb|\makeletterhead| wrapper commands are discussed below; these are used % to encapsulate information into an easy-to-use form, and to enable an % address database to be built. % % \newpage % % \section{Letter database} % \subsection{ {\tt letrinfo.tex}} % \Info{} for letters may be stored in a file. The default name of the % file is |letrinfo.tex|. This file % stores \info{} in two ways: unconditionally and conditionally. The % conditional \info{}, such as lists of addresses associated with % names, is stored in ``wrappers'', which carry the \info{} from % the file |letrinfo.tex| to each letter in a simple approach. % % \subsection{Address \info{}} % \label{page:wrapc} % Address \info is stored in an address wrapper, prepared % using the command % \begin{verbatim} % \makeaddress{IDENT}{stuff}. % \end{verbatim} % This makes a wrapper for % addresses, |\adrIDENT|. Commands placed in the wrapper are then carried into % the document when the wrapper command is placed in the letter as: % \begin{verbatim} % \begin{document} % \adrIDENT % \begin{newlfm} % ...... % \end{verbatim} % Note that the wrapper command is placed after |\begin{document}| and % before |\begin{newlfm}|. % All items entered into the |IDENT| wrapper are then activated in that % particular document. This enables \info{} to be centrally stored in the % |letrinfo.tex| file, and used in each actual letter. % % Wrapper commands have two parameters. First, |IDENT| is used to make % a new command, which functions as the a wrapper % identifier. The wrapper makes a command called |\adrIDENT|. % In general, a simple % identifier is best, which could be the initials of the ``to'' party. % Second, the actual items are placed in the second set of braces. % Whatever is placed there is used in the command, and carried along % whenever it is used. % % Commands usually used in address wrapper commands are shown in \tabr{5}. % % This \info{} usually changes from letter to letter. The use of the % |\makeaddress| wrapper enables the \info{} to be handled and used % easily. This information may be used for either the sender or the % addressee for the letter. % % \paragraph{Designating a sender:} To use the address information for % the sender, use the |\setadrfr| command: % \begin{verbatim} % \setadrfr{\adrPAT} % \end{verbatim} % This would set up the information in the |PAT| wrapper to be % placed in the ``from'' blanks of the letter. % \paragraph{Designating a recipient:} To use the address % information for the recipient, use the |\setadrto| command: % \begin{verbatim} % \setadrto{\adrPAT} % \end{verbatim} % This would set up the information in the |PAT| wrapper to be % placed in the ``to'' blanks of the letter. % % \subsection{Letterhead \info{}} % Letterhead \info{} is stored in a letterhead wrapper. The wrapper is % prepared using the command % \begin{verbatim} % \makeletterhead{LIDENT}{stuff} % \end{verbatim} % The wrapper usually contains \info about the header, footer and margin % objects, which are used to set up the letterhead. This wrapper is % used like the |\makeaddress| command. % In many cases, the return address of the letter author is set up in the % letterhead wrapper, because this does not change: % \begin{verbatim} % \makeletterhead{HomeA}{ % \rheader{this} % \setadrfr{\adrPAT} % } % \end{verbatim} % % \subsection{Signature \info{}} % Signature \info{} is stored in an signature wrapper. The wrapper is % prepared using the command % \begin{verbatim} % \makesignature{LIDENT}{stuff} % \end{verbatim} % This wrapper is used like the |\makeaddress| command. % % The information shown in \tabpage{sigsc} is usually included in the % |\makesignature| wrapper. % \tabset{6}{Commands for signature items} % \label{page:sigsc} % \begin{flushleft} % \begin{tabular}{p{.75in}p{1.45in}} \hline % Command & Use \\ \hline % |\signature| & |.epsf| version of signature (boxed) \\ % |\signame| & Printed name \\ % |\closeline| & Letter closing line \\ \hline % \end{tabular} % \end{flushleft} % % Other closing items may be included in the letter itself, in the % file |letrinfo.tex|. These include the following: % % \tabset{6}{Commands for closing information} % \label{page:eolc} % \begin{flushleft} % \begin{tabular}{p{1in}p{1.25in}} \hline % Command & Usage \\ \hline % |\cclist| & Routing list \\ % |\encllist| & Enclosures list \\ % |\initials| & Sender initials \\ % |\faxmssg| & FAX cover message \\ % |\psitem| & Ps line \\ % |\ppsitem| & Pps line \\ % |\pppsitem| & ppps line \\ % |\re| & re line \\ % |\subre| & Second re line \\ \hline % \end{tabular} % \end{flushleft} % % Several types of \info{} are stored in the file |letrinfo.tex|. These % different types of \info{} may be stored in several ways. It may be % stored unconditionally, by placing it into the file |letrinfo.tex|. % \info{}, used in the order listed will be available for all letters. % % Most \info{} is not unconditional, however. For this reason, the \info{} % will almost always be stored in the wrapper commands described above. This % even includes \info{} about the ``from'' person, as this \info{} may % change based on the style of letter, etc. The \info{} may be divided into % three different types, and is thus placed into three types of % wrapper commands. % % \subsection{Setting up wrappers} % \paragraph{File {\tt letrinfo.tex}:} % \begin{verbatim} % \makesignature{PT}{% % \newsavebox{\Signature}% % \sbox{\Sigx}{% % \includegraphics% % [bb=16 9 597 784,% % viewport=180 350 400 425,% % scale=6,height=.6in,% % width=1.375in,clip]% % {sigfile.eps}% % }% % \signature{\usebox{\Sigx}}% % \signame{% % \raisebox{.5in}{\parbox[t]{5in}{% % Paul A. Thompson \\% % Associate Professor \\% % Div. Biostatistics \\% % Washington University% % School of Mecicine}}% % }% % }% % \makeaddress{JS}{% % \name{Joe Smith}% % \address{12 Center Street \\% % Greenville, OH 55555}% % \phone{(312) 333-4444}% % \greet{Dear Joe,}% % }% % \makeaddress{PAT}{% % \name{Paul A. Thompson, Ph.D.}% % \addr{\parbox[b]{2.75in}{% % Washington University% % School of Medicine \\% % at Washington University% % Medical Center \\% % Box 8067, 660 S. Euclid \\% % St. Louis, MO 63110-1093}}% % \phone{(314) 747-3793}% % \fax{(314) 362-2693}% % }% % \newsavebox{\Logob}% % \sbox{\Logob}{\parbox[t]{\vdim}% % {\includegraphics[scale=.8]% % {wulogo3.eps}}}% % \makeletterhead{WULHa}{% % \sigPT% % \Lheader{\usebox{\Logob}}% % \setadrfr{\adrPAT}% % }% % \end{verbatim} % % \paragraph{Use in a letter:} % \begin{verbatim} % \documentclass[american]{newlfm} % \begin{document} % \adrJS \lthWULHa % \begin{newlfm} % ... % \end{newlfm} % \end{document} % \end{verbatim} % % This letter will be addressed to John Smith, using the letterhead stored % in |wulogo3.eps|. The signature is taken from |\sigPT|, which is carried % along with the |\lthWULHa| wrapper. % In this way, the letters can be addressed to John Smith very easily, by % merely including the file |letrinfo.tex| on the \LaTeX{} path, and % including the wrapper as shown above in the file. Although initials for % the recipient need not be used as the wrapper identifier tag, this is % convenient and makes the wrapper designation easy to do. % % The wrapper commands may even be used in a nested fashion. Consider this % sequence: % \begin{verbatim} % \makeaddress{Main}{ % \name{Paul A. Thompson} % \addr{WU School of Medicine} % } % \makeaddress{YouA}{\adrMain % \name{Love A} % \addr{Whereever you are} % } % \makeaddress{YouB}{\adrMain % \name{Love B} % \addr{The White House} % } % \end{verbatim} % % In this case, the \info{} in |adrmain| is carried into the wrappers % |adrYouA| and |adrYouB| and is available there. This resembles the % concept of inheritence in object-oriented programming in some ways. % % \newpage % \section{Miscellaneous topics} % \subsection{Form letters} % The use of the address wrapper commands makes it very easy to set up form % letters. \verb|newlfm| has a simple approach to form letters, using two % commands: % \begin{itemize} % \item \verb|\letterbody|: This command is used to set up the body of the % letter. The body is the text of the letter. When you set up the body, % it is very easy to further customize the letters by setting up commands % within the letter. % \item \verb|\doletter|: This is the command to print the different % letters. The command has a mandatory argument, which is not required to % be any particular thing, but will be usually used to list the name of a % wrapper command. Regardless, the argument is listed in the output before % the use of the \verb|newlfm| environment. % \end{itemize} % % \subsection{Example form letter} % Here is an example of the use of the form-letter commands. In this % example, the two wrapper commands \verb|\adrAA| and \verb|\adrBB| can be % used to address letters which are both the same to the persons listed % in these wrappers: % \begin{verbatim} % \letterbody{This is an example % of a form letter. \tailor % End of the letter.} % \newcommand{\tailor} % {First special version.} % \doletter{\adrAA} % \renewcommand{\tailor} % {Second special version.} % \doletter{\adrBB} % \end{verbatim} % % \subsection{Printing envelopes} % |newlfm| includes a set of commands which invoke the functionality of the % |envlab| package. To use this functionality, follow these steps: % \begin{enumerate*} % \item Ensure that |envlab| is properly installed in your \TeX % installation, and that the installation database has been properly % refreshed. This will ensure that \LaTeX can find the files. % \item Use the option |useenvlab| on the command line: % \begin{verbatim} % \documentclass[useenvlab]{newlfm} % \end{verbatim} % This will issue the |\makelabels| command at the start of the run, issue % the |\startlabels| command at the end of the run, insert the % ``from-address'' and ``to-address'' into appropriate structures for % |envlab| and otherwise complete the printing of the envelope using % internal information. % \item Options which are needed for |envlab| may also be entered into the % \LaTeX command line, just as with any normal use of |envlab| during any \LaTeX. % \end{enumerate*} % % \subsection{Usage tips} % As with any complex program, there are certain tips which can enhance % the use of the program. Here are several. If you come up with new % ones, please forward them to {\tt paul@wubios.wustl.edu}; complete % files demonstrating useful ideas are the most helpful. % % \begin{itemize} % \item The presence of a {\tt geometry.cfg} file which is registered to % your \TeX system can confuse the situation greatly. {\tt newlfm} needs % a pretty clean palatte to work with. Place a empty file named % |geometry.cfg| in the local % subdirectory. % \item In general, the fewer {\tt geometry} setting are used, the % better. Obviously, many users feel a need to set line width and % page height. However, it is better to let other parameters fall out % from {\tt newlfm}'s processing. % \end{itemize} % \end{multicols} % % \newpage % % \newcommand{\pages}[1]{(Page \pageref{page:#1})} % \section{Command Summary} % \begin{verbatim} % \documentstyle[stdletter,memoaddrto,other options]{newlfm} % \begin{document} % \topmargin{.25in} \addrfrom{Paul A. Thompson} other commands % \begin{newlfm} % text text text % \end{newlfm} % \end{document} % \end{verbatim} % % \vspace*{-.125in} % % \begin{raggedright} % \begin{description} % \item {\bf{Letter styles:}} |stdletter|, |stdletternofrom|, |busletter|, % |busletternofrom| % \pages{lettero} % \item {\bf{Letter options:}} |noaddrfrom|, |printallfrom|, |printallto|, % |dateright|, |dateleft|, |datecenter|, |sigright|, % |sigleft|, |sigcenter| \pages{lettero} % \item {\bf{Letter information:}} |\dateset| % \item {\bf{Memo styles:}} |stdmemo|, |fullmemo| \pages{memoo} % \item {\bf{Memo options:}} |memoaddrto|, |memoemailto|, |memophoneto|, % |memofaxto|, |memoaddrfrom|, |memoemailfrom|, |memophonefrom|, % |memofaxfrom|, |memopagerto|, |memopagerfrom| \pages{memoo} % \item {\bf{FAX styles:}} |faxheaderpage|, |faxhba|, |faxhbb|\pages{faxo} % \item {\bf{FAX options:}} |faxblocka|, |faxblockb|\pages{faxo} % \item {\bf{Address item order options:}} |orderdatefromto|, % |orderfromdateto|, |orderfromtodate| % \item {\textbf{\texttt{envlab} options:}} |useenvlab| % \item {\bf{To-Address commands:}} |\nameto|, |\addressto|, |\phoneto|, % |\phonebto|, |\phonecto|, |\phonedto|, |\faxto|, |\emailto|, |\greetto|, % |\setadrto|, |\regarding| % \item {\bf{From-Address commands:}} |\namefrom|, |\name|, |\address|, % |\addrfrom|, |\phone|, |\phonefrom|, |\phonebfrom|, |\phonecfrom|, % |\phonedfrom|, |\fax|, |\faxfrom|, |\emailfrom|, % |\setadrto| % \item {\bf{End of letter commands:}} |\cclist|, |\encllist|, |\initials|, % |\faxmssg|, |\psitem|, |\ppsitem|, |\pppsitem|, |\re|, |\subre| % \pages{eolc} % \item {\bf{Signature commands:}} |\signature|, |\signame|, |\closeline| % \pages{sigsc} % \item {\bf{Space commands:}} |\sztmarg|, |\spbmarg|, % |\sphmarg|, |\sprmarg|, |\szlmarg|, % |\splmargl|, |\splmargr|, |\splmargt|, |\spaftmemo|, |\spbefdate|, % |\spaftdate|, |\spaftfraddr|, |\spbeffraddr|, |\spafttoaddr|, % |\spaftgreet|, |\spbefsig|, |\sigspace|, |\spaftsig|, |\sppostsig|, % \item {\bf{Wrapper commands:}} |\makeaddress{XXX}{xxx info}| creates a % command |\adrXXX| containing the ``xxx info'', % |\makeletterhead{XXX}{stuff}| creates a command |\lthXXX| containing % ``stuff'' and |\makesignature{XXX}{sigstuff}| % creates a command |\sigXXX| with ``sigstuff'' \pages{wrapc}. % |\letterbody| sets the body of a form letter, while |\doletter{zz}| % prints the letter, |zz| is any command to be issued before the % letter, which will usually be a wrapper command name. % \item {\bf{Letterhead commands:}} |\Lfooter|, |\Cfooter|, |\Rfooter|, % |\Lheader|, |\Cheader|, |\Rheader|, |\Lmargin|, |\Rmargin|, % |\lfooter|, |\cfooter|, |\rfooter|, |\lheader|, |\cheader|, % |\rheader|, |\lmargin|, |\rmargin| \pages{ltrhdc} % \item {\bf{Blanking options:}} |blankheader|, |blankfooter|, % |blankrmargin|, |blanklmargin|, |Blankheader|, |Blankfooter|, % |Blankrmargin|, |Blanklmargin|, |blankall|, |Blankall|, % |Blank| % \end{description} % \end{raggedright} % % \newpage % % \StopEventually % % \section{Code} % \begin{macrocode} %<*package> % \end{macrocode} % \subsection{Preliminaries} % In this part we define a few commands that are used later on. % % These commands are used for printing control during debugging. % \begin{macrocode} \newcommand{\ifta}{0}% \newcommand{\iftb}{0}% \newcommand{\txa}[1]{}%\ifthenelse{\ifta=1}{\typeout{#1}}{}}% \newcommand{\txb}[1]{}%\ifthenelse{\iftb=1}{\typeout{#1}}{}}% % \end{macrocode} % These commands are used for printing control during debugging. The % commands |\voffset| is the vertical offset. This can be set if needed. % |\@dt@sk| is a space skipped before the date. |\@marg@left| and % |\@marg@right| are defult space values at the start. Again, these can be % changed if necessary. % \begin{macrocode} \newcommand{\envz}{} \newsavebox{\fba} \setlength{\voffset}{0in}% \newlength{\@blka@b} \newlength{\@blka@a}% \newlength{\@blkb@b} \newlength{\@blkb@a}% \newlength{\@blkc@b} \newlength{\@blkc@a}% \newlength{\@dt@sk@b} \newlength{\@dt@sk@a}% \newlength{\@addr@fr@sk@b} \newlength{\@addr@fr@sk@a}% \newlength{\@addr@to@sk@b} \newlength{\@addr@to@sk@a}% \newlength{\@greet@to@sk@b}\newlength{\@greet@to@sk@a}% \newlength{\@sig@sk@b} \newlength{\@sig@sk@a}% \newlength{\@sig@sp}% \newlength{\@post@sig@sp@a} \newlength{\@post@memo@sp} \newlength{\plz}% \newlength{\pzz}% \newlength{\@marg@left}% \newlength{\@marg@right}% \newlength{\Mwd} \setlength{\Mwd}{0in}% \newlength{\hlhgt}\newlength{\Hhgt}\newlength{\hchgt}\newlength{\hrhgt}% \newlength{\flhgt}\newlength{\Fhgt}\newlength{\fchgt}\newlength{\frhgt}% \newlength{\fldth} \newlength{\fcdth}\newlength{\frdth}% \newlength{\Pwd}% \newsavebox{\SCh}\newsavebox{\SLh}\newsavebox{\SRh}% \newsavebox{\SCf}\newsavebox{\SLf}\newsavebox{\SRf}% \newcommand{\@labname}{,nolines,dateno} \providecommand{\@d@pos}[1]{#1} \providecommand{\@t@pos}[1]{#1} \providecommand{\@f@pos}[1]{#1} \providecommand{\d@pos}[1]{\renewcommand{\@d@pos}{#1}} \providecommand{\t@pos}[1]{\renewcommand{\@t@pos}{#1}} \providecommand{\f@pos}[1]{\renewcommand{\@f@pos}{#1}} % \end{macrocode} % Boolean variables are defined here. Package |ifthen| defines |\newboolean|. % \begin{macrocode} \RequirePackage{ifthen}[1997/11/02]% \newboolean{@addr@fr@l}% \newboolean{@addr@fr@p}% \newboolean{@dt@l} \setboolean{@dt@l}{true}% \newboolean{@dt@c} \setboolean{@dt@c}{false}% \newboolean{@dt@p}% \newboolean{@fax@m@run} \setboolean{@fax@m@run}{false}% \newboolean{@side@by@sidea} \setboolean{@side@by@sidea}{false}% \newboolean{@side@by@sideb} \setboolean{@side@by@sideb}{false}% \newboolean{@greet@p}% \newboolean{@sig@l} \setboolean{@sig@l}{true}% \newboolean{@sig@c} \setboolean{@sig@l}{false}% \newboolean{@use@sig}% \newboolean{@use@sig@nm}% \newboolean{@lang@amer} \setboolean{@lang@amer}{true}% \newboolean{@lang@engl} \setboolean{@lang@engl}{false}% \newboolean{@lang@germ} \setboolean{@lang@germ}{false}% \newboolean{@lang@frnc} \setboolean{@lang@frnc}{false}% \newboolean{@lang@othr} \setboolean{@lang@othr}{false}% \newboolean{@lang@pigl} \setboolean{@lang@pigl}{false}% \newboolean{@marg@flush@top} \setboolean{@marg@flush@top}{false}% \newboolean{@memo@bl}% \newboolean{@memo@a} \newboolean{@memo@b} \setboolean{@memo@b}{false}% \newboolean{@memo@c} \setboolean{@memo@c}{false}% \newboolean{@memo@d} \setboolean{@memo@d}{false}% \newboolean{@memo@e} \setboolean{@memo@e}{true}% \newboolean{@memo@f} \setboolean{@memo@f}{true}% \newboolean{@memo@g} \setboolean{@memo@g}{true}% \newboolean{@memo@h} \setboolean{@memo@h}{false}% \newboolean{@memo@i} \setboolean{@memo@i}{false}% \newboolean{@memo@j} \setboolean{@memo@j}{false}% \newboolean{@memo@k} \setboolean{@memo@k}{false}% \newboolean{@memo@l} \setboolean{@memo@l}{false}% \newboolean{@memo@m} \setboolean{@memo@m}{false}% \newboolean{@memo@n} \setboolean{@memo@n}{false}% \newboolean{@pr@regard} \setboolean{@pr@regard}{false}% \newboolean{@sig@p}% \newboolean{@sig@mp}% \newboolean{@addr@to@l}% \newboolean{@addr@to@p}% \newboolean{@fax@hdr@pg}% \newboolean{@fax@RA}% \newboolean{@fax@RU}% \newboolean{@fax@bla} \setboolean{@fax@bla}{true}% \newboolean{@fax@blb} \setboolean{@fax@blb}{false}% \newboolean{@use@all@fr}% \newboolean{@use@all@to}% \newboolean{@use@envlab} \setboolean{@use@envlab}{false}% \newboolean{@no@cen} \setboolean{@no@cen}{false} \newboolean{@no@space} \setboolean{@no@space}{false} \newboolean{@b@h} \setboolean{@b@h}{false} \newboolean{@b@f} \setboolean{@b@f}{false} \newboolean{@b@r} \setboolean{@b@r}{false} \newboolean{@b@l} \setboolean{@b@l}{false} \newboolean{@B@h} \setboolean{@B@h}{false} \newboolean{@B@f} \setboolean{@B@f}{false} \newboolean{@B@r} \setboolean{@B@r}{false} \newboolean{@B@l} \setboolean{@B@l}{false} % \end{macrocode} % % Options for the newlfm class are declared. % % This macro defines the language for the letter. Language is only very % seldom used, for a few parameters. Basically, the strings defined here % set up the printing of structural elements of a memo or letter, such as % the ``From'' or ``To'' strings. % % These terms are used at various points in printing letters and memos. % They are American terms; your mileage may vary. Inclusion of other % terms is encouraged, especially when another language group is served. % This may be done as follows: % \begin{enumerate} % \item Change the letters ``am'' to either ``fr'' for French, ``gr'' for % German, ``en'' for English, ``ot'' for other or ``pl'' for pig-Latin. If % you feel that I have % unfairly cast disrespect on your language, feel free to add appropriate % code in the section above for your language. Change phrases in the % following terms to the appropriate terms for the language in question: % \begin{verbatim} % \newcommand{\@am@phr}{% % \renewcommand*{\@fax@cover@line}{FAX Cover Page}% % \renewcommand*{\@fax@page@count}{FAX Page Count}% % \renewcommand*{\@fax@phr}{FAX}% % \renewcommand*{\@pager@phr}{Pager}% % \renewcommand*{\@doc@phr}{Document}% % \renewcommand*{\@phn@phr}{Phone}% % \renewcommand*{\@email@phr}{E-mail}% % \renewcommand*{\@re@phr}{Re}% % \renewcommand*{\@subre@phr}{\ensuremath{\mathrm{Re}_2}}% % \renewcommand*{\@cc@phr}{cc}% % \renewcommand*{\@ps@phr}{Ps}% % \renewcommand*{\@m@phr}{Message}% % \renewcommand*{\@pps@phr}{Pps}% % \renewcommand*{\@ppps@phr}{Ppps}% % \renewcommand*{\@encl@phr}{Encl}% % \renewcommand*{\@pager@phr}{Page}% % \renewcommand*{\@hnto@phr}{To}% % \renewcommand*{\@hnfr@phr}{From}% % } % \end{verbatim} % \item Place the resulting code in the file {\tt extracd.tex}. This file % should be placed in the same subdirectory as {\tt newlfm.cls}. When the % program executes, it includes the file if it is found. % \item Use the appropriate option to include the correct code. % \end{enumerate} % \begin{macrocode} \providecommand{\defaultlanguage}{}% \providecommand{\@date@phr}{} \providecommand{\DatePhrase}[1]{}% \providecommand{\@fax@cover@line}{} \providecommand{\PhrFAXcovp}[1]{}% \providecommand{\@fax@page@count}{} \providecommand{\PhrFAXpgcnt}[1]{}% \providecommand{\@email@phr}{} \providecommand{\PhrEmail}[1]{} % \providecommand{\@fax@phr}{} \providecommand{\PhrFax}[1]{}% \providecommand{\@pager@phr}{} \providecommand{\PhrPager}[1]{}% \providecommand{\@doc@phr}{} \providecommand{\PhrDocument}[1]{}% \providecommand{\@phn@phr}{} \providecommand{\PhrPhone}[1]{}% \providecommand{\@re@phr}{} \providecommand{\PhrRe}[1]{}% \providecommand{\@subre@phr}{} \providecommand{\PhrSubre}[1]{}% \providecommand{\@cc@phr}{} \providecommand{\PhrCc}[1]{}% \providecommand{\@ps@phr}{} \providecommand{\PhrPs}[1]{}% \providecommand{\@m@phr}{} \providecommand{\PhrMessage}[1]{}% \providecommand{\@pps@phr}{} \providecommand{\PhrPps}[1]{}% \providecommand{\@ppps@phr}{} \providecommand{\PhrPpps}[1]{}% \providecommand{\@encl@phr}{} \providecommand{\PhrEncl}[1]{}% \providecommand{\@hnto@phr}{} \providecommand{\PhrTo}[1]{}% \providecommand{\@hnfr@phr}{} \providecommand{\PhrFrom}[1]{}% \providecommand{\@am@phr}{}% \providecommand{\@regard@phr}{} \providecommand{\PhrRegard}[1]{}% \renewcommand{\DatePhrase}[1]{\renewcommand{\@date@phr}{#1}}% \renewcommand{\PhrFAXcovp}[1]{\renewcommand{\@fax@cover@line}{#1}}% \renewcommand{\PhrFAXpgcnt}[1]{\renewcommand{\@fax@page@count}{#1}}% \renewcommand{\PhrEmail}[1]{\renewcommand{\@email@phr}{#1}}% \renewcommand{\PhrFax}[1]{\renewcommand{\@fax@phr}{#1}} \renewcommand{\PhrPager}[1]{\renewcommand{\@pager@phr}{#1}}% \renewcommand{\PhrDocument}[1]{\renewcommand{\@doc@phr}{#1}}% \renewcommand{\PhrPhone}[1]{\renewcommand{\@phn@phr}{#1}}% \renewcommand{\PhrRe}[1]{\renewcommand{\@re@phr}{#1}}% \renewcommand{\PhrSubre}[1]{\renewcommand{\@subre@phr}{#1}}% \renewcommand{\PhrCc}[1]{\renewcommand{\@cc@phr}{#1}}% \renewcommand{\PhrPs}[1]{\renewcommand{\@ps@phr}{#1}}% \renewcommand{\PhrMessage}[1]{\renewcommand{\@m@phr}{#1}}% \renewcommand{\PhrPps}[1]{\renewcommand{\@pps@phr}{#1}}% \renewcommand{\PhrPpps}[1]{\renewcommand{\@ppps@phr}{#1}}% \renewcommand{\PhrEncl}[1]{\renewcommand{\@encl@phr}{#1}}% \renewcommand{\PhrTo}[1]{\renewcommand{\@hnto@phr}{#1}}% \renewcommand{\PhrFrom}[1]{\renewcommand{\@hnfr@phr}{#1}}% \renewcommand{\PhrRegard}[1]{\renewcommand{\@regard@phr}{#1}}% \renewcommand{\defaultlanguage}{american}% \renewcommand{\@am@phr}{% \DatePhrase{Date}% \PhrFAXcovp{FAX Cover Page}% \PhrFAXpgcnt{FAX Page Count}% \PhrFax{FAX}% \PhrPager{Pager}% \PhrEmail{E-mail}% \PhrDocument{Document}% \PhrPhone{Telephone}% \PhrRe{Re}% \PhrSubre{\ensuremath{\mathrm{Re}_2}}% \PhrCc{cc}% \PhrPs{Ps}% \PhrMessage{Message}% \PhrPps{Pps}% \PhrPpps{Ppps}% \PhrEncl{Encl}% \PhrPager{Page}% \PhrTo{To}% \PhrFrom{From}% \PhrRegard{Regarding}% } \InputIfFileExists{extracd.tex}% {\typeout{Reading alternative macro definitions from extracd.tex}}% {\typeout{All language information must be in newlfm.cls}}% \DeclareOption{french}{\renewcommand{\defaultlanguage}{french}% \setboolean{@lang@frnc}{true} \@fr@phr}% \DeclareOption{german}{\renewcommand{\defaultlanguage}{german}% \setboolean{@lang@germ}{true} \@gr@phr}% \DeclareOption{american}{\renewcommand{\defaultlanguage}{american}% \setboolean{@lang@amer}{true} \@am@phr}% \DeclareOption{english}{\renewcommand{\defaultlanguage}{english}% \setboolean{@lang@engl}{true} \@en@phr}% \DeclareOption{othlang}{\renewcommand{\defaultlanguage}{othlang}% \setboolean{@lang@othr}{true} \@ot@phr}% \DeclareOption{piglatin}{\renewcommand{\defaultlanguage}{piglatin}% \setboolean{@lang@pigl}{true} \@pl@phr}% % \end{macrocode} % % % \begin{macro}{Memos} % Memo definitions are set up here. % \begin{macrocode} \DeclareOption{stdmemo}{\setboolean{@addr@fr@p}{false} % \setboolean{@addr@to@p}{false} % \setboolean{@memo@bl}{true}% \setboolean{@greet@p}{false}% \setboolean{@dt@l}{false}% \setboolean{@dt@c}{false}% \setboolean{@dt@p}{false}% \setboolean{@sig@p}{false}% \setboolean{@sig@mp}{true}% }% \DeclareOption{addrfrl} {\setboolean{@addr@fr@l}{true}}% \DeclareOption{addrfrr} {\setboolean{@addr@fr@l}{false}}% \DeclareOption{addrtol} {\setboolean{@addr@to@l}{true}}% \DeclareOption{addrtor} {\setboolean{@addr@to@l}{false}}% \DeclareOption{addrfromleft} {\setboolean{@addr@fr@l}{true}}% \DeclareOption{addrfromright}{\setboolean{@addr@fr@l}{false}}% \DeclareOption{addrtoleft} {\setboolean{@addr@to@l}{true}}% \DeclareOption{addrtoright} {\setboolean{@addr@to@l}{false}}% \providecommand{\boxht}[1]{} \providecommand{\boxwd}[1]{} \providecommand{\@boxht}[1]{} \providecommand{\@boxwd}[1]{} \renewcommand{\boxht}[1]{\renewcommand{\@boxht}{#1}} \boxht{1in} \renewcommand{\boxwd}[1]{\renewcommand{\@boxwd}{#1}} \boxwd{2.625in} \DeclareOption{Avery5160} {\renewcommand{\@labname}{,Avery5160,nolines,dateno} \boxht{71pt}\boxwd{2.625in}} \DeclareOption{memoaddrto} {\setboolean{@memo@b}{true}}% \DeclareOption{memoemailto} {\setboolean{@memo@k}{true}}% \DeclareOption{memophoneto} {\setboolean{@memo@c}{true}}% \DeclareOption{memopagerto} {\setboolean{@memo@n}{true}}% \DeclareOption{memofaxto} {\setboolean{@memo@d}{true}}% \DeclareOption{memoaddrfrom} {\setboolean{@memo@h}{true}}% \DeclareOption{memoemailfrom}{\setboolean{@memo@l}{true}}% \DeclareOption{memopagerfrom}{\setboolean{@memo@m}{true}}% \DeclareOption{memophonefrom}{\setboolean{@memo@i}{true}}% \DeclareOption{memofaxfrom} {\setboolean{@memo@j}{true}}% \DeclareOption{memodate} {\setboolean{@dt@p}{true}%\typeout{Setting date} } \DeclareOption{memonoto} {\setboolean{@memo@g}{true}}% \DeclareOption{memonofr} {\setboolean{@memo@e}{true}}% \DeclareOption{memonofrom}% {\setboolean{@memo@e}{true}}% \DeclareOption{memonore}{\setboolean{@memo@f}{true}}% \DeclareOption{fullmemo}{\setboolean{@addr@fr@p}{false} % \setboolean{@addr@to@p}{false} % \setboolean{@memo@bl}{true}% \setboolean{@greet@p}{false}% \setboolean{@dt@l}{false}% \setboolean{@dt@c}{false}% \setboolean{@dt@p}{false}% \setboolean{@sig@p}{false}% \setboolean{@sig@mp}{false}% \setboolean{@memo@b}{true}% \setboolean{@memo@c}{true}% \setboolean{@memo@d}{true}% \setboolean{@memo@h}{true}% \setboolean{@memo@i}{true}% \setboolean{@memo@j}{true}% \setboolean{@memo@k}{true}% \setboolean{@memo@l}{true}% \setboolean{@memo@m}{true}% \setboolean{@memo@n}{true}% }% % \end{macrocode} % \end{macro} % % \begin{macro}{Letters} % Letter definitions. % % \begin{macrocode} \newcommand{\@opt@slr} {\setboolean{@addr@fr@l}{false}% \setboolean{@addr@fr@p}{true}% \setboolean{@addr@to@p}{true}% \setboolean{@dt@p}{true}% \setboolean{@dt@l}{false}% \setboolean{@dt@c}{false}% \setboolean{@greet@p}{true}% \setboolean{@sig@p}{true}% \setboolean{@sig@mp}{false}% \setboolean{@addr@to@l}{true}% \setboolean{@memo@bl}{false}% \setboolean{@dt@l}{false}% \setboolean{@sig@l}{false}% \setboolean{@sig@c}{false}% \d@pos{1}\t@pos{3}\f@pos{2}} \DeclareOption{stdltr} {\@opt@slr} \DeclareOption{stdletter}{\@opt@slr} \newcommand{\@opt@sln} {\setboolean{@addr@fr@l}{false} % \setboolean{@addr@fr@p}{false} % \setboolean{@addr@to@p}{true} % \setboolean{@dt@p}{true}% \setboolean{@dt@l}{false}% \setboolean{@dt@c}{false}% \setboolean{@greet@p}{true}% \setboolean{@sig@p}{true}% \setboolean{@sig@mp}{false}% \setboolean{@addr@to@l}{true} % \setboolean{@memo@bl}{false}% \setboolean{@dt@l}{false}% \setboolean{@sig@l}{false}% \setboolean{@sig@c}{false}% \d@pos{1}\t@pos{3}\f@pos{2}}% \DeclareOption{sltrnf} {\@opt@sln} \DeclareOption{stdletternofrom} {\@opt@sln} \newcommand{\@opt@blr} {\setboolean{@addr@fr@l}{true}% \setboolean{@addr@fr@p}{true}% \setboolean{@memo@bl}{false}% \setboolean{@addr@to@l}{true}% \setboolean{@dt@l}{true}% \setboolean{@dt@c}{false}% \setboolean{@sig@l}{true}% \setboolean{@sig@c}{false}% \setboolean{@sig@p}{true}% \setboolean{@sig@mp}{false}% \d@pos{1}\t@pos{3}\f@pos{2}}% \DeclareOption{busltr} {\@opt@blr} \DeclareOption{busletter} {\@opt@blr} \newcommand{\@opt@bln} {\setboolean{@addr@fr@l}{true}% \setboolean{@addr@fr@p}{false}% \setboolean{@memo@bl}{false}% \setboolean{@addr@to@l}{true}% \setboolean{@dt@l}{true}% \setboolean{@dt@c}{false}% \setboolean{@sig@l}{true}% \setboolean{@sig@p}{true}% \setboolean{@sig@mp}{false}% \setboolean{@sig@c}{false}% \d@pos{1}\t@pos{3}\f@pos{2}}% \DeclareOption{bltrnf} {\@opt@bln} \DeclareOption{busletternofrom} {\@opt@bln} \DeclareOption{orddft} {\d@pos{1}\t@pos{3}\f@pos{2}}% \DeclareOption{ordfdt} {\d@pos{2}\t@pos{3}\f@pos{1}}% \DeclareOption{ordftd} {\d@pos{3}\t@pos{2}\f@pos{1}}% \DeclareOption{orderdatefromto} {\d@pos{1}\t@pos{3}\f@pos{2}}% \DeclareOption{orderfromdateto} {\d@pos{2}\t@pos{3}\f@pos{1}}% \DeclareOption{orderfromtodate} {\d@pos{3}\t@pos{2}\f@pos{1}}% \DeclareOption{sidebyside} {\t@pos{0}\f@pos{0} \ifthenelse{\@d@pos=1}{\setboolean{@side@by@sideb}{true}} {\setboolean{@side@by@sidea}{true}}} % \end{macrocode} % \end{macro} % \begin{macro}{Options} % These options are placed in the options section, in the square brackets % on the |documentclass| line. % \begin{macrocode} \DeclareOption{margflush}% Set right marginal block flush {\setboolean{@marg@flush@top}{true}}%with top of page. \DeclareOption{biggap}% Set the marginal gap between the {\setboolean{@gap@small}{false}}% margin 20pt instead of 10pt. \DeclareOption{noaddrfr}% Do not print from-address. {\setboolean{@addr@fr@p}{false}}% \DeclareOption{noaddrfrom}% Do not print from-address. {\setboolean{@addr@fr@p}{false}}% \DeclareOption{noaddrto}% Do not print to-address. {\setboolean{@addr@to@p}{false}}% \DeclareOption{addrfrno}% Do not print from-address. {\setboolean{@addr@fr@p}{false}}% \DeclareOption{addrtono}% Do not print to-address. {\setboolean{@addr@to@p}{false}}% \DeclareOption{addrfromno}% Do not print from-address. {\setboolean{@addr@fr@p}{false}}% \DeclareOption{faxhp}% Print FAX header page. {\setboolean{@fax@hdr@pg}{true}% \setboolean{@fax@RA}{false}}% \DeclareOption{faxheaderpage}% Print FAX header page. {\setboolean{@fax@hdr@pg}{true}% \setboolean{@fax@RA}{false}}% \DeclareOption{faxhba}% Print fax header block on leader {\setboolean{@fax@RA}{true}% in right top-margin. \setboolean{@fax@hdr@pg}{false}}% \DeclareOption{faxhbb}% Print fax header block on leader {\setboolean{@fax@RU}{true}% in upper right quad of letter \setboolean{@fax@hdr@pg}{false}}% below header, above letter body. \DeclareOption{faxbla}% Print FAX block in \Rheader {\setboolean{@fax@bla}{true}\setboolean{@fax@blb}{false}}% \DeclareOption{faxblb}% {\setboolean{@fax@blb}{true}\setboolean{@fax@bla}{false}}% \DeclareOption{faxblocka}% Print FAX block in \Rheader {\setboolean{@fax@bla}{true}\setboolean{@fax@blb}{false}}% \DeclareOption{faxblockb}% {\setboolean{@fax@blb}{true}\setboolean{@fax@bla}{false}}% \DeclareOption{greetno}% Do not print greeting {\setboolean{@greet@p}{false}}% \DeclareOption{dtright}% Print date right-justified {\setboolean{@dt@l}{false}\setboolean{@dt@c}{false}}% \DeclareOption{dateright}% Print date right-justified {\setboolean{@dt@l}{false}\setboolean{@dt@c}{false}}% \DeclareOption{dateleft}% Print date left-justified {\setboolean{@dt@l}{true}\setboolean{@dt@c}{false}}% \DeclareOption{datecenter}% Print date centered {\setboolean{@dt@l}{false}\setboolean{@dt@c}{true}}% \DeclareOption{dtleft}% Print date left-justified {\setboolean{@dt@l}{true}\setboolean{@dt@c}{false}}% \DeclareOption{dtcenter}% Print date centered {\setboolean{@dt@l}{false}\setboolean{@dt@c}{true}}% \DeclareOption{dateno}% Do not print date {\setboolean{@dt@p}{false}}% \DeclareOption{dateyes}% Print date {\setboolean{@dt@p}{true}}% \DeclareOption{sigright}% Print signature right-justified {\setboolean{@sig@l}{false}\setboolean{@sig@c}{false}} % \DeclareOption{sigleft}% Print signature left-justified {\setboolean{@sig@l}{true}\setboolean{@sig@c}{false}}% \DeclareOption{sigcenter}% Print signature centered {\setboolean{@sig@l}{false}\setboolean{@sig@c}{true}}% \DeclareOption{sigright}% Print signature right-justified {\setboolean{@sig@l}{false}\setboolean{@sig@c}{false}} % \DeclareOption{signatureleft}% Print signature left-justified {\setboolean{@sig@l}{true}\setboolean{@sig@c}{false}}% \DeclareOption{signaturecenter}% Print signature centered {\setboolean{@sig@l}{false}\setboolean{@sig@c}{true}}% \DeclareOption{signatureright}% Print signature right-justified {\setboolean{@sig@l}{false}\setboolean{@sig@c}{false}} % \DeclareOption{sigleft}% Print signature left-justified {\setboolean{@sig@l}{true}\setboolean{@sig@c}{false}}% \DeclareOption{sigcenter}% Print signature centered {\setboolean{@sig@l}{false}\setboolean{@sig@c}{true}}% \DeclareOption{prafr}% Print all from \info. {\setboolean{@use@all@fr}{true}}% \DeclareOption{prato}% Print all to \info. {\setboolean{@use@all@to}{true}}% \DeclareOption{printallfrom}% Print all from \info. {\setboolean{@use@all@fr}{true}}% \DeclareOption{printallto}% Print all to \info. {\setboolean{@use@all@to}{true}}% \DeclareOption{blankheader}{\setboolean{@b@h}{true}}% \DeclareOption{blankfooter}{\setboolean{@b@f}{true}}% \DeclareOption{blanklmargin}{\setboolean{@b@l}{true}}% \DeclareOption{blankrmargin}{\setboolean{@b@r}{true}}% \DeclareOption{blankleftmargin}{\setboolean{@b@l}{true}}% \DeclareOption{blankrightmargin}{\setboolean{@b@r}{true}}% \DeclareOption{Blankheader}{\setboolean{@B@h}{true}}% \DeclareOption{Blankfooter}{\setboolean{@B@f}{true}}% \DeclareOption{Blankleftmargin}{\setboolean{@B@l}{true}}% \DeclareOption{Blankrightmargin}{\setboolean{@B@r}{true}}% \DeclareOption{Blankall}% {\setboolean{@B@f}{true}\setboolean{@B@l}{true}% \setboolean{@B@h}{true}\setboolean{@B@r}{true}}% \DeclareOption{blankall}% {\setboolean{@b@f}{true}\setboolean{@b@l}{true}% \setboolean{@b@h}{true}\setboolean{@b@r}{true}}% \DeclareOption{Blank}% {\setboolean{@B@f}{true}\setboolean{@B@l}{true}% \setboolean{@B@h}{true}\setboolean{@B@r}{true}% \setboolean{@b@f}{true}\setboolean{@b@l}{true}% \setboolean{@b@h}{true}\setboolean{@b@r}{true}}% \DeclareOption{useenvlab}{\setboolean{@use@envlab}{true}}% % \end{macrocode}% % \end{macro} % \subsection{Executing Options} % Here we execute the default options to initialize certain % variables. % \changes{v1.2e}{1994/04/28}{Added execution of `oneside' option} % \begin{macrocode} \ExecuteOptions{letterpaper,stdletter,oneside,final,american,memoa}% % \end{macrocode} % % The |\ProcessOptions| command causes the execution of the code for every % option \Lopt{foo} which is declared and for which the % user typed the \Lopt{foo} option in his |\documentclass| command. % For every option \Lopt{bar} he typed, which is not declared, the % option is assumed to be a global option. All options will be % passed as document options to any |\usepackage| command in the % document preamble. % \begin{macrocode} \ProcessOptions% % \end{macrocode} % Now that all the options have been executed we can load the % existing copy of letter.cls. This will ensure that the various % constructions which work in letters (|\begin{letter}|, etc.) will % continue to work in the class. The newlfm.cls file adds a new class % environment, but does not remove any constructions which % \begin{macrocode} \LoadClassWithOptions{letter}% % \end{macrocode} % Some of the page layout parameters are defined here. Many of the values % for the page layout parameters are set in geometry below. In setting the % values here, we expect that geometry will override a large number of the % values. However, the values must be assigned {\it a prior}. % \begin{macrocode} \setlength{\itemsep}{.2em}% \setlength{\topsep}{.2em}% \setlength{\partopsep}{0\p@}% \setlength{\arraycolsep}{5\p@}% \setlength{\tabcolsep}{6\p@}% \setlength{\arrayrulewidth}{.4\p@}% \setlength{\doublerulesep}{2\p@}% \setlength{\tabbingsep}{\labelsep}% \skip\@mpfootins = \skip\footins% \setlength{\fboxsep}{3\p@}% \setlength{\fboxrule}{.4\p@}% \renewcommand{\theequation}{\@arabic\c@equation}% \renewcommand{\footnoterule}{% \kern-\p@% \hrule \@width .4\columnwidth% \kern .6\p@}% \long\def\@makefntext#1{% \noindent \hangindent 5\p@% \hb@xt@5\p@{\hss\@makefnmark}#1}% % \end{macrocode} % A number of packages are needed by this approach to letter construction. % Some are entered here; |ifthen| is entered earlier. These packages % include the following: % \tabset{8}{Packages used in {\tt newlfm}} % \label{tab:addritms} % \begin{center} % \begin{tabular}{p{.25in}p{1.15in}p{3.00in}} % & |ifthen| & good control over conditional logic --- this actually % was included above so that the boolean constructions % can be used during the class file \\ % & |geometry| & margin and page definition control \\ % & |fancyhdr| & control over header and footer, and several structures % at one time \\ % & |calc| & better arithmatic in the program \\ % & |graphicx| & external handling of graphical \info \\ % \end{tabular} % \end{center} % % \begin{macrocode} \RequirePackage{geometry}[1998/04/08]% \RequirePackage{addrset}% \RequirePackage{fancyhdr}% \IfFileExists{envlab.sty}{\RequirePackage{envlab}}{}% \RequirePackage{chngpage}% \@ifundefined{ps@@empty}{% \ClassError{newlfm}{The version of fancyhdr.sty is not correct and up-to-date. Please obtain a recent copy of fancyhdr.sty (Version 1.99d or later) from CTAN.} {Go to CTAN and download the current version of fancyhdr.sty}}{} \RequirePackage{calc}[1997/11/11]% \RequirePackage{graphicx}[1997/06/09]% % \end{macrocode} % \subsection{{\tt table} and {\tt figure}} % \begin{macro}{table,figure} % Unfortunately table and figure, which are standard article environments, % are not defined in letter. They are added here. % \begin{macrocode} \newcounter{figure} \renewcommand{\thefigure}{\@arabic\c@figure} \providecommand{\figurename}{} \providecommand{\tablename}{} \renewcommand{\figurename}{Figure} \renewcommand{\tablename}{Table} \def\fps@figure{tbp} \def\ftype@figure{1} \def\ext@figure{lof} \def\fnum@figure{\figurename~\thefigure} \newenvironment{figure} {\@float{figure}} {\end@float} \newenvironment{figure*} {\@dblfloat{figure}} {\end@dblfloat} \newcounter{table} \renewcommand\thetable{\@arabic\c@table} \def\fps@table{tbp} \def\ftype@table{2} \def\ext@table{lot} \def\fnum@table{\tablename~\thetable} \newenvironment{table} {\@float{table}} {\end@float} \newenvironment{table*} {\@dblfloat{table}} {\end@dblfloat} \newlength\abovecaptionskip \newlength\belowcaptionskip \setlength\abovecaptionskip{10\p@} \setlength\belowcaptionskip{0\p@} \long\def\@makecaption#1#2{% \vskip\abovecaptionskip \sbox\@tempboxa{#1: #2}% \ifdim \wd\@tempboxa >\hsize #1: #2\par \else \global \@minipagefalse \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip} \newcommand{\section}[1]{{\Large {\bfseries #1}}} % \newenvironment{table}[3]% % {\newcommand{\@capt}{}% % \renewcommand{\caption}[1]{\renewcommand{\@capt}{##1}}% % }% % {% % \begin{center}% % {\bf Table:} \@capt% % \end{center}% % }% % \newenvironment{figure}[3]% % {\newcommand{\@capt}{}% % \renewcommand{\caption}[1]{\renewcommand{\@capt}{##1}}% % }% % {% % \begin{center}% % {\bf Figure:} \@capt% % \end{center}% % }% % \end{macrocode} % \end{macro} % These functions all use various system indicators of time and date to % furnish a time or date value to go on faxes and letters. % \begin{macrocode} \newcommand{\monthname}{% timestamp function \ifcase\month% \or January\or February\or March\or April \or May\or June% \or July\or August\or September\or October \or November\or December% \fi% }% \newcommand{\timestring}{% \begingroup% \count0 = \time \divide\count0 by 60% \count2 = \count0 % the hour% \count4 = \time \multiply\count0 by 60% \advance\count4 by -\count0 % the minute% \ifnum\count4<10 \toks1 = {0} \else \toks1 = {}\fi% \ifnum\count2<12 \toks0 = {A.M.} % \else \toks0 = {P.M.}\advance\count2 by -12\fi% \ifnum\count2=0 \count2 = 12 \fi % make midnight 12% {\number\count2:\the\toks1 \number\count4% \thinspace \the\toks0}% \endgroup% }% \newcommand{\timestamp} {\number\day\space\monthname\space\number\year,\space\timestring}% \newcommand{\datestamp} {\monthname\space\number\day,\space\number\year}% % \end{macrocode} % \begin{macro}{Rules} % These macros set up the width of rules, and whether they are printed. % \begin{macrocode} \newboolean{@hl} \setboolean{@hl}{true} \newboolean{@fl} \setboolean{@fl}{true} \newcommand{\noheadline}{\setboolean{@hl}{false}} \newcommand{\nofootline}{\setboolean{@fl}{false}} \newcommand{\nolines}{\setboolean{@fl}{false}\setboolean{@hl}{false}} \newcommand{\@plhl}{1}\newcommand{\nopheadline} {\renewcommand{\@plhl}{0}}% \newcommand{\@plfl}{1}\newcommand{\nopfootline} {\renewcommand{\@plfl}{0}}% % \end{macrocode} % \end{macro} % \subsection{{\tt fancyhdr} in {\tt newlfm}} % Using fancyhdr (version 1.2v or later), the plain and fancy environments % are set up. The user actually does not control the \info{} using the % standard macros, but rather uses Lfooter for the left footer on the % letterhead and lfooter for the left footer on remaining pages. Thus, the % \info{} is transfered around in a simple manner. % \begin{macrocode} \fancypagestyle{plain}{% \fancyhf{}% \fancyfoot[L]{\@Lfooter}% \fancyfoot[C]{\@Cfooter}% \fancyfoot[R]{\@Rfooter}% \fancyhead[L]{\@Lheader \ifempty{\@LUheader}{} {\vspace*{-.5in} \@LUheader \vspace*{.5in}} }% % section 2 goes here if we go to plan b \fancyhead[R]{\@Rheader \ifempty{\@RUheader}{}{}}% \fancyhead[C]{\@Cheader}% }% % \end{macrocode} % \subsection{Wrapper code} % \begin{macro}{\makelth} % In order to use the program more efficiently, it is possible to set up a % database with addresses, letterhead setups and signature setups in it. % Rather than address placing \info{} about each letter in the letter % in the letter itself, \info{} is placed in the letter database file % and inserted into a letter using the wrapper. % % \begin{enumerate} % \item The file is called letrhead.tex. % \item The file is placed somewhere on the \TeX{} path. % \item In this file, place all addresses, letterhead setups and signature % setups as follows: % \begin{enumerate} % \item in file letrhead.tex, set up a command % |\makelth|{XXX}{ stuff for the letter head} % \item this makes a macro out of the stuff, with the name |\lthXXX| % \item issue the command |\lthXXX| prior to the start of the environment % \item the letterhead structure will then be used in the letter in which % it is called % \item the following commands are generally included in a letterhead % environment: lfooter, cfooter, rfooter, lheader, cheader, rheader, % Lfooter, Cfooter, Rfooter, Lheader, Cheader, Rheader, lmargin, % rmargin, Lmargin, Rmargin % \end{enumerate} % \end{enumerate} % % \begin{macrocode} % %<*addrset> % \end{macrocode} % \begin{macrocode} \newcommand*{\makeletterhead}[2] {\expandafter\newcommand\csname lth#1\endcsname{#2}}% \newcommand*{\makelth}[2] {\expandafter\newcommand\csname lth#1\endcsname{#2}}% % \end{macrocode} % \end{macro} % % \begin{macro}{\makesig} % In this wrapper macro, signature \info{} is associated with a name, % just as described above in the makelth macro. % % \begin{macrocode} \newcommand*{\makesignature}[2] {\expandafter\newcommand\csname sig#1\endcsname{#2}}% \newcommand*{\makesig}[2] {\expandafter\newcommand\csname sig#1\endcsname{#2}}% % \end{macrocode} % \end{macro} % % \begin{macro}{\makeadr} % In this wrapper macro, address \info{} is associated with a name, % just as described above in the makelth macro. This includes macros % such as nameto, phoneto, faxto and other \info{} associated with a % particular addressee. % % \begin{macrocode} \newcommand*{\makeadr}[2] {\expandafter\newcommand\csname adr#1\endcsname{#2}}% \newcommand*{\makeaddress}[2] {\expandafter\newcommand\csname adr#1\endcsname{#2}}% % \end{macrocode} % \end{macro} % \begin{macrocode} % %<*package> % \end{macrocode} % % \subsection{Text placement} % \begin{macro}{Letterhead} % This suite of macro inserts text into a specified place for the fancyhdr % macro to use. This is then later transfered into the footer of the % letterhead page, right side. The remaining macros also do this, as % follows. r, c, l: right, center, left. Header: top of page. Footer: % bottom of page. Capitalized: on letterhead page. Non-capitalized: on % remaining pages. % % In placing \info{} on the letterhead page, special constructions % allow placement {\it under} the top margin and {\it over} the footer % area. These are the macros |\LOfooter|, |\COfooter|, |\ROfooter|, % |\LUheader|, |\CUheader| and |\RUheader|. In the case of |\LOfooter|, % |\COfooter| and |\ROfooter|, the boxed \info{} is placed over the % related footer section, which includes lying over the footer line (if % printed). In the case of |\LUheader|, |\CUheader| and |\RUheader|, the % boxed \info{} is placed under the related header section, which % includes lying under the header line (if printed). When any of these % special purpose sections are used, text length is adjusted as needed. % ({\bfseries NOTE:} Although this is under development, these commands are % not yet functional. % \begin{macrocode} \providecommand{\@Lfooter}{} \providecommand{\@Cfooter}{}% \providecommand{\@Rfooter}{} \providecommand{\@lfooter}{}% \providecommand{\@cfooter}{} \providecommand{\@rfooter}{}% \providecommand{\@LOfooter}{} \providecommand{\@COfooter}{}% \providecommand{\@ROfooter}{} \providecommand{\@Lheader}{}% \providecommand{\@Cheader}{} \providecommand{\@Rheader}{}% \providecommand{\@lheader}{} \providecommand{\@cheader}{}% \providecommand{\@rheader}{} \providecommand{\@LUheader}{}% \providecommand{\@CUheader}{} \providecommand{\@RUheader}{}% \providecommand{\@Rmarg}{} \providecommand{\@Lmarg}{}% \providecommand{\@rmarg}{} \providecommand{\@lmarg}{}% \newcommand*{\Lfooter}[1]{\renewcommand{\@Lfooter}{#1}}% \newcommand*{\Cfooter}[1]{\renewcommand{\@Cfooter}{#1}}% \newcommand*{\Rfooter}[1]{\renewcommand{\@Rfooter}{#1}}% \newcommand*{\LOfooter}[1]{\renewcommand{\@LOfooter}{#1}}% \newcommand*{\COfooter}[1]{\renewcommand{\@COfooter}{#1}}% \newcommand*{\ROfooter}[1]{\renewcommand{\@ROfooter}{#1}}% \newcommand*{\lfooter}[1]{\renewcommand{\@lfooter}{#1}}% \newcommand*{\cfooter}[1]{\renewcommand{\@cfooter}{#1}}% \newcommand*{\rfooter}[1]{\renewcommand{\@rfooter}{#1}}% \Rfooter{} \Cfooter{} \Lfooter{}% \ROfooter{} \COfooter{} \LOfooter{}% \rfooter{} \cfooter{} \lfooter{}% \newcommand*{\Lheader}[1]{\renewcommand{\@Lheader}{#1}}% \newcommand*{\Cheader}[1]{\renewcommand{\@Cheader}{#1}}% \newcommand*{\Rheader}[1]{\renewcommand{\@Rheader}{#1}}% \newcommand*{\LUheader}[1]{\renewcommand{\@LUheader}{#1}}% \newcommand*{\CUheader}[1]{\renewcommand{\@CUheader}{#1}}% \newcommand*{\RUheader}[1]{\renewcommand{\@RUheader}{#1}}% \newcommand*{\lheader}[1]{\renewcommand{\@lheader}{#1}}% \newcommand*{\cheader}[1]{\renewcommand{\@cheader}{#1}}% \newcommand*{\rheader}[1]{\renewcommand{\@rheader}{#1}}% \Rheader{} \Cheader{} \Lheader{}% \RUheader{} \CUheader{} \LUheader{}% \rheader{} \cheader{} \lheader{}% \newcommand*{\Rmargin}[1]{\renewcommand{\@Rmarg}{#1}}% \newcommand*{\Lmargin}[1]{\renewcommand{\@Lmarg}{#1}}% \newcommand*{\rmargin}[1]{\renewcommand{\@rmarg}{#1}}% \newcommand*{\lmargin}[1]{\renewcommand{\@lmarg}{#1}}% \Rmargin{} \Lmargin{} \rmargin{} \lmargin{}% % \end{macrocode} % \end{macro} % \subsection{Memo and fax blocks} % \begin{macro}{\Prnt@Chk} % This is a conditional printing macro. If the boolean in 1 is true, then % go on to print the item. If we are printing the item, the boolean in 2 % tells whether left (true) or right. % \begin{macrocode} \newcommand{\Prnt@Chk}[7]{ \ifthenelse{\boolean{#1}}{\ifempty{#6}{}{ \vspace*{-2\parskip}\vspace*{#6}}}{} \ifthenelse{\boolean{#1}}% {\ifthenelse{\boolean{#2}}{\begin{flushleft}{#4}\end{flushleft}}% {\ifthenelse{\boolean{#3}}% {\begin{center}{#4}\end{center}}% {\begin{flushright}{#4}\end{flushright}}}% }{}% \ifthenelse{\boolean{#1}}{#5}{}% \ifthenelse{\boolean{#1}}{\ifempty{#7}{}% {\vspace*{-2\parskip}\vspace*{#7}}}{}% }% % \end{macrocode} % \end{macro} % \begin{macro}{\fbox{\parbox[t]{1in}{\memosec}}} % \label{page:memosec} % This section defines the text used in printing a normal memo. % This will go at the top of the text block. % % If the user intends to modify the |\memosec| code to provide their % own memo, the code in |smemosec.tex| should be modified. Save % this as file |memosec.tex|, with any desired modification. % % \begin{macrocode} \newcommand{\fixphr}[2]{\strut & \parbox[t]{\the\pc}{#1} #2 \\}% \renewcommand{\ifta}{0} \newcommand{\memosec}{% \renewcommand{\ifta}{0}% \noindent\ignorespaces% \newlength{\pa}\newlength{\pb}% \newlength{\pc}\newlength{\pd}% \settowidth{\pa}{{\large\bf \@hnfr@phr:\hspace*{1.25em}}}% \setlength{\pb}{\textwidth-\pa-.1em}% \settowidth{\pc}{\@phn@phr:\hspace*{2em}}% \settowidth{\pd}{\@fax@phr:\hspace*{2em}}% \ifthenelse{\lengthtest{\pc<\pd}}{\setlength{\pc}{\the\pd}}{}% \settowidth{\pd}{\@pager@phr:\hspace*{2em}} \ifthenelse{\lengthtest{\pc<\pd}}{\setlength{\pc}{\the\pd}}{}% \settowidth{\pd}{\@email@phr:\hspace*{2em}} \ifthenelse{\lengthtest{\pc<\pd}}{\setlength{\pc}{\the\pd}}{}% { \Large \vspace*{-1em}\setlength{\tabcolsep}{0pt}% \setboolean{@memo@a}{false}% \begin{flushleft}% \begin{tabular}{p{\the\pa}l}% \ifthenelse{\boolean{@memo@g}}% {\setboolean{@memo@a}{true}% \strut {\bf \@hnto@phr:} & \@name@to \strut \\% \ifthenelse{\boolean{@memo@b}}% {\strut & \parbox[t]{\the\pb}% {\@addr@to\strut}\strut\\}{}% \ifthenelse{\boolean{@memo@c}}% {\fixphr{\@phn@phr:}{\@phn@to}}{}% \ifthenelse{\boolean{@memo@d}}% {\fixphr{\@fax@phr:}{\@fax@to}}{}% \ifthenelse{\boolean{@memo@n}}% {\fixphr{\@pager@phr:}{\@pager@to}}{}% \ifthenelse{\boolean{@memo@k}}% {\fixphr{\@email@phr:}{\@email@to}}{}% }{}% \ifthenelse{\boolean{@memo@e}} {\setboolean{@memo@a}{true}% \strut {\bf \@hnfr@phr:} &{\@name@fr} \strut \\% \ifthenelse{\boolean{@memo@h}}{\strut & % \parbox[t]{\the\pb}{\@addr@fr \strut} \strut \\}{}% \ifthenelse{\boolean{@memo@i}}% {\fixphr{\@phn@phr:}{\@phn@fr}}{}% \ifthenelse{\boolean{@memo@j}}% {\fixphr{\@fax@phr:}{\@fax@fr}}{}% \ifthenelse{\boolean{@memo@m}}% {\fixphr{\@pager@phr:}{\@pager@fr}}{}% \ifthenelse{\boolean{@memo@l}}% {\fixphr{\@email@phr:}{\@email@fr}}{}% }{}% \ifthenelse{\boolean{@memo@f}}{\setboolean{@memo@a}{true}% \strut {\bf \@re@phr:} & {\@re@line} \\% }{}% \ifthenelse{\boolean{@dt@p}}% {\strut {\bf \@date@phr:} & \@xdate \\}{} \ifthenelse{\boolean{@memo@a}}{\hline}{}% \end{tabular}% \end{flushleft}% }% \vspace*{\@post@memo@sp}\noindent\par% }% \InputIfFileExists{memosec.tex}% {\typeout{Reading {\tt memosec.tex}}}% {\typeout{The default definition for memosec is used.}}% % \end{macrocode} % \end{macro} % \begin{macro}{faxpage} % Here we define a FAX page. This separate stand-along page includes: % \begin{enumerate} % \item the term \@fax@cover@line in Huge text, boxed % \end{enumerate} % % \begin{macrocode} \newlength{\cmndlen}% \newlength{\extrlen}% \newcommand*{\faxpage}{% \newpage\c@page\@ne\interlinepenalty=200% \thispagestyle{empty}% \begin{center}% \framebox{\Huge{\@fax@cover@line}} \\% \vspace*{.5in}% \Large{\@fax@page@count: \ref{totpage}} \\ \vspace*{.5in}% \Large{\timestamp} \\% \rule{\textwidth}{2pt}% \end{center}% \settowidth{\cmndlen}{\LARGE{\@hnto@phr:}}% \settowidth{\extrlen}{\LARGE{\@hnfr@phr:}}% \ifthenelse{\lengthtest{\cmndlen<\extrlen}}% {\setlength{\cmndlen}{\extrlen}}{}% \settowidth{\extrlen}{\LARGE{\@m@phr:}}% \ifthenelse{\lengthtest{\cmndlen<\extrlen}}% {\setlength{\cmndlen}{\extrlen}}{}% \setlength{\extrlen}{\the\textwidth-\the\cmndlen}% \begin{tabular}{p{\the\cmndlen}p{\the\extrlen}}% \LARGE{\@hnto@phr:} & % \parbox[t]{\extrlen}{\@name@to \strut \\ \@addr@to \strut% \ifempty{\@phn@to}{}{\\ \@phn@phr:\space\@phn@to \strut}% \ifempty{\@phnb@to}{}{\\ \@phn@phr:\space\@phnb@to \strut}% \ifempty{\@phnc@to}{}{\\ \@phn@phr:\space\@phnc@to \strut}% \ifempty{\@phnd@to}{}{\\ \@phn@phr:\space\@phnd@to \strut}% \ifempty{\@fax@to}{}{\\ \@fax@phr:\space\@fax@to \strut}} \\% \hline \vspace*{5pt}% \LARGE{\@hnfr@phr:} & \vspace*{5pt}% \parbox[t]{\extrlen}{\@name@fr \strut \\ \@addr@fr \strut %% \ifempty{\@phn@fr}{}{\\ \@phn@phr:\space\@phn@fr \strut}% \ifempty{\@phnb@fr}{}{\\ \@phn@phr:\space\@phnb@fr \strut}% \ifempty{\@phnc@fr}{}{\\ \@phn@phr:\space\@phnc@fr \strut}% \ifempty{\@phnd@fr}{}{\\ \@phn@phr:\space\@phnd@fr \strut}% \ifempty{\@fax@fr}{}{\\ \@fax@phr:\space\@fax@fr \strut}} \\% \hline% \ifempty{\@fax@mssg}{}{ \strut% \LARGE{\@m@phr:} \strut &% \parbox[t]{\extrlen}{\strut \@fax@mssg} \strut \\ \hline}% \end{tabular}% }% \InputIfFileExists{faxpage.tex}% {\typeout{Reading FAX page definitions from faxpage.tex}}% {\typeout{faxpage definitions stored in newlfm.cls}}% \newcommand*{\yaxpage}{% \newpage\c@page\@ne\interlinepenalty=200% \thispagestyle{empty}% \begin{center}% \framebox{\Huge{\@fax@cover@line}} \\% \vspace*{.5in}% \Large{\@fax@page@count: \ref{totpage}} \\ \vspace*{.5in}% \Large{\timestamp} \\% \rule{\textwidth}{2pt}% \end{center}% \settowidth{\cmndlen}{\LARGE{\@hnto@phr:}}% \settowidth{\extrlen}{\LARGE{\@hnfr@phr:}}% \ifthenelse{\lengthtest{\cmndlen<\extrlen}}% {\setlength{\cmndlen}{\extrlen}}{}% \settowidth{\extrlen}{\LARGE{\@m@phr:}}% \ifthenelse{\lengthtest{\cmndlen<\extrlen}}% {\setlength{\cmndlen}{\extrlen}}{}% \setlength{\extrlen}{\the\textwidth-\the\cmndlen}% \begin{tabular}{p{\the\cmndlen}p{\the\extrlen}}% \LARGE{\@hnto@phr:} & % \parbox[t]{\extrlen}{\begin{tabular}{ll}% \multicolumn{2}{l}{\@name@to \strut} \\% \multicolumn{2}{l}{\@addr@to \strut} \\ % \ifpempty{\@phn@to}{} {\@phn@phr: & \@phn@to \\ }% \ifpempty{\@phnb@to}{}{\@phn@phr: & \@phnb@to \\}% \ifpempty{\@phnc@to}{}{\@phn@phr: & \@phnc@to \\}% \ifpempty{\@phnd@to}{}{\@phn@phr: & \@phnd@to \\}% \ifpempty{\@fax@to}{} {\@fax@phr: & \@fax@to \\}\end{tabular}}% \hline \vspace*{5pt}% \LARGE{\@hnfr@phr:} & \vspace*{5pt}% \parbox[t]{\extrlen}{\@name@fr \strut \\ \@addr@fr \strut %% \ifpempty{\@phn@fr}{}{\\ \@phn@phr:\space\@phn@fr \strut}% \ifpempty{\@phnb@fr}{}{\\ \@phn@phr:\space\@phnb@fr \strut}% \ifpempty{\@phnc@fr}{}{\\ \@phn@phr:\space\@phnc@fr \strut}% \ifpempty{\@phnd@fr}{}{\\ \@phn@phr:\space\@phnd@fr \strut}% \ifpempty{\@fax@fr}{}{\\ \@fax@phr:\space\@fax@fr \strut}} \\% \hline% \ifempty{\@fax@mssg}{}{ \strut% \LARGE{\@m@phr:} \strut &% \parbox[t]{\extrlen}{\strut \@fax@mssg} \strut \\ \hline}% \end{tabular}% }% % \end{macrocode} % \end{macro} % \begin{macro}{faxblocka} % Here we define FAX block a. This block is inserted in several places in % the letter, by chosing several letter styles. It can also be inserted in % several blocks by user choice. Fax Block A includes % 1.) name-from, 2.) fax-from, 3.) name-to, 4.) fax-to, and 5.) re-line. % FAX Block A is boxed in a frame. % \begin{macrocode} \newcommand{\faxblocka}{% \sbox{\fba}{% \framebox[2.5in]{\parbox[b]{2.5in}{\setlength{\tabcolsep}{0pt} \begin{tabular}{p{.5in}p{2in}} \multicolumn{2}{l}{\Large \hspace*{.25in} \@fax@phr{} \@doc@phr} \\ \hline \@hnfr@phr:\space & \@name@fr \\ \@fax@phr:\space & \@fax@fr \\ \hline \@hnto@phr:\space & \@name@to \\ \@fax@phr:\space & \@fax@to \\ \hline \@re@phr: & \@re@line \end{tabular}}}}} % \end{macrocode} % \end{macro} % \begin{macro}{faxblockb} % Here we define FAX block b. This block is inserted in several places in % the letter, by chosing several letter styles. It can also be inserted in % several blocks by user choice. Fax Block B includes % 1.) name-from, 2.) fax-from, 3.) phone-from, 4.) name-to, 5.) fax-to, % 6.) phone to, and 7.) re-line. % FAX Block B is boxed in a frame. % \begin{macrocode} \newcommand{\faxblockb}{% {\parbox[t]{\textwidth}{\fbox{% \begin{tabular}{llll}% \@hnfr@phr:\space & \@name@fr & \@hnto@phr:\space & \@name@to \\% \@fax@phr:\space & \@fax@fr & \@fax@phr:\space & \@fax@to \\% \@phn@phr:\space & \@phn@fr & \@phn@phr:\space & \@phn@to \\% \@re@phr: & \multicolumn{3}{l}{\parbox[t]{2in}{\@re@line}} \\% \end{tabular}% }}}}% % \end{macrocode} % \end{macro} % \subsection{Start of letter document} % \begin{macro}{\openlfm} % Begin letter here. First check for left margin boxes; if one has been % specified, set it into the margin, and change the margin spacing % accordingly. After that, the left, right and center under-margin boxes % are checked. If this is a memo, this \info{} is printed next. % Finally, we print (optionally) date, from-address, to-address and opening % salutation. % \begin{macrocode} \newcommand{\ifempty}[3]% {\ifthenelse{\equal{#1}{}}{#2}{#3}}% \newcommand{\ifpempty}[3]% {\ifthenelse{\equal{\protect#1}{}}{#2}{#3}}% \newlength{\addrlen}% \newsavebox{\addrl}% \newlength{\addrmen}% \newsavebox{\addrm}% \newboolean{@greet@l}% \newcommand{\@prnt@sec}[1]{% \ifthenelse{#1=\@d@pos}% {\Prnt@Chk{@dt@p}{@dt@l}{@dt@c}{\@xdate}{}{\@dt@sk@b}{\@dt@sk@a}}% {}% \ifthenelse{#1=\@f@pos}% {\Prnt@Chk{@addr@fr@p}{@addr@fr@l}{@no@cen} {\usebox{\addrl}}{}{\@addr@fr@sk@b}{\@addr@fr@sk@a}}% {}% \ifthenelse{#1=\@t@pos}% {\Prnt@Chk{@addr@to@p}{@addr@to@l}{@no@cen}% {\@name@to \strut \\ \@addr@to \strut}{}{}{\@addr@to@sk@a}}% {}% } \newcounter{@c@pos} \newcommand*{\openlfm}{% \renewcommand{\ifta}{0}% % \@Lmarg% \ifempty{\@Lmarg}{}% {\settowidth{\hchgt}{\@Lmarg}% % \typeout{right:\the\oddsidemargin} % \setlength{\oddsidemargin}{50pt} % \typeout{Here setting Lmarg: \the\hchgt} % \typeout{Margin:\the\marginparwidth} % \typeout{Marginsep:\the\marginparsep} \reversemarginpar% \setlength{\Mwd}{15pt}% \addtolength{\Mwd}{\hchgt}% \addtolength{\Mwd}{-\@lm@top@d} \ifthenelse{\boolean{@marg@flush@top}}% {\marginpar{\vspace*{-\the\Mwd} \@Lmarg}}% {\marginpar{\@Lmarg}}% \setlength{\Mwd}{\hchgt}% \setlength{\@marg@left}{\@lm@sep@l}% }% \ifpempty{\@LUheader}{}{\@LUheader \hfill}% \ifpempty{\@CUheader}{}{\hfill \@CUheader \hfill}% \ifpempty{\@RUheader}{}{\hfill \@RUheader}% % \typeout{Running memosec} \ifthenelse{\boolean{@memo@bl}}% {{\memosec}\setboolean{@dt@p}{false}% \setboolean{@no@space}{true}}% %Memo {}% \sbox{\addrl}{\noindent\setlength{\tabcolsep}{-3pt} \raggedleft\begin{tabular}{l@{}} \noindent\ignorespaces\@addr@fr\end{tabular}}% \settowidth{\addrlen}{\usebox{\addrl}}% \sbox{\addrl}{\noindent\setlength{\tabcolsep}{-3pt} \parbox[t]{\addrlen}{\noindent \begin{tabular}{l@{}} \ignorespaces\@addr@fr\end{tabular}}} \sbox{\addrm}{\noindent\setlength{\tabcolsep}{-3pt} \raggedleft\begin{tabular}{l@{}} \noindent\ignorespaces\@name@to \strut \\ \@addr@to\end{tabular}}% \settowidth{\addrmen}{\usebox{\addrm}}% \sbox{\addrm}{\noindent\setlength{\tabcolsep}{-3pt} \parbox[t]{\addrmen}{\noindent \begin{tabular}{l@{}} \ignorespaces\@name@to \strut \\ \@addr@to\end{tabular}}} \ifthenelse{\boolean{@no@space}}{} {% \ifthenelse{\boolean{@side@by@sidea}} {\par\noindent{\usebox{\addrm} \hfill \usebox{\addrl}}} {}% \setcounter{@c@pos}{1}% \@prnt@sec{\the@c@pos}% \setcounter{@c@pos}{2}% \@prnt@sec{\the@c@pos}% \setcounter{@c@pos}{3}% \@prnt@sec{\the@c@pos}% \ifthenelse{\boolean{@side@by@sideb}} {\par\noindent{\usebox{\addrm} \hfill \usebox{\addrl}}} {}% \setboolean{@greet@l}{true}% \ifthenelse{\boolean{@pr@regard}}{\@regard@phr: \@regard@line}{}% \Prnt@Chk{@greet@p}{@greet@l}{@no@cen}% {\par\@greet@to\par\nobreak}{}{}{\@greet@to@sk@a}% } % }% % \end{macrocode} % \end{macro} % \subsection{Close of document section} % \begin{macro}{closlfm} % In this section, the letter is terminated. Several things happen here: % \begin{enumerate} % \item If signature block is to be printed, it is printed % \item If signature itself is to be printed, it is printed; otherwise, % just skip a reasonable amount of vertical space, to allow document to % be signed % \item If sender name is to be printed, it is printed % \end{enumerate} % \begin{macrocode} \newcommand{\closlfm}{% \renewcommand{\ifta}{0}% \par\nobreak% \vspace*{\@sig@sk@b}% \stopbreaks% \noindent% \hspace*{\longindentation}% \Prnt@Chk{@sig@p}{@sig@l}{@no@cen}% {\parbox{\indentedwidth}{% \ignorespaces \@closeline \hspace*{.01pt} \\% \vspace*{2\parskip}% \ifthenelse{\boolean{@use@sig}}{\@sig@fr}% {\vspace*{\@sig@sp}} \\% \vspace*{2\parskip}% \ifthenelse{\boolean{@use@sig@nm}}{\@sig@nm}{\@name@fr}}% }{}{\@sig@sk@b}{\@sig@sk@a}% }% % \end{macrocode} % \end{macro} % \subsection{Address \info} % \begin{macro}{@post@sig@bl} % This is an internal macro which prints blocks of text after the signature % in a hanging block fashion. % % \begin{macrocode} % \begin{macro}{@post@sig@bl} % \begin{macrocode} \newcommand*{\@post@sig@bl}[2]{% \ifempty{#2}{}{% \par\noindent% \parbox[t]{\textwidth}{% \setlength{\pzz}{\textwidth}% \settowidth{\plz}{{\small\normalfont#1:}}% \addtolength{\pzz}{-\plz} % \@hangfrom{{\small\normalfont#1: }}% \ignorespaces \parbox[t]{\pzz}{{\small#2}}\strut}\par}% \vspace*{\@post@sig@sp@a}% }% % \end{macrocode} % \end{macro} % \begin{macrocode} % %<*addrset> % \end{macrocode} % \begin{macro}{Commands} % These commands are either internal (begin with |@|) or user-optional (do % not begin with |@|). User-optional commands are defined in the text % above. % \begin{macrocode} \providecommand{\@addr}{} \providecommand{\@addr@fr}{}% \providecommand{\@addr@to}{} \providecommand{\@cc@item}{}% \providecommand{\@closeline}{} \providecommand{\@xdate}{}% \providecommand{\@email}{} \providecommand{\@email@fr}{}% \providecommand{\@emailb@fr}{} \providecommand{\@emailc@fr}{}% \providecommand{\@email@to}{} \providecommand{\@emailb}{}% \providecommand{\@emailb@to}{} \providecommand{\@emailc}{}% \providecommand{\@emailc@to}{}% \providecommand{\@encl@item}{}% \providecommand{\@fax}{} \providecommand{\@fax@fr}{}% \providecommand{\@fax@mssg}{} \providecommand{\@fax@to}{}% \providecommand{\@f@f}{} \providecommand{\@greet@fr}{}% \providecommand{\@greet}{} \providecommand{\@greet@to}{}% \providecommand{\@init@item}{} \providecommand{\@pager}{}% \providecommand{\@namev}{} \providecommand{\@name@to}{}% \providecommand{\@name@fr}{} \providecommand{\@pager@to}{}% \providecommand{\@pager@fr}{} \providecommand{\@phn}{}% \providecommand{\@phn@fr}{} \providecommand{\@phn@to}{}% \providecommand{\@phnb}{} \providecommand{\@phnb@fr}{}% \providecommand{\@phna}{} \providecommand{\@pager}{}% \providecommand{\@phnb@to}{} \providecommand{\@phnc}{}% \providecommand{\@phnc@fr}{} \providecommand{\@phnc@to}{}% \providecommand{\@phnd}{} \providecommand{\@phnd@fr}{}% \providecommand{\@phnd@to}{} \providecommand{\@phnh}{}% \providecommand{\@phnh@fr}{} \providecommand{\@phnh@to}{}% \providecommand{\@phno}{} \providecommand{\@phno@fr}{}% \providecommand{\@phno@to}{} \providecommand{\@position}{}% \providecommand{\@ppps@item}{} \providecommand{\@pps@item}{}% \providecommand{\@ps@item}{} \providecommand{\@re@line}{}% \providecommand{\@sender}{} \providecommand{\@sig}{}% \providecommand{\@sig@fr}{} \providecommand{\@sig@nm}{}% \providecommand{\@sig@nm}{} \providecommand{\@sub@re@line}{}% \providecommand{\@top@m}{} \providecommand{\@bot@m}{}% \providecommand{\@head@m}{} \providecommand{\@right@m}{}% \providecommand{\@left@m}{} \providecommand{\@lm@top@d}{}% \providecommand{\@lm@sep@l}{} \providecommand{\@lm@sep@r}{}% \providecommand{\@texttop}{} \providecommand{\@SS@num@to}{}% \providecommand{\@org}{} \providecommand{\@regard@line}{}% \newcommand*{\@refx}[1]{\@post@sig@bl{\@re@phr}{\@re@item}}% \newcommand*{\@subrefx}[1]{\@post@sig@bl{\@sub@re@phr}{\@sub@re@item}}% \providecommand{\addr}{} \renewcommand*{\addr}[1]% {\renewcommand{\@addr}{#1}} \addr{}% \newcommand*{\addrfr}[1]% {\renewcommand{\@addr@fr}{#1}} \addrfr{}% \newcommand*{\addrfrom}[1]% {\renewcommand{\@addr@fr}{#1}} \addrfrom{}% \newcommand*{\addrto}[1]% Address to {\renewcommand{\@addr@to}{#1}} \addrto{}% \newcommand*{\cclist}[1]% List of persons to route letter to {\renewcommand{\@cc@item}{#1}}% \newcommand*{\closeln}[1]% Letter closing line {\renewcommand{\@closeline}{#1}}% \newcommand*{\closeline}[1]% Letter closing line {\renewcommand{\@closeline}{#1}}% \newcommand*{\dateset}[1]% Letter date {\renewcommand{\@xdate}{#1}} \dateset{\today}% \newcommand*{\email}[1]% email from {\renewcommand{\@email}{#1}} \email{}% \newcommand*{\emailb}[1]% email from {\renewcommand{\@emailb}{#1}} \emailb{}% \newcommand*{\emailc}[1]% email to {\renewcommand{\@emailc}{#1}} \emailc{}% \newcommand*{\emailbto}[1]% email to {\renewcommand{\@emailb@to}{#1}} \emailbto{}% \newcommand*{\emailcto}[1]% email to {\renewcommand{\@emailc@to}{#1}} \emailcto{}% \newcommand*{\emailbfr}[1]% email fr {\renewcommand{\@emailb@fr}{#1}} \emailbfr{}% \newcommand*{\emailcfr}[1]% email fr {\renewcommand{\@emailc@fr}{#1}} \emailcfr{}% \newcommand*{\emailfr}[1]% email from {\renewcommand{\@email@fr}{#1}} \emailfr{}% \newcommand*{\emailfrom}[1]% email from {\renewcommand{\@email@fr}{#1}} \emailfrom{}% \newcommand*{\emailto}[1]% email to {\renewcommand{\@email@to}{#1}} \emailto{}% \newcommand*{\encllist}[1]% List of enclosure in letter {\renewcommand{\@encl@item}{#1}}% \newcommand*{\fax}[1]% Fax from {\renewcommand{\@fax}{#1}} \fax{}% \newcommand*{\faxto}[1]% Fax to {\renewcommand{\@fax@to}{#1}} \faxto{}% \newcommand*{\faxfr}[1]% Fax from {\renewcommand{\@fax@fr}{#1}} \faxfr{}% \newcommand*{\faxfrom}[1]% Fax from {\renewcommand{\@fax@fr}{#1}} \faxfrom{}% \newcommand*{\faxmssg}[1]% Fax message {\renewcommand{\@fax@mssg}{#1}}% \newcommand*{\initials}[1]% Initials of actual letter writer {\renewcommand{\@init@item}{#1}}% \newcommand*{\organization}[1]% {\renewcommand{\@org}{#1}} \organization{} \newcommand*{\pager}[1]% Pager number to {\renewcommand{\@pager}{#1}} \pager{}% \newcommand*{\pagerto}[1]% Pager number to {\renewcommand{\@pager@to}{#1}} \pagerto{}% \newcommand*{\pagerfrom}[1]% Pager number from {\renewcommand{\@pager@fr}{#1}} \pagerfrom{}% \newcommand*{\pagerfr}[1]% Pager number from {\renewcommand{\@pager@fr}{#1}} \pagerfr{}% \newcommand*{\phone}[1]% Phone {\renewcommand{\@phn}{#1}} \phone{}% \newcommand*{\phonea}[1]% Phone {\renewcommand{\@phna}{#1}} \phonea{}% \newcommand*{\phoneb}[1]% Phone {\renewcommand{\@phnb}{#1}} \phoneb{}% \newcommand*{\phonec}[1]% Phone {\renewcommand{\@phnc}{#1}} \phonec{}% \newcommand*{\phoned}[1]% Phone {\renewcommand{\@phnd}{#1}} \phoned{}% \newcommand*{\phoneo}[1]% Phone {\renewcommand{\@phno}{#1}} \phoneo{}% \newcommand*{\phoneh}[1]% Phone {\renewcommand{\@phnh}{#1}} \phoneh{}% \newcommand*{\phonefr}[1]% Phone from {\renewcommand{\@phn@fr}{#1}} \phonefr{}% \newcommand*{\phonefrom}[1]% Phone from {\renewcommand{\@phn@fr}{#1}} \phonefrom{}% \newcommand*{\phoneafrom}[1]% Phone from {\renewcommand{\@phn@fr}{#1}} \phoneafrom{}% \newcommand*{\phoneafr}[1]% Phone from {\renewcommand{\@phn@fr}{#1}} \phoneafrom{}% \newcommand*{\phonebfrom}[1]% Phone from {\renewcommand{\@phnb@fr}{#1}} \phonebfrom{}% \newcommand*{\phonecfrom}[1]% Phone from {\renewcommand{\@phnc@fr}{#1}} \phonecfrom{}% \newcommand*{\phonedfrom}[1]% Phone from {\renewcommand{\@phnd@fr}{#1}} \phonedfrom{}% \newcommand*{\phonebfr}[1]% Phone from {\renewcommand{\@phnb@fr}{#1}} \phonebfrom{}% \newcommand*{\phonecfr}[1]% Phone from {\renewcommand{\@phnc@fr}{#1}} \phonecfrom{}% \newcommand*{\phonedfr}[1]% Phone from {\renewcommand{\@phnd@fr}{#1}} \phonedfrom{}% \newcommand*{\phoneto}[1]% Phone to {\renewcommand{\@phn@to}{#1}} \phoneto{}% \newcommand*{\phoneoto}[1]% Phone to {\renewcommand{\@phno@to}{#1}} \phoneoto{}% \newcommand*{\phonehfr}[1]% Phone to {\renewcommand{\@phnh@fr}{#1}} \phonehfr{}% \newcommand*{\phoneofr}[1]% Phone to {\renewcommand{\@phno@fr}{#1}} \phoneofr{}% \newcommand*{\phonehto}[1]% Phone to {\renewcommand{\@phnh@to}{#1}} \phonehto{}% \newcommand*{\phoneato}[1]% Phone to {\renewcommand{\@phn@to}{#1}} \phoneto{}% \newcommand*{\phonebto}[1]% Phone to {\renewcommand{\@phnb@to}{#1}} \phonebto{}% \newcommand*{\phonecto}[1]% Phone to {\renewcommand{\@phnc@to}{#1}} \phonecto{}% \newcommand*{\phonedto}[1]% Phone to {\renewcommand{\@phnd@to}{#1}} \phonedto{}% \newcommand*{\position}[1]% {\renewcommand{\@position}{#1}} \position{} \newcommand*{\ppsitem}[1]% Post-post-script message {\renewcommand{\@pps@item}{#1}}% \newcommand*{\pppsitem}[1]% Post-post-post-script message {\renewcommand{\@ppps@item}{#1}}% \newcommand*{\psitem}[1]% Post-script message {\renewcommand{\@ps@item}{#1}}% \newcommand*{\re}[1]% re-line - used in various places {\renewcommand{\@re@line}{#1}}% \newcommand*{\regarding}[1]% regarding line {\renewcommand{\@regard@line}{#1}\setboolean{@pr@regard}{true}}% \newcommand*{\sender}[1]% Fax author name {\renewcommand{\@sender}{#1}} \sender{}% \newcommand*{\subre}[1]% Secondary re line {\renewcommand{\@sub@re@line}{#1}}\subre{}% \newcommand*{\greet}[1]% {\renewcommand{\@greet}{#1}} \greet{}% \newcommand*{\greetto}[1]% {\renewcommand{\@greet@to}{#1}} \greetto{}% \newcommand*{\greetfr}[1]% {\renewcommand{\@greet@fr}{#1}} \greetfr{}% \providecommand{\name}{} \renewcommand*{\name}[1]% {\renewcommand{\@namev}{#1}} \name{}% \newcommand*{\namefr}[1]% {\renewcommand{\@name@fr}{#1}} \namefr{}% \newcommand*{\namefrom}[1]% {\renewcommand{\@name@fr}{#1}} \namefrom{}% \newcommand*{\nameto}[1]% {\renewcommand{\@name@to}{#1}} \nameto{}% \newcommand*{\SSnumto}[1]% {\renewcommand{\@SS@num@to}{#1}} \SSnumto{}% \newcommand*{\plngadj}[1]% {\renewcommand{\@f@f}{#1}} \plngadj{0in}% \providecommand{\signature}{} \renewcommand*{\signature}[1]% {\renewcommand{\@sig@fr}{#1}\setboolean{@use@sig}{true}}% \newcommand*{\signame}[1]{\renewcommand{\@sig@nm}{#1}% \setboolean{@use@sig@nm}{true}}% \newcommand*{\setadrto}[1]{#1 \let\@name@to\@namev \let\@addr@to\@addr \let\@phn@to\@phn \let\@phna@to\@phna \let\@phnb@to\@phnb \let\@phnc@to\@phnc \let\@phnd@to\@phnd \let\@phno@to\@phno \let\@phnh@to\@phnh \let\@pager@to\@pager \let\@fax@to\@fax \let\@greet@to\@greet \let\@email@to\@email \let\@emailb@to\@emailb \let\@emailc@to\@emailc } \newcommand*{\setadrfr}[1]{#1 \let\@name@fr\@namev \let\@addr@fr\@addr \let\@phn@fr\@phn \let\@phna@fr\@phna \let\@phnb@fr\@phnb \let\@phnc@fr\@phnc \let\@phnd@fr\@phnd \let\@phno@fr\@phno \let\@phnh@fr\@phnh \let\@pager@fr\@pager \let\@fax@fr\@fax \let\@greet@fr\@greet \let\@email@fr\@email \let\@emailb@fr\@emailb \let\@emailc@fr\@emailc } % \end{macrocode} % \end{macro} % \begin{macrocode} % %<*package> % \end{macrocode} % \begin{macro}{Spacing commands} % These commands are either internal (begin with |@|) or user-optional (do % not begin with |@|). User-optional commands are defined in the text % above. % \begin{macrocode} \newcommand*{\sztmarg}[1]% {\renewcommand{\@top@m}{#1}} \sztmarg{10pt}% \newcommand*{\bottommarginskip}[1]% {\renewcommand{\@bot@m}{#1}} \newcommand*{\spbmarg}[1]% {\renewcommand{\@bot@m}{#1}} \spbmarg{20pt}% \newcommand*{\headermarginskip}[1]% {\renewcommand{\@head@m}{#1}} \newcommand*{\sphmarg}[1]% {\renewcommand{\@head@m}{#1}} \sphmarg{20pt}% \newcommand*{\rightmarginsize}[1]% {\renewcommand{\@right@m}{#1}\setlength{\@marg@right}{#1}} \newcommand*{\szrmarg}[1]% {\renewcommand{\@right@m}{#1}\setlength{\@marg@right}{#1}} \szrmarg{72pt}% \newcommand*{\szlmarg}[1]% {\renewcommand{\@left@m}{#1}\setlength{\@marg@left}{#1}} \newcommand*{\leftmarginsize}[1]% {\renewcommand{\@left@m}{#1}\setlength{\@marg@left}{#1}} \szlmarg{72pt}% \newcommand*{\leftmargintopdist}[1]{\renewcommand{\@lm@top@d}{#1}% \setboolean{@marg@flush@top}{true}}% \newcommand*{\splmargt}[1]{\renewcommand{\@lm@top@d}{#1}% \setboolean{@marg@flush@top}{true}}% \splmargt{0pt}\setboolean{@marg@flush@top}{false}% \newcommand*{\leftmarginskipleft}[1]{\renewcommand{\@lm@sep@l}{#1}}% \newcommand*{\splmargl}[1]{\renewcommand{\@lm@sep@l}{#1}}% \splmargl{10pt}% \newcommand*{\leftmarginskipright}[1]{\renewcommand{\@lm@sep@r}{#1}}% \newcommand*{\splmargr}[1]{\renewcommand{\@lm@sep@r}{#1}}% \splmargr{10pt}% \newcommand*{\dateskipbefore}[1]{\setlength{\@dt@sk@b}{#1}}% \newcommand*{\spbefdate}[1]{\setlength{\@dt@sk@b}{#1}}% \spbefdate{2\baselineskip}% \newcommand*{\dateskipafter}[1]{\setlength{\@dt@sk@a}{#1}}% \newcommand*{\spaftdate}[1]{\setlength{\@dt@sk@a}{#1}}% \spaftdate{2\baselineskip}% \newcommand*{\addrfromskipafter}[1]{\setlength{\@addr@fr@sk@a}{#1}}% \newcommand*{\spaftfraddr}[1]{\setlength{\@addr@fr@sk@a}{#1}}% \spaftfraddr{2\baselineskip}% \newcommand*{\addrfromskipbefore}[1]{\setlength{\@addr@fr@sk@b}{#1}}% \newcommand*{\spbeffraddr}[1]{\setlength{\@addr@fr@sk@b}{#1}}% \spbeffraddr{0in}% \newcommand*{\addrtoskipafter}[1]{\setlength{\@addr@to@sk@a}{#1}}% \newcommand*{\spafttoaddr}[1]{\setlength{\@addr@to@sk@a}{#1}}% \spafttoaddr{2\baselineskip}% \newcommand*{\greettoskipafter}[1]{\setlength{\@greet@to@sk@a}{#1}}% \newcommand*{\spaftgreet}[1]{\setlength{\@greet@to@sk@a}{#1}}% \spaftgreet{2\baselineskip}% \newcommand*{\sigskipbefore}[1]{\setlength{\@sig@sk@b}{#1}}% \newcommand*{\spbefsig}[1]{\setlength{\@sig@sk@b}{#1}}% \spbefsig{1\parskip}% \newcommand*{\sigskipafter}[1]{\setlength{\@sig@sk@a}{#1}}% \newcommand*{\spaftsig}[1]{\setlength{\@sig@sk@a}{#1}}% \spaftsig{1\parskip}% \newcommand*{\sigspace}[1]{\setlength{\@sig@sp}{#1}}% \sigspace{4\parskip}% \newcommand*{\postsigskipafter}[1]{\setlength{\@post@sig@sp@a}{#1}}% \newcommand*{\sppostsig}[1]{\setlength{\@post@sig@sp@a}{#1}}% \sppostsig{1\parskip}% \newcommand*{\postmemoskip}[1]{\setlength{\@post@memo@sp}{#1}}% \newcommand*{\spaftmemo}[1]{\setlength{\@post@memo@sp}{#1}}% \spaftmemo{\baselineskip}% % \end{macrocode} % \end{macro} % \subsection{Address book handling} % newlfm stores \info{} in a file |letrinfo.tex|. This \info{} is % stored in a series of wrapper macros. This are the macros |\makelth|, % |\makesig| and |\makeadr|. These are used in letters and memos by % issuing the commands |\adrXXX|, |\lthXXX| and |\sigXXX| {\it before} the % |\begin{newlfm}| statement. Essentially, this sets up a very generalized % ``hash'' table for addresses, letterheads and signature \info. % Each type of \info{} is keyed by the use of the appropriate value of XXX. % % At this point, the program reads in standard declarations of names, % addresses, signatures, header blocks, etc., stored in file % `letrinfo.tex'. This file will contain \info{} which is normally % included in a letter. That way, it need not be entered each time anew. % % \begin{macrocode} \InputIfFileExists{letrinfo.tex}% {\typeout{Reading default letter definitions from letrinfo.tex}}% {\typeout{All letter definitions must be in newlfm.cls}}% % \end{macrocode} % % \begin{macro}{showdim} % This is here for debugging only. % % \begin{macrocode} \newcommand{\showdim}[1]{% \txa{Dimensions: #1}% \txa{headheight:\the\headheight}% \txa{headsep: \the\headsep}% \txa{textheight:\the\textheight}% \txa{footskip: \the\footskip}% }% % \end{macrocode} % \end{macro} % % \subsection{Form letters} % \begin{macro}{doletter} % In this section, we set up the environment to prepare form letters. % This is done by: % \begin{enumerate} % \item Defining the body of the letter using the command % \verb|\letterbody|. The body may include macro items. The body % {\it should not} include the |newlfm| command, % which is invoked by the macro |\doletter| itself. Thus, do not % include the \verb|\begin{newlfm}| or \verb|\end{newlfm}| statements. % \item For each letter, use the construction \verb|\doletter{}|. The % required argument includes a specification of the address % information, usually. The required argument is used directly before % the {\tt newlfm} environment is specified, and the form letter % specified. Thus, the address for the several letters can easily be % listed. % \item For historical reasons, |\doltr| and |\ltrbody| are also % included, but are not the prefered form of the commands. % \end{enumerate} % \begin{macrocode} \providecommand{\@ltr@body}{} \providecommand{\ltrbody}{} \providecommand{\letterbody}{} \renewcommand{\ltrbody}[1]{\renewcommand{\@ltr@body}{#1}} \renewcommand{\letterbody}[1]{\renewcommand{\@ltr@body}{#1}} \providecommand{\doltr}{} \providecommand{\doletter}{} \renewcommand{\doltr}[1] {#1 \begin{newlfm} \@ltr@body \end{newlfm} \newpage \ifthenelse{\envopen = 1}% {\immediate\write14{\string\envlabel{\string#1} }}{}% } \newcommand{\envlabel}[1]{#1 \parbox[t][\@boxht][t]{\@boxwd} {\@name@to \\ \@addr@to}} \newcommand{\dims}{left=.165in,top=5pt,textheight=10.2in} \newcommand{\makeenvst}{ \immediate\openout14=envelope.tex% \immediate\write14 {\string\documentclass[dvips\@labname]{newlfm}} \immediate\write14{\string\usepackage{geometry}} \immediate\write14{\string\geometry{\dims}\string\nolines} \immediate\write14 {\string\pagestyle{empty}\string\thispagestyle{empty}} \immediate\write14{\string\newpage} \immediate\write14{\string\begin{document}} \renewcommand{\envopen}{1} \ifthenelse{\boolean{@hl}}% {\renewcommand{\headrulewidth}{1pt}}% {\renewcommand{\headrulewidth}{0pt}}% \ifthenelse{\boolean{@fl}}% {\renewcommand{\footrulewidth}{1pt}}% {\renewcommand{\footrulewidth}{0pt}}% } \newcommand{\makeenvfn}{ \immediate\write14{\string\end{document}} \immediate\closeout14 } \newcommand{\envopen}{0} \renewcommand{\doletter}[1] {\setadrto{#1} \begin{newlfm} \@ltr@body \end{newlfm} \newpage% \ifthenelse{\envopen = 1}% {\immediate\write14{\string\envlabel{\string#1}}}{}% } % \end{macrocode} % \end{macro} % \subsection{Main section} % \begin{macro}{newlfm} % This is the main section. In this section, we actually print a letter. % Here is how it is done: % \begin{enumerate} % \item Insert \info{} into environment % \item Determine sizes of header and footer largest pieces % \item Set all lengths to the height of the appropriate box % \item Set paperlength: % \begin{enumerate} % \item Begin with paperheight % \item Subtract |\Hhgt| % \item Subtract |\footskip|, which includes |\Fhgt| % \item Take into account |voffset|, and 1 inch, which are designed to offset % one another % \item Subtract |headsep| and |headheight| % \end{enumerate} % \end{enumerate} % \begin{macrocode} \newlength{\addv}% \newlength{\Plg}% \newenvironment{newlfm}{% Start of fax environment, in fax class% \faxblocka% \ifthenelse{\boolean{@fax@RA}}% {\ifthenelse{\boolean{@fax@bla}}{\Rheader{\usebox{\fba}}}{}% \ifthenelse{\boolean{@fax@blb}}{\Rheader{\faxblockb}}{}}% {}% \ifthenelse{\boolean{@fax@RU}}% {\txa{setting up ruh}% \ifthenelse{\boolean{@fax@bla}}{\RUheader{\faxblocka}}{}% \ifthenelse{\boolean{@fax@blb}}{\RUheader{\faxblockb}}{}}% {}% \txa{setting up ruh}% \renewcommand{\ifta}{0} \renewcommand{\ifta}{0}% \lhead{\@lheader} \chead{\@cheader} \rhead{\@rheader}% \rfoot{\@rfooter} \cfoot{\@cfooter} \lfoot{\@lfooter}% \ifthenelse{\boolean{@hl}}% {\renewcommand{\headrulewidth}{1pt}}% {\renewcommand{\headrulewidth}{0pt}}% \ifthenelse{\boolean{@fl}}% {\renewcommand{\footrulewidth}{1pt}}% {\renewcommand{\footrulewidth}{0pt}}% \renewcommand{\ifta}{0}% \setlength{\Pwd}{\paperwidth}% \sbox{\SCh}{\@Cheader}\sbox{\SLh}{\@Lheader}\sbox{\SRh}{\@Rheader}% \sbox{\SCf}{\@Cfooter}\sbox{\SLf}{\@Lfooter}\sbox{\SRf}{\@Rfooter}% \renewcommand{\ifta}{0}% \settowidth{\hchgt}{\@lmarg}% \addtolength{\Pwd}{-\Mwd-1in}% \settoheight{\hchgt}{\usebox{\SCh}}% \settoheight{\hrhgt}{\usebox{\SRh}}% \settoheight{\hlhgt}{\usebox{\SLh}}% \settodepth{\addv}{\usebox{\SCh}}% \addtolength{\hchgt}{\addv}% \settodepth{\addv}{\usebox{\SRh}}% \addtolength{\hrhgt}{\addv}% \settodepth{\addv}{\usebox{\SLh}}% \addtolength{\hlhgt}{\addv}% \txa{\string\hchgt: \the\hchgt}% \txa{\string\hrhgt: \the\hrhgt}% \txa{\string\hlhgt: \the\hlhgt}% \settoheight{\fchgt}{\usebox{\SCf}}% \settoheight{\frhgt}{\usebox{\SRf}}% \settoheight{\flhgt}{\usebox{\SLf}}% \settodepth{\fcdth}{\usebox{\SCf}} \addtolength{\fchgt}{\fcdth}% \settodepth{\frdth}{\usebox{\SRf}} \addtolength{\frhgt}{\frdth}% \settodepth{\fldth}{\usebox{\SLf}} \addtolength{\flhgt}{\fldth}% \ifthenelse{\lengthtest{\hlhgt<\hchgt}}% {\setlength{\Hhgt}{\hchgt}}% {\setlength{\Hhgt}{\hlhgt}}% \ifthenelse{\lengthtest{\Hhgt<\hrhgt}}{\setlength{\Hhgt}{\hrhgt}}{}% % \ifthenelse{\lengthtest{\flhgt<\fchgt}}% {\setlength{\Fhgt}{\fchgt}}% {\setlength{\Fhgt}{\flhgt}}% % \ifthenelse{\lengthtest{\Fhgt<\frhgt}}% {\setlength{\Fhgt}{\frhgt}}% {}% % \addtolength{\Fhgt}{\baselineskip}% % \renewcommand{\ifta}{0}% \setlength{\Plg}{0in} \setlength{\Plg}{\paperheight-\Hhgt-\footskip% -\voffset-\headsep-\footruleskip% -\footrulewidth-\@f@f}% \raggedbottom% % \ifthenelse{\boolean{@fax@hdr@pg}}{\faxpage}{}% \newpage% \if@twoside \ifodd\c@page% \else\thispagestyle{empty}\null\newpage\fi \fi% \c@page\@ne% \interlinepenalty=200 % smaller than the TeXbook value% \pagestyle{fancy} \thispagestyle{plain} \setlength{\headwidth}{\textwidth}% \ifthenelse{\boolean{@B@f}}{\Cfooter{\phantom{\Cfooter}} \Rfooter{\phantom{\Rfooter}}\Lfooter{\phantom{\Lfooter}}}{} \ifthenelse{\boolean{@B@h}}{\Rheader{\phantom{\Rheader}} \Lheader{\phantom{\Lheader}}\Cheader{\phantom{\Cheader}}}{} \ifthenelse{\boolean{@B@l}} {\ifempty{\@Lmarg}{}{\Lmargin{\phantom{\Lmargin}}}}{} \ifthenelse{\boolean{@B@r}} {\ifempty{\@Rmarg}{}{\Rmargin{\phantom{\Rmargin}}}}{} \ifthenelse{\boolean{@b@f}} {\rfooter{\phantom{\rfooter}} \lfooter{\phantom{\lfooter}} \cfooter{\phantom{\cfooter}}}{} \ifthenelse{\boolean{@b@h}} {\rheader{\phantom{\rheader}} \lheader{\phantom{\lheader}} \cheader{\phantom{\cheader}}}{} \ifthenelse{\boolean{@b@l}} {\lmargin{\phantom{\lmargin}}}{} \ifthenelse{\boolean{@b@r}} {\rmargin{\phantom{\rmargin}}}{} \openlfm% \immediate\openout15=geometry.cfg% \immediate\write15{\string\ExecuteOptions{letterpaper}}% \immediate\write15{\string\ExecuteOptions{right=\the\@marg@right}}% \immediate\write15{\string\ExecuteOptions{left=\the\@marg@left}}% \ifempty{\@Lmarg}{}{ % \immediate\write15{\string\ExecuteOptions{reversemp}}% \immediate\write15{\string\ExecuteOptions{reversemarginpar}}% \immediate\write15{\string\ExecuteOptions{marginparwidth=\the\Mwd}}% \immediate\write15{\string\ExecuteOptions{marginparsep=\@lm@sep@r}}% } \immediate\write15{\string\ExecuteOptions{top=\@top@m}}% \immediate\write15{\string\ExecuteOptions{bottom=\@bot@m}}% \immediate\write15{\string\ExecuteOptions{headsep=\@head@m}}% \immediate\write15{\string\ExecuteOptions{headheight=\the\Hhgt}}% \immediate\write15{\string\ExecuteOptions{footskip=\the\Fhgt}}% \immediate\closeout15% }% { % \typeout{End of environment newlfm} \ifthenelse{\boolean{@sig@p}}{ \closlfm% \@post@sig@bl{\@ps@phr}{\@ps@item}% \@post@sig@bl{\@pps@phr}{\@pps@item}% \@post@sig@bl{\@ppps@phr}{\@ppps@item}% \@post@sig@bl{\@encl@phr}{\@encl@item}% \@post@sig@bl{\@cc@phr}{\@cc@item}% }{}% \ifthenelse{\boolean{@sig@mp}}{ \@post@sig@bl{\@ps@phr}{\@ps@item}% \@post@sig@bl{\@pps@phr}{\@pps@item}% \@post@sig@bl{\@ppps@phr}{\@ppps@item}% \@post@sig@bl{\@encl@phr}{\@encl@item}% \@post@sig@bl{\@cc@phr}{\@cc@item}% }{}% \ifthenelse{\boolean{@use@envlab}}% {\newpage% \changepage{11in}{8.5in}{1in}{1in}{0in}{0in}{0in}{0in}{0in}% % \typeout{Actually using the makeenvelope...} \startlabels% \@capitalizeaddressfalse \mlabel{\@name@fr \\ \@addr@fr}{\@name@to \\ \@addr@to}}{}% \stopletter\@@par\pagebreak\@@par% \immediate\write\@auxout{\string\newlabel{totpage}{{\thepage}{0}}}% }% % \end{macrocode} % \end{macro} % % \begin{macrocode} \newcommand{\pgrph}[1]{{\bf #1}}% \pagestyle{plain}% \pagenumbering{arabic}% \raggedbottom% \providecommand{\@texttop}{}% \renewcommand{\@texttop} {\ifnum\c@page=1\vskip \z@ plus.00006fil\relax\fi}% \onecolumn% \AtBeginDocument{ \setlength{\headwidth}{\textwidth} \ifthenelse{\boolean{@use@envlab}} { % \typeout{useenvlab was set...} \IfFileExists{envlab.sty} {\makelabels % \typeout{Issuing the makelables....} } {\typeout{The option was issued.} \typeout{File cannot be found.} \typeout{Option is disabled} \typeout{Please install envlab system.} \setboolean{@use@envlab}{false}}}{} {} } \endinput% % \end{macrocode} % \endinput % % \begin{macrocode} % % \end{macrocode}