28.03.2013 Views

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

16.3. A model letter cus<strong>to</strong>mization 361<br />

\newcomm<strong>and</strong>{\ymail}[1]{\renewcomm<strong>and</strong>{\@ymail}{\ymailname: #1}}<br />

\newcomm<strong>and</strong>{\myref}[1]{\renewcomm<strong>and</strong>{\@myref}{\myrefname: #1}}<br />

\newcomm<strong>and</strong>{\subject}[1]{\renewcomm<strong>and</strong>{\@subject}<br />

{\subjectname: #1}}<br />

\newcomm<strong>and</strong>{\internet}[1]{\renewcomm<strong>and</strong>{\@internet}{#1}}<br />

\newcomm<strong>and</strong>{\INTERNET}{@linmpi.mpg.de}<br />

Set the dimensions of the text on the page <strong>and</strong> its margins. These<br />

numbers are appropriate for A4 paper (which does make the a4paper<br />

option superfluous).<br />

\setlength{\textheight}{215mm} \setlength{\textwidth}{160mm}<br />

\setlength{\oddsidemargin}{0pt} \setlength{\evensidemargin}{0pt}<br />

\setlength{\<strong>to</strong>pmargin}{-20pt} \setlength{\headheight}{12pt}<br />

\setlength{\headsep}{35pt}<br />

The next step is <strong>to</strong> define some fixed fonts that are needed for the<br />

letterhead. We refer <strong>to</strong> the fonts with their explicit NFSS attributes; in<br />

this case they are all Computer Modern sans serif fonts in various sizes.<br />

These fonts will not change if <strong>to</strong>tally different families are used for the<br />

body of the letter.<br />

\DeclareFixedFont{\xviisf}{OT1}{cmss}{m}{n}{17}<br />

\DeclareFixedFont{\xsf}{OT1}{cmss}{m}{n}{10}<br />

\DeclareFixedFont{\viiisf}{OT1}{cmss}{m}{n}{8}<br />

The letterhead itself is divided in<strong>to</strong> two fields, the left one containing<br />

the institute name in large letters, the right one the address in a smaller<br />

font. Below the first horizontal line, the left field displays the name <strong>and</strong><br />

address of the recipient, positioned <strong>to</strong> fit in the window of an envelope, <strong>and</strong><br />

the right one has the personal data of the letter writer, name, extension,<br />

computer address. The widths of these fields are established.<br />

\newlength{\leftfield} \setlength{\leftfield}{117mm}<br />

\newlength{\rightfield} \setlength{\rightfield}{43mm}<br />

The <strong>to</strong>tal width of these two fields equals 160 mm, which is the same as<br />

\textwidth.<br />

Next, we place the institute name <strong>and</strong> address in several saved boxes.<br />

\newsavebox{\FIRM} \newsavebox{\firmaddress}<br />

\newsavebox{\firm} \newsavebox{\firmreturn}<br />

\sbox{\FIRM}<br />

{\parbox[t]{\leftfield}<br />

{\xviisf MAX--PLANCK--INSTITUT F\"UR AERONOMIE}}<br />

\sbox{\firm}<br />

{\xsf MAX--PLANCK--INSTITUT F\"UR AERONOMIE}<br />

\sbox{\firmreturn}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!