| 1 |
% \iffalse |
| 2 |
% (This is a META-COMMENT.) |
| 3 |
% |
| 4 |
% This is file `cdpbundl.dtx'. |
| 5 |
% |
| 6 |
% This file is part of a work named "C.D.P. Bundle". |
| 7 |
% |
| 8 |
% Copyright (C) 1999-2018 by Gustavo MEZZETTI |
| 9 |
% <[email protected]>. |
| 10 |
% |
| 11 |
% The C.D.P. Bundle may be distributed and/or modified under the |
| 12 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 13 |
% of this license or (at your option) any later version. |
| 14 |
% The latest version of this license is in |
| 15 |
% http://www.latex-project.org/lppl.txt |
| 16 |
% and version 1.3 or later is part of all distributions of LaTeX |
| 17 |
% version 2005/12/01 or later. |
| 18 |
% |
| 19 |
% The C.D.P. Bundle has the LPPL maintenance status |
| 20 |
% "author-maintained". |
| 21 |
% |
| 22 |
% The file `manifest.txt' that comes along with this file specifies |
| 23 |
% what the C.D.P. Bundle consists of; more precisely, it explains how |
| 24 |
% the locutions "Work" and "Compiled Work", used in the LaTeX Project |
| 25 |
% Public License, are to be interpreted in the case of this work. |
| 26 |
% |
| 27 |
% Note that the distribution of this file alone is "distribution of |
| 28 |
% only part of the Work" in the sense of the LaTeX Project Public |
| 29 |
% License, and is not allowed. |
| 30 |
% |
| 31 |
% (End of the META-COMMENT.) |
| 32 |
% \fi |
| 33 |
% |
| 34 |
% \def\filename{cdpbundl.dtx} |
| 35 |
% \def\fileversion{0.36d} |
| 36 |
% \def\filedate{2018/02/08} |
| 37 |
% \def\docdate {2018/02/08} |
| 38 |
% \def\doclongdate{February~8, 2018} |
| 39 |
% |
| 40 |
% \CheckSum{4989} |
| 41 |
% |
| 42 |
% \DeclareRobustCommand*{\Bundle}{C.D.P. Bundle} |
| 43 |
% |
| 44 |
% \changes{0.30}{2001 Jul 01}{First release of the \Bundle.} |
| 45 |
% \changes{0.31}{2001 Dec 01}{Added support for the \protect\opz{usePS} |
| 46 |
% option in the \protect\packlass{\protect\cdpaddon} package.} |
| 47 |
% \changes{0.32}{2002 Jul 01}{Removed support for the \protect\opz{usePS} |
| 48 |
% option in the \protect\packlass{\protect\cdpaddon} package.} |
| 49 |
% \changes{0.33}{2005 Jan 01}{Reorganized code of the |
| 50 |
% \protect\packlass{\protect\articoletteracdp} class and of the |
| 51 |
% \protect\packlass{\protect\cdpaddon} package to make it compatible |
| 52 |
% with the \protect\packlass{\protect\HyperRef} package.} |
| 53 |
% \changes{0.34}{2006 Jan 01}{Improved interaction with the |
| 54 |
% \protect\packlass{\protect\HyperRef} package.} |
| 55 |
% \changes{0.34}{2006 Jan 01}{Corrected positioning of floats |
| 56 |
% in float pages.} |
| 57 |
% \changes{0.34}{2006 Jan 01}{Added \texttt{\protect\bslash place} command.} |
| 58 |
% \changes{0.35}{About 2013}{This version was never publicly released, but some |
| 59 |
% of the changes listed below for vers.~0.36 were actually introduced in this |
| 60 |
% version.} |
| 61 |
% \changes{0.36}{2015 Feb 08}{Added \texttt{\protect\bslash OpeningSequence} |
| 62 |
% command and related macros, in part.\ the \texttt{\protect\bslash |
| 63 |
% ChosenMakeOpening} hook.} |
| 64 |
% \changes{0.36}{2015 Feb 08}{Added \texttt{\protect\bslash ClosingSequence} |
| 65 |
% command and related macros, in particular \texttt{\protect\bslash |
| 66 |
% ChosenMakeClosing} and \texttt{\protect\bslash ChosenMakeSignature}.} |
| 67 |
% \changes{0.36}{2015 Feb 08}{Eventually added functionality to the |
| 68 |
% \protect\packlass{\protect\cdpaddon} package to support user-defined |
| 69 |
% letterheads.} |
| 70 |
% \changes{0.36}{2015 Feb 08}{Added \protect\relax the |
| 71 |
% \protect\opz{signaturerule} option, and its related stuff (the |
| 72 |
% \texttt{\protect\bslash signaturerule} command, the \texttt{\protect\bslash |
| 73 |
% signaturerulewidth} parameter), to support rules that mark where to sign by |
| 74 |
% hand.} |
| 75 |
% \changes{0.36}{2015 Feb 08}{Delegated to a new command |
| 76 |
% (\texttt{\protect\bslash foldingtagrule}) the task of drawing the sign that |
| 77 |
% shows where the sheet is to be folded.} |
| 78 |
% \changes{0.36}{2015 Feb 08}{Removed the \protect\packlass{\protect\adiseal} |
| 79 |
% package and the \protect\packlass{\protect\lettcdpadi} document class.} |
| 80 |
% \changes{0.36}{2015 Feb 08}{Tidied up in several points the code of the |
| 81 |
% \protect\packlass{\protect\cdpaddon} package.} |
| 82 |
% \changes{0.36}{2015 Feb 08}{Added \protect\packlass{\protect\cdpbabel} |
| 83 |
% package and related language definition files for English and Italian.} |
| 84 |
% |
| 85 |
%% \CharacterTable |
| 86 |
%% {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 |
| 87 |
%% 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 |
| 88 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 89 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 90 |
%% Dollar \$ Percent \% Ampersand \& |
| 91 |
%% Acute accent \' Left paren \( Right paren \) |
| 92 |
%% Asterisk \* Plus \+ Comma \, |
| 93 |
%% Minus \- Point \. Solidus \/ |
| 94 |
%% Colon \: Semicolon \; Less than \< |
| 95 |
%% Equals \= Greater than \> Question mark \? |
| 96 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 97 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 98 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 99 |
%% Right brace \} Tilde \~} |
| 100 |
% |
| 101 |
% \MakeShortVerb{\"} |
| 102 |
% \DeleteShortVerb{\|} |
| 103 |
% |
| 104 |
% \DoNotIndex{\begin,\end,\def,\let,\else,\fi,\@ifdefinable,\@empty} |
| 105 |
% \DoNotIndex{\newcommand,\renewcommand} |
| 106 |
% \DoNotIndex{\newenvironment,\renewenvironment} |
| 107 |
% \DoNotIndex{\z@,\z@skip,\p@,\@ne,\tw@,\thr@@,\@m,\@M,\m@ne} |
| 108 |
% \DoNotIndex{\setlength,\setcounter,\addtolength} |
| 109 |
% \DoNotIndex{\expandafter,\do,\relax,\advance,\multiply,\divide} |
| 110 |
% \DoNotIndex{\DeclareOption,\ExecuteOptions,\ProcessOptions} |
| 111 |
% \DoNotIndex{\",\.} |
| 112 |
% |
| 113 |
% \IndexPrologue{ |
| 114 |
% \section{\indexname} |
| 115 |
% Numbers in italics refer to the page where the corresponding entry |
| 116 |
% is described, the ones underlined to the code line of the |
| 117 |
% definition, the rest to the code lines where the entry is used. |
| 118 |
% } |
| 119 |
% \setcounter{IndexColumns}{2} |
| 120 |
% |
| 121 |
% \GlossaryPrologue{\section{Change History}} |
| 122 |
% \let \GlossaryParms = \IndexParms |
| 123 |
% |
| 124 |
% \setcounter{StandardModuleDepth}{1} |
| 125 |
% |
| 126 |
% \newcommand*{\DS}{\textsf{DocStrip}} |
| 127 |
% \renewcommand*{\partname}{Part} |
| 128 |
% \newcommand*{\cdpbundl}{cdpbundl} |
| 129 |
% \newcommand*{\letteracdp}{letteracdp} |
| 130 |
% \newcommand*{\articoletteracdp}{articoletteracdp} |
| 131 |
% \newcommand*{\adiseal}{adiseal} |
| 132 |
% \newcommand*{\lettcdpadi}{lettcdpadi} |
| 133 |
% \newcommand*{\cdpaddon}{cdpaddon} |
| 134 |
% \newcommand*{\cdpbabel}{cdpbabel} |
| 135 |
% \newcommand*{\babel}{babel} |
| 136 |
% \newcommand*{\HyperRef}{hyperref} |
| 137 |
% \newcommand*{\pictee}{pict2e} |
| 138 |
% \newcommand*{\epsfig}{epsfig} |
| 139 |
% \newcommand*{\cdpnamesenglish}{cdpnamesenglish.ldf} |
| 140 |
% \newcommand*{\cdpnamesitalian}{cdpnamesitalian.ldf} |
| 141 |
% \newcommand*{\example}{cdpshues-example.def} |
| 142 |
% \newcommand*{\epson}{epson-stylus-740.def} |
| 143 |
% \newcommand*{\hplj}{hp-laserjet-4500.def} |
| 144 |
% \newcommand*{\cdpshues}{cdpshues.cfg} |
| 145 |
% \newcommand*{\textoken}[1]{\(\langle\mbox{\normalfont #1}\rangle\)} |
| 146 |
% |
| 147 |
% \makeatletter |
| 148 |
% |
| 149 |
% \newcounter{paramlist} |
| 150 |
% \renewcommand*{\theparamlist}{^^A |
| 151 |
% \ifnum \value{paramlist}>\z@ |
| 152 |
% \ifnum \value{paramlist}<10 |
| 153 |
% \arabic{paramlist}^^A |
| 154 |
% \else |
| 155 |
% \@ctrerr |
| 156 |
% \fi |
| 157 |
% \fi |
| 158 |
% } |
| 159 |
% \newenvironment*{paramlist}{^^A |
| 160 |
% \setcounter{paramlist}\z@ |
| 161 |
% \@beginparpenalty \@M \relax |
| 162 |
% \setlength\topsep{\z@}^^A |
| 163 |
% \tabbing |
| 164 |
% \(\mbox{\#0}\leftarrow {\,}\)\=\kill |
| 165 |
% }{^^A |
| 166 |
% \endtabbing |
| 167 |
% } |
| 168 |
% \newcommand*{\param}{^^A |
| 169 |
% \stepcounter{paramlist}^^A |
| 170 |
% \(\mbox{\#\theparamlist}\leftarrow{}\)\>^^A |
| 171 |
% } |
| 172 |
% \newcommand*{\myspecialindex}[2] |
| 173 |
% {\special@index{#1\actualchar#2\encapchar main}} |
| 174 |
% |
| 175 |
% \makeatother |
| 176 |
% |
| 177 |
% \newcommand*{\counterindex}[1]{\myspecialindex{#1}{{\string\ttfamily |
| 178 |
% \space #1} (counter)}\index{counters:\levelchar{\protect\ttfamily |
| 179 |
% #1}\encapchar usage}} |
| 180 |
% \newcommand*{\optuseindex}[1]{\SortIndex{#1}{\protect\opz{#1}^^A |
| 181 |
% (option)\encapchar usage}\index{options:\levelchar |
| 182 |
% \protect\opz{#1}\encapchar usage}} |
| 183 |
% \newcommand*{\opz}[1]{{\normalfont\ttfamily #1}} |
| 184 |
% \newcommand*{\iopz}[1]{$\mbox{\opz{#1}}\optuseindex{#1}} |
| 185 |
% \newcommand*{\eopz}[1]{\mathbin{|}\mbox{\opz{#1}}\optuseindex{#1}} |
| 186 |
% \newcommand*{\fopz}{$} |
| 187 |
% \newcommand*{\packlass}[1]{{\normalfont\sffamily #1}} |
| 188 |
% \newcommand*{\filedir}[1]{{\normalfont\ttfamily #1}} |
| 189 |
% \newcommand*{\env}[1]{{\normalfont\ttfamily #1}} |
| 190 |
% \newcommand*{\cnt}[1]{{\normalfont\ttfamily #1}} |
| 191 |
% \newcommand*{\sty}[1]{{\normalfont\ttfamily #1}} |
| 192 |
% \newcommand*{\eqref}[1]{(\ref{#1})} |
| 193 |
% \newcommand*{\strongemph}[1]{\textbf{#1}} |
| 194 |
% \newcommand*{\zerolistvertspaces}{^^A |
| 195 |
% \setlength{\parskip}{0pt}^^A |
| 196 |
% \setlength{\topsep}{\parskip}^^A |
| 197 |
% \setlength{\partopsep}{\parskip}^^A |
| 198 |
% } |
| 199 |
% \newcommand*{\closeofsentencespace}{\spacefactor \sfcode `. \space} |
| 200 |
% |
| 201 |
% \DeclareFixedFont{\lhnss}{OT1}{cmss}{m}{n} {12} |
| 202 |
% \DeclareFixedFont{\lhbss}{OT1}{cmss}{m}{n} {17} |
| 203 |
% \DeclareFixedFont{\lhrm} {OT1}{cmr} {m}{n} {9} |
| 204 |
% \DeclareFixedFont{\lhit} {OT1}{cmr} {m}{it}{9} |
| 205 |
% \DeclareFixedFont{\lhtt} {OT1}{cmtt}{m}{n} {9} |
| 206 |
% |
| 207 |
% \providecommand*{\pdfbookmark}[3][]{} |
| 208 |
% \providecommand*{\href}[3][]{#3} |
| 209 |
% \providecommand*{\nolinkurl}[1]{\url{#1}} ^^A if hyperref isn't loades, |
| 210 |
% ^^A hand over to url package |
| 211 |
% \providecommand{\hypersetup}{} |
| 212 |
% |
| 213 |
% |
| 214 |
% |
| 215 |
% \title{ |
| 216 |
% The \Bundle\thanks{This file has version |
| 217 |
% \fileversion, release date \filedate; |
| 218 |
% last documentation update: \docdate. |
| 219 |
% Copyright \copyright~1999--2018 by G.~Mezzetti |
| 220 |
% (see page~\pageref{S:Copy}).} |
| 221 |
% } |
| 222 |
% \author{G. Mezzetti} |
| 223 |
% \date{\doclongdate} |
| 224 |
% |
| 225 |
% \hypersetup{ |
| 226 |
% pdftitle = {The C.D.P. Bundle}, |
| 227 |
% pdfauthor = {G. Mezzetti}, |
| 228 |
% pdfsubject = {Documentation of the C.D.P. Bundle}, |
| 229 |
% pdfkeywords = {letter, letterhead}, |
| 230 |
% pdfcreationdate = {D:20180208120000}, |
| 231 |
% pdfmoddate = {D:20180208120000}, |
| 232 |
% bookmarksopen, |
| 233 |
% bookmarksopenlevel = 1 |
| 234 |
% } |
| 235 |
% |
| 236 |
% \pdfbookmark[0]{Front Matter}{FrontMatter} |
| 237 |
% \maketitle |
| 238 |
% |
| 239 |
% \begin{abstract} |
| 240 |
% A bundle of \LaTeX\ (former \LaTeXe) classes and packages is |
| 241 |
% described, which was used by the \emph{Coordinamento dei Dottorandi e |
| 242 |
% dei Dottori di Ricerca dell'Universit\`{a} di Padova} (a free and |
| 243 |
% informal association of Ph.D. students and Ph.D.'s at the |
| 244 |
% university of Padua, Italy) to write its ``official'' letters. |
| 245 |
% These classes and packages took care of formatting the letters as |
| 246 |
% required by the standards of this association; in particular, they |
| 247 |
% made it very easy to include its seal, both in black-and-white and |
| 248 |
% in color, at the top of pages. |
| 249 |
% \end{abstract} |
| 250 |
% |
| 251 |
% \tableofcontents |
| 252 |
% \listoffigures |
| 253 |
% |
| 254 |
% \clearpage |
| 255 |
% \begingroup |
| 256 |
% |
| 257 |
% \setlength{\parskip}{\medskipamount} |
| 258 |
% \setlength{\parindent}{0pt} |
| 259 |
% |
| 260 |
% \section*{Copyright notice} |
| 261 |
% \label{S:Copy} |
| 262 |
% \vspace{-\parskip} |
| 263 |
% |
| 264 |
% Copyright \copyright~1999--2018 by Gustavo \textsc{Mezzetti}. All |
| 265 |
% rights are reserved, except as noted below. |
| 266 |
% |
| 267 |
% This document has been produced by feeding to a \LaTeX\ typesetting |
| 268 |
% engine the file \filedir{\filename} version \fileversion\ (\docdate). |
| 269 |
% This file is part of a work named ``\Bundle''. |
| 270 |
% |
| 271 |
% The \Bundle\ may be distributed and/or modified under the |
| 272 |
% conditions of the \LaTeX\ Project Public License, either version~1.3 |
| 273 |
% of this license or (at your option) any later version. The latest |
| 274 |
% version of this license is in |
| 275 |
% \begin{list}{\setlength{\topsep}{0pt}}\item\relax |
| 276 |
% \ttfamily |
| 277 |
% http://www.latex-project.org/lppl.txt |
| 278 |
% \end{list} |
| 279 |
% and version~1.3 or later is part of all distributions of \LaTeX\ |
| 280 |
% version 2005/12/01 or later. |
| 281 |
% |
| 282 |
% The \Bundle\ has the LPPL maintenance status ``author-maintained''. |
| 283 |
% |
| 284 |
% The file \filedir{manifest.txt} included in the \Bundle\ |
| 285 |
% specifies what the \Bundle\ consists of; more precisely, |
| 286 |
% it explains how the locutions ``Work'' and ``Compiled Work'', |
| 287 |
% used in the \LaTeX\ Project Public License, are to be interpreted |
| 288 |
% in the case of this work. |
| 289 |
% |
| 290 |
% Permission is granted to make new printed copies of this document, |
| 291 |
% by any means (\emph{e.g.}, photocopying, direct printing from the |
| 292 |
% electronic version, and so on). |
| 293 |
% |
| 294 |
% Note, though, that distribution of this document alone is |
| 295 |
% ``distribution of only part of the Work'' in the sense of the |
| 296 |
% \LaTeX\ Project Public License, and should therefore be avoided: |
| 297 |
% please distribute, in addition, the source file \filedir{\filename} |
| 298 |
% together with all other files listed in \filedir{manifest.txt}, |
| 299 |
% as explained in the file \filedir{manifest.txt} itself and also in |
| 300 |
% Subsection~\ref{sS:License} on page~\pageref{sS:License}, to which you |
| 301 |
% are referred for more information. |
| 302 |
% |
| 303 |
% \section*{Author's address} |
| 304 |
% \vspace{-\parskip} |
| 305 |
% |
| 306 |
% The recommended way to contact the author is by e-mail; his address is: |
| 307 |
% |
| 308 |
% \begin{list}{\setlength{\topsep}{0pt}}\item\relax |
| 309 |
% \href{mailto:[email protected]} |
| 310 |
% {\nolinkurl{[email protected]}} |
| 311 |
% \end{list} |
| 312 |
% |
| 313 |
% Please include the \emph{exact} phrase \verb*|C.D.P. Bundle| in the |
| 314 |
% \emph{subject} of your message; otherwise, your message could be |
| 315 |
% thrown away by a mail filter. In this regard, the weakness of the |
| 316 |
% laws concerning the protection of privacy forces me to explicitly |
| 317 |
% forbid the use of the above address for any kind of advertising, |
| 318 |
% marketing, polling, or similar commercial or statistical contact. |
| 319 |
% |
| 320 |
% \endgroup |
| 321 |
% |
| 322 |
% |
| 323 |
% |
| 324 |
% \setcounter{secnumdepth}{0} |
| 325 |
% |
| 326 |
% |
| 327 |
% |
| 328 |
% \clearpage |
| 329 |
% \section{Introduction} |
| 330 |
% |
| 331 |
% The \emph{Coordinamento dei Dottorandi e dei Dottori di Ricerca |
| 332 |
% dell'Universit\`a di Padova} (henceforth simply referred to as |
| 333 |
% ``\emph{Coordinamento}'') was a free association of Ph.D.'s and Ph.D. |
| 334 |
% students who took their degree, or were studying for it, at the |
| 335 |
% University of Padova (Padua), Italy. Discussing its precise nature is |
| 336 |
% completely outside the scope of this document; the only thing that |
| 337 |
% concerns us here is that it wrote letters of a somewhat |
| 338 |
% ``official'' kind, which, for this reason, had to bear its letterhead |
| 339 |
% on the top of their first page. The classes and packages herein described |
| 340 |
% were used for preparing this kind of letters, automatically taking care of |
| 341 |
% printing the letterhead; but besides this, they incorporated much more |
| 342 |
% functionality than the standard \packlass{letter} \LaTeX\ class, |
| 343 |
% and it was precisely this additional functionality that proved useful |
| 344 |
% also in more general contexts, thus determining the adoption of the |
| 345 |
% \Bundle\ in (certain niches of) the \LaTeX\ community. |
| 346 |
% |
| 347 |
% \subsection{Credits and disclaimer} |
| 348 |
% |
| 349 |
% The \packlass{\letteracdp} document class was originally based on |
| 350 |
% the \packlass{letter} standard \LaTeX\ class. During the time, it |
| 351 |
% went through so many deep revisions, that by now it retains |
| 352 |
% practically no relation with the original \packlass{letter} class; |
| 353 |
% but we want to acknowledge the ``historical'' source anyway. The |
| 354 |
% \packlass{\articoletteracdp} document class uses some ideas borrowed |
| 355 |
% from the \packlass{article} standard \LaTeX\ class. |
| 356 |
% |
| 357 |
% The author thanks heartfully Alessandro Ambrosi and Roberto |
| 358 |
% Strepparava, who tested the software and constantly stimulated |
| 359 |
% improvements and refinements, and Paolo Cojazzi, who, besides this, |
| 360 |
% also helped with the compression tools. |
| 361 |
% |
| 362 |
% As usual with computer software, no warranty is given that |
| 363 |
% this code will work properly, or even that it will work at all. |
| 364 |
% Using this code can even result in loss of data and/or damages |
| 365 |
% to your disks and your storage media. |
| 366 |
% If you use this code, you do so exclusively at your own risk! |
| 367 |
% |
| 368 |
% See Subsection~\ref{sS:License} and the \LaTeX\ Project Public |
| 369 |
% License for more information. |
| 370 |
% |
| 371 |
% \subsection{About this document} |
| 372 |
% |
| 373 |
% This document, like many documentation files distributed for |
| 374 |
% \LaTeX, is divided into two parts. |
| 375 |
% |
| 376 |
% The first part, \emph{User's Manual}, should contain all the |
| 377 |
% documentation you need to succesfully \emph{use} the classes and |
| 378 |
% packages that this document presents; but unfortunately (for you!), |
| 379 |
% this document is still unfinished, so this information is \emph{not} |
| 380 |
% given here; instead, you are referred to some other sources (all |
| 381 |
% available through the world-wide web). The only pieces of |
| 382 |
% information you will find in this part are how to install those |
| 383 |
% classes and packages and how to generate this documentation. This |
| 384 |
% part, however, specifies to what extent, and under what conditions, |
| 385 |
% you are allowed to use and distribute the classes and packages |
| 386 |
% presented in this document. |
| 387 |
% |
| 388 |
% The second part, \emph{Implementation}, can be omitted if you want |
| 389 |
% (explanations on how to omit it are given at the beginning of the |
| 390 |
% part itself), and contains information that concerns only |
| 391 |
% ``hackers'' who want to learn how the macros that this document |
| 392 |
% presents are \emph{implemented}. Actually, this part contains the |
| 393 |
% complete listing of the \LaTeX\ code that implements the |
| 394 |
% macros---unfortunately, almost without comments---in the usual \DS\ |
| 395 |
% format; if you are not a \LaTeX\ hacker, this part will not mean |
| 396 |
% anything to you. |
| 397 |
% |
| 398 |
% \subsection{About this release: a provisional patch} |
| 399 |
% |
| 400 |
% The \Bundle\ was essentially written between 1999 and 2000 (for |
| 401 |
% an Italian audience), and even at that time it contained code that was |
| 402 |
% already deprecated; even worse, its design was flawed since the |
| 403 |
% beginning, because it had been conceived for a specific and limited |
| 404 |
% application (the letters of the C.D.P., exactly), and was adapted for |
| 405 |
% more general use only as an afterthought. |
| 406 |
% |
| 407 |
% A thorough redesign would therefore be needed; on the other hand, some |
| 408 |
% users have suggested, or asked for, improvements and additions, in |
| 409 |
% particular for what concerns the use of the bundle with other |
| 410 |
% languages besides Italian, that can be implemented rather easily by |
| 411 |
% means of provisional patches. I~have already been deferring the |
| 412 |
% introduction of these comparatively harmless enhancements for five |
| 413 |
% years, waiting for the right moment to undertake the task of |
| 414 |
% redesigning the bundle from scratch, but now I~have resolved to simply |
| 415 |
% patch up the existing version. |
| 416 |
% |
| 417 |
% The macros presented in this document, therefore, are far from being |
| 418 |
% optimal: no serious attempt has been made to remove ``fossil'' code, nor |
| 419 |
% to bring it up to date with modern \LaTeX\ usage. The only exception to |
| 420 |
% this is a small change that has been made to the fonts used to print the |
| 421 |
% letterhead of the \emph{Coordinamento}, switching them from OT1 encoding |
| 422 |
% to~T1---because this just required hitting the \meta{DEL} key half a dozen |
| 423 |
% of times!~^^A ( paren match |
| 424 |
% ;-)\closeofsentencespace Of course, nobody will |
| 425 |
% care about this, since the least likely reason for which you might want to |
| 426 |
% use the \Bundle\ is to produce that letterhead.\footnote{Note, however, |
| 427 |
% that the ability to compose the letterhead of the \emph{Coordinamento} is |
| 428 |
% still required in order to typeset the documentation given in the |
| 429 |
% References.} For this same |
| 430 |
% motive, essentially, I~have also removed the \packlass{\adiseal} package |
| 431 |
% and the \packlass{\lettcdpadi} document class, of which, probably, nobody |
| 432 |
% besides me even remembers the purpose. |
| 433 |
% |
| 434 |
% Though\marginpar{\hfill\strongemph{$*{*}*\;$WOW!!$\;*{*}*$}}, |
| 435 |
% ^^A Yes, I know, I should use \textasteriskcentered... |
| 436 |
% \strongemph{good news} are coming for all those users who asked |
| 437 |
% for a means to \strongemph{customize the letterhead} produced by the |
| 438 |
% \Bundle: a reasonably viable method for doing so has been provided |
| 439 |
% at last!~:-D\closeofsentencespace The method requires the use |
| 440 |
% of the \packlass{\cdpaddon} package, passing in the new option |
| 441 |
% \opz{customletterhead}. You specify the contents of your custom head and |
| 442 |
% foot by means of two new environments, called \env{customletterhead} and |
| 443 |
% \env{customletterfoot}, respectively, which are similar, to a certain |
| 444 |
% extent, to the \env{minipage} environment. This should give you maximum |
| 445 |
% freedom in designing the letterhead, whilst adopting an interface you are |
| 446 |
% surely well familiar with. |
| 447 |
% See Subsection~\ref{sS:Customization} for more information. |
| 448 |
% |
| 449 |
% Another nifty feature is the ability to draw a thin rule to guide your |
| 450 |
% hand in signing your letters: you ask for this behavior by passing the new |
| 451 |
% \opz{signaturerule} option to the \packlass{\letteracdp} document class. |
| 452 |
% See Subsection~\ref{sS:Options} for more information. |
| 453 |
% |
| 454 |
% Sorry, but for now I~cannot offer any more. |
| 455 |
% |
| 456 |
% \paragraph*{About version 0.36d.} |
| 457 |
% It became necessary to release a patch of version~0.36, which has in turn |
| 458 |
% been given the version number 0.36d, because an awful bug was discovered |
| 459 |
% that absolutely required correction; I~then took this opportunity to |
| 460 |
% eliminate as well a few minor errors in the code that I~had noticed |
| 461 |
% meanwhile. I~should also mention the fact that the fonts used to print the |
| 462 |
% letterhead of the \emph{Coordinamento} have been switched back to OT1 |
| 463 |
% encoding (please don't ask why). Unfortunately, all the remarks set forth |
| 464 |
% above about the weaknesses in the code design remain valid in this patched |
| 465 |
% version too. |
| 466 |
% |
| 467 |
% |
| 468 |
% |
| 469 |
% \setcounter{secnumdepth}{3} |
| 470 |
% |
| 471 |
% |
| 472 |
% |
| 473 |
% \clearpage |
| 474 |
% \part{User's Manual} |
| 475 |
% |
| 476 |
% \section{About this part} |
| 477 |
% |
| 478 |
% We shall only give instructions on how to install the bundle and |
| 479 |
% how to generate this documentation; partial instructions on how to use |
| 480 |
% the classes and packages contained in the bundle can be found |
| 481 |
% in several documents written by the author |
| 482 |
% \cite{tutti,esempi,etichette,novita,nts,ver028,cdpaddon,ver031,ver036}, |
| 483 |
% but a systematic user's manual is no longer foreseen.~\mbox{:-(}^^A ) match |
| 484 |
% \closeofsentencespace |
| 485 |
% Note that including in this document the instructions on how to generate |
| 486 |
% the document itself may seem pretty useless, but actually isn't: |
| 487 |
% you might be reading a copy obtained from another person. |
| 488 |
% |
| 489 |
% \section{Installing the \Bundle\ and generating this documentation} |
| 490 |
% |
| 491 |
% As usual for \LaTeX\ distributions, the \Bundle\ is |
| 492 |
% distributed in the form of a \filedir{.dtx} file, namely |
| 493 |
% \filedir{cdpbundl.dtx}, and an accompanying \filedir{.ins} file, |
| 494 |
% namely \filedir{cdpbundl.ins}. |
| 495 |
% |
| 496 |
% \subsection{Installation} |
| 497 |
% |
| 498 |
% To install the bundle, run \LaTeX\ (or plain \TeX) once on the file |
| 499 |
% \filedir{cdpbundl.ins}. This will generate the following \LaTeX\ |
| 500 |
% input files: |
| 501 |
% \begin{quote} |
| 502 |
% \ttfamily |
| 503 |
% \articoletteracdp.cls\\ |
| 504 |
% \cdpaddon.sty\\ |
| 505 |
% \cdpbabel.sty\\ |
| 506 |
% \cdpnamesenglish\\ |
| 507 |
% \cdpnamesitalian\\ |
| 508 |
% \example\\ |
| 509 |
% \cdpshues\\ |
| 510 |
% \epson\\ |
| 511 |
% \hplj\\ |
| 512 |
% \letteracdp.cls |
| 513 |
% \end{quote} |
| 514 |
% To finish the installation, move them into a \LaTeX\ input |
| 515 |
% directory. (If you want, you can discard one, more, or all of the |
| 516 |
% files whose name ends in \filedir{.def}, each of which contains color |
| 517 |
% definitions for the seal appropriate for a particular printer. See |
| 518 |
% Subsection~\ref{sS:config} for information about how these files |
| 519 |
% are used for this purpose.) The above listing of all the files you |
| 520 |
% need to move is also displayed on the terminal at the end of the run |
| 521 |
% of the file \filedir{cdpbundl.ins}. The documentation of your \TeX\ |
| 522 |
% installation should tell you how to find the \LaTeX\ input |
| 523 |
% directory/ies, and probably also how to create new \LaTeX\ input |
| 524 |
% directories reserved to hold your private classes and packages. |
| 525 |
% |
| 526 |
% Note that the TDS-compliant directory where the above files should be |
| 527 |
% put is |
| 528 |
% \begin{quote} |
| 529 |
% \texttt{tex/latex/cdpbundl/} |
| 530 |
% \end{quote} |
| 531 |
% |
| 532 |
% \subsection{Configuring the \protect\packlass{\cdpaddon} package} |
| 533 |
% \label{sS:config} |
| 534 |
% |
| 535 |
% The \packlass{\cdpaddon} package is the part of the \Bundle\ |
| 536 |
% that takes care of coloring the C.D.P. seal, which appears in |
| 537 |
% black-and-white if you don't load this package. Experience by trial |
| 538 |
% and error has shown that some configuration work may be necessary in |
| 539 |
% order to obtain (more or less) correctly-\null looking colors in the |
| 540 |
% seal. This happens because different printers may render color hues |
| 541 |
% in different ways, sometimes producing surprising results. |
| 542 |
% |
| 543 |
% The configuration mechanism works as follows. For each printer |
| 544 |
% you plan to use there should be a definition file that specifies what |
| 545 |
% hues should be used to color the C.D.P. seal. To select which |
| 546 |
% file to load, the user indicates its name in an option passed to the |
| 547 |
% \packlass{\cdpaddon} package. If the user gives no such indication, |
| 548 |
% the package reads from a configuration file the name of the default |
| 549 |
% definition file, and uses that file. In both cases, if the |
| 550 |
% designated definition file cannot be read, the package issues a |
| 551 |
% warning and resorts, for the hues, to an emergency definition |
| 552 |
% (which, as you can expect, is not very pleasant to the eye). |
| 553 |
% |
| 554 |
% \subsubsection{Writing color definition files} |
| 555 |
% |
| 556 |
% The task of a color definition file is simply to define two colors |
| 557 |
% called "slight@col" and "strong@col" (when the definition file is |
| 558 |
% read, the "@"~characters are treated as ordinary letters): |
| 559 |
% "slight@col" is the color used to paint the inner of the D and of |
| 560 |
% the P in the seal, "strong@col" is the color used to draw the lines. |
| 561 |
% You define these colors by means of the "\definecolor" command: see |
| 562 |
% the \textsl{\LaTeX book} \cite[Section~7.3 and |
| 563 |
% Subsection~C.14.3]{LaTeXbook} for information on colors and the |
| 564 |
% "\definecolor" command. |
| 565 |
% |
| 566 |
% The file \filedir{\example}, too, contains comments which explain |
| 567 |
% how to write new definition files for the \packlass{\cdpaddon} |
| 568 |
% package. Indeed, this file is supplied only as a prototype: I suggest |
| 569 |
% that you write a new file by making a copy of it (with the |
| 570 |
% appropriate name) and modifying it with the help of the comments. |
| 571 |
% The colors defined in this file are just an example, and indeed they |
| 572 |
% are exactly the emergency colors used internally by the |
| 573 |
% \packlass{\cdpaddon} package when it cannot load a definition |
| 574 |
% file---that is, a completely useless definition! |
| 575 |
% |
| 576 |
% The file \filedir{\example} uses the \texttt{named} color model, |
| 577 |
% but of course you can use any color model you want. Indeed, it is |
| 578 |
% best to use ``direct'' color models like \texttt{rgb} or |
| 579 |
% \texttt{cmyk}, that allow you to drive the printer with precision: |
| 580 |
% after all, it is exactly for this purpose that you are writing the |
| 581 |
% file. The other two definition files included in the \Bundle\ |
| 582 |
% illustrate the use of these color models. |
| 583 |
% |
| 584 |
% \subsubsection{Selecting a color definition file via an option} |
| 585 |
% |
| 586 |
% The first way to select a particular color definition file among the |
| 587 |
% ones you have installed is to pass a suitable option to the |
| 588 |
% \packlass{\cdpaddon} package. More precisely, the option name has |
| 589 |
% the form \opz{printer:}\( \langle\textit{bare file name}\rangle \), |
| 590 |
% all in a row without intervening spaces, where \( |
| 591 |
% \langle\textit{bare file name}\rangle \) is the name of the |
| 592 |
% definition file you want to load \emph{without} the extension |
| 593 |
% \filedir{.def}. For example, to load a file called |
| 594 |
% \filedir{acme-wilejet.def}, you pass the option |
| 595 |
% \opz{printer:acme-wilejet}. Explicitly, you would write |
| 596 |
% \begin{verbatim}\usepackage[printer:acme-wilejet]{cdpaddon}\end{verbatim} |
| 597 |
% to load the \packlass{\cdpaddon} package and the color definitions |
| 598 |
% suitable for the ACME WileJet printer (the printer preferred by |
| 599 |
% 8~coyotes out of~10). Similarly, to load the file |
| 600 |
% \filedir{\example} you would write |
| 601 |
% \begin{verbatim}\usepackage[printer:cdpshues-example]{cdpaddon}\end{verbatim} |
| 602 |
% and so on. Of course, you can still specify, as well, the other |
| 603 |
% options listed in~\cite{cdpaddon}: for instance, |
| 604 |
% \begin{verbatim}\usepackage[hypertext,printer:acme-wilejet]{cdpaddon}\end{verbatim} |
| 605 |
% activates the hyperlinks and selects the colors for the |
| 606 |
% ACME WileJet printer. |
| 607 |
% |
| 608 |
% When no \opz{printer:}\ldots\ option is specified, a default |
| 609 |
% definition file is loaded, as explained in the next section. For |
| 610 |
% elegance, you can explicitly request this default definition file with |
| 611 |
% the \opz{printer:Default} option (note the capitalization). Of |
| 612 |
% course, this implies that you cannot have a definition file called |
| 613 |
% \filedir{Default.def}; but \filedir{default.def} is absolutely OK, |
| 614 |
% and you can select it with \opz{printer:default}. Moreover, the |
| 615 |
% \opz{printer:None} option forces the \packlass{\cdpaddon} package to |
| 616 |
% ignore the configuration file and to use the emergency, built-in |
| 617 |
% colors; again, \opz{printer:none}, instead, tries to load a color |
| 618 |
% definition file called \filedir{none.def}. |
| 619 |
% |
| 620 |
% \subsubsection{Declaring the default color definition file} |
| 621 |
% |
| 622 |
% Most users will have only one printer, and even those users who |
| 623 |
% have access to several printers will use one of them more often than |
| 624 |
% the others. Therefore, it is wise to have a second way of selecting |
| 625 |
% a definition file, to be used when the user does not specify one. |
| 626 |
% This is done by indicating in a configuration file the name of a |
| 627 |
% default color definition file. This configuration file is called |
| 628 |
% \filedir{\cdpshues}. |
| 629 |
% |
| 630 |
% The \filedir{\cdpshues} file should contain only zero or one (but |
| 631 |
% preferably one!) "\DeclareCDPSealHuesDefault" command. This command |
| 632 |
% may be used only here, and only once, since it deactivates itself |
| 633 |
% when executed, and also stops \LaTeX\ from reading any further in |
| 634 |
% the configuration file. In its unique (mandatory) argument, one |
| 635 |
% puts the name, \emph{without} the extension \filedir{.def}, of the |
| 636 |
% default color definition file. Do not include any other command in |
| 637 |
% your configuration file, because the effect of any other command is |
| 638 |
% undefined. |
| 639 |
% |
| 640 |
% The \filedir{\cdpshues} file included in the \Bundle\ contains |
| 641 |
% comments that help you to modify it in order to declare your |
| 642 |
% personal default color definition file. The recommended way of |
| 643 |
% doing this is: |
| 644 |
% \begin{enumerate} |
| 645 |
% ^^A ( paren match |
| 646 |
% \renewcommand*{\labelenumi}{\theenumi)} |
| 647 |
% \item |
| 648 |
% make a backup copy (good idea indeed!) of the original configuration |
| 649 |
% file under a convenient name, for example |
| 650 |
% \filedir{\cdpshues.original}; |
| 651 |
% \item |
| 652 |
% modify the \filedir{\cdpshues} file following the advice given |
| 653 |
% in its comments; |
| 654 |
% \item |
| 655 |
% if you want, delete all comments from the (new version of the) |
| 656 |
% \filedir{\cdpshues} file, to save disk space. |
| 657 |
% \end{enumerate} |
| 658 |
% |
| 659 |
% The obsolete version of the \packlass{\cdpaddon} package |
| 660 |
% documented in~\cite{cdpaddon} was not configurable: it was |
| 661 |
% programmed to read the color definitions from a file called |
| 662 |
% \filedir{cdpshues.def}, and this name was hard-coded in the package. |
| 663 |
% To maintain compatibility with this version, the file |
| 664 |
% \filedir{\cdpshues} included in the \Bundle\ designates as the |
| 665 |
% default color definition file exactly a file named |
| 666 |
% \filedir{cdpshues.def}. Consequently, if you install the supplied |
| 667 |
% files without making any change to them, the \packlass{\cdpaddon} |
| 668 |
% package will continue to exhibit the old behavior, reading the |
| 669 |
% legacy \filedir{cdpshues.def} file if you have one installed, and |
| 670 |
% adopting the emergency colors otherwise. Note that no actual |
| 671 |
% \filedir{cdpshues.def} file is included in the \Bundle. |
| 672 |
% |
| 673 |
% \subsection{Defining the captions for unsupported languages} |
| 674 |
% |
| 675 |
% Like many other document classes and packages, the classes and |
| 676 |
% packages of the \Bundle\ mark up some portions of the output they |
| 677 |
% produce by adding certain descriptive strings, that, by default, are |
| 678 |
% written in Italian. For example, when you have requested the |
| 679 |
% \sty{headings} page style, the name of the addressee, which is printed |
| 680 |
% atop pages, is preceded by the string ``\emph{A:}'' (=~``To:''); |
| 681 |
% similarly, when you issue the command "\tableofcontents" in a documents |
| 682 |
% that adopts the \packlass{\articoletteracdp} document class, the table it |
| 683 |
% produces is titled ``\emph{Sommario}'' (=~``Contents''); and so on. |
| 684 |
% |
| 685 |
% When the \Bundle\ was used only by the members of the |
| 686 |
% \emph{Coordinamento}, the Italian defaults it provided for those captions |
| 687 |
% were, of course, quite adequate; as long as its use remained circumscribed |
| 688 |
% to the Italian \LaTeX\ community, they were still acceptable; but now, |
| 689 |
% questions about how to adapt the \Bundle\ to foreign languages have |
| 690 |
% begun to be asked in some Internet forums by users around the world, |
| 691 |
% pushing me to reconsider the matter. |
| 692 |
% |
| 693 |
% Of course, the Italian captions are not (nor they have ever been) |
| 694 |
% ``hard-wired'' in the code: they are defined by macros that follow the |
| 695 |
% usual naming conventions ("\headtoname", "\contentsname", and so on). |
| 696 |
% Thus, it's only a matter of redefining these ``hooks'' to suit the target |
| 697 |
% language. However, it would be desirable to have some standard |
| 698 |
% definitions set for each language; but unfortunately, this cannot be |
| 699 |
% attained just by loading the \packlass{\babel} package, for two reasons. |
| 700 |
% In the first place, there are some captions that are specific to the |
| 701 |
% \Bundle\ and are therefore not cared for by the \packlass{\babel} |
| 702 |
% package: for example, the (optional) subject of a letter is preceded by |
| 703 |
% the expansion of "\subjectname" (which is ``\emph{Oggetto:}'' in Italian |
| 704 |
% and should be ``Subject:'' in English), a hook the |
| 705 |
% \packlass{\babel} package knows nothing about. Secondarily, even for |
| 706 |
% those hooks that are standard, sometimes the definition provided by the |
| 707 |
% \packlass{\babel} package seems (at least to me) not adequate for a |
| 708 |
% letter; in particular, alas, if you load \packlass{\babel} with the |
| 709 |
% \opz{italian} option (as you ordinarily do when you are writing in |
| 710 |
% Italian), it actually \emph{cancels} the definitions preset by the |
| 711 |
% \Bundle, substituting for them strings that I~deem more suitable for |
| 712 |
% articles or books, for which they are indeed intended, than for letters |
| 713 |
% (for example, \( "\contentsname" \to \mbox{``\emph{Indice}''} \) |
| 714 |
% in \packlass{\babel}, instead of |
| 715 |
% \( "\contentsname" \to \mbox{``\emph{Sommario}''} \), as defined by the |
| 716 |
% \Bundle; |
| 717 |
% \( "\refname" \to \mbox{``\emph{Riferimenti bibliografici}''} \) |
| 718 |
% in \packlass{\babel}, |
| 719 |
% instead of \( "\refname" \to \mbox{``\emph{Testi citati}''} \), as |
| 720 |
% I~prefer; etc.).\footnote{I~do not insist on these captions being defined |
| 721 |
% in the way the \Bundle\ currently uses: if the \LaTeX\ community |
| 722 |
% thinks that such definitions are inadequate, I~have no objection at all, |
| 723 |
% of course, to changing them.} |
| 724 |
% |
| 725 |
% To supply a \emph{provisional} solution to this problem, a new component |
| 726 |
% has been added to the \Bundle: the \packlass{\cdpbabel} package. |
| 727 |
% The idea is that, when using one of the document classes of the |
| 728 |
% \Bundle, you load the \packlass{\cdpbabel} package \emph{instead of} |
| 729 |
% \packlass{\babel}, and let the former load the latter on your behalf; |
| 730 |
% in this way, you offer it a chance to augment, or amend, the definitions |
| 731 |
% made by \packlass{\babel} itself. This solution might seem inelegant |
| 732 |
% (and admittedly it is), but the problem is more subtle than it may look |
| 733 |
% at first sight, involving also compatibility issues with existing |
| 734 |
% documents, and I~need to further investigate it. Hopefully, a more |
| 735 |
% satisfactory scheme will be found for future releases.\footnote{More |
| 736 |
% generally, it can be observed that the document classes of the |
| 737 |
% \Bundle\ rely too heavily on ancillary packages, and that this reconfirms |
| 738 |
% the ``patched-up'' nature of their design; just think of the entanglement |
| 739 |
% between the \packlass{\letteracdp} class and the \packlass{\cdpaddon} |
| 740 |
% package---a typical Italian \emph{pasticcio}, it should be admitted!} |
| 741 |
% |
| 742 |
% In practice, all the \packlass{\cdpbabel} package has to do is (to load |
| 743 |
% \packlass{\babel} and) to issue an |
| 744 |
% "\addto{\captions"\meta{language}"}{"\ldots"}" command (or better, |
| 745 |
% one such command for each required \meta{language}), with ``\ldots'' |
| 746 |
% replaced by the appropriate redefinitions; the list, and the details, |
| 747 |
% of such redefintions are of course dictated by \meta{language}, |
| 748 |
% so \packlass{\cdpbabel} takes them from what we will call a ``C.D.P. |
| 749 |
% language definition file''. This is a text file that, by convention, |
| 750 |
% must be named \filedir{cdpnames}\meta{language}\filedir{.ldf}, |
| 751 |
% where \meta{language} is the name of the corresponding language option |
| 752 |
% (for example, |
| 753 |
% \begin{verbatim}\usepackage[english,italian]{cdpbabel}\end{verbatim} |
| 754 |
% invokes both \filedir{\cdpnamesenglish} and \filedir{\cdpnamesitalian}, |
| 755 |
% in this order), and which must adhere to the format shown |
| 756 |
% in fig.~\ref{fig:cdpnames}. |
| 757 |
% |
| 758 |
% \begin{figure}[tbp] |
| 759 |
% \fontsize{9}{11}\selectfont |
| 760 |
% \zerolistvertspaces |
| 761 |
% \begin{flushleft} |
| 762 |
% "\ProvidesFile{cdpnames"\meta{language}".ldf}["\meta{date \& version}"]" |
| 763 |
% \end{flushleft} |
| 764 |
% \begin{verbatim} |
| 765 |
% |
| 766 |
%\def\@cdpbabel@letter@names{%\end{verbatim} |
| 767 |
% \begin{flushleft} |
| 768 |
% " \def\subjectname {"\meta{Subject:}"}%"\\ |
| 769 |
% " \def\registeredname {"\meta{Registered}"}%"\\ |
| 770 |
% " \def\registeredRRname {"\meta{Registered R.R.}"}%"\\ |
| 771 |
% " \def\andccname {"\meta{cc (in addresses)}"}%"\\ |
| 772 |
% " \def\ccname {"\meta{cc (at end of letters)}"}%"\\ |
| 773 |
% " \def\enclname {"\meta{Encl:}"}%"\\ |
| 774 |
% " \def\PSname {"\meta{P.S.:}"}%"\\ |
| 775 |
% " \def\headtoname {"\meta{To:}"}%"\\ |
| 776 |
% " \def\lettername {"\meta{Letter}"}%" |
| 777 |
% \end{flushleft} |
| 778 |
% \begin{verbatim} |
| 779 |
% % More captions could be added in the future. |
| 780 |
%} |
| 781 |
%\def\@cdpbabel@artlet@names{%\end{verbatim} |
| 782 |
% \begin{flushleft} |
| 783 |
% " \def\contentsname {"\meta{Contents}"}%"\\ |
| 784 |
% " \def\listfigurename {"\meta{List of figures}"}%"\\ |
| 785 |
% " \def\listtablename {"\meta{List of tables}"}%"\\ |
| 786 |
% " \def\refname {"\meta{References}"}%"\\ |
| 787 |
% " \def\indexname {"\meta{Index}"}%"\\ |
| 788 |
% " \def\figurename {"\meta{Figure}"}%"\\ |
| 789 |
% " \def\tablename {"\meta{Table}"}%"\\ |
| 790 |
% \end{flushleft} |
| 791 |
% \begin{verbatim} |
| 792 |
% % More captions could be added in the future. |
| 793 |
%} |
| 794 |
% |
| 795 |
%\endinput\end{verbatim} |
| 796 |
% \caption{Contents of a |
| 797 |
% \protect\filedir{cdpnames}\meta{language}\protect\filedir{.ldf} file} |
| 798 |
% \label{fig:cdpnames} |
| 799 |
% \end{figure} |
| 800 |
% |
| 801 |
% As you can see, a ``C.D.P. language definition file'' must define two |
| 802 |
% macros, named "\@cdpbabel@letter@names" and "\@cdpbabel@artlet@names", |
| 803 |
% respectively: in the first you put the redefinitions that should be |
| 804 |
% added to "\captions"\meta{language} when only the \packlass{\letteracdp} |
| 805 |
% class has been loaded; in the second you list the additional redefinitions |
| 806 |
% that apply if the \packlass{\articoletteracdp} class is loaded too; |
| 807 |
% and that's all. The listing shown in fig.~\ref{fig:cdpnames} details exactly |
| 808 |
% what hooks need to be redefined when switching to another language; |
| 809 |
% in principle, you must supply a suitable redefinition for each of them, |
| 810 |
% but of course, when a hook is already defined by the \packlass{\babel} |
| 811 |
% package in a way that you think suits, you may omit it from your list |
| 812 |
% (or, perhaps better, comment it out). Look at the two provided files |
| 813 |
% for inspiration, and in particular at \filedir{\cdpnamesenglish} for the |
| 814 |
% intended meaning of the captions (which sould be quite obvious, however). |
| 815 |
% |
| 816 |
% At present, the \Bundle\ ships with \emph{just two} such definition |
| 817 |
% files included, namely \filedir{\cdpnamesitalian} for Italian |
| 818 |
% and \filedir{\cdpnamesenglish} for English: for all other languages, |
| 819 |
% you'll have to write and install appropriate files yourself. |
| 820 |
% Needless to say, you are most welcome if, after doing so, you want to |
| 821 |
% contribute your work for inclusion in future releases of the |
| 822 |
% \Bundle. Suggestions for amending the captions specified in the two |
| 823 |
% existing files are most welcome too; for Italian, it is also a matter of |
| 824 |
% updating the captions originally defined by the \packlass{\letteracdp} |
| 825 |
% and \packlass{\articoletteracdp} document classes so that they remain |
| 826 |
% ``in sync'' with those specified in the \filedir{\cdpnamesitalian} file. |
| 827 |
% |
| 828 |
% It is hardly worth remarking that ``C.D.P. language definition files'' |
| 829 |
% naturally belong to the same directory where the \Bundle\ is located, |
| 830 |
% and \emph{not} to any directory of the \packlass{\babel} system! |
| 831 |
% |
| 832 |
% One final word of clarification: two of the abovementioned captions, |
| 833 |
% namely "\ccname" |
| 834 |
% and "\andccname", look like they are the same, but they actually differ: |
| 835 |
% the latter is prepended to \emph{addresses} to which the letter is sent |
| 836 |
% as a ``carbon copy'', whilst the former is used when the names from those |
| 837 |
% addresses are enumerated again \emph{at the end} of a letter (in the same |
| 838 |
% place where enclosures are also listed). In Italian, "\andccname" |
| 839 |
% should expand to ``\emph{e~p.~c.}'', but "\ccname" just to |
| 840 |
% ``\emph{P.~c.}''; hence, there is at least one language in which the |
| 841 |
% distinction is relevant. |
| 842 |
% |
| 843 |
% \subsection{Documentation} |
| 844 |
% |
| 845 |
% To produce this documentation, run \LaTeX\ three times (for the |
| 846 |
% table of contents to be correct) on the file \filedir{\cdpbundl.dtx}. |
| 847 |
% This won't produce the index and the change history, however: for |
| 848 |
% those, you have to run MakeIndex on the files \filedir{\cdpbundl.idx} |
| 849 |
% and \filedir{\cdpbundl.glo}, produced during the previous \LaTeX\ |
| 850 |
% run, with the styles \filedir{gind.ist} and \filedir{gglo.ist}, |
| 851 |
% respectively (these styles are part of the standard \LaTeX\ |
| 852 |
% distribution); then pass \filedir{\cdpbundl.dtx} through \LaTeX\ |
| 853 |
% twice more. |
| 854 |
% |
| 855 |
% Starting with version 0.36 of the \Bundle, a (quite trivial!\@) makefile |
| 856 |
% that ``knows'' how to produce the documentation is offered along with the |
| 857 |
% Bundle itself. Although it is not a required part of the distribution |
| 858 |
% (as per LPPL\@), you may find that some distributors supply it all the |
| 859 |
% same (I~hope the CTAN\@ sites will do so). With this makefile in the same |
| 860 |
% directory as \filedir{\filename}, the shell command |
| 861 |
% \begin{quote} |
| 862 |
% \ttfamily |
| 863 |
% make doc |
| 864 |
% \end{quote} |
| 865 |
% will take all the necessary actions to produce the full documentation |
| 866 |
% (in PDF\@; the modifications you need to introduce into the makefile |
| 867 |
% in order to obtain DVI\@ output should be quite obvious, however). |
| 868 |
% |
| 869 |
% The same makefile can also be used to extract the various class, package, |
| 870 |
% and ancillary (definition and configuration) files: simply issue the |
| 871 |
% command |
| 872 |
% \begin{quote} |
| 873 |
% \ttfamily |
| 874 |
% make code |
| 875 |
% \end{quote} |
| 876 |
% at the shell prompt; whereas |
| 877 |
% \begin{quote} |
| 878 |
% \ttfamily |
| 879 |
% make |
| 880 |
% \end{quote} |
| 881 |
% will \emph{both} extract the code files \emph{and} typeset the |
| 882 |
% documentation. Type |
| 883 |
% \begin{quote} |
| 884 |
% \ttfamily |
| 885 |
% make help |
| 886 |
% \end{quote} |
| 887 |
% for more information. |
| 888 |
% |
| 889 |
% \section{How to use the \Bundle} |
| 890 |
% |
| 891 |
% The \Bundle\ v.~0.36 contains two \LaTeX\ document classes, |
| 892 |
% namely \packlass{\letteracdp} and \packlass{\articoletteracdp}, |
| 893 |
% and two helper \LaTeX\ packages, called \packlass{\cdpaddon} |
| 894 |
% and \packlass{\cdpbabel}, plus a certain number of definition |
| 895 |
% and configuration files related to these packages. |
| 896 |
% As already said, the actual purpose of this section is not |
| 897 |
% to explain you how to use these macro files, but only to give you |
| 898 |
% references to documents where you can find the explanations. |
| 899 |
% |
| 900 |
% For instructions on how to use the \packlass{\letteracdp} class |
| 901 |
% the reader is referred to \cite{tutti,esempi,etichette,nts,ver028,ver031}. |
| 902 |
% Note, however, that the class is syntactically compatible with the |
| 903 |
% \packlass{letter} standard \LaTeX\ class, in the sense that a |
| 904 |
% document prepared for the \packlass{letter} class can be compiled |
| 905 |
% without errors with the \packlass{\letteracdp} class; but the output |
| 906 |
% will be different. |
| 907 |
% |
| 908 |
% As a minimal reference, fig.~\ref{fig:input} illustrates the typical |
| 909 |
% structure of a simple input file for the \packlass{\letteracdp} |
| 910 |
% document class. |
| 911 |
% |
| 912 |
% \iffalse |
| 913 |
% Meta-comment: a <*gobble> guard is needed here to prevent the |
| 914 |
% DocStrip program from putting the lines beginning with "%%" in the |
| 915 |
% generated files. |
| 916 |
%<*gobble> |
| 917 |
% \fi |
| 918 |
% \begin{figure}[tbp] |
| 919 |
% \zerolistvertspaces |
| 920 |
% \begin{verbatim}\documentclass[boldsubject,italicsignature,smartindent]{letteracdp} |
| 921 |
%% Of course, the above options are a matter of personal taste... |
| 922 |
%\usepackage[T1]{fontenc} % as it is now customary |
| 923 |
%% Since we are writing in English, we need to redefine some captions; |
| 924 |
%% the following package automatically takes care of this: |
| 925 |
%\usepackage[english]{cdpbabel} |
| 926 |
%% Presently only two languages are supported: "english" and "italian". |
| 927 |
% |
| 928 |
%% Name, address and signature of the sender (the name is optional): |
| 929 |
%\name{Revinu Jitis Drofnats} |
| 930 |
%\address{ |
| 931 |
% Revinu~J. \textsc{Drofnats}\\ |
| 932 |
% Department of Farm Ecology\\ |
| 933 |
% University of St.\,Anford\\ |
| 934 |
% Haga Alto, CA~94321 (U.S.A.) |
| 935 |
%} |
| 936 |
%\signature{R.~J. Drofnats\\Professor} |
| 937 |
%\date{February~8, 2018} % as usual, date is optional, default is \today |
| 938 |
%\place{St.\,Anford} % place where the letter is written (optional) |
| 939 |
% |
| 940 |
%% Uncomment the following declaration if you want running heads: |
| 941 |
%% \pagestyle{headings} |
| 942 |
% |
| 943 |
% |
| 944 |
% |
| 945 |
%\begin{document} |
| 946 |
% |
| 947 |
%\begin{letterhead}[Brian~K. Reid]{ |
| 948 |
% Prof.~Brian~K. \textsc{Reid}\\ |
| 949 |
% Department of Electrical Engineering\\ |
| 950 |
% Stanford University\\ |
| 951 |
% Stanford, CA~94305 (U.S.A.) |
| 952 |
%}[ |
| 953 |
% This is the optional subject of the letter. |
| 954 |
%] |
| 955 |
% |
| 956 |
%\opening{Dear Prof.~Reid,} |
| 957 |
% |
| 958 |
%this letter is typeset using a \texttt{letterhead} environment, so it |
| 959 |
%will be printed with the letterhead of the \emph{Coordinamento} above |
| 960 |
%it; if you don't want it, use the \texttt{letter} environment instead. |
| 961 |
%You can also use the \texttt{foldedletterhead} environment in place |
| 962 |
%of the \texttt{letterhead} environment (or \texttt{foldedletter} in |
| 963 |
%place of \texttt{letter}) to obtain a letter prepared to be folded in |
| 964 |
%three parts, as one usually does before putting it in an envelope. |
| 965 |
%Experiment to see what happens. |
| 966 |
% |
| 967 |
%\closing{Sincerely,} |
| 968 |
% |
| 969 |
%\end{letterhead} |
| 970 |
% |
| 971 |
%\end{document}\end{verbatim} |
| 972 |
% \caption{A sample input file for the \protect\packlass{\letteracdp} |
| 973 |
% document class} |
| 974 |
% \label{fig:input} |
| 975 |
% \end{figure} |
| 976 |
% \iffalse |
| 977 |
%</gobble> |
| 978 |
% \fi |
| 979 |
% |
| 980 |
% For instructions on how to use the \packlass{\articoletteracdp} |
| 981 |
% class, see~\cite{novita}. |
| 982 |
% |
| 983 |
% For instructions on how to use the \packlass{\cdpaddon} package, |
| 984 |
% see~\cite{cdpaddon}. Note, however, that this document describes an |
| 985 |
% obsolete version, which lacks the ability to deal with several color |
| 986 |
% definition files. The use of the \packlass{\cdpaddon} package for |
| 987 |
% customizing the letterhead, though, is covered in~\cite{ver036}. |
| 988 |
% |
| 989 |
% For instructions on how to use the \packlass{\cdpbabel} package, |
| 990 |
% see~\cite{ver036}. |
| 991 |
% |
| 992 |
% Please note that before using the \Bundle\ you must read the |
| 993 |
% following license to see whether its terms are acceptable for you, |
| 994 |
% especially for what concerns the lack of any warranty; if they are |
| 995 |
% not, don't use this program. |
| 996 |
% |
| 997 |
% \subsection{License} |
| 998 |
% \label{sS:License} |
| 999 |
% |
| 1000 |
% The \Bundle\ is \emph{not} in the public domain: its author, |
| 1001 |
% Gustavo \textsc{Mezzetti}, owns the copyright, and in general retains |
| 1002 |
% all the rights therein; but as a special exception, the author |
| 1003 |
% grants you the permissions indicated below. |
| 1004 |
% |
| 1005 |
% \subsubsection{Distribution and/or modification} |
| 1006 |
% |
| 1007 |
% The \Bundle\ may be distributed and/or modified under the |
| 1008 |
% conditions of the \LaTeX\ Project Public License, either version~1.3 |
| 1009 |
% of this license or (at your option) any later version. The latest |
| 1010 |
% version of this license is in |
| 1011 |
% \begin{quote} |
| 1012 |
% \ttfamily |
| 1013 |
% http://www.latex-project.org/lppl.txt |
| 1014 |
% \end{quote} |
| 1015 |
% and version~1.3 or later is part of all distributions of \LaTeX\ |
| 1016 |
% version 2005/12/01 or later. |
| 1017 |
% |
| 1018 |
% The \Bundle\ has the LPPL maintenance status ``author-maintained''. |
| 1019 |
% |
| 1020 |
% The file \filedir{manifest.txt} included in the \Bundle\ |
| 1021 |
% specifies what the \Bundle\ consists of; more precisely, |
| 1022 |
% it explains how the locutions ``Work'' and ``Compiled Work'', |
| 1023 |
% used in the \LaTeX\ Project Public License, are to be interpreted |
| 1024 |
% in the case of this work. |
| 1025 |
% |
| 1026 |
% \subsubsection{Use} |
| 1027 |
% |
| 1028 |
% The use of the \Bundle\ is unrestricted, provided that you |
| 1029 |
% accept the terms and conditions of the \LaTeX\ Project Public |
| 1030 |
% License and of the following subsection for what concerns the absence |
| 1031 |
% of any warranty. |
| 1032 |
% |
| 1033 |
% \subsubsection{No warranty} |
| 1034 |
% |
| 1035 |
% There is absolutely no warranty for the \Bundle. The |
| 1036 |
% Copyright Holder provides the \Bundle\ ``as is'', without |
| 1037 |
% warranty of any kind, either expressed or implied, including, but |
| 1038 |
% not limited to, the implied warranties of merchantability and |
| 1039 |
% fitness for a particular purpose. The entire risk as to the quality |
| 1040 |
% and performance of the \Bundle\ is with you. Should the |
| 1041 |
% \Bundle\ prove defective, you assume the cost of all necessary |
| 1042 |
% servicing, repair, or correction. |
| 1043 |
% |
| 1044 |
% In no event will The Copyright Holder, or any other party who may |
| 1045 |
% distribute and/or modify the \Bundle\ as permitted by the |
| 1046 |
% \LaTeX\ Project Public License, be liable to you for damages, |
| 1047 |
% including any general, special, incidental or consequential damages |
| 1048 |
% arising out of any use of the \Bundle\ or out of inability to |
| 1049 |
% use it (including, but not limited to, loss of data, data being |
| 1050 |
% rendered inaccurate, or losses sustained by anyone as a result of any |
| 1051 |
% failure of the \Bundle\ to operate with any other programs), |
| 1052 |
% even if The Copyright Holder or said other party has been advised of |
| 1053 |
% the possibility of such damages. |
| 1054 |
% |
| 1055 |
% \subsection{Options of the \protect\packlass{\letteracdp} class} |
| 1056 |
% \label{sS:Options} |
| 1057 |
% |
| 1058 |
% Of course, you load the \packlass{\letteracdp} class by means of the |
| 1059 |
% usual "\documentclass" declaration, which allows you to specify |
| 1060 |
% various options. For some reason, the complete list of all the |
| 1061 |
% options recognized by this class has never been given in any of the |
| 1062 |
% previous documents containing instructions about it; so, we give it |
| 1063 |
% here. |
| 1064 |
% |
| 1065 |
% We shall now list all the options recognized by the |
| 1066 |
% \packlass{\letteracdp} class, including the standard ones it can |
| 1067 |
% understand. If an option does not appear in the list given below, |
| 1068 |
% then that option is not recognized by the \packlass{\letteracdp} |
| 1069 |
% class, even if it is a standard one (that is, documented in the |
| 1070 |
% \textsl{\LaTeX book}~\cite{LaTeXbook}). |
| 1071 |
% |
| 1072 |
% We begin with the list of standard options. Since they are |
| 1073 |
% already described in the \textsl{\LaTeX book}~\cite{LaTeXbook}, we |
| 1074 |
% describe only the options that behave differently from the standard; |
| 1075 |
% the others are just listed without description. |
| 1076 |
% |
| 1077 |
% \begin{description} |
| 1078 |
% |
| 1079 |
% \item[\iopz{10pt}\eopz{11pt}\eopz{12pt}\fopz] |
| 1080 |
% |
| 1081 |
% \item[\iopz{letterpaper}\eopz{legalpaper}\eopz{executivepaper}\eopz |
| 1082 |
% {a4paper}\eopz{a5paper}\eopz{b5paper}\fopz] |
| 1083 |
% \hfil\null\linebreak |
| 1084 |
% Note that \packlass{\letteracdp} uses \opz{a4paper} as the default. |
| 1085 |
% |
| 1086 |
% \item[\iopz{landscape}\fopz] |
| 1087 |
% |
| 1088 |
% \item[\iopz{final}\eopz{draft}\fopz] |
| 1089 |
% |
| 1090 |
% \item[\iopz{oneside}\eopz{twoside}\fopz] |
| 1091 |
% |
| 1092 |
% \item[\iopz{onecolumn}\eopz{twocolumn}\fopz] The \opz{twocolumn} |
| 1093 |
% option is recognized, but triggers an error; the \opz{onecolumn} |
| 1094 |
% option is recognized, but it is ignored because in any case the |
| 1095 |
% document is typeset in one-column mode. Note, however, that |
| 1096 |
% requesting \opz{onecolumn} as a global option could make sense: |
| 1097 |
% precisely, it could serve to inform possible packages that the |
| 1098 |
% document has only one column. But, precisely for this reason, this |
| 1099 |
% option is requested by default during the class initialization; |
| 1100 |
% there is hence no reason to specify it, but it does no harm. |
| 1101 |
% |
| 1102 |
% \item[\iopz{leqn}\fopz] |
| 1103 |
% |
| 1104 |
% \item[\iopz{fleqn}\fopz] |
| 1105 |
% |
| 1106 |
% \end{description} |
| 1107 |
% |
| 1108 |
% We now list the option specific to the \packlass{\letteracdp} class. |
| 1109 |
% |
| 1110 |
% \begin{description} |
| 1111 |
% |
| 1112 |
% \item[\iopz{mediumsubject}\eopz{boldsubject}\fopz] |
| 1113 |
% The \opz{mediumsubject} option requests that the subject of the |
| 1114 |
% letters be typeset in medium weight, while the \opz{boldsubject} |
| 1115 |
% option makes it appear in boldface type. The default is |
| 1116 |
% \opz{mediumsubject}. |
| 1117 |
% |
| 1118 |
% \item[\iopz{uprightsignature}\eopz{italicsignature}\fopz] |
| 1119 |
% The \opz{uprightsignature} option requests that the signature of the |
| 1120 |
% letters be typeset in upright shape, while the \opz{italicsignature} |
| 1121 |
% option makes it appear in italic shape. The default is |
| 1122 |
% \opz{uprightsignature}. |
| 1123 |
% |
| 1124 |
% \item[\iopz{signaturerule}\eopz{nosignaturerule}\fopz] |
| 1125 |
% Drawing or not a thin rule to mark the spot where you should sign a |
| 1126 |
% letter is a matter of style that, as such, should apply to the whole |
| 1127 |
% document; for this reason, this behavior is requested by menas of an |
| 1128 |
% option, namely \opz{signaturerule}. As you can guess, \opz{signaturerule} |
| 1129 |
% causes the rule to be drawn, while \opz{nosignaturerule}, which is defined |
| 1130 |
% for the sake of completeness, suppresses it. Anyway, the rule is never |
| 1131 |
% drawn inside a \env{signatureenv*} environment; this includes signatures |
| 1132 |
% generated by the \mbox{$*$-form} of the "\closing" command. |
| 1133 |
% You can adjust the width of the rule by modifying, with "\setlength", |
| 1134 |
% the "\signaturerulewidth" rigid length. |
| 1135 |
% |
| 1136 |
% \item[\iopz{noPS}\eopz{usePS}\fopz] |
| 1137 |
% These two options are obsolete (to say the least!\@) and should |
| 1138 |
% \emph{not} be used any longer. If you want to improve the graphical |
| 1139 |
% quality of the seal, simply load the \packlass{\pictee} package in |
| 1140 |
% your document, along with the \packlass{\cdpaddon} package (of course, |
| 1141 |
% if you do so, PostScript or PDF\@ printing will be needed to produce the |
| 1142 |
% output). |
| 1143 |
% |
| 1144 |
% \item[\iopz{indent}\eopz{noindent}\eopz{smartindent}\eopz{shortindent}\fopz] |
| 1145 |
% These options are used to specify the paragraph indentation, but |
| 1146 |
% only for letters; any portion of text that is not included in a |
| 1147 |
% letter---but normally there is no such text---is not affected by |
| 1148 |
% these options. The \opz{indent} option sets the paragraph |
| 1149 |
% indentation, for letters, to one tenth of the text width, |
| 1150 |
% unless this amount looks too bad, in which case the indentation |
| 1151 |
% is set to 2~picas. The \opz{noindent} option completely |
| 1152 |
% suppressess paragraph indentation within letters. The \opz{smartindent} |
| 1153 |
% option sets the paragraph indentation, for letters, to the width |
| 1154 |
% of (the last line of) the salutation, unless this amount looks |
| 1155 |
% too bad, in which case it behaves like \opz{indent}. The \opz{shortindent} |
| 1156 |
% option maintains also for letters the same indentation used for |
| 1157 |
% text not included in letters (see below); its name, chosen to be |
| 1158 |
% more easily remembered, is due to the fact that normally it involves |
| 1159 |
% a shorter indentation than the default one. The default is \opz{indent}. |
| 1160 |
% I repeat that these options do not affect any text that should appear |
| 1161 |
% outside of letters, whose paragraphs will be always indented by |
| 1162 |
% 2~em, where the unit of 1~em is taken from the main document font; |
| 1163 |
% this is also the paragraph indentation for letters if the |
| 1164 |
% \opz{shortindent} option is specified. Paragraphs of |
| 1165 |
% postscripts are never indented. |
| 1166 |
% |
| 1167 |
% \item[\iopz{105x37labels}\eopz{70x37labels}\eopz{Avery5352labels}\fopz] |
| 1168 |
% These options indicate the format of the address labels. The |
| 1169 |
% first two options indicate address labels of mm~105\,$\times$\,37 |
| 1170 |
% and mm~70\,$\times$\,37, respectively. The third option |
| 1171 |
% indicates the address labels used by the standard \packlass{letter} |
| 1172 |
% class. Note the uppercase letter in \opz{Avery5352labels}. The |
| 1173 |
% default is \opz{105x37labels}. |
| 1174 |
% |
| 1175 |
% \end{description} |
| 1176 |
% |
| 1177 |
% \subsection{Customizing the letterhead} |
| 1178 |
% \label{sS:Customization} |
| 1179 |
% |
| 1180 |
% A new, long-awaited feature is available at last: it is now possible, |
| 1181 |
% with reasonable ease, to customize the letterhead produced by the |
| 1182 |
% \env{letterhead} environment.~:-D\closeofsentencespace |
| 1183 |
% As a matter of fact, this customization has always been possible---the |
| 1184 |
% \env{letterhead} environment would have been completely useless |
| 1185 |
% otherwise---but instructions on how to carry it out were given uniquely |
| 1186 |
% in documents that were only privately circulated; moreover, these |
| 1187 |
% instructions required you to modify some of the internal commands of the |
| 1188 |
% \Bundle. What the present version does is to provide a reasonable user |
| 1189 |
% interface for making these internal changes and (which is not less |
| 1190 |
% important) to document this interface. |
| 1191 |
% |
| 1192 |
% The customization of the letterhead basically involves the following three |
| 1193 |
% steps: |
| 1194 |
% |
| 1195 |
% \begin{enumerate} |
| 1196 |
% |
| 1197 |
% \item |
| 1198 |
% First of all, you need to load the \packlass{\cdpaddon} package, |
| 1199 |
% which is part of the \Bundle, passing to it the (new) option |
| 1200 |
% \opz{customletterhead}. |
| 1201 |
% |
| 1202 |
% \item |
| 1203 |
% The \packlass{\cdpaddon} package defines two environments, named |
| 1204 |
% \env{customletterhead} and \env{customletterfoot}, respectively, |
| 1205 |
% that can be used more or less like a \env{minipage} environment. |
| 1206 |
% You should put, in any place before the first letter (not entirely exact, |
| 1207 |
% but almost so: we'll refine this information underneath), a |
| 1208 |
% \env{customletterhead} environment holding the |
| 1209 |
% description of your letterhead. Just pretend you are composing a |
| 1210 |
% \env{minipage} with your letterhead inside. |
| 1211 |
% |
| 1212 |
% \item |
| 1213 |
% If you also want to customize the page footer (as it is ordinarily the |
| 1214 |
% case), define its contents inside a similarly placed |
| 1215 |
% \env{customletterfoot} environment. |
| 1216 |
% If you omit this step, the footer will be empty. |
| 1217 |
% |
| 1218 |
% \end{enumerate} |
| 1219 |
% |
| 1220 |
% \DescribeEnv{customletterhead}^^A |
| 1221 |
% \DescribeEnv{customletterfoot}^^A |
| 1222 |
% More formally, the \packlass{\cdpaddon} package makes two new environments |
| 1223 |
% available, named as stated above, that conform to the following syntax: |
| 1224 |
% |
| 1225 |
% \begin{flushleft} |
| 1226 |
% "\begin{customletterhead}{"\meta{wdth}"}"\quad |
| 1227 |
% \meta{text}\quad |
| 1228 |
% "\end{customletterhead}"\\ |
| 1229 |
% "\begin{customletterfoot}{"\meta{wdth}"}"\quad |
| 1230 |
% \meta{text}\quad |
| 1231 |
% "\end{customletterfoot}" |
| 1232 |
% \end{flushleft} |
| 1233 |
% |
| 1234 |
% Both these environments typeset \meta{text} in a \env{minipage} with |
| 1235 |
% width \meta{wdth} and save the result in a box register specifically |
| 1236 |
% reserved for this purpose (each environment has its own, dedicated |
| 1237 |
% register); subsequently, if the \opz{customletterhead} option has been |
| 1238 |
% specified, the contents of these box registers are used in place of the |
| 1239 |
% header and footer ordinarily defined by the \packlass{\letteracdp} |
| 1240 |
% document class. Note that the \packlass{\cdpaddon} package defines the |
| 1241 |
% \env{customletterhead} and \env{customletterfoot} environments in any |
| 1242 |
% case, \emph{independently} of which options you pass to it. |
| 1243 |
% |
| 1244 |
% The contents specified inside \env{customletterhead} and |
| 1245 |
% \env{customletterfoot} will be horizontally centered in the header and |
| 1246 |
% footer boxes, respectively; these boxes are defined by the page layout, |
| 1247 |
% but normally their left and right edges coincide with those of the main |
| 1248 |
% text. If the \meta{wdth} you have specified for the contents themselves |
| 1249 |
% exceeds the width available in the header\slash footer, they will stick |
| 1250 |
% out by the same amount of space on both sides (in brief: the contents are |
| 1251 |
% centered with "\hss" at both ends). Normally, you pass "\textwidth" as |
| 1252 |
% the \meta{wdth} parameter\footnote{I~have long been in doubt whether to make |
| 1253 |
% \meta{wdth} an optional parameter, with default value equal to |
| 1254 |
% \texttt{\bslash textwidth}; eventually, I~decided for a syntax that |
| 1255 |
% parallels the syntax of the \env{minipage} environment, and should |
| 1256 |
% therefore be obvious to remember.} and align things as you prefer |
| 1257 |
% \emph{inside} the \env{minipage}, perhaps creating sub-boxes or using |
| 1258 |
% \env{picture}s. |
| 1259 |
% |
| 1260 |
% Coming to vertical alignment, the boxes produced by the |
| 1261 |
% \env{customletterhead}\slash\env{customletterfoot} environments are |
| 1262 |
% ``smashed'' down to null height and depth; |
| 1263 |
% for \env{customletterhead}, the bottom edge of the box |
| 1264 |
% is aligned with the baseline of the header, whilst for |
| 1265 |
% \env{customletterfoot} it is the top edge which is aligned |
| 1266 |
% with the baseline of the footer. If you want the contents of |
| 1267 |
% \env{customletterhead} to sink below the baseline of the header, |
| 1268 |
% simply backspace vertically at their end, \emph{i.e.}, |
| 1269 |
% use "\vspace{"\meta{dist}"}" with a negative \meta{dist}, |
| 1270 |
% and the bottom edge of your custom header will be placed exactly |
| 1271 |
% \( \left|\meta{dist}\right| \) below the baseline of the header |
| 1272 |
% as defined by the general page layout. |
| 1273 |
% Similarly, a "\vspace{"\meta{dist}"}" with a negative \meta{dist} |
| 1274 |
% placed at the beginning of your custom footer will rise its top edge |
| 1275 |
% exactly \( \left|\meta{dist}\right| \) above the baseline of the footer |
| 1276 |
% defined by the general page layout. |
| 1277 |
% |
| 1278 |
% \iffalse |
| 1279 |
% Meta-comment: a <*gobble> guard is needed here to prevent the |
| 1280 |
% DocStrip program from putting the lines beginning with "%%" in the |
| 1281 |
% generated files. |
| 1282 |
%<*gobble> |
| 1283 |
% \fi |
| 1284 |
% \begin{figure}[tbp] |
| 1285 |
% \zerolistvertspaces |
| 1286 |
% \begin{verbatim}\documentclass |
| 1287 |
% [twoside,boldsubject,italicsignature,shortindent,signaturerule] |
| 1288 |
% {letteracdp}[2015/01/20] |
| 1289 |
%\usepackage[T1]{fontenc} |
| 1290 |
%\usepackage[english]{cdpbabel} |
| 1291 |
%\usepackage[customletterhead]{cdpaddon}[2015/01/21] |
| 1292 |
%\usepackage{url,lipsum} |
| 1293 |
% |
| 1294 |
%\address{ |
| 1295 |
% Gustavo \textsc{Mezzetti}\\ |
| 1296 |
% \protect\url{[email protected]} |
| 1297 |
%} |
| 1298 |
%\signature{Gustavo Mezzetti} |
| 1299 |
%\date{February~8, 2018} |
| 1300 |
%\place{Padova} |
| 1301 |
% |
| 1302 |
% |
| 1303 |
% |
| 1304 |
%% Definition of your letterhead occurs here: |
| 1305 |
% |
| 1306 |
%\begin{customletterhead}{\textwidth} |
| 1307 |
% \centering \Huge |
| 1308 |
% My Huge Centered Letterhead |
| 1309 |
%\end{customletterhead} |
| 1310 |
%\begin{customletterfoot}{\textwidth} |
| 1311 |
% \raggedleft \tiny |
| 1312 |
% \ruleacrossheadorfoot |
| 1313 |
% My (almost unreadable) small print\\ |
| 1314 |
% flushed against the right margin. |
| 1315 |
%\end{customletterfoot} |
| 1316 |
% |
| 1317 |
% |
| 1318 |
% |
| 1319 |
%\begin{document} |
| 1320 |
% |
| 1321 |
%\begin{foldedletterhead}[Whom it may concern] |
| 1322 |
% {To whom it may concern} |
| 1323 |
% [My own letterhead, at last!] |
| 1324 |
% |
| 1325 |
%\makepresentation |
| 1326 |
%\maketopdate\relax |
| 1327 |
% |
| 1328 |
%\lipsum[1-2] |
| 1329 |
% |
| 1330 |
%\makesignature |
| 1331 |
% |
| 1332 |
%\end{foldedletterhead} |
| 1333 |
% |
| 1334 |
%\end{document}\end{verbatim} |
| 1335 |
% \caption{How to customize the letterhead} |
| 1336 |
% \label{fig:customletter} |
| 1337 |
% \end{figure} |
| 1338 |
% \iffalse |
| 1339 |
%</gobble> |
| 1340 |
% \fi |
| 1341 |
% |
| 1342 |
% Fig.~\ref{fig:customletter} shows a sample input file for a letter with |
| 1343 |
% customized letterhead. Note that, among the others, we load the |
| 1344 |
% \packlass{\cdpaddon} package with the \opz{customletterhead} option. |
| 1345 |
% Note also that the \env{customletterhead}\slash\env{customletterfoot} |
| 1346 |
% environments \emph{can} be placed in the preamble; this makes it very easy |
| 1347 |
% to create a definition file containing the description of your custom |
| 1348 |
% letterhead, to be subsequently loaded in your source files, |
| 1349 |
% or even to define your custom version of the \packlass{\letteracdp} |
| 1350 |
% and \packlass{\articoletteracdp} document classes. For example, the three |
| 1351 |
% files \filedir{myletter.cls}, \filedir{myarticletter.cls}, and |
| 1352 |
% \filedir{mylogo.def}, whose contents are listed in |
| 1353 |
% fig.~\ref{fig:myletter}, \ref{fig:myarticletter}, and~\ref{fig:mylogo}, |
| 1354 |
% respectively, together define two new classes, called \packlass{myletter} |
| 1355 |
% and \packlass{myarticletter}, that respectively parallel |
| 1356 |
% \packlass{\letteracdp} and \packlass{\articoletteracdp}, but produce the |
| 1357 |
% same letterhead as the file of |
| 1358 |
% fig.~\ref{fig:customletter}.\footnote{Please note that \packlass{myletter} |
| 1359 |
% also used to be (a great many years ago) the obsolete name of the |
| 1360 |
% \packlass{akletter} document class. Instructing you to create a custom |
| 1361 |
% class by that name shouldn't cause you any trouble in |
| 1362 |
% ^^A ( paren match |
| 1363 |
% 2018~:-), but I~want to inform you all the same of the potential name |
| 1364 |
% conflict.} |
| 1365 |
% |
| 1366 |
% \begin{figure}[tbp] |
| 1367 |
% \zerolistvertspaces |
| 1368 |
% \begin{verbatim}\NeedsTeXFormat{LaTeX2e} % LaTeX2e is required! |
| 1369 |
%\ProvidesClass{myletter} |
| 1370 |
% [2018/02/08 v0.01 (development)] |
| 1371 |
%\LoadClassWithOptions{letteracdp}[2015/01/20] |
| 1372 |
%\input{mylogo.def} |
| 1373 |
%\endinput\end{verbatim} |
| 1374 |
% \caption{Contents of the \protect\filedir{myletter.cls} file} |
| 1375 |
% \label{fig:myletter} |
| 1376 |
% \end{figure} |
| 1377 |
% |
| 1378 |
% \begin{figure}[tbp] |
| 1379 |
% \zerolistvertspaces |
| 1380 |
% \begin{verbatim}\NeedsTeXFormat{LaTeX2e} % LaTeX2e is required! |
| 1381 |
%\ProvidesClass{myarticletter} |
| 1382 |
% [2018/02/08 v0.01 (development)] |
| 1383 |
%\LoadClassWithOptions{articoletteracdp}[2015/01/20] |
| 1384 |
%\input{mylogo.def} |
| 1385 |
%\endinput\end{verbatim} |
| 1386 |
% \caption{Contents of the \protect\filedir{myarticletter.cls} file} |
| 1387 |
% \label{fig:myarticletter} |
| 1388 |
% \end{figure} |
| 1389 |
% |
| 1390 |
% \begin{figure}[tbp] |
| 1391 |
% \zerolistvertspaces |
| 1392 |
% \begin{verbatim}\ProvidesFile{mylogo.def}[2018/02/08 v0.01 (development)] |
| 1393 |
% |
| 1394 |
%\RequirePackage[customletterhead]{cdpaddon}[2015/01/21] |
| 1395 |
% |
| 1396 |
%\begin{customletterhead}{\textwidth} |
| 1397 |
% \centering \Huge |
| 1398 |
% My Huge Centered Letterhead |
| 1399 |
%\end{customletterhead} |
| 1400 |
%\begin{customletterfoot}{\textwidth} |
| 1401 |
% \raggedleft \tiny |
| 1402 |
% \ruleacrossheadorfoot |
| 1403 |
% My (almost unreadable) small print\\ |
| 1404 |
% flushed against the right margin. |
| 1405 |
%\end{customletterfoot} |
| 1406 |
% |
| 1407 |
%\endinput\end{verbatim} |
| 1408 |
% \caption{Contents of the \protect\filedir{mylogo.def} file} |
| 1409 |
% \label{fig:mylogo} |
| 1410 |
% \end{figure} |
| 1411 |
% |
| 1412 |
% One final word: the \env{customletterhead}\slash\env{customletterfoot} |
| 1413 |
% environments save their contents in their respective box registers by |
| 1414 |
% means of a \emph{local} assignment, subject to ordinary scoping rules: |
| 1415 |
% this can be useful if you want to change the letterhead for just a single |
| 1416 |
% letter in a source file that contains many ones. |
| 1417 |
% |
| 1418 |
% See~\cite{ver036} for more information. |
| 1419 |
% |
| 1420 |
% \StopEventually{ |
| 1421 |
% \setcounter{secnumdepth}{0} |
| 1422 |
% \providecommand*\bysame{\leavevmode\hbox to3em{\hrulefill}\thinspace} |
| 1423 |
% |
| 1424 |
% \clearpage |
| 1425 |
% \pdfbookmark[0]{Back Matter}{BackMatter} |
| 1426 |
% \begin{thebibliography}{99} |
| 1427 |
% \addcontentsline{toc}{section}{\refname} |
| 1428 |
% |
| 1429 |
% \bibitem{LaTeXbook} |
| 1430 |
% L.~Lamport, \emph{\LaTeX---A Document Preparation System---User's |
| 1431 |
% Guide and Reference Manual}, 2nd~edition, Addison-Wesley, |
| 1432 |
% Reading, 1994. |
| 1433 |
% |
| 1434 |
% \bibitem{tutti} |
| 1435 |
% G.~Mezzetti, \emph{Breve presentazione d'una classe \LaTeX, denominata |
| 1436 |
% \packlass{\letteracdp}, utile nella preparazione delle lettere del |
| 1437 |
% Coordinamento}, technical note downloadable from:\\ |
| 1438 |
% \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/presentazione.tex}} |
| 1439 |
% |
| 1440 |
% \bibitem{esempi} |
| 1441 |
% \bysame, \emph{Esempi d'uso della classe \packlass{\letteracdp}}, |
| 1442 |
% technical note downloadable from:\\ |
| 1443 |
% \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/esempi.tex}} |
| 1444 |
% |
| 1445 |
% \bibitem{etichette} |
| 1446 |
% \bysame, \emph{Etichette degli indirizzi con la classe \packlass{\letteracdp}}, |
| 1447 |
% technical note downloadable from:\\ |
| 1448 |
% \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/etichett.tex}} |
| 1449 |
% |
| 1450 |
% \bibitem{novita} |
| 1451 |
% \bysame, \emph{Grandi novit\`{a} per \packlass{\letteracdp}: |
| 1452 |
% arriva \packlass{\articoletteracdp}!}, technical note downloadable from:\\ |
| 1453 |
% \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/novita.tex}} |
| 1454 |
% |
| 1455 |
% \bibitem{nts} |
| 1456 |
% \bysame, \emph{Forse non tutti sanno che\ldots}, |
| 1457 |
% technical note downloadable from:\\ |
| 1458 |
% \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/nontuttisanno.tex}} |
| 1459 |
% |
| 1460 |
% \bibitem{ver028} |
| 1461 |
% \bysame, \emph{Annuncio delle versioni 0.28 della classe \packlass{\letteracdp} |
| 1462 |
% e 0.08 della classe \packlass{\articoletteracdp}}, |
| 1463 |
% technical note downloadable from:\\ |
| 1464 |
% \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/ver0-28.tex}} |
| 1465 |
% |
| 1466 |
% \bibitem{cdpaddon} |
| 1467 |
% \bysame, \emph{Il pacchetto \packlass{\cdpaddon}}, |
| 1468 |
% technical note downloadable from:\\ |
| 1469 |
% \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/cdpaddonistr.tex}} |
| 1470 |
% |
| 1471 |
% \bibitem{ver031} |
| 1472 |
% \bysame, \emph{Annuncio della versione 0.31 del \emph{\Bundle}}, |
| 1473 |
% technical note downloadable from:\\ |
| 1474 |
% \rlap{\url{http://www.math.unipd.it/~mezzetti/Gustavo/Ludic/CDP/ver0-31.tex}} |
| 1475 |
% |
| 1476 |
% \bibitem{ver036} |
| 1477 |
% \bysame, \emph{The \Bundle\ version~0.36}, |
| 1478 |
% included in the documentation of the \packlass{\cdpbundl} package,\\ |
| 1479 |
% \href{file:cdp-ver-0-36.pdf} |
| 1480 |
% {\nolinkurl{$TEXMF/doc/latex/cdpbundl/cdp-ver-0-36.pdf}} |
| 1481 |
% |
| 1482 |
% \end{thebibliography} |
| 1483 |
% } |
| 1484 |
% |
| 1485 |
% |
| 1486 |
% |
| 1487 |
% \clearpage |
| 1488 |
% \part{Implementation} |
| 1489 |
% |
| 1490 |
% \changes{0.36a-c}{Between 2015 and 2018}{Never publicly released.} |
| 1491 |
% |
| 1492 |
% \section{About this part} |
| 1493 |
% |
| 1494 |
% This part is of interest only to \LaTeX\ hackers; to avoid |
| 1495 |
% having this part printed, look in the file \filedir{\filename} |
| 1496 |
% for a line that looks \emph{exactly} like this |
| 1497 |
% \begin{verbatim}%% \OnlyDescription % uncomment to discard Implementation part\end{verbatim} |
| 1498 |
% and remove the two leading percent signs ("%%"). |
| 1499 |
% |
| 1500 |
% \section{A driver for this document} |
| 1501 |
% |
| 1502 |
% This part of the file is \emph{not} included in any generated file: |
| 1503 |
% it is simply the driver. |
| 1504 |
% \begin{macrocode} |
| 1505 |
%<*driver> |
| 1506 |
% \end{macrocode} |
| 1507 |
% |
| 1508 |
% To begin with, we load the \packlass{ltxdoc} class and the |
| 1509 |
% \packlass{hypdoc} package. |
| 1510 |
% \begin{macrocode} |
| 1511 |
\documentclass{ltxdoc} |
| 1512 |
\usepackage{hypdoc} |
| 1513 |
% \end{macrocode} |
| 1514 |
% We now set a few typesetting options. |
| 1515 |
% First of all, we want a history listing and a full index, the latter |
| 1516 |
% organized by line numbers. |
| 1517 |
% \begin{macrocode} |
| 1518 |
\RecordChanges |
| 1519 |
\EnableCrossrefs |
| 1520 |
\CodelineIndex |
| 1521 |
% \end{macrocode} |
| 1522 |
% If you don't want to include the second part of this document, |
| 1523 |
% \emph{Implementation}, uncomment the line containing the command |
| 1524 |
% "\OnlyDescription". |
| 1525 |
% \begin{macrocode} |
| 1526 |
%% \OnlyDescription % uncomment to discard Implementation part |
| 1527 |
% \end{macrocode} |
| 1528 |
% Finally, setting "\hfuzz" and "\vfuzz" to 0~points is only one |
| 1529 |
% of the many neurotic symptoms of the author! |
| 1530 |
% \begin{macrocode} |
| 1531 |
\hfuzz = 0pt |
| 1532 |
\vfuzz = 0pt |
| 1533 |
% \end{macrocode} |
| 1534 |
% Now input this same file, using \DS\ conventions. |
| 1535 |
% \begin{macrocode} |
| 1536 |
\begin{document} |
| 1537 |
\DocInput{cdpbundl.dtx} |
| 1538 |
% \end{macrocode} |
| 1539 |
% Then print the change list and the index. We put these commands in |
| 1540 |
% the driver, rather than in the comments of this file, because |
| 1541 |
% producing the change list and the index is somewhat cumbersome, and some |
| 1542 |
% users could prefer to omit them: such users should simply use a |
| 1543 |
% different driver. |
| 1544 |
% \begin{macrocode} |
| 1545 |
\clearpage \PrintChanges |
| 1546 |
\clearpage \PrintIndex |
| 1547 |
% \end{macrocode} |
| 1548 |
% When this file is read directly by \LaTeX\ without the intervention |
| 1549 |
% of \DS, the following line will make \TeX\ stop |
| 1550 |
% reading. |
| 1551 |
% \begin{macrocode} |
| 1552 |
\end{document} |
| 1553 |
% \end{macrocode} |
| 1554 |
% End of driver module. |
| 1555 |
% \begin{macrocode} |
| 1556 |
%</driver> |
| 1557 |
% \end{macrocode} |
| 1558 |
% \noindent\null\par |
| 1559 |
% |
| 1560 |
% \section{The code for the \protect\packlass{\letteracdp} class} |
| 1561 |
% |
| 1562 |
% This part of the file goes into \filedir{\letteracdp.cls}. |
| 1563 |
% \begin{macrocode} |
| 1564 |
%<*letter> |
| 1565 |
% \end{macrocode} |
| 1566 |
% The reader must be warned that this is only a preliminary release |
| 1567 |
% of this code: a thorough reorganization of the macros has already |
| 1568 |
% been planned for future releases. Instead of putting all the code |
| 1569 |
% in a single file and giving it the form of a document class, |
| 1570 |
% in future releases the code will be split into several files, |
| 1571 |
% part of which will be packages, part definition and/or |
| 1572 |
% configuation files, and so on. |
| 1573 |
% |
| 1574 |
% \subsection{Identification} |
| 1575 |
% |
| 1576 |
% I don't remember exactly why I asked for the June 1997 release |
| 1577 |
% of \LaTeXe, but I am sure that there was a reason; so, let us |
| 1578 |
% continue to ask for it. |
| 1579 |
% \begin{macrocode} |
| 1580 |
\NeedsTeXFormat{LaTeX2e}[1997/06/01] % LaTeX2e is required! |
| 1581 |
% \end{macrocode} |
| 1582 |
% The usual identification; the string \texttt{(**incomplete**)} |
| 1583 |
% will eventually be removed, I hope! |
| 1584 |
% \begin{macrocode} |
| 1585 |
\ProvidesClass{letteracdp} |
| 1586 |
[2018/02/08 v0.36d (**incomplete**)] |
| 1587 |
% \end{macrocode} |
| 1588 |
% Print a copyright message on the terminal, just below the name |
| 1589 |
% of the class. |
| 1590 |
% \begin{macrocode} |
| 1591 |
\typeout{Copyright (C) 1999-2018 by Gustavo MEZZETTI, |
| 1592 |
all rights reserved.} |
| 1593 |
% \end{macrocode} |
| 1594 |
% |
| 1595 |
% \begin{macro}{\@letteracdp} |
| 1596 |
% Define a macro containing the name of the class; it will be used |
| 1597 |
% in error and warning messages. This is done for two reasons: |
| 1598 |
% first of all, to save tokens in macro definitions, but also to |
| 1599 |
% avoid the risk of mispelling the name of the class in some place. |
| 1600 |
% \begin{macrocode} |
| 1601 |
\@ifdefinable\@letteracdp{\def\@letteracdp{letteracdp}} |
| 1602 |
% \end{macrocode} |
| 1603 |
% \end{macro} |
| 1604 |
% |
| 1605 |
% \subsection{Initial code} |
| 1606 |
% |
| 1607 |
% \begin{macro}{\Coordinamento} |
| 1608 |
% \changes{0.36d}{2018 Feb 08}{Made the accent of ``Universit\`a'' |
| 1609 |
% independent of the currently selected font encoding.}^^A |
| 1610 |
% Define the following macros near the beginning of the code, so it |
| 1611 |
% will be easy to change them. The first one is the full name of the |
| 1612 |
% \emph{Coordinamento}: |
| 1613 |
% \begin{macrocode} |
| 1614 |
\newcommand*\Coordinamento{% |
| 1615 |
Coordinamento dei Dottorandi e dei Dottori di Ricerca |
| 1616 |
dell'Universit\`a di Padova% |
| 1617 |
} |
| 1618 |
% \end{macrocode} |
| 1619 |
% \end{macro} |
| 1620 |
% \begin{macro}{\CoordinamentoWWW} |
| 1621 |
% The second one is its web address: |
| 1622 |
% \begin{macrocode} |
| 1623 |
\newcommand*\CoordinamentoWWW{% |
| 1624 |
http://www.dei.unipd.it/\string~assdott/% |
| 1625 |
} |
| 1626 |
% \end{macrocode} |
| 1627 |
% \end{macro} |
| 1628 |
% |
| 1629 |
% Declare the fonts used to print the letterhead and the footer. In 1999 |
| 1630 |
% I~knew so little about font selection in \LaTeXe\ that I~believed that it |
| 1631 |
% was necessary to declare them as ``fixed fonts'' in order to preserve them |
| 1632 |
% from being affected by options (\emph{e.g.}, \opz{12pt}), packages |
| 1633 |
% (\emph{e.g.}, \opz{times}), and so on. Of course, this is nonsense, and it |
| 1634 |
% is probably wiser to switch to "\usefont"; but for the moment (vers.~0.36d) |
| 1635 |
% I~am not (yet) going to do so. |
| 1636 |
% \changes{0.36d}{2018 Feb 08}{Switched the fonts for the CDP\ letterhead |
| 1637 |
% back to OT1 encoding.}^^A |
| 1638 |
% Note that, in vers.~0.36d, the fonts for the CDP\ letterhead have been |
| 1639 |
% switched back to OT1 encoding. |
| 1640 |
% \begin{macro}{\@lh@nss} |
| 1641 |
% Main font for letterhead is Computer Modern Sans Serif 12pt |
| 1642 |
% (LetterHead\slash Normal Sans Serif): |
| 1643 |
% \begin{macrocode} |
| 1644 |
\DeclareFixedFont\@lh@nss{OT1}{cmss}{m}{n} {12} |
| 1645 |
% \end{macrocode} |
| 1646 |
% \end{macro} |
| 1647 |
% \begin{macro}{\@lh@bss} |
| 1648 |
% A couple of initials are printed using a bigger font, that is, |
| 1649 |
% Computer Modern Sans Serif 17pt (LetterHead\slash Bigger Sans |
| 1650 |
% Serif): |
| 1651 |
% \begin{macrocode} |
| 1652 |
\DeclareFixedFont\@lh@bss{OT1}{cmss}{m}{n} {17} |
| 1653 |
% \end{macrocode} |
| 1654 |
% \end{macro} |
| 1655 |
% \begin{macro}{\@lh@rm} |
| 1656 |
% Main font for footer: Computer Modern Roman 9pt |
| 1657 |
% (LetterHead\slash RoMan): |
| 1658 |
% \begin{macrocode} |
| 1659 |
\DeclareFixedFont\@lh@rm {OT1}{cmr} {m}{n} {9} |
| 1660 |
% \end{macrocode} |
| 1661 |
% \end{macro} |
| 1662 |
% \begin{macro}{\@lh@it} |
| 1663 |
% The words ``World Wide Web'' are printed in italics |
| 1664 |
% (LetterHead\slash ITalics): |
| 1665 |
% \begin{macrocode} |
| 1666 |
\DeclareFixedFont\@lh@it {OT1}{cmr} {m}{it}{9} |
| 1667 |
% \end{macrocode} |
| 1668 |
% \end{macro} |
| 1669 |
% \begin{macro}{\@lh@tt} |
| 1670 |
% And finally, the web address is printed in teletype font |
| 1671 |
% (LetterHead\slash TeleType): |
| 1672 |
% \begin{macrocode} |
| 1673 |
\DeclareFixedFont\@lh@tt {OT1}{cmtt}{m}{n} {9} |
| 1674 |
% \end{macrocode} |
| 1675 |
% \end{macro} |
| 1676 |
% |
| 1677 |
% \begin{macro}{\@ptsize} |
| 1678 |
% The following macro will be used later to decide which ``class |
| 1679 |
% layout'' file to load. |
| 1680 |
% \begin{macrocode} |
| 1681 |
\newcommand\@ptsize{} |
| 1682 |
% \end{macrocode} |
| 1683 |
% \end{macro} |
| 1684 |
% |
| 1685 |
% A couple of useful commands that are missing from the \LaTeX\ |
| 1686 |
% kernel; we leave this explicative comment in the code too. |
| 1687 |
% \begin{macrocode} |
| 1688 |
%% A couple of useful things that are missing from the LaTeX kernel: |
| 1689 |
% \end{macrocode} |
| 1690 |
% \begin{macro}{\@newrigidlength} |
| 1691 |
% The first is similar to "\newlength", but allocates a |
| 1692 |
% \textoken{dimen} rather than a \textoken{glue}. |
| 1693 |
% \begin{macrocode} |
| 1694 |
\@ifdefinable\@newrigidlength{\def\@newrigidlength#1{% |
| 1695 |
\@ifdefinable#1{\newdimen#1}% |
| 1696 |
}} |
| 1697 |
% \end{macrocode} |
| 1698 |
% \end{macro} |
| 1699 |
% \begin{macro}{\@msetlength} |
| 1700 |
% The second can be used to say, for instance, |
| 1701 |
%\begin{verbatim} |
| 1702 |
%\@msetlength{\someRubberLength}{2}{\anotherRubberLength} |
| 1703 |
%\end{verbatim} |
| 1704 |
% to set "\someRubberLength" to twice the value of |
| 1705 |
% "\anotherRubberLength", without destroying the stretch and |
| 1706 |
% shrink components (recall that, on the contrary, |
| 1707 |
%\begin{verbatim} |
| 1708 |
%\setlength{\someRubberLength}{2\anotherRubberLength} |
| 1709 |
%\end{verbatim} |
| 1710 |
% only sets the \emph{natural length} of "\someRubberLength" to |
| 1711 |
% twice the \emph{natural length} of "\anotherRubberLength", and |
| 1712 |
% both the stretch and shrink components of "\someRubberLength" to |
| 1713 |
% zero). |
| 1714 |
% \begin{macrocode} |
| 1715 |
\@ifdefinable\@msetlength{\def\@msetlength#1#2#3{% |
| 1716 |
#1#3\multiply#1#2\relax |
| 1717 |
}} |
| 1718 |
% \end{macrocode} |
| 1719 |
% \end{macro} |
| 1720 |
% |
| 1721 |
% A number of counter, lengths, etc.\ are defined here, early in the code, to |
| 1722 |
% detect as soon as possible if any name conflicts with an already defined |
| 1723 |
% one. The idea was that, since the class is pretty long, it is better to |
| 1724 |
% avoid to discover near the end that it cannot be used because of a name |
| 1725 |
% that is already defined; but of course, with the speed of modern computers |
| 1726 |
% this is not at all a problem, so this is just more nonsense that should be |
| 1727 |
% eliminated. Presently, however, they are almost all listed here; for many |
| 1728 |
% of them, some explanations are given here, and a more precise description |
| 1729 |
% is deferred until the spot where the corresponding entity is used. |
| 1730 |
% |
| 1731 |
% \counterindex{letter} |
| 1732 |
% First, we introduce a counter to keep track of the number of letters |
| 1733 |
% produced. \textbf{Warning:} {\em this counter is used also for |
| 1734 |
% internal bookkeeping, so don't change its value unless you know what |
| 1735 |
% you are doing!} |
| 1736 |
% \begin{macrocode} |
| 1737 |
\newcounter{letter} |
| 1738 |
% \end{macrocode} |
| 1739 |
% |
| 1740 |
% \counterindex{emptyaddrlabels} |
| 1741 |
% The following five counters are used in connection with the |
| 1742 |
% address labels optionally printed at the end of a compiled file. |
| 1743 |
% The \cnt{emptyaddrlabels} counter holds the number of labels to |
| 1744 |
% leave blank when starting to print (the first sheet of) the address |
| 1745 |
% labels; this is useful if some labels on the same sheet have already |
| 1746 |
% been peeled off. |
| 1747 |
% \begin{macrocode} |
| 1748 |
\newcounter{emptyaddrlabels} |
| 1749 |
% \end{macrocode} |
| 1750 |
% \counterindex{addrlabelrows} |
| 1751 |
% A single sheet of address labels contains many labels. For example, |
| 1752 |
% in the well-known (in the U.S.) Avery 5352 format each sheet |
| 1753 |
% contains ten labels, organized in two columns and five rows. Other |
| 1754 |
% formats contain different number of rows and columns of labels. To |
| 1755 |
% cope with all these different formats, the number of rows and |
| 1756 |
% columns of labels is kept in two counters: \cnt{addrlabelrows} holds |
| 1757 |
% the number of rows |
| 1758 |
% \begin{macrocode} |
| 1759 |
\newcounter{addrlabelrows} |
| 1760 |
% \end{macrocode} |
| 1761 |
% \counterindex{addrlabelcolumns} |
| 1762 |
% and \cnt{addrlabelcolumns} holds the number of columns. |
| 1763 |
% \begin{macrocode} |
| 1764 |
\newcounter{addrlabelcolumns} |
| 1765 |
% \end{macrocode} |
| 1766 |
% \counterindex{label} |
| 1767 |
% The \cnt{addrlabelrows} and \cnt{addrlabelcolumns} counters are |
| 1768 |
% usually set once for all by the code provided in a suitable |
| 1769 |
% "\DeclareOption" declaration, as the result of the user's request of |
| 1770 |
% one of the options devoted to specifying the address label format |
| 1771 |
% (\opz{105x37labels}, etc.). In some exceptional circumstances, they |
| 1772 |
% can also be reset by the user, but even in this case, once set they |
| 1773 |
% are not changed any more. They are therefore not real ``counters'', |
| 1774 |
% but rather (style) parameters. The following two counters, instead, |
| 1775 |
% are ``real'', \emph{running} counters: they hold a running index |
| 1776 |
% which identifies the current label. The \cnt{label} counter holds |
| 1777 |
% the index of a label inside a given letter |
| 1778 |
% \begin{macrocode} |
| 1779 |
\newcounter{label}[letter] |
| 1780 |
% \end{macrocode} |
| 1781 |
% \counterindex{totallabel} |
| 1782 |
% while the \cnt{totallabel} counter holds the global index of a |
| 1783 |
% label, that is, the index of the label in the whole document. |
| 1784 |
% \begin{macrocode} |
| 1785 |
\newcounter{totallabel} |
| 1786 |
% \end{macrocode} |
| 1787 |
% It is possible that a single letter has more than one label |
| 1788 |
% associated, because sometimes letters are sent to more than one |
| 1789 |
% addressee. |
| 1790 |
% |
| 1791 |
% \counterindex{equation} |
| 1792 |
% \counterindex{footnote} |
| 1793 |
% \counterindex{mpfootnote} |
| 1794 |
% In our document class, the letter is the main unit in which the |
| 1795 |
% document is organized. Therefore, we want that equations, footnotes, |
| 1796 |
% and footnotes inside minipages be numbered within letters. |
| 1797 |
% \begin{macrocode} |
| 1798 |
\@addtoreset{equation}{letter} |
| 1799 |
\@addtoreset{footnote}{letter} |
| 1800 |
\@addtoreset{mpfootnote}{letter} |
| 1801 |
% \end{macrocode} |
| 1802 |
% |
| 1803 |
% \begin{macro}{\@lh@left@margin} |
| 1804 |
% The second type of parameters we are going to define are rigid lengths |
| 1805 |
% (\textoken{dimen}'s). The first two govern the position of the CDP\ seal |
| 1806 |
% with respect to the text margins (see also fig.~\ref{fig:plo} on |
| 1807 |
% page~\pageref{fig:plo}). More precisely, "\@lh@left@margin" is the |
| 1808 |
% horizontal distance from the left margin of text to the \emph{right} edge |
| 1809 |
% of the seal\ldots |
| 1810 |
% \begin{macrocode} |
| 1811 |
\@newrigidlength\@lh@left@margin |
| 1812 |
% \end{macrocode} |
| 1813 |
% \end{macro} |
| 1814 |
% \begin{macro}{\@lh@right@margin} |
| 1815 |
% \ldots and "\@lh@right@margin" is the distance from the right edge of |
| 1816 |
% the rule found in the rightmost part of the letterhead to the right |
| 1817 |
% margin of text. |
| 1818 |
% \begin{macrocode} |
| 1819 |
\@newrigidlength\@lh@right@margin |
| 1820 |
% \end{macrocode} |
| 1821 |
% \end{macro} |
| 1822 |
% A couple of lenghts used as internal registers, to hold |
| 1823 |
% values that must be passed to certain macros---we shall explain |
| 1824 |
% their use when we come to it. |
| 1825 |
% \begin{macrocode} |
| 1826 |
\@newrigidlength\@block@inden |
| 1827 |
\@newrigidlength\@block@width |
| 1828 |
% \end{macrocode} |
| 1829 |
% \begin{macro}{\longindentation} |
| 1830 |
% The following are style parameters used to govern the typesetting |
| 1831 |
% of the addresses and of the signature. Some of them, in turn, are |
| 1832 |
% defined in terms of another, crucial style parameter, the so-called |
| 1833 |
% ``long indentation''; this is the length by which items that appear |
| 1834 |
% in the right-hand half of the letter should be indented: roughly, it |
| 1835 |
% is equal to half the value of "\textsize", but it can be fine-tuned |
| 1836 |
% at ``"\begin{document}"-time'' for better alignment with some parts |
| 1837 |
% of the letterhead. |
| 1838 |
% \begin{macrocode} |
| 1839 |
\@newrigidlength\longindentation |
| 1840 |
% \end{macrocode} |
| 1841 |
% \end{macro} |
| 1842 |
% \begin{macro}{\senderindentation} |
| 1843 |
% The amount by which the sender address should be indented: |
| 1844 |
% \begin{macrocode} |
| 1845 |
\@newrigidlength\senderindentation |
| 1846 |
% \end{macrocode} |
| 1847 |
% \end{macro} |
| 1848 |
% \begin{macro}{\senderwidth} |
| 1849 |
% The width of the column in which the sender address should be |
| 1850 |
% typeset: |
| 1851 |
% \begin{macrocode} |
| 1852 |
\@newrigidlength\senderwidth |
| 1853 |
% \end{macrocode} |
| 1854 |
% \end{macro} |
| 1855 |
% \begin{macro}{\addresseeindentation} |
| 1856 |
% The indentation\ldots |
| 1857 |
% \begin{macrocode} |
| 1858 |
\@newrigidlength\addresseeindentation |
| 1859 |
% \end{macrocode} |
| 1860 |
% \end{macro} |
| 1861 |
% \begin{macro}{\addresseewidth} |
| 1862 |
% \ldots and column width for the addresse address: |
| 1863 |
% \begin{macrocode} |
| 1864 |
\@newrigidlength\addresseewidth |
| 1865 |
% \end{macrocode} |
| 1866 |
% \end{macro} |
| 1867 |
% \begin{macro}{\signatureindentation} |
| 1868 |
% Indentation\ldots |
| 1869 |
% \begin{macrocode} |
| 1870 |
\@newrigidlength\signatureindentation |
| 1871 |
% \end{macrocode} |
| 1872 |
% \end{macro} |
| 1873 |
% \begin{macro}{\signaturewidth} |
| 1874 |
% \ldots and width for the signature: |
| 1875 |
% \begin{macrocode} |
| 1876 |
\@newrigidlength\signaturewidth |
| 1877 |
% \end{macrocode} |
| 1878 |
% \end{macro} |
| 1879 |
% \begin{macro}{\signaturerulewidth} |
| 1880 |
% The width of the rule drawn by the ``factory'' definition of |
| 1881 |
% "\signaturerule" (which is backed up in "\CDPFactorySignatureRule"): |
| 1882 |
% \begin{macrocode} |
| 1883 |
\@newrigidlength\signaturerulewidth |
| 1884 |
\setlength\signaturerulewidth{5cm} |
| 1885 |
% \end{macrocode} |
| 1886 |
% \end{macro} |
| 1887 |
% \begin{macro}{\foldedheight} |
| 1888 |
% There are macros that provide the ability to typeset letters that |
| 1889 |
% are going to be folded before being put into the envelopes; these |
| 1890 |
% macros ensure that no text is typeset astride of the folding. The |
| 1891 |
% vertical distance from the upper edge of the \emph{paper} (not of |
| 1892 |
% the text) to the folding is kept in "\foldedheight". A value of |
| 1893 |
% zero or less (\emph{e.g.}, $-"\maxdimen"$) prohibits folded letters: |
| 1894 |
% this can be useful for certain paper sizes, and for safety it is set |
| 1895 |
% here as the default. For paper sizes that allow folded letters, the |
| 1896 |
% actual value of "\foldedheight" is set by the code given in the |
| 1897 |
% relevant "\DeclareOption". |
| 1898 |
% \begin{macrocode} |
| 1899 |
\@newrigidlength\foldedheight |
| 1900 |
\setlength\foldedheight{-\maxdimen} |
| 1901 |
% \end{macrocode} |
| 1902 |
% \end{macro} |
| 1903 |
% \begin{macro}{\@folding@ht} |
| 1904 |
% In general, the default setting of "\foldedheight" provided by the |
| 1905 |
% option handling mechanism should be sufficient. However, the user |
| 1906 |
% is allowed to change the value of "\foldedheight", preferably in the |
| 1907 |
% preamble, but also in the document body, if a certain simple |
| 1908 |
% precaution is taken. This can be useful if one wants to alter the |
| 1909 |
% default behavior, \emph{e.g.}, to have letters that are two-folded |
| 1910 |
% rather then three-folded, or to allow folded letters also when using |
| 1911 |
% a paper format, like A5, that normally does not allow them. Useful, |
| 1912 |
% sure, but it rises a problem: the algorithm that decides where to |
| 1913 |
% split the text between the part that must go above the folding and |
| 1914 |
% the part that must go below it requires that the value of |
| 1915 |
% "\foldedheight" lie within a certain range. Obviously we cannot ask |
| 1916 |
% the user to know what range is acceptable, so we adopt the following |
| 1917 |
% solution: we define an ``internal backup'' of "\foldedheight", |
| 1918 |
% called "\@folding@ht" for historical reasons; then, the user is |
| 1919 |
% asked to call the macro "\checkfoldedheight" (see below) whenever |
| 1920 |
% (s)he changes the value of "\foldedheight"; this macro checks the |
| 1921 |
% new value and, if it is OK, copies it in the internal dimension |
| 1922 |
% "\@folding@ht" (actually, after some scaling conversions), otherwise |
| 1923 |
% it sets an internal flag which disables folded letters and issues a |
| 1924 |
% warning. A slight variant of "\checkfoldedheight", which differs |
| 1925 |
% only in the warning produced, is called automatically at the |
| 1926 |
% "\begin{document}", so the user is \emph{not} required to call |
| 1927 |
% "\checkfoldedheight" if the changes to "\foldedheight" are made in |
| 1928 |
% the preamble. |
| 1929 |
% \begin{macrocode} |
| 1930 |
\@newrigidlength\@folding@ht |
| 1931 |
% \end{macrocode} |
| 1932 |
% \end{macro} |
| 1933 |
% The following three dimensions will be described when we come to |
| 1934 |
% the point where they are used. |
| 1935 |
% \begin{macrocode} |
| 1936 |
\@newrigidlength\@lh@folding@ht |
| 1937 |
\@newrigidlength\@above@folding@margin |
| 1938 |
\@newrigidlength\@above@folding@shrink |
| 1939 |
% \end{macrocode} |
| 1940 |
% |
| 1941 |
% Now we pass to rubber lengths, \emph{i.e.}, \TeX's |
| 1942 |
% \textoken{skip}'s. The first two are something like internal |
| 1943 |
% registers used to pass certain style parameters back and forth |
| 1944 |
% between macros. |
| 1945 |
% \begin{macrocode} |
| 1946 |
\newlength\@block@space |
| 1947 |
\newlength\@block@andspace |
| 1948 |
% \end{macrocode} |
| 1949 |
% \begin{macro}{\@below@folding@skip} |
| 1950 |
% This is an internal style parameter which specifies the amount of |
| 1951 |
% vertical blank space that should be left, in folded letters, between |
| 1952 |
% the folding and the text that follows it. It can be redefined in |
| 1953 |
% packages or other classes, or, in an emergency, by the final user. |
| 1954 |
% It is a rubber length, but in this class it is assigned, as we shall |
| 1955 |
% see later, a value without stretch or shrink components. Note that |
| 1956 |
% the actual space left between the folding and the text will usually |
| 1957 |
% be greater than, or at most equal to, the value of |
| 1958 |
% "\@below@folding@skip", because lines of text are usually aligned to |
| 1959 |
% integer multiples of half the "\baselineskip". |
| 1960 |
% \begin{macrocode} |
| 1961 |
\newlength\@below@folding@skip |
| 1962 |
% \end{macrocode} |
| 1963 |
% \end{macro} |
| 1964 |
% |
| 1965 |
% The following ten (rubber) length are style parameters that affect |
| 1966 |
% the amount of vertical space left before and after certain building |
| 1967 |
% blocks, like addresses and signature. The user can freely change |
| 1968 |
% them with "\setlength". Note that all these spaces are added with |
| 1969 |
% "\addvspace", so only the largest one survives if two of them occur |
| 1970 |
% in a row. |
| 1971 |
% \begin{macro}{\aboveaddressvspace} |
| 1972 |
% The amount of vertical space above the sender's or addressee's |
| 1973 |
% address: |
| 1974 |
% \begin{macrocode} |
| 1975 |
\newlength\aboveaddressvspace |
| 1976 |
% \end{macrocode} |
| 1977 |
% \end{macro} |
| 1978 |
% \begin{macro}{\andaddressvspace} |
| 1979 |
% The amount of vertical space between two consecutive addresses |
| 1980 |
% separated with "\and" or "\andcc": |
| 1981 |
% \begin{macrocode} |
| 1982 |
\newlength\andaddressvspace |
| 1983 |
% \end{macrocode} |
| 1984 |
% \end{macro} |
| 1985 |
% \begin{macro}{\belowaddressvspace} |
| 1986 |
% The amount of vertical space below the sender's or addressee's |
| 1987 |
% address: |
| 1988 |
% \begin{macrocode} |
| 1989 |
\newlength\belowaddressvspace |
| 1990 |
% \end{macrocode} |
| 1991 |
% \end{macro} |
| 1992 |
% \begin{macro}{\abovesubjectvspace} |
| 1993 |
% The amount of vertical space above the subject: |
| 1994 |
% \begin{macrocode} |
| 1995 |
\newlength\abovesubjectvspace |
| 1996 |
% \end{macrocode} |
| 1997 |
% \end{macro} |
| 1998 |
% \begin{macro}{\presubjectvspace} |
| 1999 |
% The amount of vertical space between the text specified with |
| 2000 |
% "\presubject" (if any) and the main body of the subject: |
| 2001 |
% \begin{macrocode} |
| 2002 |
\newlength\presubjectvspace |
| 2003 |
% \end{macrocode} |
| 2004 |
% \end{macro} |
| 2005 |
% \begin{macro}{\belowsubjectvspace} |
| 2006 |
% The amount of vertical space below the subject: |
| 2007 |
% \begin{macrocode} |
| 2008 |
\newlength\belowsubjectvspace |
| 2009 |
% \end{macrocode} |
| 2010 |
% \end{macro} |
| 2011 |
% \begin{macro}{\abovesignaturevspace} |
| 2012 |
% The amount of vertical space above the signature: |
| 2013 |
% \begin{macrocode} |
| 2014 |
\newlength\abovesignaturevspace |
| 2015 |
% \end{macrocode} |
| 2016 |
% \end{macro} |
| 2017 |
% \begin{macro}{\abovesignatureshortvspace} |
| 2018 |
% The amount of vertical space above the signature when the |
| 2019 |
% \mbox{$*$-form} of the "\makesignature" command is used (this |
| 2020 |
% happens, for instance, when the \mbox{$*$-form} of the |
| 2021 |
% "\closing" command is used): |
| 2022 |
% \begin{macrocode} |
| 2023 |
\newlength\abovesignatureshortvspace |
| 2024 |
% \end{macrocode} |
| 2025 |
% \end{macro} |
| 2026 |
% \begin{macro}{\belowsignaturevspace} |
| 2027 |
% The amount of vertical space below the signature: |
| 2028 |
% \begin{macrocode} |
| 2029 |
\newlength\belowsignaturevspace |
| 2030 |
% \end{macrocode} |
| 2031 |
% \end{macro} |
| 2032 |
% \begin{macro}{\belowpresentationvspace} |
| 2033 |
% The amount of vertical space below the presentation as a whole |
| 2034 |
% (the presentation contains the sender address, the addressee |
| 2035 |
% address, and the optional subject); this also ends the block of |
| 2036 |
% these style parameters: |
| 2037 |
% \begin{macrocode} |
| 2038 |
\newlength\belowpresentationvspace |
| 2039 |
% \end{macrocode} |
| 2040 |
% \end{macro} |
| 2041 |
% |
| 2042 |
% Allocation of some other rigid lengths (\textoken{dimen}'s) |
| 2043 |
% follows: these concern the layout of the sheets of address |
| 2044 |
% labels that the user wants to employ. To save a few keystrokes, |
| 2045 |
% we define the "\do" macro to do the allocation and to initialize |
| 2046 |
% the value of the allocated length to zero. |
| 2047 |
% \begin{macrocode} |
| 2048 |
\def\do#1{\@newrigidlength #1\setlength #1\z@} |
| 2049 |
% \end{macrocode} |
| 2050 |
% Then we allocate and initialize the individual lengths. |
| 2051 |
% \begin{macro}{\addrlabelsleftmargin} |
| 2052 |
% This is the amount of horizontal space between the left edge of the |
| 2053 |
% sheet of address labels and the left edge of the leftmost column of |
| 2054 |
% labels on the sheet. |
| 2055 |
% \begin{macrocode} |
| 2056 |
\do\addrlabelsleftmargin |
| 2057 |
% \end{macrocode} |
| 2058 |
% \end{macro} |
| 2059 |
% \begin{macro}{\addrlabelstopmargin} |
| 2060 |
% This is the amount of vertical space between the top edge of the |
| 2061 |
% sheet of address labels and the top edge of the upper row of labels |
| 2062 |
% on the sheet. |
| 2063 |
% \begin{macrocode} |
| 2064 |
\do\addrlabelstopmargin |
| 2065 |
% \end{macrocode} |
| 2066 |
% \end{macro} |
| 2067 |
% \begin{macro}{\addrlabelshsep} |
| 2068 |
% This is the amount of horizontal space between two columns of labels |
| 2069 |
% on the sheet. |
| 2070 |
% \begin{macrocode} |
| 2071 |
\do\addrlabelshsep |
| 2072 |
% \end{macrocode} |
| 2073 |
% \end{macro} |
| 2074 |
% \begin{macro}{\addrlabelsvsep} |
| 2075 |
% This is the amount of vertical space between two rows of labels on |
| 2076 |
% the sheet. |
| 2077 |
% \begin{macrocode} |
| 2078 |
\do\addrlabelsvsep |
| 2079 |
% \end{macrocode} |
| 2080 |
% \end{macro} |
| 2081 |
% \begin{macro}{\addrlabelborder} |
| 2082 |
% Normally, you don't want to write into the labels starting from |
| 2083 |
% their physical border: you want to leave a little margin between the |
| 2084 |
% text inside the labels and their edges. The amount of margin is |
| 2085 |
% kept in this style parameter (sorry, no provision is made to specify |
| 2086 |
% different margins in the two directions). |
| 2087 |
% \begin{macrocode} |
| 2088 |
\do\addrlabelborder |
| 2089 |
% \end{macrocode} |
| 2090 |
% \end{macro} |
| 2091 |
% |
| 2092 |
% The following four lengths don't have reasonable default values, |
| 2093 |
% so they are not initialized here. The code for each individual |
| 2094 |
% address label option will initialize the first two, and the |
| 2095 |
% other two are computed later. |
| 2096 |
% \begin{macro}{\addrlabelwidth} |
| 2097 |
% The (horizontal) width of a single address label. |
| 2098 |
% \begin{macrocode} |
| 2099 |
\@newrigidlength\addrlabelwidth |
| 2100 |
% \end{macrocode} |
| 2101 |
% \end{macro} |
| 2102 |
% \begin{macro}{\addrlabelheight} |
| 2103 |
% The (vertical) height of a single address label. |
| 2104 |
% \begin{macrocode} |
| 2105 |
\@newrigidlength\addrlabelheight |
| 2106 |
% \end{macrocode} |
| 2107 |
% \end{macro} |
| 2108 |
% \begin{macro}{\addrlabeltrimwidth} |
| 2109 |
% This is a computed value, that the user should regard as |
| 2110 |
% read-only: it is the width of a single address label |
| 2111 |
% ("\addrlabelwidth"), diminished by twice the width of the |
| 2112 |
% border ("\addrlabelborder"). |
| 2113 |
% \begin{macrocode} |
| 2114 |
\@newrigidlength\addrlabeltrimwidth |
| 2115 |
% \end{macrocode} |
| 2116 |
% \end{macro} |
| 2117 |
% \begin{macro}{\addrlabeltrimheight} |
| 2118 |
% Analogous: "\addrlabelheight" diminished by twice |
| 2119 |
% "\addrlabelborder". This ends this block of code. |
| 2120 |
% \begin{macrocode} |
| 2121 |
\@newrigidlength\addrlabeltrimheight |
| 2122 |
% \end{macrocode} |
| 2123 |
% \end{macro} |
| 2124 |
% |
| 2125 |
% Now, we just declare a few names we are going to use. The idea |
| 2126 |
% is to trigger an error message if one of them is already defined. |
| 2127 |
% \begin{macro}{\@cdp@reserved} |
| 2128 |
% This is a reserved name that will be used as a |
| 2129 |
% ``general-purpose'' container, much like "\reserved@a", etc. |
| 2130 |
% \begin{macrocode} |
| 2131 |
\@ifdefinable\@cdp@reserved{} |
| 2132 |
% \end{macrocode} |
| 2133 |
% \end{macro} |
| 2134 |
% Miscellaneous names, we shall describe them in a more |
| 2135 |
% appropriate place. |
| 2136 |
% \begin{macrocode} |
| 2137 |
\@ifdefinable\@empty@block{} |
| 2138 |
\@ifdefinable\@beginlabels{} |
| 2139 |
\@ifdefinable\@beginlabelgroup{} |
| 2140 |
\@ifdefinable\@mlabel{} |
| 2141 |
\@ifdefinable\@endlabelgroup{} |
| 2142 |
\@ifdefinable\@endlabels{} |
| 2143 |
\@ifdefinable\startaddrlabel{} |
| 2144 |
\@ifdefinable\stopaddrlabel{} |
| 2145 |
\@ifdefinable\ifactuallabel{} |
| 2146 |
\@ifdefinable\ChosenMakeOpening{} |
| 2147 |
\@ifdefinable\ChosenMakeClosing{} |
| 2148 |
\@ifdefinable\ChosenMakeSignature{} |
| 2149 |
% \end{macrocode} |
| 2150 |
% |
| 2151 |
% \begin{macro}{\@lett@decl} |
| 2152 |
% We define a token register used to save declarations to execute |
| 2153 |
% when a letter begins (see below). |
| 2154 |
% \begin{macrocode} |
| 2155 |
\@ifdefinable\@lett@decl{\newtoks\@lett@decl} |
| 2156 |
% \end{macrocode} |
| 2157 |
% \end{macro} |
| 2158 |
% |
| 2159 |
% We finally arrive to something simple and clearly comprehensible. |
| 2160 |
% We initialize the addresses, the signature, etc. to empty strings. |
| 2161 |
% To do that, we define the "\do" macro as follows: |
| 2162 |
% \begin{macrocode} |
| 2163 |
\def\do#1{\@ifdefinable#1{\let#1\@empty}} |
| 2164 |
% \end{macrocode} |
| 2165 |
% \begin{macro}{\thesenderaddress} |
| 2166 |
% The address of the sender, \emph{including her/his name}: |
| 2167 |
% \begin{macrocode} |
| 2168 |
\do\thesenderaddress |
| 2169 |
% \end{macrocode} |
| 2170 |
% \end{macro} |
| 2171 |
% \begin{macro}{\thesendername} |
| 2172 |
% The name of the sender (essentially, this is provided only for |
| 2173 |
% compatibility with the \packlass{letter} standard \LaTeX\ class): |
| 2174 |
% \begin{macrocode} |
| 2175 |
\do\thesendername |
| 2176 |
% \end{macrocode} |
| 2177 |
% \end{macro} |
| 2178 |
% \begin{macro}{\thesendersignature} |
| 2179 |
% The signature of the sender: |
| 2180 |
% \begin{macrocode} |
| 2181 |
\do\thesendersignature |
| 2182 |
% \end{macrocode} |
| 2183 |
% \end{macro} |
| 2184 |
% \begin{macro}{\thesenderlocation} |
| 2185 |
% The room number, etc., of the sender: |
| 2186 |
% \begin{macrocode} |
| 2187 |
\do\thesenderlocation |
| 2188 |
% \end{macrocode} |
| 2189 |
% \end{macro} |
| 2190 |
% \begin{macro}{\thesenderphone} |
| 2191 |
% The phone number of the sender: |
| 2192 |
% \begin{macrocode} |
| 2193 |
\do\thesenderphone |
| 2194 |
% \end{macrocode} |
| 2195 |
% \end{macro} |
| 2196 |
% \begin{macro}{\theaddresseeaddress} |
| 2197 |
% The complete address of the addressee, \emph{including her/his |
| 2198 |
% name, title, etc.}: |
| 2199 |
% \begin{macrocode} |
| 2200 |
\do\theaddresseeaddress |
| 2201 |
% \end{macrocode} |
| 2202 |
% \end{macro} |
| 2203 |
% \begin{macro}{\theaddresseename} |
| 2204 |
% The name of the addressee (used in page headings): |
| 2205 |
% \begin{macrocode} |
| 2206 |
\do\theaddresseename |
| 2207 |
% \end{macrocode} |
| 2208 |
% \end{macro} |
| 2209 |
% \begin{macro}{\thesubject} |
| 2210 |
% The subject of the letter: |
| 2211 |
% \begin{macrocode} |
| 2212 |
\do\thesubject |
| 2213 |
% \end{macrocode} |
| 2214 |
% \end{macro} |
| 2215 |
% |
| 2216 |
% There are also some internal macros that need to be initialized to |
| 2217 |
% "\@empty". |
| 2218 |
% \begin{macro}{\@subject@style} |
| 2219 |
% The subject can be typeset either in medium weight or in |
| 2220 |
% boldface. This is achieved by inserting the "\@subject@style" |
| 2221 |
% token in front of it: its default definition given here makes |
| 2222 |
% this token a no-op (no font attributes are changed), but the code |
| 2223 |
% that implements options like \opz{mediumsubject} or |
| 2224 |
% \opz{boldsubject} can "\let" this token be equal to, say, |
| 2225 |
% "\mdseries" or "\bfseries", to obtain the desired changes in the |
| 2226 |
% font attributes. If more than one attribute needed to be |
| 2227 |
% changed (\emph{e.g.}, if somebody wanted to define a |
| 2228 |
% \opz{bolditalicsubject} option), then "\def" should be used |
| 2229 |
% instead of "\let"; for instance, one would write |
| 2230 |
% \begin{verbatim}\def\@subject@style{\bfseries\itshape}\end{verbatim} |
| 2231 |
% We don't make "\@subject@style" a token register because the |
| 2232 |
% ``"\let" case'' is the most common. |
| 2233 |
% \begin{macrocode} |
| 2234 |
\do\@subject@style |
| 2235 |
% \end{macrocode} |
| 2236 |
% \end{macro} |
| 2237 |
% \begin{macro}{\@signature@style} |
| 2238 |
% This is analogous to "\@subject@style", but for the signature. |
| 2239 |
% The code for the \opz{uprightsignature} option "\let"s it equal to |
| 2240 |
% "\upshape", and the code for the \opz{italicsignature} option to |
| 2241 |
% "\itshape". |
| 2242 |
% \begin{macrocode} |
| 2243 |
\do\@signature@style |
| 2244 |
% \end{macrocode} |
| 2245 |
% \end{macro} |
| 2246 |
% \begin{macro}{\@place} |
| 2247 |
% The place where the letter is written: starting from version~0.34, |
| 2248 |
% this macro is used as the default value for the optional argument of |
| 2249 |
% "\@makeopening", "\makedate", etc. It is logically and functionally |
| 2250 |
% analogous to "\@date". |
| 2251 |
% \begin{macrocode} |
| 2252 |
\do\@place |
| 2253 |
% \end{macrocode} |
| 2254 |
% \end{macro} |
| 2255 |
% \begin{macro}{\@cdp@begin@letter@hook} |
| 2256 |
% \changes{0.36d}{2018 Feb 08}{Name has been changed (it used to be |
| 2257 |
% \texttt{\protect\bslash @begin@letter@hook}) to avoid clash with |
| 2258 |
% a macro built by the \protect\packlass{etoolbox} package.}^^A |
| 2259 |
% This hook is executed when a letter starts, at the very end of the setup of |
| 2260 |
% the ``letter-making'' environment, just after the declarations stored in |
| 2261 |
% "\@lett@decl". It may prove useful in packages and derived classes, and in |
| 2262 |
% fact it is used by the \packlass{articoletteracdp} class. It is not a |
| 2263 |
% token register because it is envisioned that many independent segments of |
| 2264 |
% code will want to store tokens in it, and this can easily be achieved with |
| 2265 |
% the "\g@addto@macro" function, which requires that its argument be a macro, |
| 2266 |
% not a token register. In vers.~0.36d, the names of this hook and of the |
| 2267 |
% following one were changed to avoid a conflict with the \packlass{etoolbox} |
| 2268 |
% package.. |
| 2269 |
% \begin{macrocode} |
| 2270 |
\do\@cdp@begin@letter@hook |
| 2271 |
% \end{macrocode} |
| 2272 |
% \end{macro} |
| 2273 |
% \begin{macro}{\@cdp@end@letter@hook} |
| 2274 |
% \changes{0.36d}{2018 Feb 08}{Same as |
| 2275 |
% \texttt{\protect\bslash @cdp@begin@letter@hook}.}^^A |
| 2276 |
% This is analogous to "\@cdp@begin@letter@hook", but is executed at the |
| 2277 |
% end of every ``letter-making'' environment, after its last page has |
| 2278 |
% been finished off and ejected, but before writing to the |
| 2279 |
% \filedir{.aux} file the information for the associated address labels. |
| 2280 |
% Note that there is another hook, called "\stopletter" and described |
| 2281 |
% later, which is executed \emph{before} ejecting the last page of |
| 2282 |
% the letter. |
| 2283 |
% \begin{macrocode} |
| 2284 |
\do\@cdp@end@letter@hook |
| 2285 |
% \end{macrocode} |
| 2286 |
% \end{macro} |
| 2287 |
% \begin{macro}{\@begin@block@or@and@hook} |
| 2288 |
% Vers.~0.36: new hook used in "\@block@everypar" to support signature |
| 2289 |
% rules. |
| 2290 |
% \begin{macrocode} |
| 2291 |
\do\@begin@block@or@and@hook |
| 2292 |
% \end{macrocode} |
| 2293 |
% \end{macro} |
| 2294 |
% |
| 2295 |
% The following macros are defined only inside a \env{subject} |
| 2296 |
% environment. We want that they cause an error if used outside of that |
| 2297 |
% environment, but we also want to be sure that their names are not |
| 2298 |
% already defined. We achieve this by calling "\@ifdefinable", and |
| 2299 |
% then "\let"ting the relevant token be "\@undefined". |
| 2300 |
% \begin{macrocode} |
| 2301 |
\def\do#1{\@ifdefinable#1{\let#1\@undefined}} |
| 2302 |
\do\presubject |
| 2303 |
\do\registered |
| 2304 |
\do\registeredRR |
| 2305 |
% \end{macrocode} |
| 2306 |
% |
| 2307 |
% The following are integer (numeric) style parameters: they are |
| 2308 |
% initialized later, and contain several penalty values used to assist |
| 2309 |
% \TeX\ in choosing sightful and meaningful page breaks, and also for |
| 2310 |
% other purposes that will be explained later. For now we content |
| 2311 |
% ourselves with the simple allocation with "\newcount". |
| 2312 |
% \begin{macrocode} |
| 2313 |
\def\do#1{\@ifdefinable#1{\newcount#1}} |
| 2314 |
% \end{macrocode} |
| 2315 |
% The first five parameters are actually ``constants'' analogous to |
| 2316 |
% "\@lowpenalty", "\@medpenalty", and "\@highpenalty"; they are |
| 2317 |
% typically assigned very high penalty values, and their names all |
| 2318 |
% begin with "\@fold@" because they are used in connection with the |
| 2319 |
% algorithm that takes care of ``folded presentations'' (explained |
| 2320 |
% later). |
| 2321 |
% \begin{macrocode} |
| 2322 |
\do\@fold@basepenalty |
| 2323 |
\do\@fold@lowpenalty |
| 2324 |
\do\@fold@medpenalty |
| 2325 |
\do\@fold@highpenalty |
| 2326 |
\do\@fold@toppenalty |
| 2327 |
% \end{macrocode} |
| 2328 |
% The real style parameters begin here. Their values are assigned |
| 2329 |
% later, in various spots of the code; indeed, the values assigned |
| 2330 |
% vary according to certain circumstances, for example, they are |
| 2331 |
% changed from the default when a ``presentation'' is entered. |
| 2332 |
% We'll discuss all this later on. |
| 2333 |
% \begin{macro}{\@b@frompenalty} |
| 2334 |
% This is the penalty inserted at the beginning of a \env{sender} |
| 2335 |
% environment---the environment used to typeset the sender address. |
| 2336 |
% \begin{macrocode} |
| 2337 |
\do\@b@frompenalty |
| 2338 |
% \end{macrocode} |
| 2339 |
% \end{macro} |
| 2340 |
% \begin{macro}{\@i@frompenalty} |
| 2341 |
% This is the penalty inserted before additional sender addresses |
| 2342 |
% separated with "\and". |
| 2343 |
% \begin{macrocode} |
| 2344 |
\do\@i@frompenalty |
| 2345 |
% \end{macrocode} |
| 2346 |
% \end{macro} |
| 2347 |
% \begin{macro}{\@e@frompenalty} |
| 2348 |
% This is the penalty inserted at the end of a \env{sender} |
| 2349 |
% environment. |
| 2350 |
% \begin{macrocode} |
| 2351 |
\do\@e@frompenalty |
| 2352 |
% \end{macrocode} |
| 2353 |
% \end{macro} |
| 2354 |
% \begin{macro}{\@b@topenalty} |
| 2355 |
% This is the penalty inserted at the beginning of an |
| 2356 |
% \env{addressee} environment---the environment used to typeset the |
| 2357 |
% addressee address. |
| 2358 |
% \begin{macrocode} |
| 2359 |
\do\@b@topenalty |
| 2360 |
% \end{macrocode} |
| 2361 |
% \end{macro} |
| 2362 |
% \begin{macro}{\@i@topenalty} |
| 2363 |
% This is the penalty inserted before additional addressee addresses |
| 2364 |
% separated with "\and" or "\andcc". |
| 2365 |
% \begin{macrocode} |
| 2366 |
\do\@i@topenalty |
| 2367 |
% \end{macrocode} |
| 2368 |
% \end{macro} |
| 2369 |
% \begin{macro}{\@e@topenalty} |
| 2370 |
% This is the penalty inserted at the end of an \env{addressee} |
| 2371 |
% environment. |
| 2372 |
% \begin{macrocode} |
| 2373 |
\do\@e@topenalty |
| 2374 |
% \end{macrocode} |
| 2375 |
% \end{macro} |
| 2376 |
% \begin{macro}{\@b@subjpenalty} |
| 2377 |
% This is the penalty inserted at the beginning of a \env{subject} |
| 2378 |
% environment---the environment used to typeset the subject. |
| 2379 |
% \begin{macrocode} |
| 2380 |
\do\@b@subjpenalty |
| 2381 |
% \end{macrocode} |
| 2382 |
% \end{macro} |
| 2383 |
% \begin{macro}{\@e@subjpenalty} |
| 2384 |
% This is the penalty inserted at the end of a \env{subject} |
| 2385 |
% environment. |
| 2386 |
% \begin{macrocode} |
| 2387 |
\do\@e@subjpenalty |
| 2388 |
% \end{macrocode} |
| 2389 |
% \end{macro} |
| 2390 |
% \begin{macro}{\@e@prespenalty} |
| 2391 |
% This is the penalty inserted at the end of a presentation as a |
| 2392 |
% whole. |
| 2393 |
% \begin{macrocode} |
| 2394 |
\do\@e@prespenalty |
| 2395 |
% \end{macrocode} |
| 2396 |
% \end{macro} |
| 2397 |
% The following are two internal registers, used to pass penalty |
| 2398 |
% values back and forth between macros. |
| 2399 |
% \begin{macrocode} |
| 2400 |
\do\@i@penalty |
| 2401 |
\do\@e@penalty |
| 2402 |
% \end{macrocode} |
| 2403 |
% \begin{macro}{\@cdp@gencount} |
| 2404 |
% We also take the opportunity to define a general-purpose numeric |
| 2405 |
% register, used for short-term storage when needed. This ends the |
| 2406 |
% block of count registers. |
| 2407 |
% \begin{macrocode} |
| 2408 |
\do\@cdp@gencount |
| 2409 |
% \end{macrocode} |
| 2410 |
% \end{macro} |
| 2411 |
% |
| 2412 |
% Six internal switches are defined next. |
| 2413 |
% \begin{macrocode} |
| 2414 |
\def\do#1{\@ifdefinable#1{\newif#1}} |
| 2415 |
% \end{macrocode} |
| 2416 |
% \begin{macro}{\if@use@eepic@} |
| 2417 |
% The user can request, through the \opz{usePS} option, that the |
| 2418 |
% \packlass{eepic} package be used to trace the lines that make up the CDP\ |
| 2419 |
% seal, for better graphical result; the user's indication, however, will be |
| 2420 |
% honored only if the \packlass{eepic} package is available on the system (of |
| 2421 |
% course!). This switch is set to ``true'' if the \packlass{eepic} package |
| 2422 |
% is present and should be used. |
| 2423 |
% \begin{macrocode} |
| 2424 |
\do\if@use@eepic@ |
| 2425 |
% \end{macrocode} |
| 2426 |
% \end{macro} |
| 2427 |
% \begin{macro}{\if@do@fold@} |
| 2428 |
% This switch is ``true'' when folded letters are allowed, and |
| 2429 |
% ``false'' when they are shunned; the setting is made by the |
| 2430 |
% "\checkfoldedheight" command, and also at |
| 2431 |
% ``"\begin{document}"-time''. |
| 2432 |
% \begin{macrocode} |
| 2433 |
\do\if@do@fold@ |
| 2434 |
% \end{macrocode} |
| 2435 |
% \end{macro} |
| 2436 |
% \begin{macro}{\if@making@labels@} |
| 2437 |
% Prior to version~0.36, the code for generating the address labels (that |
| 2438 |
% had been copied from the standard \packlass{letter} class) wrote to the |
| 2439 |
% \filedir{.aux} file the data concerning the addresses even when no labels |
| 2440 |
% were being produced. This is totally useless. Starting from |
| 2441 |
% version~0.36, the following conditional has been introduced in order to |
| 2442 |
% avoid this. |
| 2443 |
% \begin{macrocode} |
| 2444 |
\do\if@making@labels@ |
| 2445 |
% \end{macrocode} |
| 2446 |
% \end{macro} |
| 2447 |
% \begin{macro}{\if@signature@rule@} |
| 2448 |
% True if a typeset signature should be surmounted by a ``signature rule'' |
| 2449 |
% intended to guide the signer's hand. New in vers.~0.36 (2015 Feb~08). |
| 2450 |
% \begin{macrocode} |
| 2451 |
\do\if@signature@rule@ |
| 2452 |
% \end{macrocode} |
| 2453 |
% \end{macro} |
| 2454 |
% The other two switches cannot be explained here. They are defined |
| 2455 |
% differently, without using "\newif", so that they are always changed |
| 2456 |
% "\global"ly. |
| 2457 |
% \begin{macrocode} |
| 2458 |
\@ifdefinable\if@new@block@{ |
| 2459 |
\def\@new@block@true {\global\let\if@new@block@\iftrue } |
| 2460 |
\def\@new@block@false{\global\let\if@new@block@\iffalse} |
| 2461 |
} |
| 2462 |
\@ifdefinable\if@empty@and@{ |
| 2463 |
\def\@empty@and@true {\global\let\if@empty@and@\iftrue } |
| 2464 |
\def\@empty@and@false{\global\let\if@empty@and@\iffalse} |
| 2465 |
} |
| 2466 |
% \end{macrocode} |
| 2467 |
% |
| 2468 |
% We need the following box registers to hold precompiled parts of |
| 2469 |
% the letterhead and of the footer. |
| 2470 |
% \begin{macro}{\@logo@box@base} |
| 2471 |
% This holds the main part of the CDP\ seal; more precisely, that part that |
| 2472 |
% appears both in the \ldots\sty{letterhead} and in the \sty{logo}\ldots page |
| 2473 |
% styles. |
| 2474 |
% \begin{macrocode} |
| 2475 |
\newsavebox\@logo@box@base |
| 2476 |
% \end{macrocode} |
| 2477 |
% \end{macro} |
| 2478 |
% \begin{macro}{\@logo@box@addS} |
| 2479 |
% This holds the part of the CDP\ seal that should be added to the part |
| 2480 |
% contained in "\@logo@box@base" to obtain the seal as it appears in the |
| 2481 |
% \sty{logo}\ldots page styles. |
| 2482 |
% \begin{macrocode} |
| 2483 |
\newsavebox\@logo@box@addS |
| 2484 |
% \end{macrocode} |
| 2485 |
% \end{macro} |
| 2486 |
% \begin{macro}{\@logo@box@addL} |
| 2487 |
% This holds the part of the CDP\ seal that should be added to the part |
| 2488 |
% contained in "\@logo@box@base" to obtain the seal embedded in the |
| 2489 |
% \ldots\sty{letterhead} page styles. |
| 2490 |
% \begin{macrocode} |
| 2491 |
\newsavebox\@logo@box@addL |
| 2492 |
% \end{macrocode} |
| 2493 |
% \end{macro} |
| 2494 |
% \begin{macro}{\@oordinamento@box} |
| 2495 |
% This holds the writing ``oordinamento dei Dottorandi di Padova'' |
| 2496 |
% that appears in the letterhead, with the initial~``C'' being |
| 2497 |
% supplied by the seal. |
| 2498 |
% \begin{macrocode} |
| 2499 |
\newsavebox\@oordinamento@box |
| 2500 |
% \end{macrocode} |
| 2501 |
% \end{macro} |
| 2502 |
% \begin{macro}{\@name@and@WWW@box} |
| 2503 |
% This holds the footer used in the \sty{firstletterhead} and |
| 2504 |
% \sty{foldedletterhead} page styles, which contains the full name of |
| 2505 |
% the \emph{Coordinamento} and its web address. This ends the block |
| 2506 |
% of box registers, too. |
| 2507 |
% \begin{macrocode} |
| 2508 |
\newsavebox\@name@and@WWW@box |
| 2509 |
% \end{macrocode} |
| 2510 |
% \end{macro} |
| 2511 |
% |
| 2512 |
% \begin{macro}{\and} |
| 2513 |
% It is possible to specify several addresses (both for the sender |
| 2514 |
% and the addressee) as well as several signatures; the various parts |
| 2515 |
% are separated by "\and" commands. Strictly speaking, it is an error |
| 2516 |
% to expand the token "\and" anywhere but inside the \env{sender}, |
| 2517 |
% \env{addressee}, and \env{signatureenv} environments (the |
| 2518 |
% environments used to produce the sender address, the addressee |
| 2519 |
% address, and the signature, repectively); hence, the correct thing |
| 2520 |
% to do here would be to initialize "\and" to produce an error |
| 2521 |
% message, and then redefine it in the various environments, as |
| 2522 |
% required in each case. But alas, the code for \packlass{\letteracdp} |
| 2523 |
% is still incomplete, and this is one of the things I still have to |
| 2524 |
% finish: I don't know exactly how to handle a misplaced "\and", so, |
| 2525 |
% for now, I simply decide to ignore it. |
| 2526 |
% \begin{macrocode} |
| 2527 |
\let\and\relax |
| 2528 |
% \end{macrocode} |
| 2529 |
% Of course, this definition will be changed inside the |
| 2530 |
% abovementioned environments, where "\and" must have a special |
| 2531 |
% meaning. |
| 2532 |
% \end{macro} |
| 2533 |
% \begin{macro}{\andcc} |
| 2534 |
% Only inside an \env{addressee} environment, the token "\andcc" may |
| 2535 |
% be used in place of "\and" to separate addresses of persons to which |
| 2536 |
% the letter is sent as a carbon copy. Its default definition, |
| 2537 |
% however, is to act as "\and". |
| 2538 |
% \begin{macrocode} |
| 2539 |
\@ifdefinable\andcc{\def\andcc{\and}} |
| 2540 |
% \end{macrocode} |
| 2541 |
% \end{macro} |
| 2542 |
% |
| 2543 |
% We need to save the definitions, as initialized by the \LaTeX\ |
| 2544 |
% kernel, of a couple of macros. |
| 2545 |
% \begin{macro}{\m@kel@bel} |
| 2546 |
% Saved definition of "\makelabel". |
| 2547 |
% \begin{macrocode} |
| 2548 |
\@ifdefinable\m@kel@bel{\let\m@kel@bel\makelabel} |
| 2549 |
% \end{macrocode} |
| 2550 |
% \end{macro} |
| 2551 |
% \begin{macro}{\@@vspace} |
| 2552 |
% Saved definition of "\vspace". |
| 2553 |
% \begin{macrocode} |
| 2554 |
\@ifdefinable\@@vspace{\let\@@vspace\vspace} |
| 2555 |
% \end{macrocode} |
| 2556 |
% \end{macro} |
| 2557 |
% \begin{macro}{\@indent@pref} |
| 2558 |
% This is a multi-way switch used to implement the \opz{indent}, |
| 2559 |
% \opz{noindent}, etc.\ options, which govern the way in which |
| 2560 |
% paragraphs of letters (except~P.S.) are indented. The code associated |
| 2561 |
% with the various options "\let"s this token equal to one of the |
| 2562 |
% following keys, which will be interpreted later as specified: |
| 2563 |
% \begin{description} |
| 2564 |
% \item[F (for ``fixed indent'').] |
| 2565 |
% Set "\parindent" to one tenth of "\textwidth", with a threshold |
| 2566 |
% value of 2~pica (that is, "\parindent" will be at least 2~pica, even |
| 2567 |
% if this is more than one tenth of "\textwidth"). |
| 2568 |
% \item[N (for ``no ident'').] |
| 2569 |
% Set "\parindent" to 0~points. |
| 2570 |
% \item[L (for ``leave indent'').] |
| 2571 |
% The value of "\parindent" that was in effect outside of the |
| 2572 |
% current \ldots\env{letter}\ldots\ environment is retained. |
| 2573 |
% \item[O (sorry, I don't remember for what).] |
| 2574 |
% Set "\parindent" to the width of the last line of the salutation |
| 2575 |
% (\emph{i.e.}, the argument of "\opening" or "\makeopening"); if the |
| 2576 |
% salutation is not given, this is the same as~``F''. |
| 2577 |
% |
| 2578 |
% 2015 Feb~08 (v.~0.36): I~have conjectured that the choice of the |
| 2579 |
% letter~``O'' for this key could have been suggested by the initial of |
| 2580 |
% ``opening'', meaning, as it were, ``indent by the extent of the |
| 2581 |
% opening''; but I~cannot remember of having thought of that. |
| 2582 |
% \end{description} |
| 2583 |
% The default setting is the same as the one implied by the |
| 2584 |
% \opz{indent} option. |
| 2585 |
% \begin{macrocode} |
| 2586 |
\@ifdefinable\@indent@pref{\let\@indent@pref F} |
| 2587 |
% \end{macrocode} |
| 2588 |
% \end{macro} |
| 2589 |
% |
| 2590 |
% \begin{macro}{\voidisOK} |
| 2591 |
% Sometimes, in a letter, you want to omit the sender or the |
| 2592 |
% addressee address, or the signature, and it is annoying to see a |
| 2593 |
% warning about an ``empty something'' that you left empty |
| 2594 |
% deliberately. For this reason, inside the environments that produce |
| 2595 |
% the addresses and the signature you are allowed to use the command |
| 2596 |
% "\voidisOK" to disable such warnings. The idea is that you say |
| 2597 |
% something like |
| 2598 |
%\begin{verbatim} |
| 2599 |
%\address{\voidisOK} |
| 2600 |
%\end{verbatim} |
| 2601 |
% when you want to declare that the address has intentionally be |
| 2602 |
% left void; when the address is actually typeset (and this happens |
| 2603 |
% inside an \env{addressee} environment), the command "\voidisOK" will |
| 2604 |
% be expanded, causing the warning to be suppressed. As for the |
| 2605 |
% command "\and", the right thing to do would be to define this |
| 2606 |
% command only inside the environments in which it can be used; but |
| 2607 |
% there are complications arising from the fact that the text |
| 2608 |
% specified inside an "\address" declaration can be expanded also at |
| 2609 |
% other times, for instance when typesetting the address labels. For |
| 2610 |
% this reason, we take the shortcut of "\let"ting this command equal |
| 2611 |
% to "\@empty", so that it will be ignored when it occurs out of place. |
| 2612 |
% (We do not "\let" it equal to "\relax" because the latter could |
| 2613 |
% confuse an "\ignorespaces"; on the contrary, "\@empty" disappears |
| 2614 |
% upon "\write" and "\mark" operations, and this is quite OK\@.) Where |
| 2615 |
% appropriate, "\voidisOK" will be redefined to achieve the desired |
| 2616 |
% effect. |
| 2617 |
% \begin{macrocode} |
| 2618 |
\@ifdefinable\voidisOK{\let\voidisOK\@empty} |
| 2619 |
% \end{macrocode} |
| 2620 |
% \end{macro} |
| 2621 |
% |
| 2622 |
% \begin{macro}{\subjectnamegap} |
| 2623 |
% If present, the subject of a letter is typeset with hanging |
| 2624 |
% indentation, preceded by the text contained in the command |
| 2625 |
% "\subjectname" and separated from it by a certain amount of |
| 2626 |
% horizontal white space: the width of this white space is specified |
| 2627 |
% by the "\subjectnamegap" macro. This is a macro and not a |
| 2628 |
% \textoken{dimen} register to allow the length to be specified in |
| 2629 |
% terms of the font-dependent units like ``em''. Of course, the |
| 2630 |
% hanging indentation includes this horizontal space; note, |
| 2631 |
% however, that if "\subjectname" is empty than the |
| 2632 |
% "\subjectnamegap" space is not taken into account. |
| 2633 |
% \begin{macrocode} |
| 2634 |
\newcommand*\subjectnamegap{.5em} |
| 2635 |
% \end{macrocode} |
| 2636 |
% \end{macro} |
| 2637 |
% \begin{macro}{\closingindentation} |
| 2638 |
% As for the way of typesetting addresses, different countries have |
| 2639 |
% different uses about how to indent the closing of the letter: for |
| 2640 |
% instance, in Italy the closing is indented like any other, ordinary |
| 2641 |
% paragraph, whilst in anglo-saxon letters it is indented by the same |
| 2642 |
% amount by which the sender address is indented. To cope with this, |
| 2643 |
% the "\closingindentation" command is introduced, to hold the amount |
| 2644 |
% of indentation for the closing: its default definition is |
| 2645 |
% "\parindent", so that the closing is indented like an ordinary |
| 2646 |
% paragraph, but a ``letter-making'' environment can redefine it, |
| 2647 |
% if necessary. It is a command and not a length, because the |
| 2648 |
% value of "\parindent" can change, and actually does change, in |
| 2649 |
% the sequel. |
| 2650 |
% \begin{macrocode} |
| 2651 |
\newcommand*\closingindentation{\parindent} |
| 2652 |
% \end{macrocode} |
| 2653 |
% \end{macro} |
| 2654 |
% \begin{macro}{\signaturealignment} |
| 2655 |
% Different countries have different conventions also about how the |
| 2656 |
% signature should be aligned; for instance, in the U.S. the |
| 2657 |
% signature is set ragged right, but with a hanging indentation equal |
| 2658 |
% to the hanging indentation of the sender address, which in the U.S. |
| 2659 |
% is printed on the right-hand half of the paper; in Italy, the |
| 2660 |
% signature is more or less centered between the margins, and if it |
| 2661 |
% contains more than one line, the lines are aligned at their |
| 2662 |
% midpoint. In order to accomodate the various conventions, the token |
| 2663 |
% "\signaturealignment" is inserted at the beginning of the |
| 2664 |
% \env{signatureenv} environment (the environment one uses to typeset |
| 2665 |
% the signature); it is the responsability of the surrounding |
| 2666 |
% \ldots\env{letter}\ldots\ environment to "\let" this token equal to |
| 2667 |
% "\raggedright", "\centering", etc., as required by the particular |
| 2668 |
% letter being produced. This makes it easy, for instance, to define |
| 2669 |
% an \env{asletter} (anglo-saxon letter) environment that prints |
| 2670 |
% letters that obey the U.S. conventions. The default setting given |
| 2671 |
% here has no special meaning: it just sets the signature ragged |
| 2672 |
% right. |
| 2673 |
% \begin{macrocode} |
| 2674 |
\newcommand*\signaturealignment{\raggedright} |
| 2675 |
% \end{macrocode} |
| 2676 |
% \end{macro} |
| 2677 |
% |
| 2678 |
% \subsection{Declaration of options} |
| 2679 |
% |
| 2680 |
% As a general rule, options pertaining to the same functional group |
| 2681 |
% are declared in reverse order of desirability, the default option of |
| 2682 |
% the group being declared last. This ensures that if more than |
| 2683 |
% one option of the same group is erroneously asked for by the |
| 2684 |
% user, the ``most desirable'' one (whatever this means) is |
| 2685 |
% executed last, thereby remaining in effect. |
| 2686 |
% |
| 2687 |
% We begin with the options that support the usual page formats. |
| 2688 |
% For each such option, the associated code sets appropriate values |
| 2689 |
% for the "\paperheight" and "\paperwidth" parameters. The code also |
| 2690 |
% sets the "\foldedheight" parameter, which, as explained above, |
| 2691 |
% contains the height at which the sheets of paper should be folded in |
| 2692 |
% order to put them into an envelope; this parameter is set to more or |
| 2693 |
% less one third of "\paperheight". For some paper formats, folding |
| 2694 |
% is not adequate: for them, folded letters are disabled by setting |
| 2695 |
% "\foldedheight" to $-"\maxdimen"$. |
| 2696 |
% \begin{macrocode} |
| 2697 |
\DeclareOption{executivepaper} |
| 2698 |
{\setlength\paperheight {10.5in}% |
| 2699 |
\setlength\paperwidth {7.25in}% |
| 2700 |
\setlength\foldedheight{3.5in}} |
| 2701 |
\DeclareOption{legalpaper} |
| 2702 |
{\setlength\paperheight {14in}% |
| 2703 |
\setlength\paperwidth {8.5in}% |
| 2704 |
\setlength\foldedheight{4.7in}} |
| 2705 |
\DeclareOption{letterpaper} |
| 2706 |
{\setlength\paperheight {11in}% |
| 2707 |
\setlength\paperwidth {8.5in}% |
| 2708 |
\setlength\foldedheight{3.7in}} |
| 2709 |
\DeclareOption{b5paper} |
| 2710 |
{\setlength\paperheight {250mm}% |
| 2711 |
\setlength\paperwidth {176mm}% |
| 2712 |
\setlength\foldedheight{-\maxdimen}} |
| 2713 |
\DeclareOption{a5paper} |
| 2714 |
{\setlength\paperheight {210mm}% |
| 2715 |
\setlength\paperwidth {148mm}% |
| 2716 |
\setlength\foldedheight{-\maxdimen}} |
| 2717 |
\DeclareOption{a4paper} |
| 2718 |
{\setlength\paperheight {297mm}% |
| 2719 |
\setlength\paperwidth {210mm}% |
| 2720 |
\setlength\foldedheight{100mm}} |
| 2721 |
% \end{macrocode} |
| 2722 |
% |
| 2723 |
% The \opz{landscape} option is implemented as usual, by |
| 2724 |
% exchanging the values of "\paperheight" and "\paperwidth" (note that |
| 2725 |
% this option is executed after any one of the options that sets the |
| 2726 |
% paper dimensions); but we also disable folded letters by setting |
| 2727 |
% "\foldedheight" to $-"\maxdimen"$, because usually one does not want |
| 2728 |
% to fold a letter set in landscape orientation! |
| 2729 |
% \begin{macrocode} |
| 2730 |
\DeclareOption{landscape} |
| 2731 |
{\setlength\@tempdima {\paperheight}% |
| 2732 |
\setlength\paperheight {\paperwidth}% |
| 2733 |
\setlength\paperwidth {\@tempdima}% |
| 2734 |
\setlength\foldedheight{-\maxdimen}} |
| 2735 |
% \end{macrocode} |
| 2736 |
% |
| 2737 |
% These are the usual options for setting the main font size: they are |
| 2738 |
% copied from the standard \LaTeX\ classes. See, \emph{e.g.}, the |
| 2739 |
% documentation of the standard \packlass{letter} class for |
| 2740 |
% explanations. |
| 2741 |
% \begin{macrocode} |
| 2742 |
\DeclareOption{12pt}{\renewcommand\@ptsize{2}} |
| 2743 |
\DeclareOption{11pt}{\renewcommand\@ptsize{1}} |
| 2744 |
\DeclareOption{10pt}{\renewcommand\@ptsize{0}} |
| 2745 |
% \end{macrocode} |
| 2746 |
% |
| 2747 |
% The way of implementing the \opz{oneside}\slash\opz{twoside} |
| 2748 |
% options is again copied from the \packlass{letter} standard \LaTeX\ |
| 2749 |
% class. |
| 2750 |
% \begin{macrocode} |
| 2751 |
\if@compatibility |
| 2752 |
\DeclareOption{twoside}{% |
| 2753 |
\@latexerr{No `twoside' layout for letters}\@eha |
| 2754 |
} |
| 2755 |
\else |
| 2756 |
\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} |
| 2757 |
\fi |
| 2758 |
\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} |
| 2759 |
% \end{macrocode} |
| 2760 |
% |
| 2761 |
% The \opz{onecolumn}\slash\opz{twocolumn} options are not |
| 2762 |
% declared in the \packlass{letter} standard \LaTeX\ class, but I prefer |
| 2763 |
% to declare them. The \opz{twocolumn} options causes an error, |
| 2764 |
% because I have never seen letters typeset in two columns mode! |
| 2765 |
% \begin{macrocode} |
| 2766 |
\DeclareOption{twocolumn}{% |
| 2767 |
\@latexerr{No `twocolumn' layout for letters}\@eha |
| 2768 |
} |
| 2769 |
% \end{macrocode} |
| 2770 |
% The \opz{onecolumn} option is simply ignored, but it is |
| 2771 |
% declared, so that it is removed from the list of unused options. |
| 2772 |
% \begin{macrocode} |
| 2773 |
\DeclareOption{onecolumn}{} |
| 2774 |
% \end{macrocode} |
| 2775 |
% |
| 2776 |
% More options copied from the standard \LaTeX\ classes. |
| 2777 |
% \begin{macrocode} |
| 2778 |
\DeclareOption{final}{\setlength\overfullrule{0pt}} |
| 2779 |
\DeclareOption{draft}{\setlength\overfullrule{5pt}} |
| 2780 |
\DeclareOption{leqno}{\input{leqno.clo}} |
| 2781 |
\DeclareOption{fleqn}{\input{fleqn.clo}} |
| 2782 |
% \end{macrocode} |
| 2783 |
% |
| 2784 |
% Now we have four options for setting the way in which the subject |
| 2785 |
% of a letter (if present) and the signature are printed. As |
| 2786 |
% explained above, the setting is done by "\let"ting a conventional |
| 2787 |
% token equal to one of the usual NFSS commands used to set individual |
| 2788 |
% font attributes; if more than one attribute needed to be changed, |
| 2789 |
% "\def" would be used instead of "\let", but fortunately this is not |
| 2790 |
% necessary. |
| 2791 |
% |
| 2792 |
% Options for the subject: it can be set in boldface type\ldots |
| 2793 |
% \begin{macrocode} |
| 2794 |
\DeclareOption{boldsubject}{\let\@subject@style\bfseries} |
| 2795 |
% \end{macrocode} |
| 2796 |
% \ldots or in medium weight. |
| 2797 |
% \begin{macrocode} |
| 2798 |
\DeclareOption{mediumsubject}{\let\@subject@style\mdseries} |
| 2799 |
% \end{macrocode} |
| 2800 |
% |
| 2801 |
% Options for the signature: it can be set in italic shape\ldots |
| 2802 |
% \begin{macrocode} |
| 2803 |
\DeclareOption{italicsignature}{\let\@signature@style\itshape} |
| 2804 |
% \end{macrocode} |
| 2805 |
% \ldots or in upright (normal) shape. |
| 2806 |
% \begin{macrocode} |
| 2807 |
\DeclareOption{uprightsignature}{\let\@signature@style\upshape} |
| 2808 |
% \end{macrocode} |
| 2809 |
% |
| 2810 |
% Vers.~0.36 (2015 Feb~08): new option \opz{signaturerule} requests that |
| 2811 |
% each typeset signature be surmounted by a ``signature rule'' intended to |
| 2812 |
% guide the signer's hand. This, however, should not affect at all |
| 2813 |
% signatures contained in a \env{signatureenv*} environment, the variant of |
| 2814 |
% the \env{signatureenv} environment meant for situations in which the |
| 2815 |
% letter is not going to be signed by hand. |
| 2816 |
% \begin{macrocode} |
| 2817 |
\DeclareOption{signaturerule}{\@signature@rule@true} |
| 2818 |
% \end{macrocode} |
| 2819 |
% The \opz{nosignaturerule} option (also new in vers.~0.36) is the opposite |
| 2820 |
% of the above, and is the default. |
| 2821 |
% \begin{macrocode} |
| 2822 |
\DeclareOption{nosignaturerule}{\@signature@rule@false} |
| 2823 |
% \end{macrocode} |
| 2824 |
% \emph{Remark:} the ability to draw a rule for handwritten signatures has |
| 2825 |
% been explicitly requested by some users of the \Bundle, but I~deem the use |
| 2826 |
% of such feature questionable, since only pupils in primary school need |
| 2827 |
% rules to guide their writing. Nevertheless, this practice is admittedly |
| 2828 |
% ^^A ( paren match |
| 2829 |
% fairly common in the business world~:-), so it has now been supported. |
| 2830 |
% |
| 2831 |
% Next, we have the options used to tell whether PostScript commands, |
| 2832 |
% inserted by means of the \packlass{eepic} package, should be used, or not, |
| 2833 |
% to draw the CDP\ seal. Here we simply set the internal switch according to |
| 2834 |
% the user's request; if we later find that the \packlass{eepic} package is |
| 2835 |
% not available, we shall force the switch to false. |
| 2836 |
% \begin{macrocode} |
| 2837 |
\DeclareOption{usePS}{\@use@eepic@true} |
| 2838 |
\DeclareOption{noPS}{\@use@eepic@false} |
| 2839 |
% \end{macrocode} |
| 2840 |
% (These mean ``use PostScript'' and ``don't use PostScript'', |
| 2841 |
% respectively.) |
| 2842 |
% |
| 2843 |
% Cheer up! We are almost over! (Just with the options, of |
| 2844 |
% course!) We are now to the options for the paragraph |
| 2845 |
% indentation within letters. They are implemented by setting an |
| 2846 |
% internal multi-value switch to a conventional key; the meaning of |
| 2847 |
% the keys has already been explained above. |
| 2848 |
% \begin{macrocode} |
| 2849 |
\DeclareOption{smartindent}{\let\@indent@pref O} |
| 2850 |
\DeclareOption{shortindent}{\let\@indent@pref L} |
| 2851 |
\DeclareOption{noindent}{\let\@indent@pref N} |
| 2852 |
\DeclareOption{indent}{\let\@indent@pref F} |
| 2853 |
% \end{macrocode} |
| 2854 |
% |
| 2855 |
% The last three options deal with the format of the address |
| 2856 |
% labels. As already said, the format is specified by |
| 2857 |
% initializing a number of \textoken{dimen} parameters which |
| 2858 |
% specify the ``geometry'' of the sheet of address labels. Many |
| 2859 |
% of these parameters have a default value of 0~points: when this |
| 2860 |
% default is appropriate, the parameter is not re-initialized in |
| 2861 |
% the code given below. |
| 2862 |
% |
| 2863 |
% We support the Avery 5352 address labels only for compatibility |
| 2864 |
% with the standard \packlass{letter} class. I have never seen a sheet |
| 2865 |
% of these labels, and the code for the \opz{Avery5352labels} |
| 2866 |
% option simply assigns values to the parameters in a way that tries to |
| 2867 |
% imitate the geometry described by the code found in the |
| 2868 |
% \packlass{letter} class. |
| 2869 |
% \begin{macrocode} |
| 2870 |
\DeclareOption{Avery5352labels}{% |
| 2871 |
% \end{macrocode} |
| 2872 |
% We have 5~rows of labels. |
| 2873 |
% \begin{macrocode} |
| 2874 |
\setcounter{addrlabelrows}{5}% |
| 2875 |
% \end{macrocode} |
| 2876 |
% Each row contains 2~labels, \emph{i.e.}, we have two columns of |
| 2877 |
% labels. |
| 2878 |
% \begin{macrocode} |
| 2879 |
\setcounter{addrlabelcolumns}{\tw@}% |
| 2880 |
% \end{macrocode} |
| 2881 |
% The left edge of the leftmost column is 35~points to the left of |
| 2882 |
% the \TeX\ origin, which in turn is 1~inch from the left edge of |
| 2883 |
% the paper. |
| 2884 |
% \begin{macrocode} |
| 2885 |
\setlength\addrlabelsleftmargin{-35\p@}% |
| 2886 |
\addtolength\addrlabelsleftmargin{1in}% |
| 2887 |
% \end{macrocode} |
| 2888 |
% The top edge of the topmost row is 50~points above |
| 2889 |
% the \TeX\ origin, which in turn is 1~inch from the top edge of |
| 2890 |
% the paper. |
| 2891 |
% \begin{macrocode} |
| 2892 |
\setlength\addrlabelstopmargin{-50\p@}% |
| 2893 |
\addtolength\addrlabelstopmargin{1in}% |
| 2894 |
% \end{macrocode} |
| 2895 |
% The two columns are separated by 26~points. |
| 2896 |
% \begin{macrocode} |
| 2897 |
\setlength\addrlabelshsep{26\p@}% |
| 2898 |
% \end{macrocode} |
| 2899 |
% Labels are 262~points wide by 2~inches high. |
| 2900 |
% \begin{macrocode} |
| 2901 |
\setlength\addrlabelwidth{262\p@}% |
| 2902 |
\setlength\addrlabelheight{2in}% |
| 2903 |
} |
| 2904 |
% \end{macrocode} |
| 2905 |
% |
| 2906 |
% The code for the labels I had the opportunity to actually see and |
| 2907 |
% measure is more elegant, and fits more naturally into the scheme. |
| 2908 |
% The following is the setting for the 70\,$\times$\,37 labels (the |
| 2909 |
% dimensions are given in~mm). |
| 2910 |
% \begin{macrocode} |
| 2911 |
\DeclareOption{70x37labels}{% |
| 2912 |
% \end{macrocode} |
| 2913 |
% 8~rows of labels. |
| 2914 |
% \begin{macrocode} |
| 2915 |
\setcounter{addrlabelrows}{8}% |
| 2916 |
% \end{macrocode} |
| 2917 |
% 3~columns, \emph{i.e.}, 3~labels in each row. |
| 2918 |
% \begin{macrocode} |
| 2919 |
\setcounter{addrlabelcolumns}{\thr@@}% |
| 2920 |
% \end{macrocode} |
| 2921 |
% Labels are 70\,mm wide by 37\,mm high. |
| 2922 |
% \begin{macrocode} |
| 2923 |
\setlength\addrlabelwidth{70mm}% |
| 2924 |
\setlength\addrlabelheight{37mm}% |
| 2925 |
% \end{macrocode} |
| 2926 |
% We leave 6\,mm of margin between the border of the labels and the |
| 2927 |
% actual printing. |
| 2928 |
% \begin{macrocode} |
| 2929 |
\setlength\addrlabelborder{6mm}% |
| 2930 |
} |
| 2931 |
% \end{macrocode} |
| 2932 |
% The setting for the 105\,$\times$\,37 labels (the default) is |
| 2933 |
% similar. |
| 2934 |
% \begin{macrocode} |
| 2935 |
\DeclareOption{105x37labels}{% |
| 2936 |
\setcounter{addrlabelrows}{8}% |
| 2937 |
\setcounter{addrlabelcolumns}{\tw@}% |
| 2938 |
\setlength\addrlabelwidth{105mm}% |
| 2939 |
\setlength\addrlabelheight{37mm}% |
| 2940 |
\setlength\addrlabelborder{6mm}% |
| 2941 |
} |
| 2942 |
% \end{macrocode} |
| 2943 |
% |
| 2944 |
% \subsection{Option processing} |
| 2945 |
% |
| 2946 |
% Nothing special to note here. |
| 2947 |
% |
| 2948 |
% \emph{Begin to think (v.~0.34):} should I change the defaults as |
| 2949 |
% follows: \opz{boldsubject} in place of \opz{mediumsubject}, |
| 2950 |
% \opz{italicsignature} in place of \opz{uprightsignature}, |
| 2951 |
% \opz{shortindent} in place of \opz{indent}? |
| 2952 |
% |
| 2953 |
% Ver.~0.36 (2015 Feb~08): not yet determined to change the default options. |
| 2954 |
% Added \opz{nosignaturerule}. |
| 2955 |
% \begin{macrocode} |
| 2956 |
\ExecuteOptions{% |
| 2957 |
a4paper,10pt,oneside,onecolumn,final,% |
| 2958 |
mediumsubject,uprightsignature,nosignaturerule,noPS,indent,% |
| 2959 |
105x37labels% |
| 2960 |
} |
| 2961 |
\ProcessOptions\relax |
| 2962 |
% \end{macrocode} |
| 2963 |
% |
| 2964 |
% \subsection{Package loading} |
| 2965 |
% |
| 2966 |
% In this version of the \Bundle, all the original code is |
| 2967 |
% put in the file \filedir{\letteracdp.cls}, so in the normal operating |
| 2968 |
% mode no packages need to be loaded. This will change in future |
| 2969 |
% releases: the code will be split among several packages, to allow |
| 2970 |
% the final user to request only some features and not the others; |
| 2971 |
% when this happens, this section will become much longer, in order to |
| 2972 |
% load all those packages. However, even now it could be necessary to |
| 2973 |
% require the \packlass{eepic} package, if the user specified the |
| 2974 |
% \opz{usePS} option. At this stage, the presence of this option can |
| 2975 |
% be tested for by means of the "\if@use@eepic@" switch. |
| 2976 |
% \begin{macrocode} |
| 2977 |
\if@use@eepic@ |
| 2978 |
% \end{macrocode} |
| 2979 |
% If the \packlass{eepic} package is not available, force the switch |
| 2980 |
% to false and warn the user. |
| 2981 |
% \begin{macrocode} |
| 2982 |
\IfFileExists{eepic.sty}{% |
| 2983 |
\RequirePackage{eepic}% |
| 2984 |
}{% |
| 2985 |
\@use@eepic@false |
| 2986 |
\ClassWarningNoLine{\@letteracdp}{% |
| 2987 |
Can't find the eepic package;\MessageBreak |
| 2988 |
option usePS ignored (converted to noPS)% |
| 2989 |
}% |
| 2990 |
}% |
| 2991 |
\fi |
| 2992 |
% \end{macrocode} |
| 2993 |
% |
| 2994 |
% \subsection{Main code} |
| 2995 |
% |
| 2996 |
% ^^A ( paren match |
| 2997 |
% OK, boys, until now we have just set up a few things; now the real |
| 2998 |
% fun begins.~\mbox{:-)} Oh, well, actually it will begin in a few lines: |
| 2999 |
% for now we have to do a little more bit of tedious work.~\mbox{:-(} |
| 3000 |
% ^^A ) paren match |
| 3001 |
% |
| 3002 |
% \subsubsection{More initializations} |
| 3003 |
% |
| 3004 |
% Some of the following initializations could have been put in the |
| 3005 |
% \emph{Initial code} section, but some others require that the code |
| 3006 |
% for the options have already been executed. |
| 3007 |
% |
| 3008 |
% \begin{macro}{\date} |
| 3009 |
% We redefine "\date" in order to make the changes to the date local |
| 3010 |
% instead of global: this is useful if one of the letters has a date |
| 3011 |
% which is different from the other ones. Since "\date" is a kernel |
| 3012 |
% command, an explicative comment is left in % the code too. |
| 3013 |
% \begin{macrocode} |
| 3014 |
%% Command \date redefined to make changes to date local. |
| 3015 |
\def\date#1{\def\@date{#1}} |
| 3016 |
% \end{macrocode} |
| 3017 |
% \end{macro} |
| 3018 |
% |
| 3019 |
% \begin{macro}{\place} |
| 3020 |
% This command records the place where the letter is written (added |
| 3021 |
% in version~0.34): it is analogous to "\date". Starting from |
| 3022 |
% version~0.34, this should be used instead of the optional argument |
| 3023 |
% of "\opening", "\makedate", etc.\ (however, the optional argument of |
| 3024 |
% those commands may still be used, for compatibility). Note that the |
| 3025 |
% comma is added automatically, but only if the argument of "\place" |
| 3026 |
% is nonempty. |
| 3027 |
% \begin{macrocode} |
| 3028 |
\newcommand*\place[1]{% |
| 3029 |
\ifx \@empty #1\@empty % if #1 is empty |
| 3030 |
\let\@place\@empty |
| 3031 |
\else |
| 3032 |
\def\@place{#1,}% |
| 3033 |
\fi |
| 3034 |
} |
| 3035 |
% \end{macrocode} |
| 3036 |
% \end{macro} |
| 3037 |
% |
| 3038 |
% Usual loading of the suitable \filedir{.clo} file; see the |
| 3039 |
% documentation of, \emph{e.g.}, the standard \packlass{letter} |
| 3040 |
% class for explanations about the following three lines of code. |
| 3041 |
% \begin{macrocode} |
| 3042 |
\input{size1\@ptsize.clo} |
| 3043 |
\setlength\lineskip{\p@} |
| 3044 |
\setlength\normallineskip{\p@} |
| 3045 |
% \end{macrocode} |
| 3046 |
% \begin{macro}{\baselinestretch} |
| 3047 |
% This command can be redefined by the final user to obtain |
| 3048 |
% double-spaced, triple-spaced, etc.\ output. See the |
| 3049 |
% \textsl{\LaTeX book} \cite[Subsection~C.3.2]{LaTeXbook}. |
| 3050 |
% \begin{macrocode} |
| 3051 |
\renewcommand*\baselinestretch{} |
| 3052 |
% \end{macrocode} |
| 3053 |
% \end{macro} |
| 3054 |
% \begin{macro}{\thelabel} |
| 3055 |
% The printed form of the \cnt{label} counter is changed to include |
| 3056 |
% also the number of the letter it refers to. Note that we do not |
| 3057 |
% change "\p@label" (the prefix used only when printing |
| 3058 |
% \emph{references} to the counter), but actually the command used to |
| 3059 |
% print the counter itself. |
| 3060 |
% \begin{macrocode} |
| 3061 |
\renewcommand*\thelabel{\theletter\@alph\c@label} |
| 3062 |
% \end{macrocode} |
| 3063 |
% \end{macro} |
| 3064 |
% |
| 3065 |
% The following are the usual constants used to represent typical |
| 3066 |
% penalty values; again, see the documentation of the standard |
| 3067 |
% classes. |
| 3068 |
% \begin{macrocode} |
| 3069 |
\@lowpenalty 51 |
| 3070 |
\@medpenalty 151 |
| 3071 |
\@highpenalty 301 |
| 3072 |
% \end{macrocode} |
| 3073 |
% We need five more constants of the same type, but with much |
| 3074 |
% higher penalty values. They are used in the algorithm that takes |
| 3075 |
% care of folded letters. |
| 3076 |
% \begin{macrocode} |
| 3077 |
\@fold@basepenalty 9000 |
| 3078 |
\@fold@lowpenalty 9101 |
| 3079 |
\@fold@medpenalty 9202 |
| 3080 |
\@fold@highpenalty 9303 |
| 3081 |
\@fold@toppenalty 9500 |
| 3082 |
% \end{macrocode} |
| 3083 |
% |
| 3084 |
% We now initialize the style parameters that contain the penalties |
| 3085 |
% inserted around the address blocks and the subject. This values |
| 3086 |
% will never be used in practice, because usually the address blocks |
| 3087 |
% and the subject are wrapped up in a \ldots\env{presentation} |
| 3088 |
% environment, and these environments completely redefine the values |
| 3089 |
% of these style parameters. The values given here will be used only |
| 3090 |
% when a \env{sender}, \env{addressee}, or \env{subject} environment |
| 3091 |
% is used without being wrapped in a presentation. These values allow |
| 3092 |
% a page break without penalty before each of the blocks and at the |
| 3093 |
% end of the subject, mildly discourage a break after the address |
| 3094 |
% blocks, and discourage rather strongly a break at an "\and" or |
| 3095 |
% "\andcc" token. |
| 3096 |
% \begin{macrocode} |
| 3097 |
\@b@frompenalty\z@ |
| 3098 |
\@i@frompenalty\@highpenalty |
| 3099 |
\@e@frompenalty\@lowpenalty |
| 3100 |
\@b@topenalty\z@ |
| 3101 |
\@i@topenalty\@highpenalty |
| 3102 |
\@e@topenalty\@lowpenalty |
| 3103 |
\@b@subjpenalty\z@ |
| 3104 |
\@e@subjpenalty\z@ |
| 3105 |
% \end{macrocode} |
| 3106 |
% Unlike the preceding ones, the following style parameter is not |
| 3107 |
% redefined elsewhere. It is the penalty inserted after |
| 3108 |
% presentations, and since a presentation typically ends with the |
| 3109 |
% subject, the following initialization seems quite natural. |
| 3110 |
% \begin{macrocode} |
| 3111 |
\@e@prespenalty\@e@subjpenalty |
| 3112 |
% \end{macrocode} |
| 3113 |
% |
| 3114 |
% \subsubsection{Page layout} |
| 3115 |
% |
| 3116 |
% The first thing one could begin to find interesting is the code |
| 3117 |
% for setting up the page layout. To help the reader to understand |
| 3118 |
% what is going on, fig.~\ref{fig:plo} summarizes the basic page |
| 3119 |
% layout parameters we are going to speak about.\footnote{If you are |
| 3120 |
% reading directly the comments in the \filedir{.dtx} file, instead of |
| 3121 |
% typesetting it with \LaTeX, you might find it difficult to follow |
| 3122 |
% the forthcoming discussion.} This figure shows the parameters used |
| 3123 |
% in the case of an A5~sheet of paper: this allows to fit the entire |
| 3124 |
% figure on the page without having to scale it. |
| 3125 |
% |
| 3126 |
% \begin{figure}[tbp] |
| 3127 |
% \centering |
| 3128 |
% \setlength{\unitlength}{1mm} |
| 3129 |
% \begin{picture}(108,200)(-10,0) |
| 3130 |
% \thinlines |
| 3131 |
% \put(-20,0) {\line(1,0){148}} |
| 3132 |
% \put(-20,210){\line(1,0){148}} |
| 3133 |
% \put(-20,0) {\line(0,1){210}} |
| 3134 |
% \put(128,0) {\line(0,1){210}} |
| 3135 |
% \put(10,185){\makebox(88,10)[bl]{\makebox[88mm][s]{^^A |
| 3136 |
% \kern -1cm |
| 3137 |
% \setlength\unitlength{.625mm}^^A |
| 3138 |
% \begin{picture}(32,16)(-3,7.87) |
| 3139 |
% \thinlines |
| 3140 |
% \put(8,16){\oval(10,10)[l]} |
| 3141 |
% \put(8,11){\line(0,1){10}} |
| 3142 |
% \put(9,11){\framebox(3,20){}} |
| 3143 |
% \put(18,16){\oval(10,10)[r]} |
| 3144 |
% \put(18,11){\line(0,1){10}} |
| 3145 |
% \put(14,1){\framebox(3,20){}} |
| 3146 |
% \thicklines |
| 3147 |
% \put(8,16){\oval(16,16)[l]} |
| 3148 |
% \put(8,8){\line(1,0){5}} |
| 3149 |
% \put(13,24){\line(1,0){10}} |
| 3150 |
% \put(8,16){\oval(14,14)[l]} |
| 3151 |
% \put(8,9){\line(1,0){5}} |
| 3152 |
% \put(13,23){\line(1,0){10}} |
| 3153 |
% \put(18,8){\line(1,0){10}} |
| 3154 |
% \put(18,9){\line(1,0){10}} |
| 3155 |
% \end{picture}^^A |
| 3156 |
% \fontencoding{OT1}\selectfont |
| 3157 |
% \lhnss oordinamento dei {\lhbss D}\kern-.033333em ottorandi di |
| 3158 |
% {\lhbss P}\kern-.1em adova\enspace\hrulefill\kern-1cm |
| 3159 |
% }}} |
| 3160 |
% \put(10,40){\makebox(88,130)[tl]{\begin{minipage}[t]{88mm} |
| 3161 |
% \vrule height 10pt depth 0pt width 0pt \relax |
| 3162 |
% Text text text text text text text text text text text text |
| 3163 |
% text text text text text text text text text text text text. |
| 3164 |
% \end{minipage}}} |
| 3165 |
% \put(10,25){\makebox(88,3.514598035146)[tl]{\parbox[t]{88mm}{^^A |
| 3166 |
% \setlength{\parfillskip}{0pt} |
| 3167 |
% \noindent\rule{0pt}{10pt}\kern-1cm\hrulefill\kern-1cm\par |
| 3168 |
% \setlength{\baselineskip}{11pt} |
| 3169 |
% \fontencoding{OT1}\selectfont |
| 3170 |
% \hbox to \hsize{\hss\lhrm |
| 3171 |
% Coordinamento dei Dottorandi e dei Dottori di Ricerca |
| 3172 |
% dell'Universit\`{a} di Padova^^A |
| 3173 |
% \hss} |
| 3174 |
% \hbox to \hsize{\hss |
| 3175 |
% \lhit World Wide Web:\/ |
| 3176 |
% \lhtt http://www.dei.unipd.it/\string~assdott/^^A |
| 3177 |
% \hss} |
| 3178 |
% }}} |
| 3179 |
% \linethickness{0.1pt} |
| 3180 |
% \put(-27,210){\line(1,0){17}} |
| 3181 |
% \put(-27,195){\line(1,0){125}} |
| 3182 |
% \put(-27,185){\line(1,0){142}} |
| 3183 |
% \put(-27,170){\line(1,0){142}} |
| 3184 |
% \put(-27,40) {\line(1,0){142}} |
| 3185 |
% \put(-27,25) {\line(1,0){142}} |
| 3186 |
% \put(10,25) {\line(0,1){192}} |
| 3187 |
% \put(98,25) {\line(0,1){192}} |
| 3188 |
% \put(20,185){\line(0,1){37}} |
| 3189 |
% \put(5,215) {\vector(1,0){5}} |
| 3190 |
% \put(10,215){\line(1,0){10}} |
| 3191 |
% \put(55,215){\vector(-1,0){35}} |
| 3192 |
% \put(55,215){\makebox(0,35)[br]{\strut\ttfamily\bslash @lh@left@margin}} |
| 3193 |
% \put(63,215) {\vector(1,0){35}} |
| 3194 |
% \put(63,215){\makebox(0,35)[bl]{\strut\ttfamily\bslash @lh@right@margin}} |
| 3195 |
% \put(98,215){\line(1,0){10}} |
| 3196 |
% \put(113,215){\vector(-1,0){5}} |
| 3197 |
% \put(108,25){\line(0,1){197}} |
| 3198 |
% \put(0,25) {\line(0,1){12}} |
| 3199 |
% \put(-5,30){\vector(1,0){5}} |
| 3200 |
% \put(0,30) {\line(1,0){10}} |
| 3201 |
% \put(45,30){\vector(-1,0){35}} |
| 3202 |
% \put(45,30){\makebox(0,35)[br]{\strut\ttfamily\bslash @lh@right@margin}} |
| 3203 |
% \put(-15,35){\vector(1,0) {15}} |
| 3204 |
% \put(-5,35) {\vector(-1,0){15}} |
| 3205 |
% \put(-10,35){\makebox(0,0)[b]{\strut $2\,\mbox{cm}$}} |
| 3206 |
% \put(-20,200){\line(0,1){22}} |
| 3207 |
% \put(-10,220){\vector(1,0) {30}} |
| 3208 |
% \put(10,220) {\vector(-1,0){30}} |
| 3209 |
% \put(0,220){\makebox(0,0)[b]{\strut $4\,\mbox{cm}$}} |
| 3210 |
% \put(128,200){\line(0,1){22}} |
| 3211 |
% \put(113,220){\vector(1,0) {15}} |
| 3212 |
% \put(123,220){\vector(-1,0){15}} |
| 3213 |
% \put(118,220){\makebox(0,0)[b]{\strut $2\,\mbox{cm}$}} |
| 3214 |
% \put(113,195){\vector(0,1) {15}} |
| 3215 |
% \put(113,200){\vector(0,-1){15}} |
| 3216 |
% \put(113,197.5){\makebox(0,0)[l]{ $2.5\,\mbox{cm}$}} |
| 3217 |
% \put(113,175){\vector(0,1) {10}} |
| 3218 |
% \put(113,180){\vector(0,-1){10}} |
| 3219 |
% \put(113,177.5){\makebox(0,0)[l]{ $1.5\,\mbox{cm}$}} |
| 3220 |
% \put(113,30){\vector(0,1) {10}} |
| 3221 |
% \put(113,35){\vector(0,-1){10}} |
| 3222 |
% \put(113,32.5){\makebox(0,0)[l]{${}\ge1.5\,\mbox{cm}$}} |
| 3223 |
% \put(113,10){\vector(0,1) {15}} |
| 3224 |
% \put(113,15){\vector(0,-1){15}} |
| 3225 |
% \put(113,12.5){\makebox(0,0)[l]{ $2.5\,\mbox{cm}$}} |
| 3226 |
% \put(-25,200){\vector(0,1) {10}} |
| 3227 |
% \put(-25,205){\vector(0,-1){10}} |
| 3228 |
% \put(-25,202.5){\makebox(0,0)[r]{$\mbox{\ttfamily\bslash topmargin}+1\,\mbox{in}$ }} |
| 3229 |
% \put(-25,189){\vector(0,1) {6}} |
| 3230 |
% \put(-25,191){\vector(0,-1){6}} |
| 3231 |
% \put(-25,190){\makebox(0,0)[r]{{\ttfamily\bslash headheight} }} |
| 3232 |
% \put(-25,175){\vector(0,1) {10}} |
| 3233 |
% \put(-25,180){\vector(0,-1){10}} |
| 3234 |
% \put(-25,177.5){\makebox(0,0)[r]{{\ttfamily\bslash headsep} }} |
| 3235 |
% \put(-25,100){\vector(0,1) {70}} |
| 3236 |
% \put(-25,110){\vector(0,-1){70}} |
| 3237 |
% \put(-25,105){\makebox(0,0)[r]{{\ttfamily\bslash textheight} }} |
| 3238 |
% \put(-25,30){\vector(0,1) {10}} |
| 3239 |
% \put(-25,35){\vector(0,-1){10}} |
| 3240 |
% \put(-25,32.5){\makebox(0,0)[r]{{\ttfamily\bslash footskip} }} |
| 3241 |
% \put(-10,100){\vector(1,0) {20}} |
| 3242 |
% \put(0,100) {\vector(-1,0){20}} |
| 3243 |
% \put(-5,100) {\makebox(0,0)[b]{\parbox[b]{4cm}{\centering |
| 3244 |
% \strut\texttt{\bslash oddsidemargin}\\ |
| 3245 |
% or\\ |
| 3246 |
% \texttt{\bslash evensidemargin}\\ |
| 3247 |
% ${}+1\,\mbox{in}$\strut |
| 3248 |
% }}} |
| 3249 |
% \put(48,100){\vector(1,0) {50}} |
| 3250 |
% \put(60,100){\vector(-1,0){50}} |
| 3251 |
% \put(54,100){\makebox(0,0)[b]{\strut\ttfamily\bslash textwidth}} |
| 3252 |
% \end{picture} |
| 3253 |
% \caption{Basic page layout parameters} |
| 3254 |
% \label{fig:plo} |
| 3255 |
% \end{figure} |
| 3256 |
% |
| 3257 |
% Before discussing the page layout parameters, let us make a brief |
| 3258 |
% digression to illustrate what we are trying to achieve and what |
| 3259 |
% difficulties we need to solve. We would like that the seal and |
| 3260 |
% certain other details of the letterhead and the footer appeared in |
| 3261 |
% fixed positions with respect to the physical edges of the sheet: |
| 3262 |
% fig.~\ref{fig:plo} shows these fixed distances, explicitly given in |
| 3263 |
% centimeters, among the others, indicated by their symbolic name. |
| 3264 |
% This rises a little problem: we want to typeset the letterhead and |
| 3265 |
% the footer as standard \LaTeX\ headers and footers, but the |
| 3266 |
% subroutine for the header or the footer installed with a |
| 3267 |
% "\ps@"\ldots\ declaration is called inside a box of width |
| 3268 |
% "\textwidth" and aligned with the main body of text. In other |
| 3269 |
% words, when typesetting the header, or the footer, one has no direct |
| 3270 |
% means to refer to the page boundaries: the only available reference |
| 3271 |
% points are the margins of the main body of text. For this reason, |
| 3272 |
% it is necessary to precompute the offset from the text margins of |
| 3273 |
% the various points that we want to appear in fixed positions. For |
| 3274 |
% instance, looking at fig.~\ref{fig:plo}: if we know that the left |
| 3275 |
% margin of the text runs exactly at \( 3\,\mbox{cm} \) from the left |
| 3276 |
% border of the sheet, and we want the left edge of the writing |
| 3277 |
% ``oordinamento dei Dottorandi di Padova'' to lie at exactly \( |
| 3278 |
% 4\,\mbox{cm} \) from this border, we need to set the |
| 3279 |
% "\@lh@left@margin" parameter to \( 1\,\mbox{cm} \), to indicate that |
| 3280 |
% the left edge of the writing should lie \( 1\,\mbox{cm} \) to the |
| 3281 |
% right of the left text margin. |
| 3282 |
% |
| 3283 |
% But this is only half of the story; the other half is best |
| 3284 |
% illustrated with an example. Suppose you are typesetting on A4~paper, |
| 3285 |
% using 10 points fonts (these are precisely the settings chosen by |
| 3286 |
% default). If you calculate the text margins and the text width |
| 3287 |
% following the recommendations given by the authors of \LaTeX\ for |
| 3288 |
% this particular combination of paper and font sizes, you will |
| 3289 |
% discover that the left margin of the main text runs at, say, \( |
| 3290 |
% 4.2\,\mbox{cm} \) from the left border of the sheet. (I~don't want |
| 3291 |
% to compute the exact value just now, since this is only an example, |
| 3292 |
% but I know that the actual value is very close to this, so the |
| 3293 |
% example is meaningful.) If, according to what we have just said, you |
| 3294 |
% set "\@lh@left@margin" to \( -0.2\,\mbox{cm} \), you will end with |
| 3295 |
% the writing ``oordinamento\ldots'' that fails to be aligned with the |
| 3296 |
% main text by just \( 2\,\mbox{mm} \)---which is awful to see. |
| 3297 |
% Clearly, in a case like this it is better to foresee that |
| 3298 |
% "\@lh@left@margin" is going to receive a small value, and to adjust |
| 3299 |
% the left margin of the main body of text to \( 4\,\mbox{cm} \), so |
| 3300 |
% that "\@lh@left@margin" can be set to \( 0\,\mbox{pt} \). This is |
| 3301 |
% just what the class does, and the final visual effect is, let |
| 3302 |
% me say, pretty good indeed\ldots |
| 3303 |
% |
| 3304 |
% To sum up, the strategy for setting the page layout parameters is |
| 3305 |
% the following: |
| 3306 |
% |
| 3307 |
% \begin{enumerate} |
| 3308 |
% |
| 3309 |
% \item\label{plostep1} |
| 3310 |
% Compute the main text width and margins according to usual \LaTeX\ |
| 3311 |
% recommendations. |
| 3312 |
% |
| 3313 |
% \item\label{plostep2} |
| 3314 |
% Figure out whether the margins computed in step~\ref{plostep1} fall |
| 3315 |
% too close to some of the points of the letterhead that we want to |
| 3316 |
% stay in fixed position, and, if it is so, adjust them so that they |
| 3317 |
% are exactly aligned with those positions. |
| 3318 |
% |
| 3319 |
% \item\label{plostep3} |
| 3320 |
% Allow the user to change the values computed in step~\ref{plostep2}, |
| 3321 |
% in case (s)he needs to set the margins to some special value. |
| 3322 |
% |
| 3323 |
% \item\label{plostep4} |
| 3324 |
% Compute the offset of those fixed points from one of the text |
| 3325 |
% margin (\emph{e.g.}, "\@lh@left@margin" in the example above), using |
| 3326 |
% whatever values for the margins are in effect after |
| 3327 |
% step~\ref{plostep3}, in such a way to be able to correctly position |
| 3328 |
% the abovementioned points using only the text margins as a reference. |
| 3329 |
% |
| 3330 |
% \end{enumerate} |
| 3331 |
% |
| 3332 |
% Of course, step~\ref{plostep3} occurs in the preamble; this means |
| 3333 |
% that step~\ref{plostep4} must be performed during the |
| 3334 |
% "\AtBeginDocument" hook. |
| 3335 |
% |
| 3336 |
% As already said, the fixed distances of the layout design are all |
| 3337 |
% shown in fig.~\ref{fig:plo}; from this distances, from the relations |
| 3338 |
% shown in the figure, and from the additional information that the |
| 3339 |
% main body of text should be horizontally centered between the edges |
| 3340 |
% of the sheet, it is possible to deduce the values of almost all the |
| 3341 |
% basic page layout parameters once the value for "\textwidth" has |
| 3342 |
% been (cleverly) chosen. Some of these parameters are readily |
| 3343 |
% readable: for instance, fig.~\ref{fig:plo} clearly states that |
| 3344 |
% "\headsep" should be equal to \( 1.5\,\mbox{cm} \); other parameters |
| 3345 |
% may require some computations, and may even not be completely |
| 3346 |
% determined: for instance, from the figure you see that \( |
| 3347 |
% "\topmargin"+"\headheight" = 2.5\,\mbox{cm}-1\,\mbox{in} \), but you |
| 3348 |
% cannot tell what the single values of "\topmargin" and "\headheight" |
| 3349 |
% are. In the last case, the inherent uncertainty does no harm, |
| 3350 |
% because the "\headheight" parameter is not used to position any |
| 3351 |
% graphical element of the letterhead: it suffices to ensure that it |
| 3352 |
% allows enough room for the other, ordinary running heads; in |
| 3353 |
% practice, that there is room for a line of text in the largest |
| 3354 |
% supported font size (\emph{i.e.}, 12~points). Setting "\headheight" |
| 3355 |
% to \( 1\,\mbox{cm} \) definitely satisfies this requisite, and has the |
| 3356 |
% nice additional aesthetic advantage that the virtual lines delimiting the |
| 3357 |
% head run exactly along the outer strokes of the ``C'' in the seal. |
| 3358 |
% (Note that decreasing or increasing the value of "\headheight" does |
| 3359 |
% not alter the dimensions of the seal: the dimensions of the seal are |
| 3360 |
% fixed, and the seal appears as a box of null width and height.) |
| 3361 |
% |
| 3362 |
% We shall now discuss the parameters shown in fig.~\ref{fig:plo} |
| 3363 |
% one by one. Of course, many of them are standard \LaTeX\ page |
| 3364 |
% layout parameters, and do not require particular explanations. |
| 3365 |
% |
| 3366 |
% The first decision I took was to locate the lower right corner of |
| 3367 |
% the seal in a fixed position \( 4\,\mbox{cm} \) across and \( |
| 3368 |
% 2.5\,\mbox{cm} \) down from the upper left corner of the page. The |
| 3369 |
% value of \( 4\,\mbox{cm} \) was chosen because it was twice the |
| 3370 |
% design width of the seal; $2.5$~is the golden section of~$4$. I then |
| 3371 |
% placed the upper margin of the main body of text \( 4\,\mbox{cm} |
| 3372 |
% \) from the upper edge of the paper. Also, the rule found to the |
| 3373 |
% right of the letterhead extends up to a distance of \( 2\,\mbox{cm} |
| 3374 |
% \) from the right edge of the paper; the rule of the footer is |
| 3375 |
% aligned with that of the letterhead on the right, and on the left it |
| 3376 |
% extends to a symmetric distance. From these fixed setting, one |
| 3377 |
% deduces the other parameters: let us see how. |
| 3378 |
% |
| 3379 |
% \begin{description} |
| 3380 |
% |
| 3381 |
% \renewcommand*\makelabel[1]{\hspace\labelsep\normalfont |
| 3382 |
% \texttt{\bslash #1}.} |
| 3383 |
% |
| 3384 |
% \item[textwidth] |
| 3385 |
% This parameter is first of all initialized in the standard |
| 3386 |
% \filedir{.clo} files: this ensures that the standard \LaTeX\ initial |
| 3387 |
% value is used (cf.~step~\ref{plostep1} above). Nevertheless, the |
| 3388 |
% value can be subsequently adjusted as explained in |
| 3389 |
% step~\ref{plostep2}, to achieve a better alignment with some points |
| 3390 |
% of the letterhead. |
| 3391 |
% |
| 3392 |
% \item[oddsidemargin] |
| 3393 |
% This is set to \( \frac{1}{2}("\paperwidth"-"\textwidth") - |
| 3394 |
% 1\,\mbox{in} \), to ensure that the main body of text is |
| 3395 |
% horizontally centered on the page. Note that \LaTeX\ measures |
| 3396 |
% "\oddsidemargin" from the \TeX\ origin, and not from the left edge |
| 3397 |
% of the paper. |
| 3398 |
% |
| 3399 |
% \item[evensidemargin] |
| 3400 |
% This is set equal to "\oddsidemargin". |
| 3401 |
% |
| 3402 |
% \item[@lh@left@margin] |
| 3403 |
% This is set to \( 4\,\mbox{cm}-"\oddsidemargin"-1\,\mbox{in} \); |
| 3404 |
% this setting is done at ``"\begin{document}"-time'' |
| 3405 |
% (cf.~step~\ref{plostep4} above), to allow the user to change |
| 3406 |
% "\oddsidemargin" in the preamble (cf.~step~\ref{plostep3} above). |
| 3407 |
% It can be useful to remark that the amount shown in |
| 3408 |
% fig.~\ref{fig:plo} is positive when measured according to the |
| 3409 |
% sign convention used internally by the code. |
| 3410 |
% |
| 3411 |
% \item[@lh@right@margin] |
| 3412 |
% This is set to \( 2\,\mbox{cm}-"\oddsidemargin"-1\,\mbox{in} \); |
| 3413 |
% this setting is done at ``"\begin{document}"-time'' |
| 3414 |
% (cf.~step~\ref{plostep4} above), to allow the user to change |
| 3415 |
% "\oddsidemargin" in the preamble (cf.~step~\ref{plostep3} above). |
| 3416 |
% It can be useful to remark that the amounts shown in |
| 3417 |
% fig.~\ref{fig:plo} are negative when measured according to the sign |
| 3418 |
% convention used internally by the code. |
| 3419 |
% |
| 3420 |
% \item[topmargin] |
| 3421 |
% This is set to \( 2.5\,\mbox{cm}-1\,\mbox{in} \) (because \LaTeX\ |
| 3422 |
% measures "\topmargin" from the \TeX\ origin, and not from the |
| 3423 |
% upper edge of the paper). |
| 3424 |
% |
| 3425 |
% \item[headheight] |
| 3426 |
% This is set to \( 1\,\mbox{cm} \). |
| 3427 |
% |
| 3428 |
% \item[headsep] |
| 3429 |
% This is set to \( 1.5\,\mbox{cm} \). |
| 3430 |
% |
| 3431 |
% \item[textheight] |
| 3432 |
% To avoid underfull "\vbox"es when typesetting pages that contain |
| 3433 |
% no glue besides the "\baselineskip" glue (that usually has no |
| 3434 |
% ability to stretch or shrink), it is highly recommendable to |
| 3435 |
% set "\textheight" to an integer number of text lines, that is, |
| 3436 |
% to set it to \( "\topskip" + n\cdot"\baselineskip" \), where |
| 3437 |
% $n$~is a natural number. We do this, choosing $n$ to be the |
| 3438 |
% largest natural number such that |
| 3439 |
% \begin{equation} |
| 3440 |
% "\topskip" + n\cdot"\baselineskip" \le "\paperheight"-8\,\mbox{cm} |
| 3441 |
% \mbox{.} |
| 3442 |
% \label{eq:textheight} |
| 3443 |
% \end{equation} |
| 3444 |
% |
| 3445 |
% \item[footskip] |
| 3446 |
% This is set to \( "\paperheight" - "\textheight" - |
| 3447 |
% 6.5\,\mbox{cm} \): this ensures that the baseline of the footer |
| 3448 |
% (along which the rule is traced) runs at \( 2.5\,\mbox{cm} \) |
| 3449 |
% from the bottom edge of the paper. |
| 3450 |
% |
| 3451 |
% \end{description} |
| 3452 |
% |
| 3453 |
% In the case of "\footskip", note that the baseline of the footer |
| 3454 |
% actually means\ldots\ the baseline of the footer! I mean, normal |
| 3455 |
% footers (like, for instance, page numbers) are typeset with the |
| 3456 |
% baseline at exactly \( 2.5\,\mbox{cm} \) from the bottom edge of the |
| 3457 |
% paper; but the footer containing the address of the |
| 3458 |
% \emph{Coordinamento} is treated differently, in that it is the |
| 3459 |
% horizontal rule which is aligned with the baseline. |
| 3460 |
% |
| 3461 |
% OK, after all this preliminary blather, we are now ready to return |
| 3462 |
% to the code. Since we have already given many explanations, the |
| 3463 |
% following comments will be rather terse. |
| 3464 |
% |
| 3465 |
% We begin to perform some of the initialization described above. |
| 3466 |
% \begin{macrocode} |
| 3467 |
\setlength\headheight{1cm} |
| 3468 |
\setlength\topmargin{1.5cm} |
| 3469 |
\addtolength\topmargin{-1in} |
| 3470 |
\setlength\headsep{1.5cm} |
| 3471 |
% \end{macrocode} |
| 3472 |
% The following settings pertaining to marginal notes and footnotes |
| 3473 |
% are simply copied from the standard \packlass{letter} class: we have |
| 3474 |
% no reason to change them. |
| 3475 |
% \begin{macrocode} |
| 3476 |
\setlength\marginparsep {11\p@} |
| 3477 |
\setlength\marginparpush{5\p@} |
| 3478 |
\setlength\footnotesep{12\p@} |
| 3479 |
\setlength{\skip\footins}{10\p@ plus 2\p@ minus 4\p@} |
| 3480 |
% \end{macrocode} |
| 3481 |
% |
| 3482 |
% Everything we have been saying above was for \LaTeXe\footnote{This |
| 3483 |
% term should no longer be used, however: what was once known as |
| 3484 |
% \LaTeXe\ has now become \LaTeX\ \emph{tout-court}.}. No attempt is |
| 3485 |
% made to support any users who happened to be still using the |
| 3486 |
% Palaeolithic \LaTeX~2.09: we simply honor the standard convention |
| 3487 |
% according to which certain basic page layout parameters must be set to |
| 3488 |
% fixed values in compatibility mode. Note that the alignment of |
| 3489 |
% those certain special points of the letterhead to fixed positions |
| 3490 |
% will still work even in this case, but the placement of the main |
| 3491 |
% body of text will be awful, in the best hypothesis. Note also that, |
| 3492 |
% in general, "\textheight" will not at all be of the form \( |
| 3493 |
% "\topskip" + n\cdot "\baselineskip" \). |
| 3494 |
% \begin{macrocode} |
| 3495 |
\if@compatibility |
| 3496 |
\setlength\oddsidemargin{53pt} |
| 3497 |
\setlength\evensidemargin{53pt} |
| 3498 |
\setlength\marginparwidth{90pt} |
| 3499 |
\setlength\textwidth{365\p@} |
| 3500 |
\setlength\textheight{505\p@} |
| 3501 |
\setlength\footskip{25\p@} |
| 3502 |
\else |
| 3503 |
% \end{macrocode} |
| 3504 |
% |
| 3505 |
% Very well, now that the have get rid of that bothersome |
| 3506 |
% parenthesis of compatibility mode, we can go on with our |
| 3507 |
% initialization code. We now take care of "\textwidth" and |
| 3508 |
% "\oddsidemargin". These parameters have already been initialized in |
| 3509 |
% a \filedir{.clo} file---and this was step~\ref{plostep1}, see above. |
| 3510 |
% Now we take care of step~\ref{plostep2}. Put |
| 3511 |
% \[ |
| 3512 |
% "\@tempdima" = \textit{total\_left\_margin} := |
| 3513 |
% {"\paperwidth"-"\textwidth"\over 2} |
| 3514 |
% \mbox{.} |
| 3515 |
% \] |
| 3516 |
% \begin{macrocode} |
| 3517 |
\setlength\@tempdima{\paperwidth} |
| 3518 |
\addtolength\@tempdima{-\textwidth} |
| 3519 |
\setlength\@tempdima{.5\@tempdima} |
| 3520 |
% \end{macrocode} |
| 3521 |
% If \( \textit{total\_left\_margin} < 3.25\,\mbox{cm} \), that is, |
| 3522 |
% if the left margin measured from the paper edge is too narrow, then |
| 3523 |
% we set "\oddsidemargin" to \( 3\,\mbox{cm} \), thereby aligning the |
| 3524 |
% left margin with the centre of the seal. |
| 3525 |
% \begin{macrocode} |
| 3526 |
\ifdim\@tempdima < 3.25cm % align to centre of logo |
| 3527 |
\setlength\oddsidemargin{3cm} |
| 3528 |
% \end{macrocode} |
| 3529 |
% If \( 3.25\,\mbox{cm} \le \textit{total\_left\_margin} < |
| 3530 |
% 4.5\,\mbox{cm} \), that is, if the left margin measured from the paper |
| 3531 |
% edge is sufficiently close to the predetermined position of the right |
| 3532 |
% edge of the seal, then we align the former to the latter, by |
| 3533 |
% setting "\oddsidemargin" to~\( 4\,\mbox{cm} \). |
| 3534 |
% \begin{macrocode} |
| 3535 |
\else\ifdim\@tempdima < 4.5cm % align to right edge of logo |
| 3536 |
\setlength\oddsidemargin{4cm} |
| 3537 |
% \end{macrocode} |
| 3538 |
% In all other cases, we set "\oddsidemargin" to the computed |
| 3539 |
% $\textit{total\_left\_margin}$. |
| 3540 |
% \begin{macrocode} |
| 3541 |
\else % keep the computed margin |
| 3542 |
\setlength\oddsidemargin{\@tempdima} |
| 3543 |
\fi\fi |
| 3544 |
% \end{macrocode} |
| 3545 |
% Whatever value we have set "\oddsidemargin" to, we reset |
| 3546 |
% "\textwidth" according to it. |
| 3547 |
% \begin{macrocode} |
| 3548 |
\setlength\textwidth{\paperwidth} |
| 3549 |
\addtolength\textwidth{-2\oddsidemargin} |
| 3550 |
% \end{macrocode} |
| 3551 |
% Of course, we must not forget to subtract \( 1\,\mbox{in} \) from |
| 3552 |
% "\oddsidemargin": we shall do this later. |
| 3553 |
% |
| 3554 |
% The following segment of code sets the width of marginal |
| 3555 |
% paragraphs (marginal notes). We first try to use up all the |
| 3556 |
% margin, leaving only a gap of "\marginparsep" (already |
| 3557 |
% initialized above) on the text side, and of \( 7\,\mbox{mm} \) |
| 3558 |
% from the paper edge. The latter should suffice with modern laser |
| 3559 |
% printers, but other printers might have more restrictive |
| 3560 |
% mechanical constraints that can affect their ability to print so |
| 3561 |
% close to the paper edge: let's hope everything works\ldots |
| 3562 |
% \begin{macrocode} |
| 3563 |
\setlength\marginparwidth{\oddsidemargin} |
| 3564 |
\addtolength\marginparwidth{-\marginparsep} |
| 3565 |
\addtolength\marginparwidth{-7mm} |
| 3566 |
% \end{macrocode} |
| 3567 |
% However, with some paper formats (\emph{e.g.}, with landscape |
| 3568 |
% orientation) the above setting may yield very wide marginal notes, |
| 3569 |
% which is undesirable. Therefore, if the value just set exceeds one |
| 3570 |
% third of "\textwidth", we cut it down to this value, provided that |
| 3571 |
% the latter is at least \( 90\,\mbox{pt} \). |
| 3572 |
% \begin{macrocode} |
| 3573 |
\setlength\@tempdima{.33333\textwidth} |
| 3574 |
\ifdim\marginparwidth > \@tempdima |
| 3575 |
\ifdim\@tempdima < 90pt\else |
| 3576 |
\setlength\marginparwidth{\@tempdima} |
| 3577 |
\fi |
| 3578 |
\fi |
| 3579 |
% \end{macrocode} |
| 3580 |
% |
| 3581 |
% All the main horizontal page layout parameters have been set. We |
| 3582 |
% can now convert "\oddsidemargin" into \TeX's coordinate system: we |
| 3583 |
% did not do this before to ease other computations. We also set |
| 3584 |
% "\evensidemargin". |
| 3585 |
% \begin{macrocode} |
| 3586 |
\addtolength\oddsidemargin{-1in} |
| 3587 |
\setlength\evensidemargin{\oddsidemargin} |
| 3588 |
% \end{macrocode} |
| 3589 |
% |
| 3590 |
% We turn now to vertical parameters. We set "\textheight" |
| 3591 |
% according to~\eqref{eq:textheight} and "\footskip" as stated above. |
| 3592 |
% First step: |
| 3593 |
% \[ |
| 3594 |
% "\@tempdima" = \textit{max\_desired\_text\_height} |
| 3595 |
% := "\paperheight"-8\,\mbox{cm} |
| 3596 |
% \mbox{.} |
| 3597 |
% \] |
| 3598 |
% \begin{macrocode} |
| 3599 |
\setlength\@tempdima{\paperheight} |
| 3600 |
\addtolength\@tempdima{-8cm} |
| 3601 |
\setlength\footskip{\@tempdima} |
| 3602 |
% \end{macrocode} |
| 3603 |
% Remove the first line, which is only "\topskip" high: |
| 3604 |
% \begin{macrocode} |
| 3605 |
\addtolength\@tempdima{-\topskip} |
| 3606 |
% \end{macrocode} |
| 3607 |
% Set "\textheight" to the largest possible integer multiple of |
| 3608 |
% "\baselineskip": |
| 3609 |
% \begin{macrocode} |
| 3610 |
\divide\@tempdima\baselineskip |
| 3611 |
\@tempcnta=\@tempdima |
| 3612 |
\setlength\textheight{\@tempcnta\baselineskip} |
| 3613 |
% \end{macrocode} |
| 3614 |
% Put in again the first line: |
| 3615 |
% \begin{macrocode} |
| 3616 |
\addtolength\textheight{\topskip} |
| 3617 |
% \end{macrocode} |
| 3618 |
% "\footskip" is still equal to \( "\paperheight"-8\,\mbox{cm} \); |
| 3619 |
% finish its initialization (cf.~above): |
| 3620 |
% \begin{macrocode} |
| 3621 |
\addtolength\footskip{-\textheight} |
| 3622 |
\addtolength\footskip{1.5cm} |
| 3623 |
% \end{macrocode} |
| 3624 |
% |
| 3625 |
% The following "\fi" goes with "\if@compatibility": |
| 3626 |
% \begin{macrocode} |
| 3627 |
\fi |
| 3628 |
% \end{macrocode} |
| 3629 |
% |
| 3630 |
% \begin{macro}{\computelongindentation} |
| 3631 |
% As explained above, "\longindentation" is a parameter that should |
| 3632 |
% set to roughly half the value of "\textwidth", with optional |
| 3633 |
% fine-tuning for better graphical results. The setting is made |
| 3634 |
% by the "\computelongindentation" macro, which is available also |
| 3635 |
% to the final user: if (s)he alters the value of "\textwidth", |
| 3636 |
% then (s)he should also call this macro to update the value of |
| 3637 |
% "\longindentation". The macro takes care of all the necessary |
| 3638 |
% fine-tuning. |
| 3639 |
% \begin{macrocode} |
| 3640 |
\newcommand*\computelongindentation{% |
| 3641 |
% \end{macrocode} |
| 3642 |
% More precisely, "\longindentation" is set as follows: the first |
| 3643 |
% attempt is to set it equal to the width of the writing |
| 3644 |
% ``oordinamento dei Dottorandi di Padova'' ("\@oordinamento@box" |
| 3645 |
% is initialized below), because this makes for a great visual |
| 3646 |
% effect\ldots |
| 3647 |
% \begin{macrocode} |
| 3648 |
\setlength\@tempdima{\wd\@oordinamento@box}% |
| 3649 |
\setlength\longindentation{\@tempdima}% |
| 3650 |
% \end{macrocode} |
| 3651 |
% \ldots but this ideal value will only be retained if it falls within |
| 3652 |
% the closed range \( [\frac{1}{2}"\textwidth"-2.5\,\mbox{mm}, |
| 3653 |
% \frac{1}{2}"\textwidth"+12.5\,\mbox{mm}] \), that is, sufficiently |
| 3654 |
% close to \( \frac{1}{2}"\textwidth" \) (which is the case for the |
| 3655 |
% most common page formats, like \opz{a4paper}); otherwise, \( |
| 3656 |
% \frac{1}{2}"\textwidth" \) will be used. |
| 3657 |
% \begin{macrocode} |
| 3658 |
\addtolength\@tempdima{2.5mm}% |
| 3659 |
\ifdim\@tempdima<.5\textwidth |
| 3660 |
\setlength\longindentation{.5\textwidth}% |
| 3661 |
\else |
| 3662 |
\addtolength\@tempdima{-12.5mm}% |
| 3663 |
\ifdim\@tempdima>.5\textwidth |
| 3664 |
\setlength\longindentation{.5\textwidth}% |
| 3665 |
\fi |
| 3666 |
\fi |
| 3667 |
% \end{macrocode} |
| 3668 |
% A final check is also made to ensure that "\longindentation" falls |
| 3669 |
% within the closed range \( [\frac{4}{10}"\textwidth", |
| 3670 |
% \frac{6}{10}"\textwidth"] \). |
| 3671 |
% \begin{macrocode} |
| 3672 |
\ifdim\longindentation<.4\textwidth |
| 3673 |
\setlength\longindentation{.5\textwidth}% |
| 3674 |
\else\ifdim\longindentation>.6\textwidth |
| 3675 |
\setlength\longindentation{.5\textwidth}% |
| 3676 |
\fi\fi |
| 3677 |
} |
| 3678 |
% \end{macrocode} |
| 3679 |
% \end{macro} |
| 3680 |
% |
| 3681 |
% The following part of the code deals with initializations the have to be |
| 3682 |
% deferred until the "\begin{document}" hook. The most complex of these is |
| 3683 |
% the check about the "\foldedheight" parameter. Recall that this parameter, |
| 3684 |
% which is initialized to a default value by the code which handles the |
| 3685 |
% \ldots\opz{paper} options, can be altered by the user at any time, but has |
| 3686 |
% to be converted in an internal form afterwards; before making the |
| 3687 |
% conversion, we need to check that the value lies in the prescribed range. |
| 3688 |
% If this is not the case, we issue a warning and set the "\if@do@fold@" |
| 3689 |
% switch false: the "\@checkfoldedheight" macro, which will be defined below, |
| 3690 |
% takes care of this, and relies on the following two macros to provide two |
| 3691 |
% different types of warning. They take two arguments, used to customize the |
| 3692 |
% message that the user will see: argument "#1" should be either the word |
| 3693 |
% ``short'' or the word ``tall'', argument "#2" should contain text giving |
| 3694 |
% further help. |
| 3695 |
% |
| 3696 |
% In addition, the user can ``validate'' a new value assigned to |
| 3697 |
% "\foldedheight" at any point in the document, by means of the |
| 3698 |
% "\checkfoldedheight" command: this commands issues a warning also when the |
| 3699 |
% check is successful. |
| 3700 |
% |
| 3701 |
% \begin{macro}{\@folding@ht@warn} |
| 3702 |
% This macro is invoked when the value of "\foldedheight" is found |
| 3703 |
% to be wrong in the check that is made during the "\AtBeginDocument" |
| 3704 |
% hook. |
| 3705 |
% \begin{macrocode} |
| 3706 |
\@ifdefinable\@folding@ht@warn{\def\@folding@ht@warn#1#2{% |
| 3707 |
\ClassWarningNoLine{\@letteracdp}{% |
| 3708 |
\protect\foldedheight\space ignored: |
| 3709 |
it is too #1!\MessageBreak |
| 3710 |
(#2.)\MessageBreak |
| 3711 |
Folded letters will be shunned% |
| 3712 |
}% |
| 3713 |
\@do@fold@false |
| 3714 |
}}% |
| 3715 |
% \end{macrocode} |
| 3716 |
% \end{macro} |
| 3717 |
% \begin{macro}{\@folding@ht@NO} |
| 3718 |
% This macro is invoked when the value of "\foldedheight" is found to be |
| 3719 |
% wrong in a check being made by the "\checkfoldedheight" command. |
| 3720 |
% \begin{macrocode} |
| 3721 |
\@ifdefinable\@folding@ht@NO{\def\@folding@ht@NO#1#2{% |
| 3722 |
\ClassWarning{\@letteracdp}{% |
| 3723 |
Bad value of \protect\foldedheight: it is too #1!\MessageBreak |
| 3724 |
(#2.)\MessageBreak |
| 3725 |
Therefore, at present folded letters are _shunned_;\MessageBreak |
| 3726 |
warning issued% |
| 3727 |
}% |
| 3728 |
\@do@fold@false |
| 3729 |
}}% |
| 3730 |
% \end{macrocode} |
| 3731 |
% \end{macro} |
| 3732 |
% \begin{macro}{\@folding@ht@OK} |
| 3733 |
% The following, instead, is the macro used to inform the user that |
| 3734 |
% the value of "\foldedheight" is correct. It sets the "\if@do@fold@" |
| 3735 |
% switch to true, too. |
| 3736 |
% \begin{macrocode} |
| 3737 |
\@ifdefinable\@folding@ht@OK{\def\@folding@ht@OK{% |
| 3738 |
\ClassWarning{\@letteracdp}{% |
| 3739 |
Checked \protect\foldedheight, |
| 3740 |
current value is acceptable.\MessageBreak |
| 3741 |
Therefore, at present folded letters are _allowed_;\MessageBreak |
| 3742 |
warning issued% |
| 3743 |
}% |
| 3744 |
\@do@fold@true |
| 3745 |
}}% |
| 3746 |
% \end{macrocode} |
| 3747 |
% \end{macro} |
| 3748 |
% \begin{macro}{\@checkfoldedheight} |
| 3749 |
% This is the internal version of the macro that checks the value of |
| 3750 |
% "\foldedheight"; it is invoked both by the "\checkfoldedheight" command and |
| 3751 |
% by the check that is made during the "\AtBeginDocument" hook. The |
| 3752 |
% arguments have the following meaning: |
| 3753 |
% \begin{paramlist} |
| 3754 |
% \param |
| 3755 |
% command to execute if the value is bad (see below);\\ |
| 3756 |
% \param |
| 3757 |
% command to execute if the value is OK\ (takes no arguments). |
| 3758 |
% \end{paramlist} |
| 3759 |
% The command passed in~\#1 must take two arguments, as follow: |
| 3760 |
% \begin{paramlist} |
| 3761 |
% \param |
| 3762 |
% either the word ``short'' or the word ``tall'';\\ |
| 3763 |
% \param |
| 3764 |
% message giving additional information. |
| 3765 |
% \end{paramlist} |
| 3766 |
% Note that both "\@folding@ht@warn" and "\@folding@ht@NO" conform to this |
| 3767 |
% calling protocol. |
| 3768 |
% \begin{macrocode} |
| 3769 |
\@ifdefinable\@checkfoldedheight{\def\@checkfoldedheight#1#2{% |
| 3770 |
% \end{macrocode} |
| 3771 |
% To begin with, the value of "\foldedheight" must be positive in order for |
| 3772 |
% folded letters to be allowed. |
| 3773 |
% \begin{macrocode} |
| 3774 |
\ifdim\foldedheight>\z@ |
| 3775 |
% \end{macrocode} |
| 3776 |
% Values greater than \( \frac{6}{10}"\paperheight" \) are rejected as too |
| 3777 |
% large. |
| 3778 |
% \begin{macrocode} |
| 3779 |
\ifdim\foldedheight>.6\paperheight |
| 3780 |
#1{tall}{% |
| 3781 |
It must not exceed 0.6\protect\paperheight |
| 3782 |
}% |
| 3783 |
% \end{macrocode} |
| 3784 |
% "\@folding@ht" holds the height of the folded flap measured from the top |
| 3785 |
% margin \emph{of the text}. |
| 3786 |
% \begin{macrocode} |
| 3787 |
\else |
| 3788 |
\setlength\@folding@ht{\foldedheight}% |
| 3789 |
\addtolength\@folding@ht{-1in}% |
| 3790 |
\addtolength\@folding@ht{-\topmargin}% |
| 3791 |
\addtolength\@folding@ht{-\headheight}% |
| 3792 |
\setlength\@lh@folding@ht{-\@folding@ht}% |
| 3793 |
\addtolength\@folding@ht{-\headsep}% |
| 3794 |
% \end{macrocode} |
| 3795 |
% If the height of the folded flap measured from the top margin of the text |
| 3796 |
% is less than $2.5\,\mbox{cm}$, it is rejected as well as too small. |
| 3797 |
% \begin{macrocode} |
| 3798 |
\ifdim\@folding@ht<2.5cm |
| 3799 |
#1{short}{% |
| 3800 |
At least 2cm _of_text_ and 0.5cm of margin\MessageBreak |
| 3801 |
must be allowed above the folding% |
| 3802 |
}% |
| 3803 |
% \end{macrocode} |
| 3804 |
% Otherwise, the value of "\foldedheight" is acceptable. |
| 3805 |
% \begin{macrocode} |
| 3806 |
\else |
| 3807 |
\setlength\@above@folding@margin{1cm}% |
| 3808 |
\setlength\@above@folding@shrink{5mm}% |
| 3809 |
\setlength\@below@folding@skip{5mm}% |
| 3810 |
\dimen4 .5\baselineskip |
| 3811 |
\dimen@ \@folding@ht |
| 3812 |
\advance\dimen@ \@below@folding@skip |
| 3813 |
\advance\dimen@ -\topskip |
| 3814 |
\dimen@ii -\dimen@ |
| 3815 |
\divide\dimen@ \dimen4 |
| 3816 |
\count@ \dimen@ |
| 3817 |
\advance\dimen@ii \count@\dimen4% |
| 3818 |
\addtolength\@below@folding@skip{\dimen@ii}% |
| 3819 |
\addtolength\@folding@ht{-\@above@folding@margin}% |
| 3820 |
% \end{macrocode} |
| 3821 |
% Note that the command passed in~\#2 \emph{must} take care of setting the |
| 3822 |
% "\if@do@fold@" switch to ``true''. |
| 3823 |
% \begin{macrocode} |
| 3824 |
#2% |
| 3825 |
% \end{macrocode} |
| 3826 |
% End of "\ifdim\@folding@ht<2.5cm": |
| 3827 |
% \begin{macrocode} |
| 3828 |
\fi |
| 3829 |
% \end{macrocode} |
| 3830 |
% End of "\ifdim\foldedheight>.6\paperheight": |
| 3831 |
% \begin{macrocode} |
| 3832 |
\fi |
| 3833 |
% \end{macrocode} |
| 3834 |
% When \( "\foldedheight" \le 0 \), folded letters are silently shunned: |
| 3835 |
% \begin{macrocode} |
| 3836 |
\else |
| 3837 |
\@do@fold@false |
| 3838 |
\fi |
| 3839 |
}} |
| 3840 |
% \end{macrocode} |
| 3841 |
% \end{macro} |
| 3842 |
% \begin{macro}{\checkfoldedheight} |
| 3843 |
% This is the user-level command, for checking the value of "\foldedheight" |
| 3844 |
% at the user's request (as opposed to checking it at the "\AtBeginDocument" |
| 3845 |
% hook). |
| 3846 |
% \begin{macrocode} |
| 3847 |
\newcommand*\checkfoldedheight{% |
| 3848 |
\@checkfoldedheight\@folding@ht@NO\@folding@ht@OK |
| 3849 |
} |
| 3850 |
% \end{macrocode} |
| 3851 |
% \end{macro} |
| 3852 |
% |
| 3853 |
% Now we perform step~\ref*{plostep4} (see \hyperref[plostep4]{above}) of |
| 3854 |
% our ``strategy for setting the page layout parameters'': |
| 3855 |
% \begin{macrocode} |
| 3856 |
\AtBeginDocument{% |
| 3857 |
\setlength\@lh@left@margin{4cm}% |
| 3858 |
\addtolength\@lh@left@margin{-1in}% |
| 3859 |
\addtolength\@lh@left@margin{-\oddsidemargin}% |
| 3860 |
\setlength\@lh@right@margin{\@lh@left@margin}% |
| 3861 |
\addtolength\@lh@right@margin{-2cm}% |
| 3862 |
% \end{macrocode} |
| 3863 |
% This is the ``"\begin{document}"'' check for the value of "\foldedheight": |
| 3864 |
% it calls "\@folding@ht@warn" if the current value is bad, and simply sets |
| 3865 |
% the "\if@do@fold@" switch to ``true'' (without giving any warning) if it |
| 3866 |
% is~OK\@. |
| 3867 |
% \begin{macrocode} |
| 3868 |
\@checkfoldedheight\@folding@ht@warn\@do@fold@true |
| 3869 |
\let\@folding@ht@warn\@undefined |
| 3870 |
} |
| 3871 |
% \end{macrocode} |
| 3872 |
% |
| 3873 |
% \begin{macro}{\@oordinamento@box} |
| 3874 |
% \changes{0.36d}{2018 Feb 08}{Added selection of the OT1 font encoding to |
| 3875 |
% the code that presets the b/w version.}^^A |
| 3876 |
% The reason for typesetting this box here was (in 1999) to save compilation |
| 3877 |
% time. In version 0.36d, "\fontencoding{OT1}\selectfont" has been added. |
| 3878 |
% \begin{macrocode} |
| 3879 |
\sbox\@oordinamento@box{% |
| 3880 |
\fontencoding{OT1}\selectfont\@lh@nss |
| 3881 |
oordinamento dei {\@lh@bss D}\kern-.033333em ottorandi di |
| 3882 |
{\@lh@bss P}\kern-.1em adova\enspace |
| 3883 |
} |
| 3884 |
% \end{macrocode} |
| 3885 |
% \end{macro} |
| 3886 |
% Now that we know the width of "\@oordinamento@box", we can now compute the |
| 3887 |
% value of "\longindentation": |
| 3888 |
% \begin{macrocode} |
| 3889 |
\computelongindentation |
| 3890 |
% \end{macrocode} |
| 3891 |
% |
| 3892 |
% Uncommented code starts here. |
| 3893 |
% \begin{macrocode} |
| 3894 |
\newcommand*\standardvertspaces{% |
| 3895 |
\setlength\aboveaddressvspace {\medskipamount}% |
| 3896 |
\@msetlength\andaddressvspace {2}{\medskipamount}% |
| 3897 |
\@msetlength\belowaddressvspace {3}{\medskipamount}% |
| 3898 |
\setlength\abovesubjectvspace {\medskipamount}% |
| 3899 |
\setlength\presubjectvspace {\medskipamount}% |
| 3900 |
\@msetlength\belowsubjectvspace {3}{\medskipamount}% |
| 3901 |
\@msetlength\abovesignaturevspace {6}{\medskipamount}% |
| 3902 |
\setlength\abovesignatureshortvspace{\bigskipamount}% |
| 3903 |
\setlength\belowsignaturevspace {\bigskipamount}% |
| 3904 |
\@msetlength\belowpresentationvspace{3}{\medskipamount}% |
| 3905 |
} |
| 3906 |
\setlength\senderindentation {\z@} |
| 3907 |
\setlength\senderwidth {\textwidth} |
| 3908 |
\setlength\addresseeindentation{\z@} |
| 3909 |
\setlength\addresseewidth {\textwidth} |
| 3910 |
\setlength\signatureindentation{\z@} |
| 3911 |
\setlength\signaturewidth {\textwidth} |
| 3912 |
\standardvertspaces |
| 3913 |
% \end{macrocode} |
| 3914 |
% |
| 3915 |
% \subsubsection{Page styles} |
| 3916 |
% |
| 3917 |
% \begin{macrocode} |
| 3918 |
\newcommand*{\automark}{\let\@mkboth\markboth} |
| 3919 |
\newcommand*{\usermark}{\let\@mkboth\@gobbletwo} |
| 3920 |
\automark % default is to put page no. and addressee in the header |
| 3921 |
%% We need to change even the definition of the standard page styles. |
| 3922 |
\def\ps@empty{% |
| 3923 |
\let\@oddhead\@empty |
| 3924 |
\let\@evenhead\@empty |
| 3925 |
\let\@oddfoot\@empty |
| 3926 |
\let\@evenfoot\@empty |
| 3927 |
} |
| 3928 |
\def\ps@plain{% |
| 3929 |
\let\@oddhead\@empty |
| 3930 |
\let\@evenhead\@empty |
| 3931 |
\let\@oddfoot\@centred@folio |
| 3932 |
\let\@evenfoot\@centred@folio |
| 3933 |
} |
| 3934 |
\def\ps@firstpage{% |
| 3935 |
\let\@oddhead\@empty |
| 3936 |
\let\@evenhead\@empty |
| 3937 |
\let\@oddfoot\@first@foot |
| 3938 |
\let\@evenfoot\@centred@folio |
| 3939 |
} |
| 3940 |
\def\ps@foldedpage{% |
| 3941 |
\def\@oddhead{\hfill\@folding@tag}% |
| 3942 |
\let\@evenhead\@empty |
| 3943 |
\let\@oddfoot\@first@foot |
| 3944 |
\let\@evenfoot\@centred@folio |
| 3945 |
} |
| 3946 |
\def\ps@letterhead{% |
| 3947 |
\let\@oddhead\@cdp@head |
| 3948 |
\let\@evenhead\@empty |
| 3949 |
\let\@oddfoot\@centred@folio |
| 3950 |
\let\@evenfoot\@centred@folio |
| 3951 |
} |
| 3952 |
\def\ps@firstletterhead{% |
| 3953 |
\let\@oddhead\@cdp@head |
| 3954 |
\let\@evenhead\@empty |
| 3955 |
\let\@oddfoot\@cdp@foot |
| 3956 |
\let\@evenfoot\@centred@folio |
| 3957 |
} |
| 3958 |
\def\ps@foldedletterhead{% |
| 3959 |
\def\@oddhead{\@cdp@head\@folding@tag}% |
| 3960 |
\let\@evenhead\@empty |
| 3961 |
\let\@oddfoot\@cdp@foot |
| 3962 |
\let\@evenfoot\@centred@folio |
| 3963 |
} |
| 3964 |
\def\ps@logo{% |
| 3965 |
\def\@oddhead{\@cdp@logo\hfill}% |
| 3966 |
\let\@evenhead\@empty |
| 3967 |
\let\@oddfoot\@centred@folio |
| 3968 |
\let\@evenfoot\@centred@folio |
| 3969 |
} |
| 3970 |
\def\ps@headings{% |
| 3971 |
\automark |
| 3972 |
\let\@oddhead\@r@head |
| 3973 |
\let\@evenhead\@l@head |
| 3974 |
\let\@oddfoot\@centred@folio |
| 3975 |
\let\@evenfoot\@centred@folio |
| 3976 |
} |
| 3977 |
\def\ps@logoheadings{% |
| 3978 |
\automark |
| 3979 |
\def\@oddhead{\@cdp@logo\@r@head}% |
| 3980 |
\let\@evenhead\@l@head |
| 3981 |
\let\@oddfoot\@centred@folio |
| 3982 |
\let\@evenfoot\@centred@folio |
| 3983 |
} |
| 3984 |
\def\ps@myheadings{% |
| 3985 |
\usermark |
| 3986 |
\let\@oddhead\@r@head |
| 3987 |
\let\@evenhead\@l@head |
| 3988 |
\let\@oddfoot\@centred@folio |
| 3989 |
\let\@evenfoot\@centred@folio |
| 3990 |
} |
| 3991 |
\def\ps@logomyheadings{% |
| 3992 |
\usermark |
| 3993 |
\def\@oddhead{\@cdp@logo\@r@head}% |
| 3994 |
\let\@evenhead\@l@head |
| 3995 |
\let\@oddfoot\@centred@folio |
| 3996 |
\let\@evenfoot\@centred@folio |
| 3997 |
} |
| 3998 |
\def\ps@letterheadnpn{% |
| 3999 |
\let\@oddhead\@cdp@head |
| 4000 |
\let\@evenhead\@empty |
| 4001 |
\let\@oddfoot\@empty |
| 4002 |
\let\@evenfoot\@empty |
| 4003 |
} |
| 4004 |
\def\ps@logonpn{% |
| 4005 |
\def\@oddhead{\@cdp@logo\hfill}% |
| 4006 |
\let\@evenhead\@empty |
| 4007 |
\let\@oddfoot\@empty |
| 4008 |
\let\@evenfoot\@empty |
| 4009 |
} |
| 4010 |
\@ifdefinable\@centred@folio{\def\@centred@folio{% |
| 4011 |
\reset@font\hfil\thepage\hfil |
| 4012 |
}} |
| 4013 |
\@ifdefinable\@l@head{\def\@l@head{% |
| 4014 |
\reset@font\slshape\hfil\ignorespaces\leftmark\unskip\/\hfil |
| 4015 |
}} |
| 4016 |
\@ifdefinable\@r@head{\def\@r@head{% |
| 4017 |
\reset@font\slshape\hfil\ignorespaces\rightmark\unskip\/\hfil |
| 4018 |
}} |
| 4019 |
\@ifdefinable\@first@foot{\def\@first@foot{% |
| 4020 |
\reset@font |
| 4021 |
\raisebox{-24\p@}[\z@]{% |
| 4022 |
\hb@xt@\textwidth{% |
| 4023 |
\ifcase \@ptsize\relax |
| 4024 |
\normalsize |
| 4025 |
\or |
| 4026 |
\small |
| 4027 |
\or |
| 4028 |
\footnotesize |
| 4029 |
\fi |
| 4030 |
\thesenderlocation \hfill \thesenderphone |
| 4031 |
}% |
| 4032 |
}\hss |
| 4033 |
}} |
| 4034 |
% \end{macrocode} |
| 4035 |
% |
| 4036 |
% \begin{macro}{\@folding@tag} |
| 4037 |
% Invoked by the macros that implement the ``folded'' page styles, |
| 4038 |
% more precisely by those which draw the header, to draw the small sign |
| 4039 |
% that marks the point where the sheet should be folded. |
| 4040 |
% \begin{macrocode} |
| 4041 |
\@ifdefinable\@folding@tag{\def\@folding@tag{% |
| 4042 |
\if@do@fold@ |
| 4043 |
\raisebox{\@lh@folding@ht}[\z@][\z@]{% |
| 4044 |
\makebox[\z@][l]{% |
| 4045 |
% \end{macrocode} |
| 4046 |
% Vers.~0.36: new and more robust way of computing the horizontal position. |
| 4047 |
% \begin{macrocode} |
| 4048 |
\dimen@ \paperwidth |
| 4049 |
\advance \dimen@ -1in% |
| 4050 |
\advance \dimen@ -\oddsidemargin |
| 4051 |
\advance \dimen@ -\textwidth |
| 4052 |
\advance\dimen@ -1cm% |
| 4053 |
% \end{macrocode} |
| 4054 |
% End of change. |
| 4055 |
% \begin{macrocode} |
| 4056 |
\kern\dimen@ \vbox{% |
| 4057 |
% \end{macrocode} |
| 4058 |
% Vers.~0.36: change to support the new "\foldingtagrule" user-level command |
| 4059 |
% and the use of color. |
| 4060 |
% \begin{macrocode} |
| 4061 |
\color@begingroup |
| 4062 |
\foldingtagrule |
| 4063 |
\color@endgroup |
| 4064 |
% \end{macrocode} |
| 4065 |
% End of change. |
| 4066 |
% \begin{macrocode} |
| 4067 |
}% |
| 4068 |
}% |
| 4069 |
}% |
| 4070 |
\fi |
| 4071 |
}} |
| 4072 |
% \end{macrocode} |
| 4073 |
% \end{macro} |
| 4074 |
% |
| 4075 |
% \begin{macro}{\foldingtagrule} |
| 4076 |
% Vers.~0.36 (2015 Feb~08): new command, redefinable by the user, |
| 4077 |
% to draw the tag. It permits customization of the latter. |
| 4078 |
% It should take up no vertical space in total |
| 4079 |
% (\emph{i.e.}, it should backspace). |
| 4080 |
% \begin{macrocode} |
| 4081 |
\newcommand*\foldingtagrule{% |
| 4082 |
\kern -.1\p@ |
| 4083 |
\hrule \@height .1\p@ \@depth .1\p@ \@width 5mm% |
| 4084 |
\kern -.1\p@ |
| 4085 |
} |
| 4086 |
% \end{macrocode} |
| 4087 |
% \end{macro} |
| 4088 |
% |
| 4089 |
% \begin{macro}{\CDPFactoryFoldingTagRule} |
| 4090 |
% Back up of the above. Should \emph{not} be redefined! |
| 4091 |
% \begin{macrocode} |
| 4092 |
\@ifdefinable\CDPFactoryFoldingTagRule{ |
| 4093 |
\let \CDPFactoryFoldingTagRule = \foldingtagrule |
| 4094 |
} |
| 4095 |
% \end{macrocode} |
| 4096 |
% \end{macro} |
| 4097 |
% |
| 4098 |
% \subsubsection{Macros for drawing the CDP\ seal} |
| 4099 |
% |
| 4100 |
% There are essentially two reasons for which I~cannot get rid of these: |
| 4101 |
% \begin{enumerate} |
| 4102 |
% \renewcommand*{\theenumi}{{\normalfont (\textit{\roman{enumi}})}} |
| 4103 |
% \renewcommand*{\labelenumi}{\theenumi} |
| 4104 |
% \item |
| 4105 |
% sentimental reasons; |
| 4106 |
% \item |
| 4107 |
% we must ensure that it is still possible to typeset the legacy |
| 4108 |
% documentation, which uses the letterhead of the \emph{Coordinamento}. |
| 4109 |
% \end{enumerate} |
| 4110 |
% In 1999, people of the \emph{Coordinamento} used the \Bundle\ on a variety |
| 4111 |
% of personal computers (mostly Macintoshes) that were often connected to |
| 4112 |
% printers lacking a PostScript interpreter; it was therefore essential that |
| 4113 |
% the CDP\ seal could be drawn relying exclusively on those capabilities of |
| 4114 |
% the \env{picture} environment that are implemented without having recourse |
| 4115 |
% to any particular driver (\emph{e.g.}, \texttt{dvips}). This had indeed |
| 4116 |
% been a fundamental principle in the design of the logotype. |
| 4117 |
% |
| 4118 |
% \begin{macro}{\@logo@box@base} |
| 4119 |
% This holds the main part of the CDP\ seal; more precisely, that part that |
| 4120 |
% appears both in the \ldots\sty{letterhead} and in the \sty{logo}\ldots page |
| 4121 |
% styles. |
| 4122 |
% \begin{macrocode} |
| 4123 |
\savebox\@logo@box@base[\z@][r]{\setlength\unitlength{.625mm}% |
| 4124 |
\begin{picture}(32,16)(-3,7.87)% |
| 4125 |
\put(8,16){\oval(10,10)[l]}% |
| 4126 |
\put(8,11){\line(0,1){10}}% |
| 4127 |
\put(9,11){\framebox(3,20){}}% |
| 4128 |
\put(18,16){\oval(10,10)[r]}% |
| 4129 |
\put(18,11){\line(0,1){10}}% |
| 4130 |
\put(14,1){\framebox(3,20){}}% |
| 4131 |
\thicklines |
| 4132 |
\put(8,16){\oval(16,16)[l]}% |
| 4133 |
\put(8,8){\line(1,0){5}}% |
| 4134 |
\put(13,24){\line(1,0){10}}% |
| 4135 |
\put(8,16){\oval(14,14)[l]}% |
| 4136 |
\put(8,9){\line(1,0){5}}% |
| 4137 |
\put(13,23){\line(1,0){10}}% |
| 4138 |
\end{picture}% |
| 4139 |
} |
| 4140 |
% \end{macrocode} |
| 4141 |
% \end{macro} |
| 4142 |
% \begin{macro}{\@logo@box@addS} |
| 4143 |
% This holds the part of the CDP\ seal that should be added to the part |
| 4144 |
% contained in "\@logo@box@base" to obtain the seal as it appears in the |
| 4145 |
% \sty{logo}\ldots page styles. |
| 4146 |
% \begin{macrocode} |
| 4147 |
\savebox\@logo@box@addS[\z@][r]{\setlength\unitlength{.625mm}% |
| 4148 |
\begin{picture}(32,16)(-3,7.87)% |
| 4149 |
\thicklines |
| 4150 |
\put(18,8){\line(1,0){8}}% |
| 4151 |
\put(18,9){\line(1,0){8}}% |
| 4152 |
\end{picture}% |
| 4153 |
} |
| 4154 |
% \end{macrocode} |
| 4155 |
% \end{macro} |
| 4156 |
% \begin{macro}{\@logo@box@addL} |
| 4157 |
% This holds the part of the CDP\ seal that should be added to the part |
| 4158 |
% contained in "\@logo@box@base" to obtain the seal embedded in the |
| 4159 |
% \ldots\sty{letterhead} page styles. |
| 4160 |
% \begin{macrocode} |
| 4161 |
\savebox\@logo@box@addL[\z@][r]{\setlength\unitlength{.625mm}% |
| 4162 |
\begin{picture}(32,16)(-3,7.87)% |
| 4163 |
\thicklines |
| 4164 |
\put(18,8){\line(1,0){10}}% |
| 4165 |
\put(18,9){\line(1,0){10}}% |
| 4166 |
\end{picture}% |
| 4167 |
} |
| 4168 |
% \end{macrocode} |
| 4169 |
% \end{macro} |
| 4170 |
% \begin{macro}{\@logo@overlay} |
| 4171 |
% Utility macro, that typesets the part of the logo that is common to the |
| 4172 |
% letterhead too. Note the final "\copy" primitive, that lacks its argument. |
| 4173 |
% \begin{macrocode} |
| 4174 |
\@ifdefinable\@logo@overlay{\def\@logo@overlay{% |
| 4175 |
\kern\@lh@left@margin |
| 4176 |
\copy\@logo@box@base \copy |
| 4177 |
}} |
| 4178 |
% \end{macrocode} |
| 4179 |
% \end{macro} |
| 4180 |
% \begin{macro}{\@cdp@logo} |
| 4181 |
% This macro is invoked by "\ps@"\ldots\ macros to typeset the seal. |
| 4182 |
% \begin{macrocode} |
| 4183 |
\@ifdefinable\@cdp@logo{\def\@cdp@logo{% |
| 4184 |
\@logo@overlay\@logo@box@addS |
| 4185 |
}} |
| 4186 |
% \end{macrocode} |
| 4187 |
% \end{macro} |
| 4188 |
% \begin{macro}{\@cdp@head} |
| 4189 |
% This macro is invoked by "\ps@"\ldots\ macros to typeset the letterhead. |
| 4190 |
% Note that it fills up the current horizontal box. |
| 4191 |
% \begin{macrocode} |
| 4192 |
\@ifdefinable\@cdp@head{\def\@cdp@head{% |
| 4193 |
\@logo@overlay\@logo@box@addL |
| 4194 |
\copy\@oordinamento@box \hrulefill \kern\@lh@right@margin |
| 4195 |
}} |
| 4196 |
% \end{macrocode} |
| 4197 |
% \end{macro} |
| 4198 |
% \begin{macro}{\@name@and@WWW@box} |
| 4199 |
% This holds the footer used in the \sty{firstletterhead} and |
| 4200 |
% \sty{foldedletterhead} page styles, which contains the full name of |
| 4201 |
% the \emph{Coordinamento} and its web address. |
| 4202 |
% \changes{0.36d}{2018 Feb 08}{Added selection of the OT1 font encoding to |
| 4203 |
% the code that presets the b/w version.}^^A |
| 4204 |
% Vers.~0.36d: added "\fontencoding{OT1}\selectfont". |
| 4205 |
% \begin{macrocode} |
| 4206 |
\setbox\@name@and@WWW@box = \vtop{% |
| 4207 |
\baselineskip 11\p@ |
| 4208 |
\fontencoding{OT1}\selectfont |
| 4209 |
\hb@xt@\z@{\hss \@lh@rm\Coordinamento \hss}% |
| 4210 |
\hb@xt@\z@{% |
| 4211 |
\hss |
| 4212 |
\@lh@it World Wide Web:\/ |
| 4213 |
\@lh@tt \CoordinamentoWWW |
| 4214 |
\hss |
| 4215 |
}% |
| 4216 |
} |
| 4217 |
% \end{macrocode} |
| 4218 |
% \end{macro} |
| 4219 |
% \begin{macro}{\@cdp@foot} |
| 4220 |
% This macro is invoked by "\ps@"\ldots\ macros to typeset the footer |
| 4221 |
% associated with the letterhead. It draws a horizontal rule that runs along |
| 4222 |
% the baseline of the footer (the same baseline on which page numbers would |
| 4223 |
% lie) starting from a distance of $-"\@lh@right@margin"$ into the left |
| 4224 |
% margin and stopping at an equal distance into the right margin, and then |
| 4225 |
% appends under this rule the saved contents of "\@name@and@WWW@box", |
| 4226 |
% horizontally centered with "\hfil". |
| 4227 |
% \begin{macrocode} |
| 4228 |
\@ifdefinable\@cdp@foot{\def\@cdp@foot{% |
| 4229 |
\reset@font |
| 4230 |
\setlength\@tempdima{\textwidth}% |
| 4231 |
\addtolength\@tempdima{-2\@lh@right@margin}% |
| 4232 |
\hss\parbox[t]{\@tempdima}{% |
| 4233 |
\parfillskip\z@skip |
| 4234 |
\noindent\hrulefill\@@par |
| 4235 |
\baselineskip 11\p@ |
| 4236 |
\hb@xt@\hsize{\hfil\copy\@name@and@WWW@box\hfil}% |
| 4237 |
}\hss |
| 4238 |
}} |
| 4239 |
% \end{macrocode} |
| 4240 |
% \end{macro} |
| 4241 |
% |
| 4242 |
% \subsubsection{\textquotedblleft Letter-making\textquotedblright\ environments} |
| 4243 |
% |
| 4244 |
% We start with the commands that set the sender's data. |
| 4245 |
% |
| 4246 |
% \begin{macro}{\name} |
| 4247 |
% The sender's name (\emph{e.g.}, "\name{R.~J.~Drofnats}"). |
| 4248 |
% \begin{macrocode} |
| 4249 |
\newcommand*\name [1]{\def\thesendername{#1}} |
| 4250 |
% \end{macrocode} |
| 4251 |
% \end{macro} |
| 4252 |
% \begin{macro}{\signature} |
| 4253 |
% The sender's signature (\emph{e.g.}, |
| 4254 |
% "\signature{R.~J.~Drofnats\\Professor}"). |
| 4255 |
% \begin{macrocode} |
| 4256 |
\newcommand \signature[1]{\def\thesendersignature{#1}} |
| 4257 |
% \end{macrocode} |
| 4258 |
% \end{macro} |
| 4259 |
% \begin{macro}{\address} |
| 4260 |
% The sender's address, \emph{including} the name. |
| 4261 |
% \begin{macrocode} |
| 4262 |
\newcommand \address [1]{\def\thesenderaddress{#1}} |
| 4263 |
% \end{macrocode} |
| 4264 |
% \end{macro} |
| 4265 |
% \begin{macro}{\location} |
| 4266 |
% The sender's location (\emph{e.g.}, floor, room number\ldots). |
| 4267 |
% \begin{macrocode} |
| 4268 |
\newcommand \location [1]{\def\thesenderlocation{#1}} |
| 4269 |
% \end{macrocode} |
| 4270 |
% \end{macro} |
| 4271 |
% \begin{macro}{\telephone} |
| 4272 |
% The sender's telephone number. |
| 4273 |
% \begin{macrocode} |
| 4274 |
\newcommand*\telephone[1]{\def\thesenderphone{#1}} |
| 4275 |
% \end{macrocode} |
| 4276 |
% \end{macro} |
| 4277 |
% |
| 4278 |
% \begin{macro}{\makelabels} |
| 4279 |
% \changes{0.36}{2015 Feb 08}{Added new instruction |
| 4280 |
% \texttt{\protect\bslash @making@labels@true}.}^^A |
| 4281 |
% The "\makelabels" command now sets the "\if@making@labels@" switch. |
| 4282 |
% \begin{macrocode} |
| 4283 |
\newcommand*\makelabels{% |
| 4284 |
\@making@labels@true |
| 4285 |
\AtBeginDocument{% |
| 4286 |
\def\@beginlabels{\begin{labels}}% |
| 4287 |
\def\@beginlabelgroup{\begin{labelgroup}}% |
| 4288 |
\let\@mlabel\basemlabel |
| 4289 |
\def\@endlabelgroup{\end{labelgroup}}% |
| 4290 |
\def\@endlabels{\end{labels}}% |
| 4291 |
\if@filesw |
| 4292 |
\immediate\write\@mainaux{\string\@beginlabels}\fi}% |
| 4293 |
\AtEndDocument{% |
| 4294 |
\if@filesw\immediate\write\@mainaux{\string\@endlabels}\fi}} |
| 4295 |
\@onlypreamble\makelabels |
| 4296 |
% \end{macrocode} |
| 4297 |
% \end{macro} |
| 4298 |
% |
| 4299 |
% \begin{macro}{\cleardoubleemptypage} |
| 4300 |
% Similar to "\cleardoublepage", but inserts pages with \sty{empty} page |
| 4301 |
% style. |
| 4302 |
% \begin{macrocode} |
| 4303 |
\newcommand*\cleardoubleemptypage{\par |
| 4304 |
\onecolumn |
| 4305 |
\if@twoside \ifodd\c@page \else |
| 4306 |
\thispagestyle{empty}\null\newpage |
| 4307 |
\fi\fi |
| 4308 |
} |
| 4309 |
% \end{macrocode} |
| 4310 |
% \end{macro} |
| 4311 |
% |
| 4312 |
% \begin{macro}{\@safe@space} |
| 4313 |
% This macro inserts \#1 in the current horizontal lists; if it contributes |
| 4314 |
% a (strictly) positive width, it also inserts~\#2. Usually \#1 is a |
| 4315 |
% certain string, and \#2 is a spacing command that one wants to emit (if |
| 4316 |
% and) only if the string is nonempty. |
| 4317 |
% \begin{macrocode} |
| 4318 |
\@ifdefinable\@safe@space{\def\@safe@space#1#2{% |
| 4319 |
\setbox\z@\hbox{\ignorespaces #1\unskip}% |
| 4320 |
\ifdim\wd\z@>\z@ |
| 4321 |
\unhbox\z@ #2% |
| 4322 |
\else |
| 4323 |
\unhbox\z@ |
| 4324 |
\fi |
| 4325 |
}} |
| 4326 |
% \end{macrocode} |
| 4327 |
% \end{macro} |
| 4328 |
% |
| 4329 |
% \begin{environment}{baseletter} |
| 4330 |
% \changes{0.31}{2001 Dec 01}{Reintroduced the first mandatory argument |
| 4331 |
% to hold local initializations.}^^A |
| 4332 |
% All the ``letter-making'' environments are based upon this one, which is |
| 4333 |
% the lowest-level one. Its purpose is to take the basic actions that are |
| 4334 |
% needed to begin and end every kind of letter. In this version of the code |
| 4335 |
% it takes two arguments (this has changed several times among different |
| 4336 |
% releases), which are meant to contain code that performs any custom |
| 4337 |
% initialization required by the higher-level environments (or by the user, |
| 4338 |
% if this environment is called directly by the user). The code passed |
| 4339 |
% in~"#1" is executed before the core initializations provided by |
| 4340 |
% "baseletter", but inside the group implied by this environment; the code |
| 4341 |
% passed in~"#2" is executed as the last thing (just before |
| 4342 |
% "\@cdp@begin@letter@hook"). Other arguments will be picked up by the |
| 4343 |
% "\x@baseletter" or "\y@baseletter" macro. |
| 4344 |
% \begin{macrocode} |
| 4345 |
\newenvironment{baseletter}[2]{% |
| 4346 |
#1% |
| 4347 |
% \end{macrocode} |
| 4348 |
% Save~"#2" in a token register for later execution: |
| 4349 |
% \begin{macrocode} |
| 4350 |
\@lett@decl{#2}% |
| 4351 |
% \end{macrocode} |
| 4352 |
% Obvious initializations; note that "\cleardoubleemptypage" calls |
| 4353 |
% "\onecolumn". |
| 4354 |
% \changes{0.36d}{2018 Feb 08}{Added \texttt{\protect\bslash global} before |
| 4355 |
% \texttt{\protect\bslash c@page\protect\bslash @ne}.}^^A |
| 4356 |
% Vers.~0.36d: added "\global" in front of "\c@page\@ne". |
| 4357 |
% \begin{macrocode} |
| 4358 |
\cleardoubleemptypage |
| 4359 |
\global\c@page\@ne |
| 4360 |
\refstepcounter{letter}% |
| 4361 |
\typeout{\lettername \space \number\c@letter}% |
| 4362 |
\interlinepenalty 200 % smaller than the TeXbook value |
| 4363 |
\parskip\medskipamount |
| 4364 |
% \end{macrocode} |
| 4365 |
% Set "\parindent" according to the option specified by the user. |
| 4366 |
% \begin{macrocode} |
| 4367 |
\ifx\@indent@pref L\else |
| 4368 |
\ifx\@indent@pref N% |
| 4369 |
\setlength\parindent{\z@}% |
| 4370 |
\else |
| 4371 |
\ifdim .1\textwidth>2pc |
| 4372 |
\setlength\parindent{.1\textwidth}% |
| 4373 |
\else |
| 4374 |
\setlength\parindent{2pc}% |
| 4375 |
\fi |
| 4376 |
\fi |
| 4377 |
\fi |
| 4378 |
% \end{macrocode} |
| 4379 |
% Continue initialization in two different ways, according to the |
| 4380 |
% presence or not of the first optional argument. |
| 4381 |
% \begin{macrocode} |
| 4382 |
\@ifnextchar[\x@baseletter\y@baseletter % ] bracket matching |
| 4383 |
}{% |
| 4384 |
% \end{macrocode} |
| 4385 |
% Code for ending letters. "\stopletter" is a hook reserved to the |
| 4386 |
% user; it is executed \emph{before} the last page of the letter is |
| 4387 |
% finished off. |
| 4388 |
% \begin{macrocode} |
| 4389 |
\stopletter |
| 4390 |
% \end{macrocode} |
| 4391 |
% Now ensure vertical mode and add a zero-cost page break \emph{above} |
| 4392 |
% the vertical glue (possibly) present at the end of the page: this |
| 4393 |
% allows to discard the glue after the signature if this is needed to |
| 4394 |
% fit the letter in the page, even if "\stopbreaks" is in effect after |
| 4395 |
% the signature. Should this be a ``"-\@M"''-cost page break instead? |
| 4396 |
% |
| 4397 |
% (2015 Feb~08, vers.~0.36: definitely \emph{no}, since that would stretch |
| 4398 |
% out the last page of the letter! It was fortunate we didn't dare change |
| 4399 |
% it in previous releases!) |
| 4400 |
% \begin{macrocode} |
| 4401 |
\@@par\addpenalty\z@ |
| 4402 |
\clearpage |
| 4403 |
% \end{macrocode} |
| 4404 |
% The following is a hook reserved to extensions of the |
| 4405 |
% \packlass{letteracdp} class; it is used, for instance, by |
| 4406 |
% \packlass{articoletteracdp}. Note that it is executed \emph{after} |
| 4407 |
% ejecting the last page of the letter. |
| 4408 |
% \changes{0.36d}{2018 Feb 08}{Changed the name of the (former) |
| 4409 |
% \texttt{\protect\bslash @end@letter@hook} hook to |
| 4410 |
% \texttt{\protect\bslash @cdp@end@letter@hook}.}^^A |
| 4411 |
% (Vers.~0.36d: changed name, added \texttt{@cdp} prefix.) |
| 4412 |
% \begin{macrocode} |
| 4413 |
\@cdp@end@letter@hook |
| 4414 |
% \end{macrocode} |
| 4415 |
% Write to the \filedir{.aux} file the data for the address labels. |
| 4416 |
% This is rather tricky because we can have multiple addressees |
| 4417 |
% \emph{and} multiple senders |
| 4418 |
% \changes{0.36}{2015 Feb 08}{Added check for the |
| 4419 |
% \texttt{\protect\bslash if@making@labels@} switch before writing to the |
| 4420 |
% \protect\filedir{.aux} file unneeded information for generating the |
| 4421 |
% address labels.}^^A |
| 4422 |
% (v.~0.36: note the new check for "\if@making@labels@", in order to write |
| 4423 |
% to the \filedir{.aux} file the information about the address labels |
| 4424 |
% only when it is actually needed). |
| 4425 |
% \begin{macrocode} |
| 4426 |
\if@filesw \if@making@labels@ |
| 4427 |
\begingroup |
| 4428 |
% \end{macrocode} |
| 4429 |
% Ensure that "\\", "~" and "\protect"'ed tokens are written literally |
| 4430 |
% instead of being expanded: |
| 4431 |
% \begin{macrocode} |
| 4432 |
\let\\\relax |
| 4433 |
\let ~\relax |
| 4434 |
\let\protect\@unexpandable@protect |
| 4435 |
% \end{macrocode} |
| 4436 |
% ^^A { brace match |
| 4437 |
% The following hack causes "\and" (and "\andcc") to expand into |
| 4438 |
% ``"}\@gobble{"''. |
| 4439 |
% ^^A } brace match |
| 4440 |
% \begin{macrocode} |
| 4441 |
\def\and{% |
| 4442 |
\iffalse{\fi}\expandafter\@gobble\expandafter{\iffalse}\fi |
| 4443 |
}% |
| 4444 |
\let\andcc\and |
| 4445 |
% \end{macrocode} |
| 4446 |
% "\returnaddress" contains the addresses of the senders, separated by |
| 4447 |
% "\and"; thanks to the above hack, only the first is saved into |
| 4448 |
% "\@cdp@reserved", and the others are "\@gobble"'d. |
| 4449 |
% \begin{macrocode} |
| 4450 |
\edef\@cdp@reserved{{\returnaddress}}% |
| 4451 |
% \end{macrocode} |
| 4452 |
% We now cope with "\and"'s and "\andcc"'s inside "\theaddresseeaddress": |
| 4453 |
% we write them to the \filedir{.aux} file as |
| 4454 |
% ^^A { brace match |
| 4455 |
% ``"}"\,\meta{LF}\,"\@mlabel{"^^A |
| 4456 |
% \( \langle\mbox{\itshape expansion of\/ } "\@cdp@reserved"\,\rangle \)^^A |
| 4457 |
% "}{"'', |
| 4458 |
% ^^A } brace match |
| 4459 |
% \emph{i.e.}, for what we have just said, as |
| 4460 |
% ^^A { brace match |
| 4461 |
% ``"}"\,\meta{LF}\,"\@mlabel{"\meta{address of 1st~sender}"}{"''. |
| 4462 |
% ^^A } brace match |
| 4463 |
% \begin{macrocode} |
| 4464 |
\def\and{% |
| 4465 |
\iffalse{\fi}^^J% |
| 4466 |
\string\@mlabel{\@cdp@reserved}{\iffalse}\fi |
| 4467 |
}% |
| 4468 |
\let\andcc\and |
| 4469 |
% \end{macrocode} |
| 4470 |
% We are now ready to write out the correct sequence of commands, |
| 4471 |
% \emph{e.g.}: |
| 4472 |
% \begingroup |
| 4473 |
% \fontsize{9}{11}\selectfont |
| 4474 |
% \zerolistvertspaces |
| 4475 |
% \begin{flushleft} |
| 4476 |
% "\@beginlabelgroup"\\ |
| 4477 |
% "\@mlabel{"\meta{1st sender}"}{"\meta{1st addressee}"}"\\ |
| 4478 |
% "\@mlabel{"\meta{1st sender}"}{"\meta{2nd addressee}"}"\\ |
| 4479 |
% "\@mlabel{"\meta{1st sender}"}{"\meta{3rd addressee}"}"\\ |
| 4480 |
% \ldots\\ |
| 4481 |
% "\@endlabelgroup"\\ |
| 4482 |
% \end{flushleft} |
| 4483 |
% \endgroup |
| 4484 |
% \begin{macrocode} |
| 4485 |
\immediate\write\@auxout{% |
| 4486 |
\string\@beginlabelgroup ^^J% |
| 4487 |
\string\@mlabel |
| 4488 |
{\@cdp@reserved}{\theaddresseeaddress}^^J% |
| 4489 |
\string\@endlabelgroup |
| 4490 |
}% |
| 4491 |
\endgroup |
| 4492 |
% \end{macrocode} |
| 4493 |
% Vers.~0.36: note the additional "\fi" to go with the new |
| 4494 |
% "\if@making@labels@". |
| 4495 |
% \begin{macrocode} |
| 4496 |
\fi \fi |
| 4497 |
} |
| 4498 |
% \end{macrocode} |
| 4499 |
% \end{environment} |
| 4500 |
% |
| 4501 |
% Back to uncommented code. |
| 4502 |
% \begin{macrocode} |
| 4503 |
\@ifdefinable\x@baseletter{\long\def\x@baseletter[#1]#2{% |
| 4504 |
\def\theaddresseename{#1}% |
| 4505 |
\def\theaddresseeaddress{#2}% |
| 4506 |
\@baseletter |
| 4507 |
}} |
| 4508 |
\@ifdefinable\y@baseletter{\long\def\y@baseletter#1{% |
| 4509 |
\@cut@andcc #1\andcc\@@@ |
| 4510 |
\def\theaddresseeaddress{#1}% |
| 4511 |
\@baseletter |
| 4512 |
}} |
| 4513 |
\newcommand\@baseletter[1][]{% |
| 4514 |
\def\thesubject{#1}% |
| 4515 |
\if@twoside |
| 4516 |
\@mkboth{% |
| 4517 |
\noexpand\@safe@space\noexpand\headtoname\noexpand\enspace |
| 4518 |
\ignorespaces\theaddresseename\unskip \hfill \noexpand\@date |
| 4519 |
}{% |
| 4520 |
\noexpand\@date \hfill |
| 4521 |
\noexpand\@safe@space\noexpand\headtoname\noexpand\enspace |
| 4522 |
\ignorespaces\theaddresseename % \unskip put by \@?@head |
| 4523 |
}% |
| 4524 |
\else |
| 4525 |
\@mkboth{}{% |
| 4526 |
\noexpand\@safe@space\noexpand\headtoname\noexpand\enspace |
| 4527 |
\ignorespaces\theaddresseename\unskip \hfill \noexpand\@date |
| 4528 |
}% |
| 4529 |
\fi |
| 4530 |
\the\@lett@decl |
| 4531 |
\@cdp@begin@letter@hook |
| 4532 |
} |
| 4533 |
\@ifdefinable\@cut@andcc{\long\def\@cut@andcc#1\andcc#2\@@@{% |
| 4534 |
\@cut@and #1\and\@@@% |
| 4535 |
}} |
| 4536 |
\@ifdefinable\@cut@and{\long\def\@cut@and#1\and#2\@@@{% |
| 4537 |
\@cut@nl #1\\\@@@% |
| 4538 |
}} |
| 4539 |
\@ifdefinable\@cut@nl{\long\def\@cut@nl#1\\#2\@@@{% |
| 4540 |
\@cut@par #1\par\@@@% |
| 4541 |
}} |
| 4542 |
\@ifdefinable\@cut@par{\long\def\@cut@par#1\par#2\@@@{% |
| 4543 |
\def\theaddresseename{#1}% |
| 4544 |
}} |
| 4545 |
\newcommand*\stopbreaks{% |
| 4546 |
\interlinepenalty\@M |
| 4547 |
\def\par{\ifvmode\else\@@par\nobreak\fi}% |
| 4548 |
\let\\\@nobreakcr |
| 4549 |
\let\vspace\@nobreakvspace |
| 4550 |
} |
| 4551 |
\DeclareRobustCommand\@nobreakvspace |
| 4552 |
{\@ifstar\@vspacer\@nobreakvspacex} |
| 4553 |
\@ifdefinable\@nobreakvspacex{\def\@nobreakvspacex#1{% |
| 4554 |
\ifvmode |
| 4555 |
\nobreak |
| 4556 |
\vskip #1% |
| 4557 |
\vskip\z@skip |
| 4558 |
\else |
| 4559 |
\@bsphack |
| 4560 |
\vadjust{\@restorepar |
| 4561 |
\nobreak |
| 4562 |
\vskip #1% |
| 4563 |
\vskip\z@skip |
| 4564 |
}% |
| 4565 |
\@esphack |
| 4566 |
\fi |
| 4567 |
}} |
| 4568 |
\@ifdefinable\@nobreakcr{\def\@nobreakcr{% |
| 4569 |
\@ifstar{\@normalcr*}{\@normalcr*}% |
| 4570 |
}} |
| 4571 |
\newcommand*\startbreaks{% |
| 4572 |
\interlinepenalty 200% |
| 4573 |
\let\par\@@par |
| 4574 |
\let\\\@normalcr |
| 4575 |
\let\vspace\@@vspace |
| 4576 |
} |
| 4577 |
\@ifdefinable\@par@stopbreaks{\def\@par@stopbreaks{% |
| 4578 |
\par\nobreak\stopbreaks |
| 4579 |
}} |
| 4580 |
\@ifdefinable\@@letter{\def\@@letter#1#2#3{% |
| 4581 |
\ifx#2N% |
| 4582 |
\renewcommand*\makepresentation{\makenormalpresentation}% |
| 4583 |
\renewenvironment*{presentation}{% |
| 4584 |
\normalpresentation |
| 4585 |
}{% |
| 4586 |
\endnormalpresentation |
| 4587 |
}% |
| 4588 |
\else\ifx#2F% |
| 4589 |
\renewcommand*\makepresentation{\makefoldedpresentation}% |
| 4590 |
\renewenvironment*{presentation}{% |
| 4591 |
\foldedpresentation |
| 4592 |
}{% |
| 4593 |
\endfoldedpresentation |
| 4594 |
}% |
| 4595 |
\fi\fi |
| 4596 |
\setlength\senderindentation {\z@}% |
| 4597 |
\setlength\senderwidth {#3}% |
| 4598 |
\setlength\addresseeindentation{#3}% |
| 4599 |
\setlength\addresseewidth {\textwidth}% |
| 4600 |
\addtolength\addresseewidth{-\addresseeindentation}% |
| 4601 |
\setlength\signatureindentation{.3\textwidth}% |
| 4602 |
\setlength\signaturewidth {.6\textwidth}% |
| 4603 |
\renewcommand*\closingindentation{\parindent} |
| 4604 |
\renewcommand*\signaturealignment{\centering}% |
| 4605 |
\standardvertspaces |
| 4606 |
\baseletter{}{% |
| 4607 |
#1% |
| 4608 |
}% |
| 4609 |
}} |
| 4610 |
\@ifdefinable\@letter{\def\@letter#1{% |
| 4611 |
\@@letter{\thispagestyle{#1}}% |
| 4612 |
}} |
| 4613 |
\newenvironment*{customletter}{% |
| 4614 |
\@@letter{}L% |
| 4615 |
}{\endbaseletter} |
| 4616 |
\newenvironment*{letter}{% |
| 4617 |
\@letter{firstpage}N{.5\textwidth}% |
| 4618 |
}{\endbaseletter} |
| 4619 |
\newenvironment*{foldedletter}{% |
| 4620 |
\@letter{foldedpage}F{.5\textwidth}% |
| 4621 |
}{\endbaseletter} |
| 4622 |
\newenvironment*{letter*}{% |
| 4623 |
\@letter{firstpage}N\longindentation |
| 4624 |
}{\endbaseletter} |
| 4625 |
\newenvironment*{foldedletter*}{% |
| 4626 |
\@letter{foldedpage}F\longindentation |
| 4627 |
}{\endbaseletter} |
| 4628 |
\newenvironment*{letterhead}{% |
| 4629 |
\@letter{firstletterhead}N\longindentation |
| 4630 |
}{\endbaseletter} |
| 4631 |
\newenvironment*{foldedletterhead}{% |
| 4632 |
\@letter{foldedletterhead}F\longindentation |
| 4633 |
}{\endbaseletter} |
| 4634 |
% \end{macrocode} |
| 4635 |
% |
| 4636 |
% \subsubsection{Addresses and subject} |
| 4637 |
% |
| 4638 |
% The addresses and the subject are not composed inside inner boxes: |
| 4639 |
% instead, they are constructed from ``blocks'' of lines, conveniently |
| 4640 |
% indented, that are contributed directly to the main vertical list. |
| 4641 |
% The correct indentation is achieved by a clever combination of "\parshape" |
| 4642 |
% and "\everypar". |
| 4643 |
% This unusual scheme was chosen with the intent of maintaining full control |
| 4644 |
% over the interline glue, but other, and simpler, ways to accomplish this |
| 4645 |
% are actually available (\emph{if} the interline glue is \emph{rigid}). |
| 4646 |
% |
| 4647 |
% \begin{macro}{\@block@parshape} |
| 4648 |
% This macro, invoked at every par., is responsible for setting the |
| 4649 |
% indentation. |
| 4650 |
% \begin{macrocode} |
| 4651 |
\@ifdefinable\@block@parshape{\def\@block@parshape{% |
| 4652 |
\parshape \@ne\@block@inden\@block@width |
| 4653 |
}} |
| 4654 |
% \end{macrocode} |
| 4655 |
% \end{macro} |
| 4656 |
% |
| 4657 |
% \begin{macro}{\@block@@everypar} |
| 4658 |
% The part of "\@block@everypar" that "\y@custom@block" uses directly. |
| 4659 |
% \begin{macrocode} |
| 4660 |
\@ifdefinable\@block@@everypar{\def\@block@@everypar{% |
| 4661 |
\parskip\z@skip |
| 4662 |
\@nobreakfalse \@minipagefalse % these are already \global |
| 4663 |
\@new@block@false \@empty@and@false % these too |
| 4664 |
\everypar{\@block@parshape}% |
| 4665 |
}} |
| 4666 |
% \end{macrocode} |
| 4667 |
% \end{macro} |
| 4668 |
% |
| 4669 |
% \begin{macro}{\@block@everypar} |
| 4670 |
% Code executed when a block or an ``"\and"-section'' begins. |
| 4671 |
% \changes{0.36}{2015 Feb 08}{Added a hook, \texttt{\protect\bslash |
| 4672 |
% @begin@block@or@and@hook}.}^^A |
| 4673 |
% 2015 Feb~08 (v.~0.36): "\@begin@block@or@and@hook" added. |
| 4674 |
% \begin{macrocode} |
| 4675 |
\@ifdefinable\@block@everypar{\def\@block@everypar{% |
| 4676 |
\@block@parshape |
| 4677 |
\@block@@everypar |
| 4678 |
\@begin@block@or@and@hook |
| 4679 |
}} |
| 4680 |
% \end{macrocode} |
| 4681 |
% \end{macro} |
| 4682 |
% |
| 4683 |
% \begin{macro}{\x@custom@block} |
| 4684 |
% General utility macro for generating blocks that, like address blocks, |
| 4685 |
% haven't got a label, but for which, in exchange, the indentation and the |
| 4686 |
% width can be set independently of one another. Parameters: |
| 4687 |
% \begin{paramlist} |
| 4688 |
% \param |
| 4689 |
% switch: \( \mbox{Y} = \mbox{add} \) space above and below, |
| 4690 |
% \( \mbox{N} = \mbox{don't} \) add it;\\ |
| 4691 |
% \param |
| 4692 |
% block indentation from left margin (\textoken{dimen});\\ |
| 4693 |
% \param |
| 4694 |
% block width (\textoken{dimen});\\ |
| 4695 |
% \param |
| 4696 |
% vertical space above block (\textoken{glue});\\ |
| 4697 |
% \param |
| 4698 |
% vertical space between ``"\and"-sections'' (\textoken{glue});\\ |
| 4699 |
% \param |
| 4700 |
% vertical space below block (\textoken{glue});\\ |
| 4701 |
% \param |
| 4702 |
% penalty for breaking before block;\\ |
| 4703 |
% \param |
| 4704 |
% penalty for breaking between ``"\and"-sections'';\\ |
| 4705 |
% \param |
| 4706 |
% penalty for breaking after block. |
| 4707 |
% \end{paramlist} |
| 4708 |
% \begin{macrocode} |
| 4709 |
\@ifdefinable\x@custom@block{\def\x@custom@block#1#2#3#4#5#6#7#8#9{% |
| 4710 |
\@custom@block#1#4#5#6#8#9% |
| 4711 |
\@block@inden #2% |
| 4712 |
\@block@width #3% |
| 4713 |
\def\voidisOK{\global\let\@empty@block\@empty}% |
| 4714 |
\everypar{\@block@everypar}% |
| 4715 |
\@@custom@block #7% |
| 4716 |
}} |
| 4717 |
% \end{macrocode} |
| 4718 |
% \end{macro} |
| 4719 |
% |
| 4720 |
% \begin{macro}{\y@custom@block} |
| 4721 |
% General utility macro for generating blocks that, just like the block of |
| 4722 |
% the subject, do have a label, but for which, in exchange, both the |
| 4723 |
% indentation and the width are deduced from the width of the label itself. |
| 4724 |
% \changes{0.36}{2015 Feb 08}{Added parameter for space after label.}^^A |
| 4725 |
% 2015 Feb~08 (v.~0.36): added new parameter for the amount of |
| 4726 |
% horizontal space after the label. Parameters now are: |
| 4727 |
% \begin{paramlist} |
| 4728 |
% \param |
| 4729 |
% switch: \( \mbox{Y} = \mbox{add} \) space above and below, |
| 4730 |
% \( \mbox{N} = \mbox{don't} \) add it;\\ |
| 4731 |
% \param |
| 4732 |
% label;\\ |
| 4733 |
% \param |
| 4734 |
% horizontal space after label (\textoken{dimen});\\ |
| 4735 |
% \param |
| 4736 |
% vertical space above block (\textoken{glue});\\ |
| 4737 |
% \param |
| 4738 |
% vertical space between ``"\and"-sections'' (\textoken{glue});\\ |
| 4739 |
% \param |
| 4740 |
% vertical space below block (\textoken{glue});\\ |
| 4741 |
% \param |
| 4742 |
% penalty for breaking before block;\\ |
| 4743 |
% \param |
| 4744 |
% penalty for breaking between ``"\and"-sections'';\\ |
| 4745 |
% \param |
| 4746 |
% penalty for breaking after block. |
| 4747 |
% \end{paramlist} |
| 4748 |
% \begin{macrocode} |
| 4749 |
\@ifdefinable\y@custom@block{\def\y@custom@block#1#2#3#4#5#6#7#8#9{% |
| 4750 |
\@custom@block#1#4#5#6#8#9% |
| 4751 |
\sbox\@labels{\normalfont\ignorespaces #2\unskip}% |
| 4752 |
% We use \@labels to save a box register. |
| 4753 |
\@block@inden\wd\@labels |
| 4754 |
\ifdim\@block@inden>\z@ |
| 4755 |
\advance \@block@inden #3\relax |
| 4756 |
\wd\@labels\@block@inden |
| 4757 |
\fi |
| 4758 |
\@block@width\textwidth \advance\@block@width -\@block@inden |
| 4759 |
\everypar{% |
| 4760 |
\parshape \tw@ \z@\textwidth \@block@inden\@block@width |
| 4761 |
\box\@labels |
| 4762 |
\@block@@everypar |
| 4763 |
}% |
| 4764 |
\@@custom@block #7% |
| 4765 |
}} |
| 4766 |
% \end{macrocode} |
| 4767 |
% \end{macro} |
| 4768 |
% |
| 4769 |
% Uncommented code. |
| 4770 |
% \begin{macrocode} |
| 4771 |
\@ifdefinable\@custom@block{\def\@custom@block#1#2#3#4#5#6{% |
| 4772 |
\if@inlabel \indent \fi |
| 4773 |
\let\par\@@par \par |
| 4774 |
\if@newlist \@noitemerr \fi |
| 4775 |
\let\makelabel\m@kel@bel |
| 4776 |
\@nobreakfalse |
| 4777 |
\@noskipsecfalse |
| 4778 |
\@totalleftmargin\z@ |
| 4779 |
\leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip |
| 4780 |
\parfillskip\@flushglue |
| 4781 |
\ifx#1Y% |
| 4782 |
\parskip #2\relax |
| 4783 |
\ifdim\lastskip>\parskip |
| 4784 |
\parskip\z@skip |
| 4785 |
\else |
| 4786 |
\advance\parskip -\lastskip |
| 4787 |
\fi |
| 4788 |
\else |
| 4789 |
\parskip\z@skip |
| 4790 |
\fi |
| 4791 |
\parindent\z@ |
| 4792 |
\linewidth\textwidth |
| 4793 |
\hsize\textwidth |
| 4794 |
\@block@space #4% |
| 4795 |
\@block@andspace #3% |
| 4796 |
\@i@penalty #5% |
| 4797 |
\@e@penalty #6% |
| 4798 |
\stopbreaks |
| 4799 |
\@new@block@true \@empty@and@true |
| 4800 |
}} |
| 4801 |
\@ifdefinable\@@custom@block{\def\@@custom@block#1{% |
| 4802 |
\addpenalty #1% |
| 4803 |
\color@begingroup |
| 4804 |
}} |
| 4805 |
\def\end@custom@block#1{\par |
| 4806 |
\color@endgroup |
| 4807 |
\if@new@block@ |
| 4808 |
\@empty@block |
| 4809 |
\else |
| 4810 |
\if@empty@and@ |
| 4811 |
\@empty@and |
| 4812 |
\fi |
| 4813 |
\ifx#1Y% |
| 4814 |
\addpenalty\@e@penalty |
| 4815 |
\addvspace\@block@space |
| 4816 |
\fi |
| 4817 |
\fi |
| 4818 |
\everypar{}% |
| 4819 |
} |
| 4820 |
\newcommand*\makeandvspace{% |
| 4821 |
\addpenalty\@i@penalty |
| 4822 |
\addvspace\@block@andspace |
| 4823 |
} |
| 4824 |
\newcommand*\makeandcclabel[1][\andccname]{% |
| 4825 |
\makebox[\z@][r]{\normalfont\@safe@space{#1}\quad}% |
| 4826 |
\ignorespaces |
| 4827 |
} |
| 4828 |
\@ifdefinable\@block@nd{\def\@block@nd{\par |
| 4829 |
\if@empty@and@ |
| 4830 |
\@empty@and |
| 4831 |
\else |
| 4832 |
\makeandvspace |
| 4833 |
\fi |
| 4834 |
\@empty@and@true |
| 4835 |
\everypar{\@block@everypar}% |
| 4836 |
}} |
| 4837 |
\@ifdefinable\@empty@and{\def\@empty@and{% |
| 4838 |
\ClassWarning{\@letteracdp}{% |
| 4839 |
\protect\and\space with nothing inside% |
| 4840 |
}% |
| 4841 |
}} |
| 4842 |
\@ifdefinable\@empty@sender{\def\@empty@sender{% |
| 4843 |
\ClassWarning{\@letteracdp}{% |
| 4844 |
Empty sender address% |
| 4845 |
}% |
| 4846 |
}} |
| 4847 |
\@ifdefinable\@sender{\def\@sender#1{% |
| 4848 |
\let\@empty@block\@empty@sender |
| 4849 |
\let\and\@block@nd |
| 4850 |
\x@custom@block #1% |
| 4851 |
\senderindentation\senderwidth |
| 4852 |
\aboveaddressvspace\andaddressvspace\belowaddressvspace |
| 4853 |
\@b@frompenalty\@i@frompenalty\@e@frompenalty |
| 4854 |
\raggedright |
| 4855 |
}} |
| 4856 |
\newenvironment*{sender} {\@sender Y}{\end@custom@block Y} |
| 4857 |
\newenvironment*{sender*}{\@sender N}{\end@custom@block N} |
| 4858 |
\@ifdefinable\@empty@addressee{\def\@empty@addressee{% |
| 4859 |
\ClassWarning{\@letteracdp}{% |
| 4860 |
Empty addressee address% |
| 4861 |
}% |
| 4862 |
}} |
| 4863 |
\@ifdefinable\@addressee{\def\@addressee#1{% |
| 4864 |
\let\@empty@block\@empty@addressee |
| 4865 |
\let\and\@block@nd |
| 4866 |
\def\andcc{\@block@nd |
| 4867 |
\everypar\expandafter{\the\everypar |
| 4868 |
\makeandcclabel\relax |
| 4869 |
}% |
| 4870 |
}% |
| 4871 |
\x@custom@block #1% |
| 4872 |
\addresseeindentation\addresseewidth |
| 4873 |
\aboveaddressvspace\andaddressvspace\belowaddressvspace |
| 4874 |
\@b@topenalty\@i@topenalty\@e@topenalty |
| 4875 |
\raggedright |
| 4876 |
}} |
| 4877 |
\newenvironment*{addressee} {\@addressee Y}{\end@custom@block Y} |
| 4878 |
\newenvironment*{addressee*}{\@addressee N}{\end@custom@block N} |
| 4879 |
\@ifdefinable\@good@prsbj{\def\@good@prsbj#1{% |
| 4880 |
\@new@block@false \@empty@and@false |
| 4881 |
\let\presubject\@bad@prsbj |
| 4882 |
\vskip\parskip |
| 4883 |
\leftline{\normalfont\ignorespaces #1\unskip}% |
| 4884 |
\nobreak |
| 4885 |
\parskip\presubjectvspace |
| 4886 |
}} |
| 4887 |
\@ifdefinable\@bad@prsbj{\def\@bad@prsbj#1{% |
| 4888 |
\ClassError{\@letteracdp}{% |
| 4889 |
Misused \protect\presubject% |
| 4890 |
}{% |
| 4891 |
At the beginning of the subject of a letter |
| 4892 |
you can write something like\MessageBreak |
| 4893 |
\protect\presubject{A short phrase...} |
| 4894 |
in order to typeset "A short phrase..."\MessageBreak |
| 4895 |
just above the subject; but the \protect\presubject\space |
| 4896 |
command must come before\MessageBreak |
| 4897 |
any other text in the subject, |
| 4898 |
and it cannot be used twice.\MessageBreak |
| 4899 |
(If you are wondering where you used the |
| 4900 |
\protect\presubject\space command,\MessageBreak |
| 4901 |
recall that both \protect\registered\space and |
| 4902 |
\protect\registeredRR\space invoke |
| 4903 |
\protect\presubject.)\MessageBreak |
| 4904 |
The offending command will be ignored: |
| 4905 |
try to type \space <return> \space to proceed.% |
| 4906 |
}% |
| 4907 |
}} |
| 4908 |
% \end{macrocode} |
| 4909 |
% |
| 4910 |
% \begin{macro}{\@subject} |
| 4911 |
% Inner implementation of \env{subject}\slash\env{subject*} environments. |
| 4912 |
% \changes{0.36}{2015 Feb 08}{Now this macro passes |
| 4913 |
% \texttt{\protect\bslash subjectnamegap} as parameter~\#3 to |
| 4914 |
% \texttt{\protect\bslash y@custom@block}.}^^A |
| 4915 |
% 2015 Feb~08 (v.~0.36): now passes the "\subjectnamegap" macro |
| 4916 |
% as parameter~\#3 to "\y@custom@block", parameter added in this same |
| 4917 |
% version. |
| 4918 |
% \begin{macrocode} |
| 4919 |
\@ifdefinable\@subject{\def\@subject#1#2{% |
| 4920 |
\let\@empty@block\@empty |
| 4921 |
\y@custom@block #1% |
| 4922 |
{#2}\subjectnamegap |
| 4923 |
\abovesubjectvspace\z@skip\belowsubjectvspace |
| 4924 |
\@b@subjpenalty\@M\@e@subjpenalty |
| 4925 |
\let\presubject\@good@prsbj |
| 4926 |
\def\registered {\presubject{\registeredname}}% |
| 4927 |
\def\registeredRR{\presubject{\registeredRRname}}% |
| 4928 |
\everypar\expandafter{\the\everypar |
| 4929 |
\let\presubject\@bad@prsbj |
| 4930 |
}% |
| 4931 |
\@subject@style |
| 4932 |
}} |
| 4933 |
% \end{macrocode} |
| 4934 |
% \end{macro} |
| 4935 |
% |
| 4936 |
% Uncommented code. |
| 4937 |
% \begin{macrocode} |
| 4938 |
\newenvironment*{subject} [1][\subjectname] |
| 4939 |
{\@subject Y{#1}}{\end@custom@block Y} |
| 4940 |
\newenvironment*{subject*}[1][\subjectname] |
| 4941 |
{\@subject N{#1}}{\end@custom@block N} |
| 4942 |
\newcommand*\ifemptyblock{% |
| 4943 |
\if@new@block@ |
| 4944 |
\expandafter\@firstoftwo |
| 4945 |
\else |
| 4946 |
\expandafter\@secondoftwo |
| 4947 |
\fi |
| 4948 |
} |
| 4949 |
\@ifdefinable\@makesender{\def\@makesender#1{% |
| 4950 |
\begin{sender#1}\thesenderaddress\end{sender#1}% |
| 4951 |
}} |
| 4952 |
\newcommand*\makesender{% |
| 4953 |
\@ifstar{\@makesender *}{\@makesender {}}% |
| 4954 |
} |
| 4955 |
\@ifdefinable\@makeaddressee{\def\@makeaddressee#1{% |
| 4956 |
\begin{addressee#1}\theaddresseeaddress\end{addressee#1}% |
| 4957 |
}} |
| 4958 |
\newcommand*\makeaddressee{% |
| 4959 |
\@ifstar{\@makeaddressee *}{\@makeaddressee {}}% |
| 4960 |
} |
| 4961 |
\newcommand*\x@makesubject[1][\subjectname]{% |
| 4962 |
\begin{subject}[#1]\thesubject\end{subject}% |
| 4963 |
} |
| 4964 |
\newcommand*\y@makesubject[1][\subjectname]{% |
| 4965 |
\begin{subject*}[#1]\thesubject\end{subject*}% |
| 4966 |
} |
| 4967 |
\newcommand*\makesubject{\@ifstar\y@makesubject\x@makesubject} |
| 4968 |
% \end{macrocode} |
| 4969 |
% |
| 4970 |
% \subsubsection{Presentations} |
| 4971 |
% |
| 4972 |
% With this funny term we denote the initial part of a letter |
| 4973 |
% (addresses and the like). |
| 4974 |
% |
| 4975 |
% \begin{macro}{\@setup@pres} |
| 4976 |
% Code for setting up style parameters. |
| 4977 |
% \begin{macrocode} |
| 4978 |
\@ifdefinable\@setup@pres{\def\@setup@pres{% |
| 4979 |
\global\@topnum\z@ % prevents figures from going at top of page |
| 4980 |
\parskip\z@skip |
| 4981 |
\parindent\z@ |
| 4982 |
\@b@frompenalty \@M |
| 4983 |
\@i@frompenalty \@fold@toppenalty |
| 4984 |
\@e@frompenalty \@M |
| 4985 |
\@b@topenalty \@fold@toppenalty |
| 4986 |
\@i@topenalty \@fold@toppenalty |
| 4987 |
\@e@topenalty \@M |
| 4988 |
\@b@subjpenalty \@fold@toppenalty |
| 4989 |
\@e@subjpenalty \@M |
| 4990 |
\interlinepenalty\@M |
| 4991 |
\def\par{\ifvmode\else\@@par\penalty\@fold@toppenalty\fi}% |
| 4992 |
\let\\\@nobreakcr |
| 4993 |
\let\vspace\@nobreakvspace |
| 4994 |
}} |
| 4995 |
\newenvironment*{presentation}{% |
| 4996 |
\normalpresentation |
| 4997 |
}{% |
| 4998 |
\endnormalpresentation |
| 4999 |
} |
| 5000 |
% \end{macrocode} |
| 5001 |
% \end{macro} |
| 5002 |
% |
| 5003 |
% \begin{environment}{normalpresentation} |
| 5004 |
% The environment for making a normal presentation: |
| 5005 |
% \begin{macrocode} |
| 5006 |
\newenvironment*{normalpresentation}{% |
| 5007 |
\cleardoublepage |
| 5008 |
\@setup@pres |
| 5009 |
}{% |
| 5010 |
% \end{macrocode} |
| 5011 |
% \changes{0.34}{2006 Jan 01}{At the end of the environment, changed |
| 5012 |
% \texttt{\protect\bslash par} into \texttt{\protect\bslash @@par}.}^^A |
| 5013 |
% Changed the following line from "\par" to "\@@par" (v.~0.34): |
| 5014 |
% \begin{macrocode} |
| 5015 |
\@@par |
| 5016 |
\addpenalty\@e@prespenalty |
| 5017 |
\addvspace\belowpresentationvspace |
| 5018 |
} |
| 5019 |
% \end{macrocode} |
| 5020 |
% \end{environment} |
| 5021 |
% |
| 5022 |
% \begin{macro}{\@nofoldwarning} |
| 5023 |
% Warning issued when folded presentations are not allowed: |
| 5024 |
% \begin{macrocode} |
| 5025 |
\@ifdefinable\@nofoldwarning{\def\@nofoldwarning{% |
| 5026 |
\ClassWarning{\@letteracdp}{% |
| 5027 |
The paper format you chose does not allow\MessageBreak |
| 5028 |
folded letters; making normal presentation.\MessageBreak |
| 5029 |
(Modify \protect\foldedheight\space in the preamble\MessageBreak |
| 5030 |
if you want to alter the default behavior.)\MessageBreak |
| 5031 |
Warning issued% |
| 5032 |
}% |
| 5033 |
}} |
| 5034 |
% \end{macrocode} |
| 5035 |
% \end{macro} |
| 5036 |
% |
| 5037 |
% \begin{environment}{foldedpresentation} |
| 5038 |
% The environment for making a folded presentation, possibly |
| 5039 |
% splitting it into two parts: the part the actually fits in the folded |
| 5040 |
% flap, and the other, which is merged with the text below the |
| 5041 |
% folding. I~think it's better to include some comments here. |
| 5042 |
% \begin{macrocode} |
| 5043 |
\newenvironment*{foldedpresentation}{% |
| 5044 |
% \end{macrocode} |
| 5045 |
% Are folded letters currently allowed? |
| 5046 |
% \begin{macrocode} |
| 5047 |
\if@do@fold@ |
| 5048 |
% \end{macrocode} |
| 5049 |
% \emph{Yes.} First, ensure that we are at the beginning of a page; |
| 5050 |
% note that \emph{numbered} pages, here, are inserted if there is a gap |
| 5051 |
% to be filled. |
| 5052 |
% \begin{macrocode} |
| 5053 |
\cleardoublepage |
| 5054 |
% \end{macrocode} |
| 5055 |
% The contents of the presentation will be saved in "\box0": set up |
| 5056 |
% parameters, color support\ldots |
| 5057 |
% \begin{macrocode} |
| 5058 |
\setbox\z@\vbox\bgroup |
| 5059 |
\@setup@pres |
| 5060 |
% \end{macrocode} |
| 5061 |
% \changes{0.34}{2006 Jan 01}{Added setting of |
| 5062 |
% \texttt{\protect\bslash boxmaxdepth} at the beginning of the |
| 5063 |
% environment.}^^A |
| 5064 |
% Added the following line (v.~0.34), even if the depth of "\box0" |
| 5065 |
% will be checked later: |
| 5066 |
% \begin{macrocode} |
| 5067 |
\boxmaxdepth\maxdepth |
| 5068 |
% \end{macrocode} |
| 5069 |
% \ldots color support, we were saying\ldots |
| 5070 |
% \begin{macrocode} |
| 5071 |
\color@begingroup |
| 5072 |
% \end{macrocode} |
| 5073 |
% The reason for this "\penalty" will be explained later~($*$): |
| 5074 |
% \begin{macrocode} |
| 5075 |
\penalty-\@M |
| 5076 |
% \end{macrocode} |
| 5077 |
% \changes{0.34}{2006 Jan 01}{Removed a superfluous setting of |
| 5078 |
% \texttt{\protect\bslash prevdepth} from the beginning of the |
| 5079 |
% environment.}^^A |
| 5080 |
% Removed the following line (v.~0.34): we have no need to insert |
| 5081 |
% interline glue here, and it is even wrong to do it; we will insert the |
| 5082 |
% "\topskip" glue below with a trick (which, in any case, would remove |
| 5083 |
% the---incorrect---interline glue inserted here). Why did I include |
| 5084 |
% this redundant statement? |
| 5085 |
%\begin{verbatim} |
| 5086 |
%\prevdepth\z@ |
| 5087 |
%\end{verbatim} |
| 5088 |
% \begin{macrocode} |
| 5089 |
\else |
| 5090 |
% \end{macrocode} |
| 5091 |
% \emph{No.} Inform the user and substitute a normal presentation. |
| 5092 |
% \begin{macrocode} |
| 5093 |
\@nofoldwarning |
| 5094 |
\normalpresentation |
| 5095 |
\fi |
| 5096 |
}{% |
| 5097 |
% \end{macrocode} |
| 5098 |
% |
| 5099 |
% When the presentation ends, if we were making a folded |
| 5100 |
% presentation\ldots |
| 5101 |
% \begin{macrocode} |
| 5102 |
\if@do@fold@ |
| 5103 |
% \end{macrocode} |
| 5104 |
% \ldots finish off the box\ldots |
| 5105 |
% \begin{macrocode} |
| 5106 |
\@@par |
| 5107 |
\color@endgroup |
| 5108 |
% \end{macrocode} |
| 5109 |
% \ldots and save its "\prevdepth" for later. |
| 5110 |
% \begin{macrocode} |
| 5111 |
\global\dimen@i\prevdepth |
| 5112 |
% \end{macrocode} |
| 5113 |
% Insert the equivalent of "\foldingfilbreak[0]": if possible, the |
| 5114 |
% "\vsplit" that will later split the presentation should try to split |
| 5115 |
% it here (\emph{i.e.}, not to split it at all). |
| 5116 |
% \begin{macrocode} |
| 5117 |
\@f@ldingfilbreak\@fold@basepenalty |
| 5118 |
% \end{macrocode} |
| 5119 |
% But "\vsplit" might prefer to split the box at the implicit |
| 5120 |
% "\penalty-10000" inserted at its end; avoid this, since it would |
| 5121 |
% defeat the "\vfil" of "\@f@ldingfilbreak":\nobreak\space($**$) |
| 5122 |
% \begin{macrocode} |
| 5123 |
\vskip\maxdimen % "discourage" the break at the \penalty-10000 |
| 5124 |
% \end{macrocode} |
| 5125 |
% End of "\vbox". |
| 5126 |
% \begin{macrocode} |
| 5127 |
\egroup |
| 5128 |
% \end{macrocode} |
| 5129 |
% Now "\box0" contains the presentation, but it lacks the due |
| 5130 |
% "\topskip" glue atop. Of course, we could have inserted the |
| 5131 |
% equivalent (in normal circumstances) of the "\topskip" glue by |
| 5132 |
% setting \[ "\prevdepth" := "\topskip"-"\baselineskip" \] at the |
| 5133 |
% beginning of "\box0", but this does not work always, since it could |
| 5134 |
% insert the "\lineskip" glue instead. We are admittedly whimsical |
| 5135 |
% here, but, in order to achieve exactly the same result yielded by |
| 5136 |
% the "\topskip" glue machinery operated in the main vertical list, we |
| 5137 |
% use the following trick of "\vsplit"'ting "\box0" to \texttt{0pt}. |
| 5138 |
% A legal breakpoint exists for this: it is the "\penalty-10000" |
| 5139 |
% inserted above in~($*$)! This breakpoint comes first in "\box0" and |
| 5140 |
% it is mandatory, so the "\vsplit" operation will stop immediately |
| 5141 |
% (without consuming time); nothing will be actually split off, |
| 5142 |
% everything will remain in "\box0", but with "\splittopskip" glue |
| 5143 |
% added at the top! Moreover, although we set "\boxmaxdepth" inside |
| 5144 |
% "\box0", we check again for possible excess depth (can't figure out |
| 5145 |
% how it could creep in, however). So: |
| 5146 |
% \begin{macrocode} |
| 5147 |
\splitmaxdepth\maxdepth |
| 5148 |
\splittopskip\topskip |
| 5149 |
\setbox\tw@\vsplit\z@ to\z@ |
| 5150 |
% \end{macrocode} |
| 5151 |
% The real splitting of the presentation is done by the following |
| 5152 |
% "\vsplit": the baseline of the first line possibly remaining in |
| 5153 |
% "\box0" after the "\vsplit" must be at a distance of |
| 5154 |
% "\@below@folding@skip" from the folding, plus the "\parskip" glue |
| 5155 |
% and, of course, the normal interline glue (we are in mid-page now). |
| 5156 |
% \begin{macrocode} |
| 5157 |
\splittopskip\baselineskip |
| 5158 |
\advance\splittopskip\@below@folding@skip |
| 5159 |
\advance\splittopskip\parskip |
| 5160 |
\setbox\tw@\vsplit\z@ to\@folding@ht |
| 5161 |
% \end{macrocode} |
| 5162 |
% Now "\box2" contains the part of the presentation that does fit in the |
| 5163 |
% folded flap; we append this box to the page (actually, it is the first |
| 5164 |
% thing contributed since the "\cleardoublepage"). Since this box already |
| 5165 |
% includes "\topskip" glue at the top, we take redundant precautions to |
| 5166 |
% ensure that no such glue is added again here. |
| 5167 |
% \begin{macrocode} |
| 5168 |
{\topskip\z@skip \box\tw@ |
| 5169 |
% \end{macrocode} |
| 5170 |
% Thanks to the above setting of "\splitmaxdepth", we are sure that |
| 5171 |
% the depth of the previous box is small; so the following line will |
| 5172 |
% take us exactly on the edge of the fold, with null depth\ldots |
| 5173 |
% \begin{macrocode} |
| 5174 |
\baselineskip\@above@folding@margin \nobreak\null}% |
| 5175 |
% \end{macrocode} |
| 5176 |
% \ldots where we insert a costly, yet feasible breakpoint. |
| 5177 |
% \begin{macrocode} |
| 5178 |
\penalty\@highpenalty |
| 5179 |
% \end{macrocode} |
| 5180 |
% If everything fitted in the folded flap, nothing remained in |
| 5181 |
% "\box0". |
| 5182 |
% \begin{macrocode} |
| 5183 |
\ifvoid\z@ |
| 5184 |
% \end{macrocode} |
| 5185 |
% In that case, just leave appropriate blank space (the "\prevdepth" |
| 5186 |
% is already zero, so the interline glue of the following line will be |
| 5187 |
% correct). |
| 5188 |
% \begin{macrocode} |
| 5189 |
\vskip\@below@folding@skip |
| 5190 |
% \end{macrocode} |
| 5191 |
% Otherwise, take the part that did not fit out of "\box0"\ldots |
| 5192 |
% \begin{macrocode} |
| 5193 |
\else |
| 5194 |
\unvbox\z@ |
| 5195 |
% \end{macrocode} |
| 5196 |
% \ldots so it is now in the list of ``recent contributions'' |
| 5197 |
% ("\unvbox" does not exercise the page builder); remove the |
| 5198 |
% "\vskip\maxdimen" added in~($**$) just to fool "\vsplit", as well as |
| 5199 |
% the items added by the virtual "\foldingfilbreak[0]". |
| 5200 |
% \begin{macrocode} |
| 5201 |
\unskip % remove "\vskip\maxdimen" |
| 5202 |
\unpenalty % remove "\penalty\@fold@basepenalty" |
| 5203 |
\unskip % remove "\vskip \dimen@ plus 1fil minus ..." |
| 5204 |
\unskip % remove "\vskip -\skip@" |
| 5205 |
\unpenalty % remove "\penalty 10000" |
| 5206 |
% \end{macrocode} |
| 5207 |
% Now the list of ``recent contributions'' contains exactly what the |
| 5208 |
% user put in the presentation (and did not fit in the folded flap). |
| 5209 |
% Restore "\prevdepth" and conclude as if it were a normal |
| 5210 |
% presentation: this makes a perfectly seamless join with the |
| 5211 |
% following material, as if the folded presentation had been a normal |
| 5212 |
% one, extending down to this spot in the page. ^^A ( paren match |
| 5213 |
% Not bad, uhu?~:-) |
| 5214 |
% \begin{macrocode} |
| 5215 |
\prevdepth\dimen@i |
| 5216 |
\addpenalty\@e@prespenalty |
| 5217 |
\addvspace\belowpresentationvspace |
| 5218 |
% \end{macrocode} |
| 5219 |
% Ah, yes, also inform the user of what happened: |
| 5220 |
% \begin{macrocode} |
| 5221 |
\ClassWarning{\@letteracdp}{% |
| 5222 |
Some text that did not fit into the folded flap\MessageBreak |
| 5223 |
was moved into the main text below the folding;\MessageBreak |
| 5224 |
warning issued% |
| 5225 |
}% |
| 5226 |
\fi |
| 5227 |
% \end{macrocode} |
| 5228 |
% If we were not making a folded presentation, then conclude a |
| 5229 |
% normal one. |
| 5230 |
% \begin{macrocode} |
| 5231 |
\else |
| 5232 |
\endnormalpresentation |
| 5233 |
\fi |
| 5234 |
} |
| 5235 |
% \end{macrocode} |
| 5236 |
% \end{environment} |
| 5237 |
% |
| 5238 |
% Back to uncommented code. |
| 5239 |
% \begin{macrocode} |
| 5240 |
\newcommand*\iffoldedallowed{% |
| 5241 |
\if@do@fold@ |
| 5242 |
\expandafter\@firstoftwo |
| 5243 |
\else |
| 5244 |
\expandafter\@secondoftwo |
| 5245 |
\fi |
| 5246 |
} |
| 5247 |
\newcommand*\makepresentation{\makenormalpresentation} |
| 5248 |
\newcommand*\makenormalpresentation{% |
| 5249 |
\begin{normalpresentation}% |
| 5250 |
\makesender\relax |
| 5251 |
\makeaddressee\relax |
| 5252 |
\makesubject\relax |
| 5253 |
\end{normalpresentation}% |
| 5254 |
} |
| 5255 |
% \end{macrocode} |
| 5256 |
% |
| 5257 |
% \begin{macro}{\@f@ldingfilbreak} |
| 5258 |
% The ``upper half'' of "\@foldingfilbreak". |
| 5259 |
% \begin{macrocode} |
| 5260 |
\@ifdefinable\@f@ldingfilbreak{\def\@f@ldingfilbreak#1{% |
| 5261 |
\ifdim\prevdepth<\maxdepth |
| 5262 |
\dimen@ -\prevdepth |
| 5263 |
\else |
| 5264 |
\dimen@ -\maxdepth |
| 5265 |
\fi |
| 5266 |
\skip@ \lastskip |
| 5267 |
\nobreak |
| 5268 |
\vskip -\skip@ |
| 5269 |
\vskip \dimen@ \@plus 1fil\@minus \@above@folding@shrink |
| 5270 |
\penalty #1% |
| 5271 |
}} |
| 5272 |
% \end{macrocode} |
| 5273 |
% \end{macro} |
| 5274 |
% |
| 5275 |
% \begin{macrocode} |
| 5276 |
\@ifdefinable\@foldingfilbreak{\def\@foldingfilbreak#1#2{\par |
| 5277 |
\@f@ldingfilbreak#1% |
| 5278 |
\vskip -\dimen@ \@plus -1fil\@minus -\@above@folding@shrink |
| 5279 |
\vskip \skip@ |
| 5280 |
\addvspace{#2}% |
| 5281 |
}} |
| 5282 |
\@ifdefinable\@fold@getpen{\def\@fold@getpen#1{% |
| 5283 |
\ifcase #1 \@fold@basepenalty \or \@fold@lowpenalty |
| 5284 |
\or \@fold@medpenalty \or \@fold@highpenalty |
| 5285 |
\else \@fold@toppenalty \fi |
| 5286 |
}} |
| 5287 |
\newcommand*\foldingbreak[1][\z@]{% |
| 5288 |
\ifvmode |
| 5289 |
\penalty\@fold@getpen{#1}% |
| 5290 |
\else |
| 5291 |
\@bsphack |
| 5292 |
\vadjust{\penalty\@fold@getpen{#1}}% |
| 5293 |
\@esphack |
| 5294 |
\fi |
| 5295 |
} |
| 5296 |
\newcommand*\foldingfilbreak[1][\z@]{% |
| 5297 |
\@foldingfilbreak{\@fold@getpen{#1}}% |
| 5298 |
} |
| 5299 |
\newcommand*\makefoldedpresentation{% |
| 5300 |
\if@do@fold@ |
| 5301 |
\begin{foldedpresentation}% |
| 5302 |
\renewcommand*\makeandvspace{% |
| 5303 |
\@foldingfilbreak\@fold@medpenalty\andaddressvspace |
| 5304 |
}% |
| 5305 |
\makesender\relax |
| 5306 |
\@foldingfilbreak\@fold@medpenalty\z@skip |
| 5307 |
\if@new@block@ |
| 5308 |
\aboveaddressvspace \z@\@plus1fil\relax |
| 5309 |
\nointerlineskip\null\nobreak |
| 5310 |
\fi |
| 5311 |
\makeaddressee\relax |
| 5312 |
\@foldingfilbreak\@fold@lowpenalty\z@skip |
| 5313 |
\makesubject\relax |
| 5314 |
\end{foldedpresentation}% |
| 5315 |
\else |
| 5316 |
\@nofoldwarning |
| 5317 |
\makenormalpresentation |
| 5318 |
\fi |
| 5319 |
} |
| 5320 |
% \end{macrocode} |
| 5321 |
% |
| 5322 |
% \subsubsection{Date, salutation, signature, enclosures\ldots} |
| 5323 |
% |
| 5324 |
% This section should be reorganized, with commands listed in a more |
| 5325 |
% logical order: at present, they are rather mixed up. |
| 5326 |
% |
| 5327 |
% First comes the date. |
| 5328 |
% \begin{macrocode} |
| 5329 |
\@ifdefinable\@make@date{\def\@make@date#1#2#3{\par |
| 5330 |
\ifx#2Y% |
| 5331 |
\nobreak\medskip |
| 5332 |
\fi |
| 5333 |
\noindent\@safe@space{#1}\space\@date\par |
| 5334 |
\ifx#3Y% |
| 5335 |
\nobreak\medskip |
| 5336 |
\fi |
| 5337 |
}} |
| 5338 |
\newcommand*\makedate [1][\@place]{\@make@date{#1}NN} |
| 5339 |
\newcommand*\maketopdate [1][\@place]{\@make@date{#1}NY} |
| 5340 |
\newcommand*\makebottomdate[1][\@place]{\@make@date{#1}YN} |
| 5341 |
\@ifdefinable\@empty@signature{\def\@empty@signature{% |
| 5342 |
\ClassWarning{\@letteracdp}{% |
| 5343 |
Empty signature% |
| 5344 |
}% |
| 5345 |
}} |
| 5346 |
% \end{macrocode} |
| 5347 |
% |
| 5348 |
% Then, heaven knows why, the signature. |
| 5349 |
% |
| 5350 |
% \begin{macro}{\@signatureenv} |
| 5351 |
% Inner implementation of the \env{signatureenv}\slash\env{signatureenv*} |
| 5352 |
% environments. |
| 5353 |
% \changes{0.36}{2015 Feb 08}{Added support for \protect\opz{signaturerule} |
| 5354 |
% option.}^^A |
| 5355 |
% Added support for the \opz{signaturerule} option (vers.~0.36), exploiting |
| 5356 |
% the new ``hook'' "\@begin@block@or@and@hook", the gets executed whenever a |
| 5357 |
% signature is typeset. |
| 5358 |
% \begin{macrocode} |
| 5359 |
\@ifdefinable\@signatureenv{\def\@signatureenv#1{\par |
| 5360 |
\let\@empty@block\@empty@signature |
| 5361 |
\let\and\@block@nd |
| 5362 |
\if@signature@rule@ |
| 5363 |
\let \@begin@block@or@and@hook \@make@signature@rule |
| 5364 |
\fi |
| 5365 |
\x@custom@block Y% |
| 5366 |
\signatureindentation\signaturewidth |
| 5367 |
#1#1\z@skip |
| 5368 |
\@M\@M\@M |
| 5369 |
\signaturealignment\@signature@style |
| 5370 |
}} |
| 5371 |
% \end{macrocode} |
| 5372 |
% \end{macro} |
| 5373 |
% |
| 5374 |
% \begin{macro}{\end@signatureenv} |
| 5375 |
% Ends a \env{signatureenv}\slash\env{signatureenv*} environment. |
| 5376 |
% \begin{macrocode} |
| 5377 |
\def\end@signatureenv{% |
| 5378 |
\end@custom@block N% not "Y" for efficiency |
| 5379 |
% \end{macrocode} |
| 5380 |
% The following line (also added, of course, in vers.~0.36) is not actually necessary ("\@begin@block@or@and@hook" |
| 5381 |
% has been set by "\@signatureenv" inside a group), but redundancy does not |
| 5382 |
% hurt. |
| 5383 |
% \begin{macrocode} |
| 5384 |
\let \@begin@block@or@and@hook \@empty |
| 5385 |
\addvspace\belowsignaturevspace |
| 5386 |
} |
| 5387 |
% \end{macrocode} |
| 5388 |
% \end{macro} |
| 5389 |
% |
| 5390 |
% \begin{environment}{signatureenv} |
| 5391 |
% For signatures that include vertical space for handwriting. |
| 5392 |
% \begin{macrocode} |
| 5393 |
\newenvironment*{signatureenv}{% |
| 5394 |
\@signatureenv\abovesignaturevspace |
| 5395 |
}{% |
| 5396 |
\end@signatureenv |
| 5397 |
} |
| 5398 |
% \end{macrocode} |
| 5399 |
% \end{environment} |
| 5400 |
% |
| 5401 |
% \begin{environment}{signatureenv*} |
| 5402 |
% For signatures that do \emph{not} include vertical space for handwriting; |
| 5403 |
% these should \emph{never} display a rule, and for this reason\ldots |
| 5404 |
% \begin{macrocode} |
| 5405 |
\newenvironment*{signatureenv*}{% |
| 5406 |
% \end{macrocode} |
| 5407 |
% \changes{0.36}{2015 Feb 08}{Taken care of always suppressing rules |
| 5408 |
% here.}^^A |
| 5409 |
% \ldots~we add the following line in vers.~0.36 (note that we are inside a |
| 5410 |
% group). |
| 5411 |
% \begin{macrocode} |
| 5412 |
\@signature@rule@false |
| 5413 |
\@signatureenv\abovesignatureshortvspace |
| 5414 |
}{% |
| 5415 |
\end@signatureenv |
| 5416 |
} |
| 5417 |
% \end{macrocode} |
| 5418 |
% \end{environment} |
| 5419 |
% |
| 5420 |
% Uncommented code. |
| 5421 |
% \begin{macrocode} |
| 5422 |
\@ifdefinable\x@msignature{\def\x@msignature#1{% |
| 5423 |
\begin{signatureenv#1}% |
| 5424 |
\ifx\thesendersignature\@empty |
| 5425 |
\thesendername |
| 5426 |
\else |
| 5427 |
\thesendersignature |
| 5428 |
\fi |
| 5429 |
\end{signatureenv#1}% |
| 5430 |
}} |
| 5431 |
\@ifdefinable\y@msignature{\def\y@msignature{% |
| 5432 |
\begin{signatureenv}% |
| 5433 |
\vskip\parskip \vskip\z@skip |
| 5434 |
\the\everypar |
| 5435 |
\end{signatureenv}% |
| 5436 |
}} |
| 5437 |
\newcommand*\makesignature{\@par@stopbreaks |
| 5438 |
\@ifstar{% |
| 5439 |
\x@msignature *% |
| 5440 |
}{% |
| 5441 |
\@ifnextchar -{% |
| 5442 |
\@firstoftwo\y@msignature |
| 5443 |
}{% |
| 5444 |
\x@msignature {}% |
| 5445 |
}% |
| 5446 |
}% |
| 5447 |
} |
| 5448 |
% \end{macrocode} |
| 5449 |
% |
| 5450 |
% \begin{macro}{\@make@signature@rule} |
| 5451 |
% Generate a fake, raised line, containing the rule. Added in vers.~0.36. |
| 5452 |
% \begin{macrocode} |
| 5453 |
\@ifdefinable\@make@signature@rule{\def\@make@signature@rule{% |
| 5454 |
\raisebox{\baselineskip}[0pt][0pt]{% |
| 5455 |
\signaturerule |
| 5456 |
}\\*[-\baselineskip]% |
| 5457 |
}} |
| 5458 |
% \end{macrocode} |
| 5459 |
% \end{macro} |
| 5460 |
% |
| 5461 |
% \begin{macro}{\signaturerule} |
| 5462 |
% User command to allow customization of the signature rule. |
| 5463 |
% Added in vers.~0.36. |
| 5464 |
% \begin{macrocode} |
| 5465 |
\newcommand*\signaturerule{% |
| 5466 |
\makebox[\signaturerulewidth]{% |
| 5467 |
\leaders \hrule \@height .1\p@ \@depth .1\p@ \hfill |
| 5468 |
}% |
| 5469 |
} |
| 5470 |
% \end{macrocode} |
| 5471 |
% \end{macro} |
| 5472 |
% |
| 5473 |
% Now it is the turn of the salutation (I~said the order isn't logical!). |
| 5474 |
% |
| 5475 |
% \begin{macro}{\makeopening} |
| 5476 |
% This command generates the sheer salutation. It comes in two flavors: |
| 5477 |
% \begin{description} |
| 5478 |
% \item[normal form:] |
| 5479 |
% "\makeopening{"\meta{text}"}"\\* |
| 5480 |
% typeset the \meta{text} as the salutation; |
| 5481 |
% \item[$+$-form:] |
| 5482 |
% "\makeopening+"\\* |
| 5483 |
% leave space for a handwritten salutation. |
| 5484 |
% \end{description} |
| 5485 |
% \begin{macrocode} |
| 5486 |
\newcommand*\makeopening{\par |
| 5487 |
\@ifnextchar +{\@firstoftwo\y@mopening}\x@mopening |
| 5488 |
} |
| 5489 |
% \end{macrocode} |
| 5490 |
% \end{macro} |
| 5491 |
% |
| 5492 |
% Uncommented code. |
| 5493 |
% \begin{macrocode} |
| 5494 |
\@ifdefinable\x@mopening{\def\x@mopening#1{% |
| 5495 |
\ifx\@indent@pref O% |
| 5496 |
\dimen@\prevdepth |
| 5497 |
\setbox\z@\vbox{\color@begingroup |
| 5498 |
\null |
| 5499 |
\prevdepth\dimen@ |
| 5500 |
\noindent\null\ignorespaces #1\par |
| 5501 |
\global\dimen@i\prevdepth |
| 5502 |
\color@endgroup}% |
| 5503 |
\setbox\tw@\vbox{% |
| 5504 |
\unvcopy\z@ |
| 5505 |
\setbox\z@\lastbox |
| 5506 |
\global\setbox\@ne\hbox{\unhbox\z@}% |
| 5507 |
}% |
| 5508 |
\ifdim\wd\@ne<2pc |
| 5509 |
\parindent 2pc\relax |
| 5510 |
\else\ifdim\wd\@ne>.4\textwidth |
| 5511 |
\parindent .1\textwidth\relax |
| 5512 |
\else |
| 5513 |
\parindent \wd\@ne |
| 5514 |
\fi\fi |
| 5515 |
\unvbox\z@ |
| 5516 |
\prevdepth\dimen@i |
| 5517 |
\else |
| 5518 |
\noindent\null\ignorespaces #1\par |
| 5519 |
\fi |
| 5520 |
\nobreak |
| 5521 |
}} |
| 5522 |
\@ifdefinable\y@mopening{\def\y@mopening{% |
| 5523 |
\@handwr@box\z@ \nobreak |
| 5524 |
}} |
| 5525 |
% \end{macrocode} |
| 5526 |
% |
| 5527 |
% \begin{macro}{\opening} |
| 5528 |
% Well-known command for opening a letter. In vers.~0.35, it, |
| 5529 |
% and related macros, have been completely reimplemented to support the |
| 5530 |
% "\OpeningSequence" feature. |
| 5531 |
% \begin{macrocode} |
| 5532 |
\newcommand*\opening{\par |
| 5533 |
\@ifnextchar +{\@firstoftwo\y@opening}\x@opening |
| 5534 |
} |
| 5535 |
% \end{macrocode} |
| 5536 |
% \end{macro} |
| 5537 |
% |
| 5538 |
% \begin{macro}{\y@opening} |
| 5539 |
% Implements the ``\mbox{$+$-form}'' of the "\opening" command (salutation |
| 5540 |
% written by hand): "\ChosenMakeOpening" should expand to ``"\y@mopening"''. |
| 5541 |
% \begin{macrocode} |
| 5542 |
\newcommand*\y@opening[1][\@place]{% |
| 5543 |
\@opening \y@mopening {#1}% |
| 5544 |
} |
| 5545 |
% \end{macrocode} |
| 5546 |
% \end{macro} |
| 5547 |
% |
| 5548 |
% \begin{macro}{\x@opening} |
| 5549 |
% Implements the normal form of the "\opening" command (with typeset |
| 5550 |
% salutation): "\ChosenMakeOpening" should expand to |
| 5551 |
% ``"\x@mopening{"\meta{contents of~\#2}"}"''. |
| 5552 |
% \begin{macrocode} |
| 5553 |
\newcommand*\x@opening[2][\@place]{% |
| 5554 |
\@opening{\x@mopening{#2}}{#1}% |
| 5555 |
} |
| 5556 |
% \end{macrocode} |
| 5557 |
% \end{macro} |
| 5558 |
% |
| 5559 |
% \begin{macro}{\@opening} |
| 5560 |
% Prepare call to "\OpeningSequence", then call it. Parameters: |
| 5561 |
% \begin{paramlist} |
| 5562 |
% \param |
| 5563 |
% intended meaning of "\ChosenMakeOpening";\\ |
| 5564 |
% \param |
| 5565 |
% contents of optional argument of "\opening" (defaults to "\@place"). |
| 5566 |
% \end{paramlist} |
| 5567 |
% \begin{macrocode} |
| 5568 |
\@ifdefinable\@opening{\def\@opening#1#2{% |
| 5569 |
% \end{macrocode} |
| 5570 |
% Keep definition of "\ChosenMakeOpening" local. |
| 5571 |
% \begin{macrocode} |
| 5572 |
\begingroup |
| 5573 |
\def\ChosenMakeOpening{#1}% |
| 5574 |
% \end{macrocode} |
| 5575 |
% Invoke user-customizable opening sequence. |
| 5576 |
% \begin{macrocode} |
| 5577 |
\OpeningSequence{#2}% |
| 5578 |
% \end{macrocode} |
| 5579 |
% If the \opz{smartindent} option is in force, "\parindent" might have just |
| 5580 |
% been changed: this change must be ``lifted'' out of the group. |
| 5581 |
% \begin{macrocode} |
| 5582 |
\global\dimen@i\parindent |
| 5583 |
\endgroup |
| 5584 |
\parindent\dimen@i |
| 5585 |
}} |
| 5586 |
% \end{macrocode} |
| 5587 |
% \end{macro} |
| 5588 |
% |
| 5589 |
% \begin{macro}{\OpeningSequence} |
| 5590 |
% This command defines the ``opening sequence'', that is, the sequence of |
| 5591 |
% commands that should be executed when the user-level "\opening" command |
| 5592 |
% is given. Provided in vers.~0.35 to allow customization. The optional |
| 5593 |
% argument of "\opening" is passed in the---mandatory!---argument of this |
| 5594 |
% command; the mandatory argument of "\opening", if present (\emph{i.e.}, |
| 5595 |
% if not ``\mbox{$+$-form}'') is embodied in "\ChosenMakeOpening". |
| 5596 |
% Factory definition: |
| 5597 |
% \begin{macrocode} |
| 5598 |
\newcommand*\OpeningSequence[1]{% |
| 5599 |
\makepresentation |
| 5600 |
\maketopdate[#1]% |
| 5601 |
\ChosenMakeOpening |
| 5602 |
} |
| 5603 |
% \end{macrocode} |
| 5604 |
% \end{macro} |
| 5605 |
% |
| 5606 |
% A little bit of uncommented code. |
| 5607 |
% \begin{macrocode} |
| 5608 |
\newcommand*\makeclosing{\@par@stopbreaks |
| 5609 |
\@ifnextchar +{\@firstoftwo\y@mclosing}\x@mclosing |
| 5610 |
} |
| 5611 |
\@ifdefinable\x@mclosing{\def\x@mclosing#1{% |
| 5612 |
\noindent\hspace*{\closingindentation}\ignorespaces #1\par |
| 5613 |
}} |
| 5614 |
\@ifdefinable\y@mclosing{\def\y@mclosing{% |
| 5615 |
\@handwr@box\closingindentation |
| 5616 |
}} |
| 5617 |
% \end{macrocode} |
| 5618 |
% |
| 5619 |
% \begin{macro}{\closing} |
| 5620 |
% Well-known command for closing a letter. In vers.~0.35, it, |
| 5621 |
% and related macros, have been completely reimplemented to support the |
| 5622 |
% "\ClosingSequence" feature. The present implementation support exactly |
| 5623 |
% the same modifiers as the former one (cf.~\cite{nts}), \emph{i.e.}: |
| 5624 |
% \begin{description} |
| 5625 |
% \item[normal form:] |
| 5626 |
% "\closing{"\meta{text}"}"\\* |
| 5627 |
% typeset the \meta{text} as the closing sentence, |
| 5628 |
% using the internal equivalent of "\makeclosing{"\meta{text}"}"; |
| 5629 |
% an ordinary signature (the internal equivalent of "\makesignature") |
| 5630 |
% follows; |
| 5631 |
% \item[$*$-form:] |
| 5632 |
% "\closing*{"\meta{text}"}"\\* |
| 5633 |
% typeset the \meta{text} as the closing sentence, |
| 5634 |
% using the internal equivalent of "\makeclosing{"\meta{text}"}"; |
| 5635 |
% a compressed signature (the internal equivalent of |
| 5636 |
% "\makesignature*") follows; |
| 5637 |
% \item[$+$-form:] |
| 5638 |
% "\closing+"\\* |
| 5639 |
% leave space for a handwritten closing sentence (as "\makeclosing+" |
| 5640 |
% would do), |
| 5641 |
% followed by another space for an equally handwritten signature |
| 5642 |
% (like the one produced by "\makesignature-"); |
| 5643 |
% \item[$-$-form:] |
| 5644 |
% "\closing-{"\meta{text}"}"\\* |
| 5645 |
% typeset the \meta{text} as the closing sentence, |
| 5646 |
% using the internal equivalent of "\makeclosing{"\meta{text}"}", |
| 5647 |
% followed by the space for a handwritten signature |
| 5648 |
% (like the one produced by "\makesignature-"). |
| 5649 |
% \end{description} |
| 5650 |
% \begin{macrocode} |
| 5651 |
\newcommand*\closing{\@par@stopbreaks |
| 5652 |
\@ifstar{% |
| 5653 |
\@closing{\x@msignature *}% |
| 5654 |
}{% |
| 5655 |
\@ifnextchar +{\@firstoftwo{% |
| 5656 |
\@@closing \y@mclosing \y@msignature |
| 5657 |
}}{% |
| 5658 |
\@ifnextchar -{\@firstoftwo{% |
| 5659 |
\@closing \y@msignature |
| 5660 |
}}{% |
| 5661 |
\@closing{\x@msignature {}}% |
| 5662 |
}% |
| 5663 |
}% |
| 5664 |
}% |
| 5665 |
} |
| 5666 |
% \end{macrocode} |
| 5667 |
% \end{macro} |
| 5668 |
% |
| 5669 |
% \begin{macro}{\@closing} |
| 5670 |
% The sole purpose of this macro is to absorb the argument destined for the |
| 5671 |
% "\closing" command (which is absent in the ``\mbox{$+$-form}, though), |
| 5672 |
% which becomes argument~\#2; argument~\#1 is the token sequence that should |
| 5673 |
% be used to generate the signature. |
| 5674 |
% \begin{macrocode} |
| 5675 |
\@ifdefinable\@closing{\def\@closing#1#2{% |
| 5676 |
\@@closing{\x@mclosing{#2}}{#1}% |
| 5677 |
}} |
| 5678 |
% \end{macrocode} |
| 5679 |
% \end{macro} |
| 5680 |
% |
| 5681 |
% \begin{macro}{\@@closing} |
| 5682 |
% Prepare call to "\ClosingSequence", then call it. Parameters: |
| 5683 |
% \begin{paramlist} |
| 5684 |
% \param |
| 5685 |
% intended meaning of "\ChosenMakeClosing";\\ |
| 5686 |
% \param |
| 5687 |
% intended meaning of "\ChosenMakeSignature". |
| 5688 |
% \end{paramlist} |
| 5689 |
% \begin{macrocode} |
| 5690 |
\@ifdefinable\@@closing{\def\@@closing#1#2{% |
| 5691 |
% \end{macrocode} |
| 5692 |
% Keep definitions local. |
| 5693 |
% \begin{macrocode} |
| 5694 |
\begingroup |
| 5695 |
\def\ChosenMakeClosing{#1}% |
| 5696 |
\def\ChosenMakeSignature{#2}% |
| 5697 |
% \end{macrocode} |
| 5698 |
% Invoke user-customizable closing sequence. |
| 5699 |
% \begin{macrocode} |
| 5700 |
\ClosingSequence |
| 5701 |
\endgroup |
| 5702 |
}} |
| 5703 |
% \end{macrocode} |
| 5704 |
% \end{macro} |
| 5705 |
% |
| 5706 |
% \begin{macro}{\ClosingSequence} |
| 5707 |
% This command defines the ``closing sequence'', that is, the sequence of |
| 5708 |
% commands that should be executed when the user-level "\closing" command |
| 5709 |
% is given. Provided in vers.~0.35 to allow customization. |
| 5710 |
% Factory definition: |
| 5711 |
% \begin{macrocode} |
| 5712 |
\newcommand*\ClosingSequence{% |
| 5713 |
\ChosenMakeClosing |
| 5714 |
\ChosenMakeSignature |
| 5715 |
} |
| 5716 |
% \end{macrocode} |
| 5717 |
% \end{macro} |
| 5718 |
% |
| 5719 |
% \begin{macro}{\@handwr@box} |
| 5720 |
% Draws an almost imperceptible sign that marks the spot where a handwritten |
| 5721 |
% salutation, or closing sentence, should start. \#1~is the amount of |
| 5722 |
% indentation. |
| 5723 |
% \begin{macrocode} |
| 5724 |
\@ifdefinable\@handwr@box{\def\@handwr@box#1{% |
| 5725 |
\vskip .5\baselineskip |
| 5726 |
\setbox\z@\vbox{% |
| 5727 |
\hrule\@height .1\p@ \@depth .1\p@ \@width 3\p@ |
| 5728 |
}% |
| 5729 |
\wd\z@\z@ \ht\z@\z@ \dp\z@\z@ \noindent\hspace*{#1}\box\z@\par |
| 5730 |
\vskip .5\baselineskip\vskip\z@skip |
| 5731 |
}} |
| 5732 |
% \end{macrocode} |
| 5733 |
% \end{macro} |
| 5734 |
% |
| 5735 |
% \begin{macro}{\@cc@encl} |
| 5736 |
% Inner implementation for both "\cc" and "\encl". |
| 5737 |
% \changes{0.36}{2015 Feb 08}{Fully reimplemented by means of |
| 5738 |
% ``blocks''.}^^A |
| 5739 |
% Wholly rewritten in vers.~0.36, now uses ``blocks'' (like addresses and |
| 5740 |
% subject). This, among other things, ensures coherent treatment of the |
| 5741 |
% interline glue. |
| 5742 |
% \begin{macrocode} |
| 5743 |
\@ifdefinable\@cc@encl{\long\def\@cc@encl#1#2{\par |
| 5744 |
\begingroup |
| 5745 |
\let\@empty@block\@empty |
| 5746 |
\y@custom@block N{#1}{.5em}% |
| 5747 |
\z@skip\z@skip\z@skip |
| 5748 |
\@M\z@\z@ |
| 5749 |
\ignorespaces #2% |
| 5750 |
\end@custom@block N% |
| 5751 |
\endgroup |
| 5752 |
}} |
| 5753 |
% \end{macrocode} |
| 5754 |
% \end{macro} |
| 5755 |
% |
| 5756 |
% Uncommented code. |
| 5757 |
% \begin{macrocode} |
| 5758 |
\newcommand*\cc [1][\ccname] {\@cc@encl{#1}} |
| 5759 |
\newcommand*\encl[1][\enclname]{\@cc@encl{#1}} |
| 5760 |
\newenvironment{enclosures}[1][\enclname]{% |
| 5761 |
\baseenclosures[#1]{}% |
| 5762 |
}{% |
| 5763 |
\endbaseenclosures |
| 5764 |
} |
| 5765 |
\newenvironment{baseenclosures}[2][\enclname]{\par |
| 5766 |
\addpenalty{-\@lowpenalty}% |
| 5767 |
\addvspace{\bigskipamount}% |
| 5768 |
\startbreaks |
| 5769 |
\parskip\z@skip |
| 5770 |
{\parindent\z@ #1\par}% |
| 5771 |
\list{\labelenumi}{% |
| 5772 |
\usecounter{enumi}% |
| 5773 |
\@beginparpenalty\@M |
| 5774 |
\@itempenalty-\@lowpenalty |
| 5775 |
\@endparpenalty-\@medpenalty |
| 5776 |
%% ( paren match |
| 5777 |
\renewcommand*\labelenumi{\theenumi)}% |
| 5778 |
#2% |
| 5779 |
}% |
| 5780 |
}{% |
| 5781 |
\endlist |
| 5782 |
\aftergroup\startbreaks |
| 5783 |
} |
| 5784 |
\newcommand*\ps{\par\startbreaks\parindent\z@} |
| 5785 |
\newcommand*\@PS@rigid [1][\PSname]{% |
| 5786 |
{\normalfont\@safe@space{#1}\enspace}\ignorespaces |
| 5787 |
} |
| 5788 |
\newcommand*\@PS@rubber[1][\PSname]{% |
| 5789 |
\@safe@space{#1}{\nobreak\space}\ignorespaces |
| 5790 |
} |
| 5791 |
\newcommand*\PS{% |
| 5792 |
\ps\@ifstar{\@PS@rubber}{\@PS@rigid}% |
| 5793 |
} |
| 5794 |
% \end{macrocode} |
| 5795 |
% |
| 5796 |
% \begin{macro}{\stopletter} |
| 5797 |
% User-level hook invoked (before anything else) when a letter ends. |
| 5798 |
% \begin{macrocode} |
| 5799 |
\newcommand*\stopletter{} |
| 5800 |
% \end{macrocode} |
| 5801 |
% \end{macro} |
| 5802 |
% |
| 5803 |
% \subsubsection{Address labels} |
| 5804 |
% |
| 5805 |
% This part of the code should probably be detached and put in a |
| 5806 |
% separate file to be loaded on demand. |
| 5807 |
% |
| 5808 |
% The general idea is the following: |
| 5809 |
% \begin{itemize} |
| 5810 |
% \item |
| 5811 |
% a \env{labels} (or \env{baselabels}, see below) environment |
| 5812 |
% produces one or more sheets of address labels; |
| 5813 |
% \item |
| 5814 |
% inside \env{labels}, several \env{labelgroup} environments wrap up |
| 5815 |
% the address labels pertaining to each letter (a letter may have |
| 5816 |
% several address labels associated with it, if it has several |
| 5817 |
% addressees); |
| 5818 |
% \item |
| 5819 |
% inside each \env{labelgroup} environment, individual labels are |
| 5820 |
% produced with the "\basemlabel" command. |
| 5821 |
% \end{itemize} |
| 5822 |
% The \env{labels} environment takes care of such things like jumping |
| 5823 |
% to a new page, etc.; the \env{labelgroup} environment merely changes |
| 5824 |
% the way address labels are numbered, but does not otherwise affect |
| 5825 |
% the printout. |
| 5826 |
% |
| 5827 |
% The user may either: |
| 5828 |
% \begin{enumerate} |
| 5829 |
% \renewcommand*{\theenumi}{(\Alph{enumi})} |
| 5830 |
% \renewcommand*{\labelenumi}{\theenumi} |
| 5831 |
% \item\label{autolabels} |
| 5832 |
% include a "\makelabels" declaration in the preamble, to have |
| 5833 |
% address labels generated automatically via the \filedir{.aux} |
| 5834 |
% file; in this case, appropriate commands are written in the |
| 5835 |
% \filedir{.aux} file by each |
| 5836 |
% \env{baseletter} environment, which, when the \filedir{.aux} file |
| 5837 |
% is re-read at the "\end{document}", automatically generate the |
| 5838 |
% required environments and commands (\env{labels}, |
| 5839 |
% \env{labelgroup}, etc.); \emph{or} |
| 5840 |
% \item\label{handlabels} |
| 5841 |
% produce the address labels ``by hand'', including directly in the |
| 5842 |
% source file, where (s)he want the address label sheets to appear, a |
| 5843 |
% \env{labels} environment, containing the appropriate |
| 5844 |
% \env{labelgroup} environments, containing, in turn, the individual |
| 5845 |
% "\basemlabel" commands. |
| 5846 |
% \end{enumerate} |
| 5847 |
% In principle, it is also possible to mix \ref{autolabels} |
| 5848 |
% and~\ref{handlabels} (and to have several \env{labels} |
| 5849 |
% environments, too), but this has no practical utility. |
| 5850 |
% |
| 5851 |
% \begin{macrocode} |
| 5852 |
\newcommand*\returnaddress{\thesenderaddress} |
| 5853 |
\@ifdefinable\@emptyaddrlabels@err{\def\@emptyaddrlabels@err{% |
| 5854 |
\advance \@cdp@gencount \m@ne |
| 5855 |
\ClassError{\@letteracdp}{% |
| 5856 |
Counter emptyaddrlabels out of range% |
| 5857 |
}{% |
| 5858 |
The counter emptyaddrlabels holds |
| 5859 |
the number of labels\MessageBreak |
| 5860 |
to leave blank when starting to print |
| 5861 |
the address labels\MessageBreak |
| 5862 |
(e.g., because some labels |
| 5863 |
have already been peeled off).\MessageBreak |
| 5864 |
For the label format you chose, |
| 5865 |
it must lie in the range\MessageBreak |
| 5866 |
0..\number\@cdp@gencount\space (inclusive), |
| 5867 |
but presently its value is \number\c@emptyaddrlabels.\MessageBreak |
| 5868 |
It will therefore be ignored; |
| 5869 |
type \space <return> \space to proceed.% |
| 5870 |
}% |
| 5871 |
}} |
| 5872 |
\newcommand*\skipemptylabels{% |
| 5873 |
\@cdp@gencount \c@addrlabelrows |
| 5874 |
\multiply \@cdp@gencount \c@addrlabelcolumns |
| 5875 |
\ifnum\c@emptyaddrlabels<\z@ |
| 5876 |
\@emptyaddrlabels@err |
| 5877 |
\else\ifnum\c@emptyaddrlabels<\@cdp@gencount |
| 5878 |
\begingroup |
| 5879 |
\let\ifactuallabel\@secondoftwo |
| 5880 |
\@whilenum\c@totallabel<\c@emptyaddrlabels\do{\basemlabel{}{}}% |
| 5881 |
\endgroup |
| 5882 |
\else |
| 5883 |
\@emptyaddrlabels@err |
| 5884 |
\fi\fi |
| 5885 |
} |
| 5886 |
% \end{macrocode} |
| 5887 |
% |
| 5888 |
% \begin{environment}{baselabels} |
| 5889 |
% This is the actual environment for producing sheets of address labels: the |
| 5890 |
% \env{labels} environment (see below) is simply a wrapper that offers the |
| 5891 |
% user the chance of making some changes after calling \env{baselabels}. |
| 5892 |
% \changes{0.36d}{2018 Feb 08}{Added \texttt{\protect\bslash global} before |
| 5893 |
% \texttt{\protect\bslash c@page\protect\bslash @ne}.}^^A |
| 5894 |
% V.~0.36d: "\global\c@page\@ne". |
| 5895 |
% \begin{macrocode} |
| 5896 |
\newenvironment*{baselabels}{% |
| 5897 |
\cleardoubleemptypage |
| 5898 |
\global\c@page\@ne |
| 5899 |
\typeout{Address Labels}% |
| 5900 |
\pagestyle{empty}% |
| 5901 |
\textwidth \c@addrlabelcolumns\addrlabelwidth |
| 5902 |
\count@ \c@addrlabelcolumns |
| 5903 |
\advance \count@ \m@ne |
| 5904 |
\ifnum\count@>\z@ |
| 5905 |
\advance \textwidth \count@\addrlabelshsep |
| 5906 |
\fi |
| 5907 |
\linewidth\textwidth \hsize\textwidth |
| 5908 |
\oddsidemargin -1in% |
| 5909 |
\advance \oddsidemargin \addrlabelsleftmargin |
| 5910 |
\evensidemargin \oddsidemargin |
| 5911 |
\@totalleftmargin\z@ |
| 5912 |
\leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip |
| 5913 |
\parfillskip\@flushglue |
| 5914 |
\textheight \c@addrlabelrows\addrlabelheight |
| 5915 |
\count@ \c@addrlabelrows |
| 5916 |
\advance \count@ \m@ne |
| 5917 |
\ifnum\count@>\z@ |
| 5918 |
\advance \textheight \count@\addrlabelsvsep |
| 5919 |
\fi |
| 5920 |
\@colht\textheight \@colroom\textheight \vsize\textheight |
| 5921 |
\headsep \z@ |
| 5922 |
\headheight \z@ |
| 5923 |
\footskip \z@ |
| 5924 |
\topmargin -1in% |
| 5925 |
\advance \topmargin \addrlabelstopmargin |
| 5926 |
\ifcase \@ptsize\relax |
| 5927 |
\normalsize |
| 5928 |
\or |
| 5929 |
\small |
| 5930 |
\or |
| 5931 |
\footnotesize |
| 5932 |
\fi |
| 5933 |
\parindent \z@ |
| 5934 |
\baselineskip \z@skip |
| 5935 |
\lineskip \z@skip |
| 5936 |
\boxmaxdepth \z@ |
| 5937 |
\raggedright |
| 5938 |
\fboxrule \z@ |
| 5939 |
\fboxsep \addrlabelborder |
| 5940 |
\addrlabeltrimwidth \addrlabelwidth |
| 5941 |
\advance \addrlabeltrimwidth -2\addrlabelborder |
| 5942 |
\addrlabeltrimheight \addrlabelheight |
| 5943 |
\advance \addrlabeltrimheight -2\addrlabelborder |
| 5944 |
\setcounter{totallabel}{\z@}% |
| 5945 |
\setcounter{label}{\z@}% |
| 5946 |
\setcounter{letter}{\z@}% |
| 5947 |
\noindent |
| 5948 |
\skipemptylabels |
| 5949 |
}{% |
| 5950 |
\@killglue\clearpage |
| 5951 |
} |
| 5952 |
% \end{macrocode} |
| 5953 |
% \end{environment} |
| 5954 |
% |
| 5955 |
% \begin{environment}{labels} |
| 5956 |
% It is the user-level environment for producing one or more sheets of |
| 5957 |
% address labels. |
| 5958 |
% Its default definition simply invokes \env{baselables}, but the |
| 5959 |
% user may redefine it to set some style parameters. For example: |
| 5960 |
%\begin{verbatim} |
| 5961 |
%\renewenvironment{labels}{% |
| 5962 |
% \baselabels |
| 5963 |
% \setlength\fboxrule{.2pt}% |
| 5964 |
% \addtolength\fboxsep{-2\fboxrule}% |
| 5965 |
%}{\endbaselabels} |
| 5966 |
%\end{verbatim} |
| 5967 |
% will draw a thin border around each address label. |
| 5968 |
% \begin{macrocode} |
| 5969 |
\newenvironment*{labels}{\baselabels}{\endbaselabels} |
| 5970 |
% \end{macrocode} |
| 5971 |
% \end{environment} |
| 5972 |
% |
| 5973 |
% Back to uncommented code. |
| 5974 |
% \begin{macrocode} |
| 5975 |
\let\@beginlabels=\relax |
| 5976 |
\let\@endlabels=\relax |
| 5977 |
\newenvironment*{labelgroup}{\stepcounter{letter}}{} |
| 5978 |
\let\@beginlabelgroup=\relax |
| 5979 |
\let\@endlabelgroup=\relax |
| 5980 |
\newcommand*\labeltab{\@killglue |
| 5981 |
\ifnum\c@totallabel>\z@ |
| 5982 |
\count@ \c@totallabel |
| 5983 |
\divide \count@ \c@addrlabelcolumns |
| 5984 |
\multiply \count@ -\c@addrlabelcolumns |
| 5985 |
\advance \count@ \c@totallabel |
| 5986 |
\ifnum\count@=\z@ |
| 5987 |
\par\vskip\addrlabelsvsep\noindent |
| 5988 |
\else |
| 5989 |
\hskip\addrlabelshsep |
| 5990 |
\fi |
| 5991 |
\fi |
| 5992 |
\stepcounter{totallabel}% |
| 5993 |
\stepcounter{label}% |
| 5994 |
} |
| 5995 |
% \end{macrocode} |
| 5996 |
% |
| 5997 |
% \begin{macro}{\ifactuallabel} |
| 5998 |
% Macro for the user: "\ifactuallabel{"\meta{FOO}"}{"\meta{BAR}"}" |
| 5999 |
% executes \meta{FOO} if the label is not being skipped, \meta{BAR} |
| 6000 |
% otherwise. |
| 6001 |
% \begin{macrocode} |
| 6002 |
\let\ifactuallabel\@firstoftwo |
| 6003 |
% \end{macrocode} |
| 6004 |
% \end{macro} |
| 6005 |
% |
| 6006 |
% \begin{macrocode} |
| 6007 |
\newcommand\basemlabel[2]{% |
| 6008 |
\begingroup |
| 6009 |
\def\startaddrlabel{\par |
| 6010 |
\noindent \vrule\@height\topskip \@depth\z@ \@width\z@ \par |
| 6011 |
\vskip-\baselineskip \vskip\z@skip |
| 6012 |
}% |
| 6013 |
\def\stopaddrlabel{\par |
| 6014 |
\ifnum\prevdepth>\z@ |
| 6015 |
\kern -\prevdepth |
| 6016 |
\prevdepth\z@ |
| 6017 |
\fi |
| 6018 |
}% |
| 6019 |
\labeltab\mlabel{\ignorespaces #1}{\ignorespaces #2}% |
| 6020 |
\endgroup |
| 6021 |
} |
| 6022 |
\newcommand\mlabel[2]{% |
| 6023 |
\fbox{% |
| 6024 |
\parbox[c][\addrlabeltrimheight]{\addrlabeltrimwidth}{% |
| 6025 |
\raggedright\startaddrlabel #2\stopaddrlabel |
| 6026 |
}% |
| 6027 |
}% |
| 6028 |
} |
| 6029 |
\let\@mlabel=\@gobbletwo |
| 6030 |
% \end{macrocode} |
| 6031 |
% |
| 6032 |
% \subsubsection{Lists and other similar environments} |
| 6033 |
% |
| 6034 |
% \begin{macrocode} |
| 6035 |
\normalfont \normalsize |
| 6036 |
\setlength\leftmargini {2em} |
| 6037 |
\setlength\leftmarginii {2em} |
| 6038 |
\setlength\leftmarginiii{2em} |
| 6039 |
\setlength\leftmarginiv {1.75em} |
| 6040 |
\setlength\leftmarginv {1.5em} |
| 6041 |
\setlength\leftmarginvi {1.5em} |
| 6042 |
\setlength\leftmargin {\leftmargini} |
| 6043 |
\setlength \labelsep {.5em} |
| 6044 |
\setlength \labelwidth{\leftmargini} |
| 6045 |
\addtolength\labelwidth{-\labelsep} |
| 6046 |
\setlength\partopsep{\z@skip} |
| 6047 |
\@beginparpenalty -\@lowpenalty |
| 6048 |
\@endparpenalty -\@lowpenalty |
| 6049 |
\@itempenalty -\@lowpenalty |
| 6050 |
\def\@listI{\leftmargin\leftmargini |
| 6051 |
\parsep \smallskipamount |
| 6052 |
\topsep \medskipamount |
| 6053 |
\itemsep\smallskipamount} |
| 6054 |
\let\@listi\@listI |
| 6055 |
\@listi |
| 6056 |
\def\@listii {\leftmargin\leftmarginii |
| 6057 |
\labelwidth\leftmarginii |
| 6058 |
\advance\labelwidth-\labelsep |
| 6059 |
\topsep\smallskipamount |
| 6060 |
\parsep\z@skip} |
| 6061 |
\def\@listiii{\leftmargin\leftmarginiii |
| 6062 |
\labelwidth\leftmarginiii |
| 6063 |
\advance\labelwidth-\labelsep} |
| 6064 |
\def\@listiv {\leftmargin\leftmarginiv |
| 6065 |
\labelwidth\leftmarginiv |
| 6066 |
\advance\labelwidth-\labelsep} |
| 6067 |
\def\@listv {\leftmargin\leftmarginv |
| 6068 |
\labelwidth\leftmarginv |
| 6069 |
\advance\labelwidth-\labelsep} |
| 6070 |
\def\@listvi {\leftmargin\leftmarginvi |
| 6071 |
\labelwidth\leftmarginvi |
| 6072 |
\advance\labelwidth-\labelsep} |
| 6073 |
\renewcommand*\theenumi{\@arabic\c@enumi} |
| 6074 |
\renewcommand*\theenumii{\@alph\c@enumii} |
| 6075 |
\renewcommand*\theenumiii{\@roman\c@enumiii} |
| 6076 |
\renewcommand*\theenumiv{\@Alph\c@enumiv} |
| 6077 |
\newcommand*\labelenumi{\theenumi.} |
| 6078 |
\newcommand*\labelenumii{(\theenumii)} |
| 6079 |
\newcommand*\labelenumiii{\theenumiii.} |
| 6080 |
\newcommand*\labelenumiv{\theenumiv.} |
| 6081 |
\renewcommand*\p@enumii{\theenumi} |
| 6082 |
\renewcommand*\p@enumiii{\theenumi(\theenumii)} |
| 6083 |
\renewcommand*\p@enumiv{\p@enumiii\theenumiii} |
| 6084 |
\newcommand*\labelitemi{\textbullet} |
| 6085 |
\newcommand*\labelitemii{\normalfont\bfseries \textendash} |
| 6086 |
\newcommand*\labelitemiii{\textasteriskcentered} |
| 6087 |
\newcommand*\labelitemiv{\textperiodcentered} |
| 6088 |
\newenvironment*{description} |
| 6089 |
{\list{}{\labelwidth\z@ \itemindent-\leftmargin |
| 6090 |
\let\makelabel\descriptionlabel}} |
| 6091 |
{\endlist} |
| 6092 |
\newcommand*\descriptionlabel[1]{\hspace\labelsep |
| 6093 |
\normalfont\bfseries #1} |
| 6094 |
\newenvironment*{verse} |
| 6095 |
{\let\\\@centercr |
| 6096 |
\list{}{\setlength\itemsep{\z@skip}% |
| 6097 |
\setlength\itemindent{-15\p@}% |
| 6098 |
\setlength\listparindent{\itemindent}% |
| 6099 |
\setlength\rightmargin{\leftmargin}% |
| 6100 |
\addtolength\leftmargin{15\p@}}% |
| 6101 |
\item[]} |
| 6102 |
{\endlist} |
| 6103 |
\newenvironment*{quotation} |
| 6104 |
{\list{}{\setlength\listparindent{1.5em}% |
| 6105 |
\setlength\itemindent{\listparindent}% |
| 6106 |
\setlength\rightmargin{\leftmargin}}% |
| 6107 |
\item[]} |
| 6108 |
{\endlist} |
| 6109 |
\newenvironment*{quote} |
| 6110 |
{\list{}{\setlength\rightmargin{\leftmargin}}% |
| 6111 |
\item[]} |
| 6112 |
{\endlist} |
| 6113 |
% \end{macrocode} |
| 6114 |
% |
| 6115 |
% \subsubsection{Miscellanea} |
| 6116 |
% |
| 6117 |
% \begin{macrocode} |
| 6118 |
\setlength\parindent{2em} |
| 6119 |
\setlength\parskip{\z@ plus \p@} |
| 6120 |
\setlength\columnsep{10\p@} |
| 6121 |
\setlength\columnseprule{\z@} |
| 6122 |
\setlength\arraycolsep{5\p@} |
| 6123 |
\setlength\tabcolsep{6\p@} |
| 6124 |
\setlength\arrayrulewidth{.4\p@} |
| 6125 |
\setlength\doublerulesep{2\p@} |
| 6126 |
\setlength\tabbingsep{\labelsep} |
| 6127 |
\skip\@mpfootins = \skip\footins |
| 6128 |
\setlength\fboxsep{3\p@} |
| 6129 |
\setlength\fboxrule{.4\p@} |
| 6130 |
\renewcommand*\theequation{\@arabic\c@equation} |
| 6131 |
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} |
| 6132 |
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} |
| 6133 |
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} |
| 6134 |
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} |
| 6135 |
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} |
| 6136 |
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\relax} |
| 6137 |
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\relax} |
| 6138 |
\DeclareRobustCommand*{\cal}{\@fontswitch{\relax}{\mathcal}} |
| 6139 |
\DeclareRobustCommand*{\mit}{\@fontswitch{\relax}{\mathnormal}} |
| 6140 |
\renewcommand*\footnoterule{% |
| 6141 |
\kern-\p@ |
| 6142 |
\hrule \@width .4\columnwidth |
| 6143 |
\kern .6\p@} |
| 6144 |
\long\def\@makefntext#1{% |
| 6145 |
\noindent |
| 6146 |
\hangindent 5\p@ |
| 6147 |
\hb@xt@5\p@{\hss\@makefnmark}#1} |
| 6148 |
% \end{macrocode} |
| 6149 |
% |
| 6150 |
% \subsubsection{Names and final setup} |
| 6151 |
% |
| 6152 |
% \begin{macrocode} |
| 6153 |
\newcommand*\subjectname {Oggetto:} |
| 6154 |
\newcommand*\registeredname {Raccomandata} |
| 6155 |
\newcommand*\registeredRRname{\registeredname~A.R.} |
| 6156 |
\newcommand*\andccname {e~p.~c.} |
| 6157 |
\newcommand*\ccname {P.~c.:} |
| 6158 |
\newcommand*\enclname {Allegati:} |
| 6159 |
\newcommand*\PSname {P.S.:} |
| 6160 |
\newcommand*\headtoname {A:} |
| 6161 |
\newcommand*\lettername {Lettera} |
| 6162 |
\newcommand*\today{\number\day~\ifcase\month\or |
| 6163 |
gennaio\or febbraio\or marzo\or aprile\or maggio\or giugno\or |
| 6164 |
luglio\or agosto\or settembre\or ottobre\or novembre\or dicembre\fi |
| 6165 |
\space\number\year} |
| 6166 |
\let\do\@undefined |
| 6167 |
\pagestyle{plain} |
| 6168 |
\pagenumbering{arabic} |
| 6169 |
\raggedbottom |
| 6170 |
\onecolumn |
| 6171 |
% \end{macrocode} |
| 6172 |
% |
| 6173 |
% End of the module for the \packlass{\letteracdp} class. |
| 6174 |
% \begin{macrocode} |
| 6175 |
%</letter> |
| 6176 |
% \end{macrocode} |
| 6177 |
% \noindent\null\par |
| 6178 |
% |
| 6179 |
% \section{The code for the \protect\packlass{\articoletteracdp} class} |
| 6180 |
% |
| 6181 |
% This part of the file goes into \filedir{\articoletteracdp.cls}. |
| 6182 |
% \begin{macrocode} |
| 6183 |
%<*artico> |
| 6184 |
% \end{macrocode} |
| 6185 |
% |
| 6186 |
% \subsection{Identification} |
| 6187 |
% |
| 6188 |
% \begin{macrocode} |
| 6189 |
\NeedsTeXFormat{LaTeX2e}[1996/06/01] % LaTeX2e is required! |
| 6190 |
\ProvidesClass{articoletteracdp} |
| 6191 |
[2018/02/08 v0.36d (development)] |
| 6192 |
% \end{macrocode} |
| 6193 |
% |
| 6194 |
% \subsection{Initial code} |
| 6195 |
% |
| 6196 |
% We check that some names are not already taken. |
| 6197 |
% \begin{macrocode} |
| 6198 |
\@ifdefinable\@out@table@list{} |
| 6199 |
\@ifdefinable\@in@table@list{} |
| 6200 |
\@ifdefinable\@do@tf{} |
| 6201 |
\@ifdefinable\@sec@head@size{} |
| 6202 |
% \end{macrocode} |
| 6203 |
% |
| 6204 |
% Definition of two switches that support the options about what to |
| 6205 |
% include in the table of contents. |
| 6206 |
% \begin{macrocode} |
| 6207 |
\def\do#1{\@ifdefinable#1{\newif#1}} |
| 6208 |
\do\if@toc@in@toc@ |
| 6209 |
\do\if@loX@in@toc@ |
| 6210 |
% \end{macrocode} |
| 6211 |
% |
| 6212 |
% \begin{macro}{\@letter@bookmark} |
| 6213 |
% Support for pdf\TeX\slash\packlass{\HyperRef}. If pdf\TeX\ is |
| 6214 |
% being used to typeset the document, if the \packlass{\HyperRef} |
| 6215 |
% package is loaded, and if the user doesn't ask us to avoid doing so, |
| 6216 |
% we shall generate a ``level~0'' bookmark for each letter we shall |
| 6217 |
% typeset (sections are of level~1, so they will be bookmarked under |
| 6218 |
% letters). This command serves this purpose: it is defined either |
| 6219 |
% as "\@gobbletwo", if such bookmarks are \emph{not} being generated, |
| 6220 |
% or as a suitable invocation of "\pdfbookmark" if they are. To begin |
| 6221 |
% with, we set the former alternative, which makes it act as a no-op. |
| 6222 |
% \begin{macrocode} |
| 6223 |
\@ifdefinable\@letter@bookmark{\let\@letter@bookmark\@gobbletwo} |
| 6224 |
% \end{macrocode} |
| 6225 |
% \end{macro} |
| 6226 |
% |
| 6227 |
% Space above and below captions for figures and tables. |
| 6228 |
% \begin{macrocode} |
| 6229 |
\newlength\abovecaptionskip |
| 6230 |
\newlength\belowcaptionskip |
| 6231 |
% \end{macrocode} |
| 6232 |
% |
| 6233 |
% \subsection{Declaration of options} |
| 6234 |
% |
| 6235 |
% \begin{macrocode} |
| 6236 |
\DeclareOption{titlepage}{% |
| 6237 |
\@latexerr{No title page for letters}\@eha |
| 6238 |
} |
| 6239 |
\DeclareOption{notitlepage}{} |
| 6240 |
\DeclareOption{loXintoc}{% |
| 6241 |
\@toc@in@toc@false |
| 6242 |
\@loX@in@toc@true |
| 6243 |
} |
| 6244 |
\DeclareOption{tocintoc}{% |
| 6245 |
\@toc@in@toc@true |
| 6246 |
\@loX@in@toc@true |
| 6247 |
} |
| 6248 |
\DeclareOption{Hofstadter}{% |
| 6249 |
\ExecuteOptions{tocintoc}% |
| 6250 |
} |
| 6251 |
\DeclareOption{plaintoc}{% |
| 6252 |
\@toc@in@toc@false |
| 6253 |
\@loX@in@toc@false |
| 6254 |
} |
| 6255 |
% \end{macrocode} |
| 6256 |
% The option \opz{letterbookmarks} causes the bookmarks for letters to |
| 6257 |
% be generated. Upon expansion, the 2~arguments of |
| 6258 |
% "\@letter@bookmark" will become arguments of "\pdfbookmark". We |
| 6259 |
% also need to ask the \packlass{\HyperRef} package to generate closed |
| 6260 |
% bookmarks. Note that the user can later overwrite this setting; |
| 6261 |
% note also that nothing will happen if \packlass{\HyperRef} is not |
| 6262 |
% loaded later. |
| 6263 |
% \begin{macrocode} |
| 6264 |
\DeclareOption{letterbookmarks}{% |
| 6265 |
\def\@letter@bookmark{\pdfbookmark[0]}% |
| 6266 |
\PassOptionsToPackage{bookmarksopen=false}{hyperref}% |
| 6267 |
} |
| 6268 |
% \end{macrocode} |
| 6269 |
% The option \opz{noletterbookmarks} supresses the bookmarks for |
| 6270 |
% letters. |
| 6271 |
% \begin{macrocode} |
| 6272 |
\DeclareOption{noletterbookmarks}{% |
| 6273 |
\let\@letter@bookmark\@gobbletwo |
| 6274 |
} |
| 6275 |
% \end{macrocode} |
| 6276 |
% The option \opz{openletterbookmarks} causes the bookmarks for |
| 6277 |
% letters to be generated and to be presented open to the reader. We |
| 6278 |
% ask the \packlass{\HyperRef} package to generate open bookmarks, but |
| 6279 |
% only one level deep. Note that the user can later overwrite this |
| 6280 |
% setting. This is made the default option, below. |
| 6281 |
% \begin{macrocode} |
| 6282 |
\DeclareOption{openletterbookmarks}{% |
| 6283 |
\def\@letter@bookmark{\pdfbookmark[0]}% |
| 6284 |
\PassOptionsToPackage{bookmarksopen,bookmarksopenlevel=1}{hyperref}% |
| 6285 |
} |
| 6286 |
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{letteracdp}} |
| 6287 |
% \end{macrocode} |
| 6288 |
% |
| 6289 |
% \subsection{Option processing} |
| 6290 |
% |
| 6291 |
% \begin{macrocode} |
| 6292 |
\ExecuteOptions{plaintoc,openletterbookmarks} |
| 6293 |
\ProcessOptions\relax |
| 6294 |
% \end{macrocode} |
| 6295 |
% |
| 6296 |
% \subsection{Class loading} |
| 6297 |
% |
| 6298 |
% \begin{macrocode} |
| 6299 |
\LoadClass{letteracdp}[2018/02/08] |
| 6300 |
% \end{macrocode} |
| 6301 |
% |
| 6302 |
% \subsection{Main code} |
| 6303 |
% |
| 6304 |
% Unfortunately, most of the code is not commented (yet). |
| 6305 |
% |
| 6306 |
% \subsubsection{More initializations} |
| 6307 |
% |
| 6308 |
% \begin{macrocode} |
| 6309 |
\newcounter{section}[letter] |
| 6310 |
\newcounter{paragraph}[section] |
| 6311 |
\newcounter{figure}[letter] |
| 6312 |
\newcounter{table}[letter] |
| 6313 |
% \end{macrocode} |
| 6314 |
% |
| 6315 |
% Stuff for dealing with the \packlass{\HyperRef} package. The problem is |
| 6316 |
% our non-standard hierarchy of sectioning commands, with paragraphs placed |
| 6317 |
% directly below sections. In this version (0.34) we choose a different |
| 6318 |
% approach than the one we adopted in version 0.33, redefining |
| 6319 |
% "\theHparagraph"; of course, this must be done \emph{after} |
| 6320 |
% \packlass{\HyperRef} has been loaded, and we could not find any better |
| 6321 |
% place for this than the "\AtBeginDocument" hook. Within the same hook, we |
| 6322 |
% also redefine "\theHsection" (the counter used by \packlass{\HyperRef} to |
| 6323 |
% generate hyperlinks to sections) so that sections with the same number, but |
| 6324 |
% included in different letters, will have different anchors; we fix the |
| 6325 |
% bookmark level for paragraphs, too. |
| 6326 |
% \begin{macrocode} |
| 6327 |
\AtBeginDocument{% |
| 6328 |
\def\theHletter{\arabic{letter}}% |
| 6329 |
\@ifpackageloaded{hyperref}{% |
| 6330 |
\def\theHparagraph{\theHsection.\arabic{paragraph}}% |
| 6331 |
\def\theHsection{\theHletter.\arabic{section}}% |
| 6332 |
\def\toclevel@paragraph{2}% |
| 6333 |
}{% |
| 6334 |
% \end{macrocode} |
| 6335 |
% If the \packlass{\HyperRef} package is not loaded, we ensure that |
| 6336 |
% "\@letter@bookmarks" acts as a no-op: |
| 6337 |
% \begin{macrocode} |
| 6338 |
\let\@letter@bookmark\@gobbletwo |
| 6339 |
}% |
| 6340 |
} |
| 6341 |
% \end{macrocode} |
| 6342 |
% |
| 6343 |
% \begin{macro}{\hyper@last} |
| 6344 |
% The following line is to deactivate the check that |
| 6345 |
% \packlass{\HyperRef} makes against old files; this is necessary |
| 6346 |
% because otherwise, on the first \LaTeX\ run, it would overwrite our |
| 6347 |
% redefinition of "\@starttoc", possibly writing unwanted |
| 6348 |
% \filedir{.toc}, \filedir{.lof}, and \filedir{.lot} files, and (much |
| 6349 |
% worse) causing trouble if the letter happens to contain more than one |
| 6350 |
% "\tableofcontents", "\listoffigures", or "\listoftables". Of |
| 6351 |
% course, this means that the user must be informed that (s)he has to |
| 6352 |
% delete the old files by hand.~\mbox{:-(}^^A ) paren match |
| 6353 |
% \closeofsentencespace Note, anyway, that the automatic check |
| 6354 |
% made by \packlass{\HyperRef} would not work with the \Bundle\ |
| 6355 |
% in any case (because it looks for \filedir{.toc}, \filedir{.lof}, |
| 6356 |
% etc.\ files, not for, say, \filedir{.toc1}, etc.), so\ldots |
| 6357 |
% \begin{macrocode} |
| 6358 |
\@ifdefinable\hyper@last{\let\hyper@last\relax} |
| 6359 |
% \end{macrocode} |
| 6360 |
% \end{macro} |
| 6361 |
% |
| 6362 |
% Back to uncommented code. |
| 6363 |
% |
| 6364 |
% \begin{macrocode} |
| 6365 |
%% Command \title and \author redefined to make changes local. |
| 6366 |
\def\title#1{\def\@title{#1}} |
| 6367 |
\def\author#1{\def\@author{#1}} |
| 6368 |
% \end{macrocode} |
| 6369 |
% |
| 6370 |
% \subsubsection{Managing the \protect\filedir{.toc}, |
| 6371 |
% \protect\filedir{.lof}, and \protect\filedir{.lot} files} |
| 6372 |
% |
| 6373 |
% \begin{macrocode} |
| 6374 |
%% Inner command \@starttoc redefined to make table of contents, etc. |
| 6375 |
%% local to letters (this is tricky!). |
| 6376 |
\def\@starttoc#1{% |
| 6377 |
\begingroup |
| 6378 |
\vskip\parskip |
| 6379 |
\parskip\z@skip |
| 6380 |
\makeatletter |
| 6381 |
\@input{\jobname.#1\number\c@letter}% |
| 6382 |
\if@filesw |
| 6383 |
\@ifundefined{tf@@#1}{% |
| 6384 |
\expandafter\newwrite\csname tf@@#1\endcsname |
| 6385 |
}\relax |
| 6386 |
\immediate\write\@out@table@list{\string\@do@tf{#1}}% |
| 6387 |
\fi |
| 6388 |
\@nobreakfalse |
| 6389 |
\endgroup |
| 6390 |
} |
| 6391 |
% \end{macrocode} |
| 6392 |
% |
| 6393 |
% The "\@cdp@begin@letter@hook" (new name in vers.~0.36d) macro is invoked |
| 6394 |
% whenever a letter starts; we want (possibly, see above) a bookmark to be |
| 6395 |
% generated for the letter. Note that we use "\theletter" for the letter |
| 6396 |
% number presented to the user, and "\theHletter" for the number used to |
| 6397 |
% generate the anchor. |
| 6398 |
% \begin{macrocode} |
| 6399 |
\g@addto@macro\@cdp@begin@letter@hook{% |
| 6400 |
\edef\@cdp@reserved{% |
| 6401 |
\noexpand\@letter@bookmark |
| 6402 |
{\lettername\space\theletter}{letter.\theHletter}% |
| 6403 |
}% |
| 6404 |
\@cdp@reserved |
| 6405 |
% \end{macrocode} |
| 6406 |
% |
| 6407 |
% Actions for closing a set of toc/lof/lot file and opening another: |
| 6408 |
% \begin{macrocode} |
| 6409 |
\if@filesw |
| 6410 |
{\escapechar\m@ne |
| 6411 |
\immediate\write\@out@table@list{\string\}^^J\string\{}% |
| 6412 |
}% |
| 6413 |
\immediate\write\@auxout |
| 6414 |
{\string\@deferred@clopen{\number\c@letter}}% |
| 6415 |
\fi |
| 6416 |
} |
| 6417 |
% \end{macrocode} |
| 6418 |
% |
| 6419 |
% Uncommented code. |
| 6420 |
% \begin{macrocode} |
| 6421 |
\@ifdefinable\@deferred@open {\let\@deferred@open \@gobble} |
| 6422 |
\@ifdefinable\@deferred@close {\let\@deferred@close \@empty} |
| 6423 |
\@ifdefinable\@deferred@clopen{\let\@deferred@clopen\@gobble} |
| 6424 |
\newwrite\@out@table@list |
| 6425 |
\newread\@in@table@list |
| 6426 |
\AtBeginDocument{% |
| 6427 |
\if@filesw |
| 6428 |
\immediate\openout\@out@table@list = \jobname.summ\relax |
| 6429 |
{\escapechar\m@ne |
| 6430 |
\immediate\write\@out@table@list{\string\{}% |
| 6431 |
}% |
| 6432 |
\immediate\write\@auxout{\string\@deferred@open{0}}% |
| 6433 |
\def\@deferred@close{% |
| 6434 |
\def\@do@tf##1{% |
| 6435 |
\@restore@tf{##1}% |
| 6436 |
\immediate\closeout \csname tf@##1\endcsname |
| 6437 |
\global\expandafter\let\csname tf@##1\endcsname\@undefined |
| 6438 |
}% |
| 6439 |
\@temp@table@list |
| 6440 |
}% |
| 6441 |
\def\@deferred@open#1{% |
| 6442 |
\ifeof\@in@table@list\else |
| 6443 |
\read\@in@table@list to\@temp@table@list |
| 6444 |
\def\@do@tf##1{% |
| 6445 |
\@restore@tf{##1}% |
| 6446 |
\immediate\openout |
| 6447 |
\csname tf@##1\endcsname = \jobname.##1#1\relax |
| 6448 |
}% |
| 6449 |
\@temp@table@list |
| 6450 |
\fi |
| 6451 |
}% |
| 6452 |
\def\@deferred@clopen#1{% |
| 6453 |
\@deferred@close |
| 6454 |
\@deferred@open{#1}% |
| 6455 |
}% |
| 6456 |
\fi |
| 6457 |
} |
| 6458 |
\AtEndDocument{% |
| 6459 |
\if@filesw |
| 6460 |
{\escapechar\m@ne |
| 6461 |
\immediate\write\@out@table@list{\string\}}% |
| 6462 |
}% |
| 6463 |
\immediate\closeout\@out@table@list |
| 6464 |
\clearpage |
| 6465 |
\immediate\write\@auxout{\string\@deferred@close}% |
| 6466 |
\openin\@in@table@list = \jobname.summ\relax |
| 6467 |
\fi |
| 6468 |
} |
| 6469 |
\@ifdefinable\@restore@tf{\def\@restore@tf#1{% |
| 6470 |
\edef\@tempa{% |
| 6471 |
\let\csname tf@#1\endcsname\csname tf@@#1\endcsname |
| 6472 |
}% |
| 6473 |
\global\@tempa |
| 6474 |
}} |
| 6475 |
\@ifdefinable\@temp@table@list{\let\@temp@table@list\@empty} |
| 6476 |
% \end{macrocode} |
| 6477 |
% |
| 6478 |
% \subsubsection{Adding punctuation to titles} |
| 6479 |
% |
| 6480 |
% \begin{macrocode} |
| 6481 |
\@ifdefinable\@addfullstop{\long\def\@addfullstop#1{% |
| 6482 |
{\nonfrenchspacing\ignorespaces#1\unskip |
| 6483 |
\ifnum \spacefactor>\@m \else.\fi \/}% |
| 6484 |
}} |
| 6485 |
\newcommand*\nopunct{\spacefactor 1001\relax} |
| 6486 |
% \end{macrocode} |
| 6487 |
% |
| 6488 |
% \subsubsection{Floats} |
| 6489 |
% |
| 6490 |
% \changes{0.36d}{2018 Feb 08}{The assignment of \texttt{\protect\bslash |
| 6491 |
% c@topnumber} to \texttt{\protect\bslash c@dbltopnumber} has been made |
| 6492 |
% \texttt{\protect\bslash global}.}^^A |
| 6493 |
% \begin{macrocode} |
| 6494 |
\setcounter{topnumber}{\tw@} |
| 6495 |
\renewcommand\topfraction{.7} |
| 6496 |
\setcounter{bottomnumber}{\@ne} |
| 6497 |
\renewcommand\bottomfraction{.3} |
| 6498 |
\setcounter{totalnumber}{\thr@@} |
| 6499 |
\renewcommand\textfraction{.2} |
| 6500 |
\renewcommand\floatpagefraction{.5} |
| 6501 |
\global\c@dbltopnumber\c@topnumber |
| 6502 |
\let\dbltopfraction\topfraction |
| 6503 |
\let\dblfloatpagefraction\floatpagefraction |
| 6504 |
\setlength \floatsep {\bigskipamount} |
| 6505 |
\@msetlength\textfloatsep {2}{\bigskipamount} |
| 6506 |
\setlength \intextsep {\bigskipamount} |
| 6507 |
\setlength \dblfloatsep {\bigskipamount} |
| 6508 |
\@msetlength\dbltextfloatsep {2}{\bigskipamount} |
| 6509 |
\setlength \@fptop {\z@ plus 1 fil} |
| 6510 |
\setlength \@fpsep {1\bigskipamount plus 2 fil} |
| 6511 |
\setlength \@fpbot {\z@ plus 1 fil} |
| 6512 |
\setlength \@dblfptop {\@fptop} |
| 6513 |
\setlength \@dblfpsep {\@fpsep} |
| 6514 |
\setlength \@dblfpbot {\@fpbot} |
| 6515 |
\setlength\abovecaptionskip{\medskipamount} |
| 6516 |
\setlength\belowcaptionskip{\z@skip} |
| 6517 |
% \end{macrocode} |
| 6518 |
% |
| 6519 |
% \subsubsection{Title, section heads, figures, bibliography\ldots} |
| 6520 |
% |
| 6521 |
% \begin{macro}{\maketitle} |
| 6522 |
% Without the \packlass{\HyperRef} package, the "\maketitle" command can take |
| 6523 |
% the same optional argument as "\maketopdate", for specifying a short string |
| 6524 |
% to be prepended to the date; and in this case, the new "\place" declaration |
| 6525 |
% will be automatically honored. But the former feature will break if |
| 6526 |
% \packlass{\HyperRef} is loaded, and no remedy seems feasible for this, |
| 6527 |
% since \packlass{\HyperRef} assumes that "\maketitle" hasn't got any |
| 6528 |
% arguments. Note also that a period is automatically added to the title. |
| 6529 |
% \begin{macrocode} |
| 6530 |
\newcommand*\maketitle{% |
| 6531 |
\begingroup |
| 6532 |
\renewcommand\thefootnote{\@fnsymbol\c@footnote}% |
| 6533 |
\def\thesenderaddress{\@author}% |
| 6534 |
\def\thesubject{\leavevmode\@addfullstop\@title}% |
| 6535 |
\let\@empty@sender\@empty |
| 6536 |
\let\@thanks\@empty |
| 6537 |
\makepresentation |
| 6538 |
\@thanks |
| 6539 |
\endgroup |
| 6540 |
\setcounter{footnote}{\z@}% |
| 6541 |
\maketopdate |
| 6542 |
} |
| 6543 |
% \end{macrocode} |
| 6544 |
% \end{macro} |
| 6545 |
% |
| 6546 |
% Uncommented code. |
| 6547 |
% \begin{macrocode} |
| 6548 |
\setcounter{secnumdepth}{\tw@} |
| 6549 |
\def\@seccntformat#1{\csname the#1\endcsname .\enspace} |
| 6550 |
\ifcase \@ptsize\relax |
| 6551 |
\def\@sec@head@size{\@setfontsize\@sec@head@size\@xiipt{15}} |
| 6552 |
\or |
| 6553 |
\def\@sec@head@size{\@setfontsize\@sec@head@size\@xiipt{17.4}} |
| 6554 |
\or |
| 6555 |
\def\@sec@head@size{\@setfontsize\@sec@head@size\@xivpt{18.75}} |
| 6556 |
\fi |
| 6557 |
\newcommand*\section{\@startsection {section}{\@ne}% |
| 6558 |
{\z@}% |
| 6559 |
{-\bigskipamount}% |
| 6560 |
{\smallskipamount}% |
| 6561 |
{% |
| 6562 |
\normalfont |
| 6563 |
\noindent\null\@@par\nobreak\vskip-\baselineskip |
| 6564 |
\parskip\z@skip |
| 6565 |
\@sec@head@size\bfseries |
| 6566 |
}% |
| 6567 |
} |
| 6568 |
\newcommand*\paragraph{\@startsection{paragraph}{\tw@}% |
| 6569 |
{\z@}% |
| 6570 |
{-\medskipamount}% |
| 6571 |
{-.66667em}% |
| 6572 |
{\normalfont\normalsize\itshape\@addfullstop}% |
| 6573 |
} |
| 6574 |
\newcommand*\epilogue{% |
| 6575 |
\if@noskipsec \leavevmode \fi |
| 6576 |
\par |
| 6577 |
\if@nobreak |
| 6578 |
\everypar{}% |
| 6579 |
\else |
| 6580 |
\addpenalty\@secpenalty\addvspace\bigskipamount |
| 6581 |
\fi |
| 6582 |
} |
| 6583 |
\renewcommand*\thesection{\@arabic\c@section} |
| 6584 |
\renewcommand*\theparagraph{\thesection.\@arabic\c@paragraph} |
| 6585 |
\renewcommand*\thefigure{\@arabic\c@figure} |
| 6586 |
\def\fps@figure{tbp} |
| 6587 |
\def\ftype@figure{\@ne} |
| 6588 |
\def\ext@figure{lof} |
| 6589 |
\def\fnum@figure{\figurename~\thefigure} |
| 6590 |
\newenvironment*{figure} |
| 6591 |
{\@float{figure}} |
| 6592 |
{\end@float} |
| 6593 |
\newenvironment*{figure*} |
| 6594 |
{\@dblfloat{figure}} |
| 6595 |
{\end@dblfloat} |
| 6596 |
\renewcommand*\thetable{\@arabic\c@table} |
| 6597 |
\def\fps@table{tbp} |
| 6598 |
\def\ftype@table{\tw@} |
| 6599 |
\def\ext@table{lot} |
| 6600 |
\def\fnum@table{\tablename~\thetable} |
| 6601 |
\newenvironment*{table} |
| 6602 |
{\@float{table}} |
| 6603 |
{\end@float} |
| 6604 |
\newenvironment*{table*} |
| 6605 |
{\@dblfloat{table}} |
| 6606 |
{\end@dblfloat} |
| 6607 |
\long\def\@makecaption#1#2{% |
| 6608 |
\vskip\abovecaptionskip |
| 6609 |
\sbox\@tempboxa{\itshape \@addfullstop{#1: #2}}% |
| 6610 |
\ifdim \wd\@tempboxa >\hsize |
| 6611 |
\unhbox\@tempboxa\par |
| 6612 |
\else |
| 6613 |
\global \@minipagefalse |
| 6614 |
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% |
| 6615 |
\fi |
| 6616 |
\vskip\belowcaptionskip |
| 6617 |
} |
| 6618 |
\newcommand*\@pnumwidth{1.55em} |
| 6619 |
\newcommand*\@tocrmarg{2.55em} |
| 6620 |
\newcommand*\@dotsep{4.5} |
| 6621 |
\setcounter{tocdepth}{\@ne} |
| 6622 |
\newcommand*\tableofcontents{% |
| 6623 |
\section*{\contentsname \sectionmark\contentsname} |
| 6624 |
\if@toc@in@toc@ |
| 6625 |
\addcontentsline{toc}{section}{\protect\contentsname}% |
| 6626 |
\fi |
| 6627 |
\@starttoc{toc}% |
| 6628 |
} |
| 6629 |
\newcommand*\l@section{\@dottedtocline{\@ne}{\z@}{2em}} |
| 6630 |
\newcommand*\l@paragraph[2]{% |
| 6631 |
\@dottedtocline{\tw@}{2em}{2.5em}{\small #1}{\small #2}% |
| 6632 |
} |
| 6633 |
\newcommand*\listoffigures{% |
| 6634 |
\section*{\listfigurename \sectionmark\listfigurename}% |
| 6635 |
\if@loX@in@toc@ |
| 6636 |
\addcontentsline{toc}{section}{\protect\listfigurename}% |
| 6637 |
\fi |
| 6638 |
\@starttoc{lof}% |
| 6639 |
} |
| 6640 |
\def\l@figure{\@dottedtocline{\@ne}{\z@}{2em}} |
| 6641 |
\newcommand*\listoftables{% |
| 6642 |
\section*{\listtablename \sectionmark\listtablename}% |
| 6643 |
\if@loX@in@toc@ |
| 6644 |
\addcontentsline{toc}{section}{\protect\listtablename}% |
| 6645 |
\fi |
| 6646 |
\@starttoc{lot}% |
| 6647 |
} |
| 6648 |
\let\l@table\l@figure |
| 6649 |
\newenvironment*{thebibliography}[1]{% |
| 6650 |
\startbreaks |
| 6651 |
\section*{\refname \sectionmark\refname}% |
| 6652 |
\addcontentsline{toc}{section}{\protect\refname}% |
| 6653 |
\vskip\parskip |
| 6654 |
\parskip\z@skip |
| 6655 |
\parindent\z@ |
| 6656 |
\list{\@biblabel{\@arabic\c@enumiv}}{% |
| 6657 |
\settowidth\labelwidth{\@biblabel{#1}}% |
| 6658 |
\leftmargin\labelwidth |
| 6659 |
\advance\leftmargin\labelsep |
| 6660 |
\usecounter{enumiv}% |
| 6661 |
\let\p@enumiv\@empty |
| 6662 |
\renewcommand\theenumiv{\@arabic\c@enumiv}% |
| 6663 |
}% |
| 6664 |
\sloppy |
| 6665 |
\clubpenalty 4000 \@clubpenalty \clubpenalty |
| 6666 |
\widowpenalty 4000 |
| 6667 |
\sfcode`\.\@m |
| 6668 |
}{% |
| 6669 |
\def\@noitemerr |
| 6670 |
{\@latex@warning{Empty `thebibliography' environment}}% |
| 6671 |
\endlist |
| 6672 |
} |
| 6673 |
\newcommand*\newblock{\hskip .11em\@plus.33em\@minus.07em} |
| 6674 |
\newcommand*\bysame{\leavevmode\hbox to3em{\hrulefill}\thinspace} |
| 6675 |
% \end{macrocode} |
| 6676 |
% |
| 6677 |
% \subsubsection{Names} |
| 6678 |
% |
| 6679 |
% \begin{macrocode} |
| 6680 |
\newcommand*\contentsname {Sommario} |
| 6681 |
\newcommand*\listfigurename{Indice delle figure} |
| 6682 |
\newcommand*\listtablename {Indice delle tabelle} |
| 6683 |
\newcommand*\refname {Testi citati} |
| 6684 |
\newcommand*\indexname {Indice analitico} |
| 6685 |
\newcommand*\figurename {Figura} |
| 6686 |
\newcommand*\tablename {Tabella} |
| 6687 |
% \end{macrocode} |
| 6688 |
% |
| 6689 |
% End of the module for the \packlass{\articoletteracdp} class. |
| 6690 |
% \begin{macrocode} |
| 6691 |
%</artico> |
| 6692 |
% \end{macrocode} |
| 6693 |
% \noindent\null\par |
| 6694 |
% |
| 6695 |
% \section{The code for the \protect\packlass{\cdpaddon} package} |
| 6696 |
% |
| 6697 |
% This part of the file goes into \filedir{\cdpaddon.sty}. |
| 6698 |
% \begin{macrocode} |
| 6699 |
%<*addon> |
| 6700 |
% \end{macrocode} |
| 6701 |
% |
| 6702 |
% \subsection{Identification} |
| 6703 |
% |
| 6704 |
% Why did I ask for the June 1998 release of \LaTeX? I don't remember! |
| 6705 |
% \begin{macrocode} |
| 6706 |
\NeedsTeXFormat{LaTeX2e}[1998/06/01] % LaTeX2e is required! |
| 6707 |
\ProvidesPackage{cdpaddon} |
| 6708 |
[2018/02/08 v0.36d (development)] |
| 6709 |
\@ifdefinable\@cdpaddon{\def\@cdpaddon{cdpaddon}} |
| 6710 |
% \end{macrocode} |
| 6711 |
% |
| 6712 |
% \subsection{Initial code} |
| 6713 |
% |
| 6714 |
% Switches; "\if@custom@lh@" added in vers.~0.36 (2015 Feb~08). |
| 6715 |
% \begin{macrocode} |
| 6716 |
\def\do#1{\@ifdefinable#1{\newif#1}} |
| 6717 |
\do\if@using@cdp@ |
| 6718 |
\do\if@use@color@ |
| 6719 |
\do\if@use@hyper@ |
| 6720 |
\do\if@custom@lh@ |
| 6721 |
% \end{macrocode} |
| 6722 |
% |
| 6723 |
% \begin{macro}{\@cdpaddon@printer} |
| 6724 |
% Below, we shall store in this macro the name (without the extension |
| 6725 |
% \filedir{.def}) of the definition file from which to read the |
| 6726 |
% definitions of the colors for the C.D.P. seal. |
| 6727 |
% If it is empty, the emergency colors will be used: |
| 6728 |
% we make this the default. |
| 6729 |
% \begin{macrocode} |
| 6730 |
\@ifdefinable\@cdpaddon@printer{\let\@cdpaddon@printer\@empty} |
| 6731 |
% \end{macrocode} |
| 6732 |
% \end{macro} |
| 6733 |
% |
| 6734 |
% ``Scratch'' macros, will be re-used in the sequel. |
| 6735 |
% \begin{macrocode} |
| 6736 |
\@ifdefinable\@temp@cdpaddon@a{} |
| 6737 |
\@ifdefinable\@temp@cdpaddon@b{} |
| 6738 |
% \end{macrocode} |
| 6739 |
% |
| 6740 |
% Here is a first use of those ``scratch'' macros. |
| 6741 |
% \begin{macrocode} |
| 6742 |
\def\@temp@cdpaddon@a{% |
| 6743 |
\@using@cdp@false |
| 6744 |
\PackageWarningNoLine{\@cdpaddon}{% |
| 6745 |
It seems that you are not using the letteracdp\MessageBreak |
| 6746 |
document class; therefore no attempt will be made\MessageBreak |
| 6747 |
to modify letterheads and similar things% |
| 6748 |
}% |
| 6749 |
} |
| 6750 |
\def\@temp@cdpaddon@b{letteracdp} |
| 6751 |
% \end{macrocode} |
| 6752 |
% Double check to be absolutely sure that the \packlass{\letteracdp} |
| 6753 |
% class is loaded. |
| 6754 |
% \begin{macrocode} |
| 6755 |
\@ifclassloaded{\@temp@cdpaddon@b}{% |
| 6756 |
\ifx\@letteracdp\@temp@cdpaddon@b |
| 6757 |
\@using@cdp@true |
| 6758 |
\else |
| 6759 |
\@temp@cdpaddon@a |
| 6760 |
\fi |
| 6761 |
}{% |
| 6762 |
\@temp@cdpaddon@a |
| 6763 |
} |
| 6764 |
% \end{macrocode} |
| 6765 |
% |
| 6766 |
% \subsection{Declaration of options} |
| 6767 |
% |
| 6768 |
% The following macro is needed to strip the prefix \opz{printer:}\ |
| 6769 |
% from the option that selects which color definition file to load. |
| 6770 |
% Again, we use one of the ``scratch'' macro to save memory (the other |
| 6771 |
% ``scratch'' macro is used as well inside). |
| 6772 |
% \begin{macrocode} |
| 6773 |
\def\@temp@cdpaddon@a#1printer:#2,#3\@@@{% |
| 6774 |
\def\@temp@cdpaddon@b{#1}% |
| 6775 |
\ifx\@temp@cdpaddon@b\@empty |
| 6776 |
\def\@cdpaddon@printer{#2}% |
| 6777 |
\else |
| 6778 |
\@unknownoptionerror |
| 6779 |
\fi |
| 6780 |
} |
| 6781 |
% \end{macrocode} |
| 6782 |
% Vers.~0.36 (2015 Feb~08): modified the existing option so that they also |
| 6783 |
% deal with the new "\if@custom@lh@" switch\ldots |
| 6784 |
% \begin{macrocode} |
| 6785 |
\DeclareOption{bw}{\@use@color@false\@custom@lh@false} |
| 6786 |
\DeclareOption{color}{\@use@color@true\@custom@lh@false} |
| 6787 |
\DeclareOption{hypertext}{\@use@hyper@true\@custom@lh@false} |
| 6788 |
\DeclareOption{plaintext}{\@use@hyper@false\@custom@lh@false} |
| 6789 |
% \end{macrocode} |
| 6790 |
% \ldots~and added new \opz{customletterhead} option. |
| 6791 |
% \begin{macrocode} |
| 6792 |
\DeclareOption{customletterhead}{% |
| 6793 |
\@use@color@false |
| 6794 |
\@use@hyper@false |
| 6795 |
\@custom@lh@true |
| 6796 |
} |
| 6797 |
% \end{macrocode} |
| 6798 |
% Otherwise, we can have a \opz{printer:}\ldots\ option requesting a color |
| 6799 |
% definition file. |
| 6800 |
% \begin{macrocode} |
| 6801 |
\DeclareOption*{% |
| 6802 |
\expandafter\@temp@cdpaddon@a\CurrentOption,printer:,\@@@% |
| 6803 |
} |
| 6804 |
% \end{macrocode} |
| 6805 |
% |
| 6806 |
% \subsection{Option processing} |
| 6807 |
% |
| 6808 |
% \begin{macrocode} |
| 6809 |
\ExecuteOptions{color,plaintext} |
| 6810 |
\ProcessOptions\relax |
| 6811 |
% \end{macrocode} |
| 6812 |
% If the \opz{printer:Default} option has been specified, we want |
| 6813 |
% the same behavior as if no \opz{printer:}\ldots\ option had been |
| 6814 |
% specified at all. |
| 6815 |
% \begin{macrocode} |
| 6816 |
\def\@temp@cdpaddon@a{Default} |
| 6817 |
\ifx\@cdpaddon@printer\@temp@cdpaddon@a |
| 6818 |
\let\@cdpaddon@printer\@empty |
| 6819 |
\fi |
| 6820 |
% \end{macrocode} |
| 6821 |
% |
| 6822 |
% \subsection{Package loading} |
| 6823 |
% |
| 6824 |
% \changes{0.34a}{2010 Jun 01}{Fixed up the use of dvips names in the |
| 6825 |
% \protect\packlass{\protect\cdpaddon} package (bug reported by Tommaso |
| 6826 |
% Gordini).}^^A |
| 6827 |
% V.~0.34a: fixed up the use of dvips names |
| 6828 |
% (bug reported by Tommaso Gordini). |
| 6829 |
% V.~0.36: also removed the ridiculous check for the presence of standard |
| 6830 |
% packages on the system! |
| 6831 |
% \begin{macrocode} |
| 6832 |
\if@use@color@ |
| 6833 |
\RequirePackage[dvipsnames]{color} |
| 6834 |
\fi |
| 6835 |
\if@use@hyper@ |
| 6836 |
\RequirePackage{hyperref} |
| 6837 |
\fi |
| 6838 |
% \end{macrocode} |
| 6839 |
% |
| 6840 |
% \subsection{Main code} |
| 6841 |
% |
| 6842 |
% Unfortunately, the code is only sparsely commented (at the moment). |
| 6843 |
% |
| 6844 |
% \subsubsection{Redefinition of the seal, etc.} |
| 6845 |
% |
| 6846 |
% Vers.~0.36 (2015 Feb~08): removed the "\@back@folding@tag" macro, |
| 6847 |
% now become unnecessary because of the introduction of the |
| 6848 |
% "\foldingtagrule" user command. |
| 6849 |
% We leave the code in place, but commented out, for documentation purposes. |
| 6850 |
%\begin{verbatim} |
| 6851 |
%\@ifdefinable\@back@folding@tag{\def\@back@folding@tag{% |
| 6852 |
% \if@do@fold@ |
| 6853 |
% \raisebox{\@lh@folding@ht}[\z@][\z@]{% |
| 6854 |
% \makebox[\z@][l]{% |
| 6855 |
% \color{strong@col}% |
| 6856 |
% \dimen@ -\@lh@right@margin |
| 6857 |
% \advance\dimen@ 1cm% |
| 6858 |
% \kern\dimen@ \vbox{% |
| 6859 |
% \kern -.1\p@ |
| 6860 |
% \hrule \@height .1\p@ \@depth .1\p@ \@width 5mm% |
| 6861 |
% \kern -.1\p@ |
| 6862 |
% }% |
| 6863 |
% }% |
| 6864 |
% }% |
| 6865 |
% \fi |
| 6866 |
%}} |
| 6867 |
%\end{verbatim} |
| 6868 |
% |
| 6869 |
% If the \packlass{\letteracdp} class is loaded\ldots |
| 6870 |
% \begin{macrocode} |
| 6871 |
\if@using@cdp@ |
| 6872 |
% \end{macrocode} |
| 6873 |
% \ldots then we can try to replace the macros that draw the seal, |
| 6874 |
% etc.; but we want to perform the redefinition (if and) only if the |
| 6875 |
% macro is already defined, and rise an error otherwise. To ease this |
| 6876 |
% task, we define the ``scratch'' macro "\@temp@cdpaddon@a" in such a |
| 6877 |
% way that "\@temp@cdpaddon@a{"\meta{name}"}{"\meta{code}"}" rises an |
| 6878 |
% error if \meta{name} is undefined, and executes \meta{code} |
| 6879 |
% otherwise. It is intended that \meta{code} is the code that does the |
| 6880 |
% actual redefinition. Note that \meta{name} must be indicated |
| 6881 |
% \emph{without} the backslash. Note also that it is not necessary |
| 6882 |
% a second parameter for \meta{code}: "{"\meta{code}"}" becomes the |
| 6883 |
% third parameter of "\@ifundefined". |
| 6884 |
% \begin{macrocode} |
| 6885 |
\def\@temp@cdpaddon@a#1{% |
| 6886 |
\@ifundefined{#1}{% |
| 6887 |
\PackageError\@cdpaddon{% |
| 6888 |
Internal command \@backslashchar#1 undefined% |
| 6889 |
}{% |
| 6890 |
The internal command \@backslashchar#1, |
| 6891 |
that should have been defined\MessageBreak |
| 6892 |
by the \@letteracdp\space document class, |
| 6893 |
is actually undefined.\MessageBreak |
| 6894 |
Probably, you are using an old or modified version |
| 6895 |
of that class.\MessageBreak |
| 6896 |
% \end{macrocode} |
| 6897 |
% Vers.~0.36 (2015 Feb~08): modified the following line: |
| 6898 |
% \begin{macrocode} |
| 6899 |
Proceed, but keep your fingers crossed!% |
| 6900 |
}% |
| 6901 |
}% |
| 6902 |
} |
| 6903 |
% \end{macrocode} |
| 6904 |
% |
| 6905 |
% We first take care of color. Did the user request colors? |
| 6906 |
% \begin{macrocode} |
| 6907 |
\if@use@color@ |
| 6908 |
% \end{macrocode} |
| 6909 |
% Yes? Well, in that case, we try to load the file that defines |
| 6910 |
% the hues. First of all, see whether the user selected a color |
| 6911 |
% definition file. |
| 6912 |
% \begin{macrocode} |
| 6913 |
\ifx\@cdpaddon@printer\@empty |
| 6914 |
% \end{macrocode} |
| 6915 |
% If not (\("\@cdpaddon@printer"="\@empty"\)), then we must read the |
| 6916 |
% config.\ file. Before doing this, we define the "\DeclareCDPSealHuesDefault" |
| 6917 |
% command, in a somewhat tricky way: we begin a group, thereby making |
| 6918 |
% a local definition, but we put the "\endgroup" in the replacement text |
| 6919 |
% of the macro itself. This is quite OK, because once the macro has |
| 6920 |
% been expanded, we no longer need its definition! We must foresee |
| 6921 |
% the case in which the configuration file does not contain any |
| 6922 |
% "\DeclareCDPSealHuesDefault" command at all. For this, we use |
| 6923 |
% another hack: we "\let" "\@temp@cdpaddon@b" equal to "\endgroup" |
| 6924 |
% \emph{inside} the group, but to "\@empty" outside of it. Then we call it: |
| 6925 |
% if the group has already ended, nothing happens, otherwise the group |
| 6926 |
% is ended now. |
| 6927 |
% \begin{macrocode} |
| 6928 |
\let\@temp@cdpaddon@b\@empty |
| 6929 |
\begingroup % \endgroup put in by \@temp@cdpaddon@b |
| 6930 |
\let\@temp@cdpaddon@b\endgroup |
| 6931 |
\InputIfFileExists{cdpshues.cfg}{% |
| 6932 |
\PackageInfo{\@cdpaddon}{% |
| 6933 |
Reading config. file% |
| 6934 |
}% |
| 6935 |
% \end{macrocode} |
| 6936 |
% \begin{macro}{\DeclareCDPSealHuesDefault} |
| 6937 |
% This command is defined in such a way that it not only ends the group, |
| 6938 |
% but also stops reading from the file. |
| 6939 |
% \begin{macrocode} |
| 6940 |
\def\DeclareCDPSealHuesDefault{% |
| 6941 |
\@temp@cdpaddon@b % ends group |
| 6942 |
\endinput |
| 6943 |
% \end{macrocode} |
| 6944 |
% \end{macro} |
| 6945 |
% The argument to "\DeclareCDPSealHuesDefault" will become the |
| 6946 |
% replacement text of the following "\def". |
| 6947 |
% \begin{macrocode} |
| 6948 |
\def\@cdpaddon@printer |
| 6949 |
}% |
| 6950 |
}{% |
| 6951 |
\PackageWarningNoLine{\@cdpaddon}{% |
| 6952 |
Could not find config. file for default printer% |
| 6953 |
}% |
| 6954 |
}% |
| 6955 |
% \end{macrocode} |
| 6956 |
% The following is part of the hack to end the group if it has not |
| 6957 |
% already ended. |
| 6958 |
% \begin{macrocode} |
| 6959 |
\@temp@cdpaddon@b |
| 6960 |
% \end{macrocode} |
| 6961 |
% We now check if the user specified the \opz{printer:None} option; |
| 6962 |
% if so, we take the same action that would result from an empty |
| 6963 |
% configuration file. |
| 6964 |
% \begin{macrocode} |
| 6965 |
\else |
| 6966 |
\def\@temp@cdpaddon@b{None}% |
| 6967 |
\ifx\@cdpaddon@printer\@temp@cdpaddon@b |
| 6968 |
\let\@cdpaddon@printer\@empty |
| 6969 |
\fi |
| 6970 |
% \end{macrocode} |
| 6971 |
% End of things to do when no \opz{printer:}\ldots\ option has been |
| 6972 |
% specified. |
| 6973 |
% \begin{macrocode} |
| 6974 |
\fi |
| 6975 |
% \end{macrocode} |
| 6976 |
% OK, now we have the name of the color definition file in |
| 6977 |
% "\@cdpaddon@printer", and we have to load it. The following are the |
| 6978 |
% actions to take when the file cannot be found or when |
| 6979 |
% "\@cdpaddon@printer" is still empty (\emph{e.g.,} because no |
| 6980 |
% config.\ file was found, or because it was void): use emergency |
| 6981 |
% definitions and issue a warning. We save them in a ``scratch'' |
| 6982 |
% macro because we need them twice~(!). |
| 6983 |
% \begin{macrocode} |
| 6984 |
\def\@temp@cdpaddon@b{% |
| 6985 |
\definecolor{slight@col}{named}{SpringGreen} |
| 6986 |
\definecolor{strong@col}{named}{OliveGreen} |
| 6987 |
\PackageInfo{\@cdpaddon}{% |
| 6988 |
Color hues defined internally% |
| 6989 |
}% |
| 6990 |
\typeout{% |
| 6991 |
*Package cdpaddon using built-in colors for the C.D.P. seal.*% |
| 6992 |
}% |
| 6993 |
} |
| 6994 |
% \end{macrocode} |
| 6995 |
% We finally try to load the color definition file. |
| 6996 |
% \begin{macrocode} |
| 6997 |
\ifx\@cdpaddon@printer\@empty |
| 6998 |
\@temp@cdpaddon@b |
| 6999 |
\else |
| 7000 |
\InputIfFileExists{\@[email protected]}{% |
| 7001 |
\PackageInfo{\@cdpaddon}{% |
| 7002 |
Color hues defined by def. file\MessageBreak |
| 7003 |
\@[email protected]% |
| 7004 |
}% |
| 7005 |
}{% |
| 7006 |
\PackageWarningNoLine{\@cdpaddon}{% |
| 7007 |
Could not find def. file \@[email protected]% |
| 7008 |
}% |
| 7009 |
\@temp@cdpaddon@b |
| 7010 |
}% |
| 7011 |
\fi |
| 7012 |
% \end{macrocode} |
| 7013 |
% |
| 7014 |
% We define another handy subroutine. Given the name \meta{boxname} |
| 7015 |
% of an hbox, "\@temp@cdpaddon@b{"\meta{boxname}"}" causes a |
| 7016 |
% "\color{strong@col}" declaration to be added at the beginning of |
| 7017 |
% "\"\meta{boxname}, properly contained in a group to ensure that the |
| 7018 |
% "\special" for restoring the previous colors is included in the box too. |
| 7019 |
% We use this method of setting and resetting the color inside the |
| 7020 |
% individual boxes because the one used in the previous versions, of |
| 7021 |
% setting the color once for all at the beginning of "\@cdp@head", did |
| 7022 |
% not seem to work properly with pdf\TeX. |
| 7023 |
% \begin{macrocode} |
| 7024 |
\def\@temp@cdpaddon@b#1{% |
| 7025 |
\@temp@cdpaddon@a{#1}{% |
| 7026 |
\setbox\z@\box\@nameuse{#1}% |
| 7027 |
\sbox{\@nameuse{#1}}{{\color{strong@col}\unhbox\z@}}% |
| 7028 |
}% |
| 7029 |
} |
| 7030 |
% \end{macrocode} |
| 7031 |
% |
| 7032 |
% Actual redefinition of macros begins here. |
| 7033 |
% |
| 7034 |
% Vers.~0.36 (2015 Feb~08): no need, now, to redefine the "\@folding@tag" |
| 7035 |
% macro: just redefine the user-level command "\foldingtagrule" |
| 7036 |
% (much neater!). |
| 7037 |
% \begin{macrocode} |
| 7038 |
\renewcommand*\foldingtagrule{% |
| 7039 |
\color{strong@col}% |
| 7040 |
\CDPFactoryFoldingTagRule |
| 7041 |
} |
| 7042 |
% \end{macrocode} |
| 7043 |
% |
| 7044 |
% \begin{macro}{\@logo@box@base} |
| 7045 |
% \changes{0.32}{2002 Jul 01}{Eliminated an awful bug introduced with |
| 7046 |
% version 0.31 (a conditional that could not appear at this spot).}^^A |
| 7047 |
% Color the main part of the seal. |
| 7048 |
% \begin{macrocode} |
| 7049 |
\@temp@cdpaddon@a{@logo@box@base}{% |
| 7050 |
\savebox\@logo@box@base[\z@][r]{\setlength\unitlength{.625mm}% |
| 7051 |
\begin{picture}(32,16)(-3,7.87)% |
| 7052 |
% \end{macrocode} |
| 7053 |
% I don't remember exactly what this group was for. Eliminate? |
| 7054 |
% \begin{macrocode} |
| 7055 |
\begingroup |
| 7056 |
% \end{macrocode} |
| 7057 |
% Draw the inner of the~``D'' and of the~``P'', in the slight color. |
| 7058 |
% \begin{macrocode} |
| 7059 |
\color{slight@col}% |
| 7060 |
% \end{macrocode} |
| 7061 |
% Try to draw two filled circles of the right size to fill up the |
| 7062 |
% inner of the two letters. If the target system happens to have |
| 7063 |
% sufficiently large filled circles, this will suffice. |
| 7064 |
% \begin{macrocode} |
| 7065 |
\put(8,16){\circle*{10}}% |
| 7066 |
\put(18,16){\circle*{10}}% |
| 7067 |
% \end{macrocode} |
| 7068 |
% With the standard set of fonts, however, the above request can not |
| 7069 |
% be honored, and the two circles we have just obtained are a little |
| 7070 |
% too small; so, we finish them by adding arcs of circumference of |
| 7071 |
% increasing size, drawn in thick lines. |
| 7072 |
% \begin{macrocode} |
| 7073 |
\thicklines |
| 7074 |
\put(8,16){\oval(8.2,8.2)[l]}% |
| 7075 |
\put(8,16){\oval(8.6,8.6)[l]}% |
| 7076 |
\put(8,16){\oval(9,9)[l]}% |
| 7077 |
\put(8,16){\oval(9.4,9.4)[l]}% |
| 7078 |
\put(8,16){\oval(9.8,9.8)[l]}% |
| 7079 |
\put(18,16){\oval(8.2,8.2)[r]}% |
| 7080 |
\put(18,16){\oval(8.6,8.6)[r]}% |
| 7081 |
\put(18,16){\oval(9,9)[r]}% |
| 7082 |
\put(18,16){\oval(9.4,9.4)[r]}% |
| 7083 |
\put(18,16){\oval(9.8,9.8)[r]}% |
| 7084 |
% \end{macrocode} |
| 7085 |
% Now erase the inner half of the two circles. |
| 7086 |
% \begin{macrocode} |
| 7087 |
\put(13,16){\makebox(0,0){\color{white}% |
| 7088 |
\vrule height 6.25mm depth 0mm width 6.25mm |
| 7089 |
}}% |
| 7090 |
% \end{macrocode} |
| 7091 |
% Draw the vertical part of the two letters. |
| 7092 |
% \begin{macrocode} |
| 7093 |
\put(9,11){\makebox(0,0)[bl]{% |
| 7094 |
\vrule height 12.5mm depth 0mm width 1.875mm |
| 7095 |
}}% |
| 7096 |
\put(14,1){\makebox(0,0)[bl]{% |
| 7097 |
\vrule height 12.5mm depth 0mm width 1.875mm |
| 7098 |
}}% |
| 7099 |
\endgroup |
| 7100 |
% \end{macrocode} |
| 7101 |
% Now redraw the outer strokes of the~``D'' and of the~``P'' in the |
| 7102 |
% strong color. |
| 7103 |
% \begin{macrocode} |
| 7104 |
\color{strong@col}% |
| 7105 |
\put(8,16){\oval(10,10)[l]}% |
| 7106 |
\put(8,11){\line(0,1){10}}% |
| 7107 |
\put(9,11){\framebox(3,20){}}% |
| 7108 |
\put(18,16){\oval(10,10)[r]}% |
| 7109 |
\put(18,11){\line(0,1){10}}% |
| 7110 |
\put(14,1){\framebox(3,20){}}% |
| 7111 |
% \end{macrocode} |
| 7112 |
% The strokes of the~``C'' are thick. |
| 7113 |
% \begin{macrocode} |
| 7114 |
\thicklines |
| 7115 |
\put(8,16){\oval(16,16)[l]}% |
| 7116 |
\put(8,8){\line(1,0){5}}% |
| 7117 |
\put(13,24){\line(1,0){10}}% |
| 7118 |
\put(8,16){\oval(14,14)[l]}% |
| 7119 |
\put(8,9){\line(1,0){5}}% |
| 7120 |
\put(13,23){\line(1,0){10}}% |
| 7121 |
\end{picture}% |
| 7122 |
}% |
| 7123 |
} |
| 7124 |
% \end{macrocode} |
| 7125 |
% \end{macro} |
| 7126 |
% Coloring the other parts of the seal is easier: just add the color |
| 7127 |
% declaration to the various boxes, to the rule in the head, and to the |
| 7128 |
% whole footer. |
| 7129 |
% \begin{macrocode} |
| 7130 |
\@temp@cdpaddon@b{@logo@box@addS} |
| 7131 |
\@temp@cdpaddon@b{@logo@box@addL} |
| 7132 |
\@temp@cdpaddon@b{@oordinamento@box} |
| 7133 |
\@temp@cdpaddon@a{@cdp@head}{\def\@cdp@head{% |
| 7134 |
\@logo@overlay\@logo@box@addL |
| 7135 |
\copy\@oordinamento@box |
| 7136 |
{\color{strong@col}\hrulefill}\kern\@lh@right@margin |
| 7137 |
}} |
| 7138 |
\@temp@cdpaddon@a{@cdp@foot}{\def\@cdp@foot{% |
| 7139 |
\color{strong@col}% |
| 7140 |
\reset@font |
| 7141 |
\setlength\@tempdima{\textwidth}% |
| 7142 |
\addtolength\@tempdima{-2\@lh@right@margin}% |
| 7143 |
\hss\parbox[t]{\@tempdima}{% |
| 7144 |
\parfillskip\z@skip |
| 7145 |
\noindent\hrulefill\@@par |
| 7146 |
\baselineskip 11\p@ |
| 7147 |
\hb@xt@\hsize{\hfil\copy\@name@and@WWW@box\hfil}% |
| 7148 |
}\hss |
| 7149 |
}} |
| 7150 |
\fi |
| 7151 |
% \end{macrocode} |
| 7152 |
% |
| 7153 |
% Support for user-defined letterheads added in vers.~0.36 (2015 Feb~08). |
| 7154 |
% Support for custom logo (cf.~\sty{logo} pagestyle and its relatives) |
| 7155 |
% still kept hidden. |
| 7156 |
% |
| 7157 |
% First, define storage boxes to hold custom head, foot, and logo. |
| 7158 |
% \begin{macrocode} |
| 7159 |
\newsavebox\@cdp@custom@lhead@box |
| 7160 |
\newsavebox\@cdp@custom@lfoot@box |
| 7161 |
\newsavebox\@cdp@custom@llogo@box |
| 7162 |
% \end{macrocode} |
| 7163 |
% |
| 7164 |
% \begin{environment}{customletterhead} |
| 7165 |
% \begin{environment}{customletterfoot} |
| 7166 |
% \begin{environment}{customletterlogo} |
| 7167 |
% These three environments are defined similarly, so we use one of the |
| 7168 |
% ``scratch'' macros to perform their definition |
| 7169 |
% The parameters are: |
| 7170 |
% \begin{paramlist} |
| 7171 |
% \param |
| 7172 |
% \( \texttt{head} \mathbin{|} \texttt{foot} \mathbin{|} |
| 7173 |
% \texttt{logo} \);\\ |
| 7174 |
% \param |
| 7175 |
% intended alignment of the \env{minipage} |
| 7176 |
% (\( \texttt{b} \mathbin{|} \texttt{t} \));\\ |
| 7177 |
% \param |
| 7178 |
% either "\vss" or nothing;\\ |
| 7179 |
% \param |
| 7180 |
% either "\vss" or nothing. |
| 7181 |
% \end{paramlist} |
| 7182 |
% \begin{macrocode} |
| 7183 |
\def\@temp@cdpaddon@b#1#2#3#4{% |
| 7184 |
\newenvironment*{customletter#1}[1]{% |
| 7185 |
% \end{macrocode} |
| 7186 |
% Save in the appropriate box, pretending that they have zero height and |
| 7187 |
% depth\ldots |
| 7188 |
% \begin{macrocode} |
| 7189 |
\setbox\@nameuse{@cdp@custom@l#1@box}\vbox to\z@ \bgroup |
| 7190 |
\hsize ##1\relax |
| 7191 |
\parskip \z@skip |
| 7192 |
#3% either \vss or nothing |
| 7193 |
% \end{macrocode} |
| 7194 |
% \ldots~the contents of a temporary \env{minipage}; note that we need to |
| 7195 |
% disable the ``"Missing \begin{document}"'' error, which is triggered by |
| 7196 |
% "\everypar". |
| 7197 |
% \begin{macrocode} |
| 7198 |
\everypar{}% |
| 7199 |
\noindent\minipage[#2]{##1}% |
| 7200 |
\null |
| 7201 |
}{% |
| 7202 |
% \end{macrocode} |
| 7203 |
% Code for ending the \env{minipage}: note that we smash to zero the |
| 7204 |
% possible depth of the contents. |
| 7205 |
% \begin{macrocode} |
| 7206 |
\par |
| 7207 |
\vskip -\baselineskip |
| 7208 |
\null |
| 7209 |
\endminipage |
| 7210 |
#4% either \vss or nothing |
| 7211 |
\egroup |
| 7212 |
% \end{macrocode} |
| 7213 |
% ``Lift'' the definition out of the group implied by the environment. |
| 7214 |
% We have used the outer boxes, above, because we prefer not to keep around |
| 7215 |
% any ``scratch'' boxes (\emph{e.g.}, "\box1") when we must pass control to |
| 7216 |
% the final user. |
| 7217 |
% \begin{macrocode} |
| 7218 |
\global \setbox \@ne \box \@nameuse{@cdp@custom@l#1@box}% |
| 7219 |
\xdef\@cdp@reserved{% |
| 7220 |
\setbox \@nameuse{@cdp@custom@l#1@box}\box \@ne |
| 7221 |
}% |
| 7222 |
\aftergroup \@cdp@reserved |
| 7223 |
}% |
| 7224 |
}% |
| 7225 |
% \end{macrocode} |
| 7226 |
% Perform definitions of the three abovementioned environments. |
| 7227 |
% \begin{macrocode} |
| 7228 |
\@temp@cdpaddon@b{head}{b}{\vss}{} |
| 7229 |
\@temp@cdpaddon@b{foot}{t}{}{\vss} |
| 7230 |
\@temp@cdpaddon@b{logo}{b}{\vss}{} |
| 7231 |
% \end{macrocode} |
| 7232 |
% \end{environment} |
| 7233 |
% \end{environment} |
| 7234 |
% \end{environment} |
| 7235 |
% |
| 7236 |
% \begin{macro}{\ruleacrossheadorfoot} |
| 7237 |
% Draw a rule across head or foot. Synopsis: |
| 7238 |
% \begin{flushleft} |
| 7239 |
% "\ruleacrossheadorfoot["\meta{wdth\_l}"]["\meta{wdth\_r}"]" |
| 7240 |
% \end{flushleft} |
| 7241 |
% \meta{wdth\_l} is the inset from the left margin (defaults to zero), |
| 7242 |
% a negative inset causes the rule to protrude into the margin itself; |
| 7243 |
% \meta{wdth\_r} is the inset from the right margin (defaults to |
| 7244 |
% \meta{wdth\_l}). Both \meta{wdth\_l} and \meta{wdth\_r} must be |
| 7245 |
% rigid lengths. \emph{Note:} "\@tempdima" and "\@tempdimb" are used here. |
| 7246 |
% \begin{macrocode} |
| 7247 |
\newcommand*\ruleacrossheadorfoot[1][\z@]{\par |
| 7248 |
\setlength\@tempdima{#1}% |
| 7249 |
\@ifnextchar [% ] bracket matching |
| 7250 |
\@cdp@rule@across@x |
| 7251 |
{% |
| 7252 |
\@tempdimb \@tempdima |
| 7253 |
\@cdp@rule@across |
| 7254 |
}% |
| 7255 |
} |
| 7256 |
% \end{macrocode} |
| 7257 |
% \end{macro} |
| 7258 |
% |
| 7259 |
% Inner implementation. |
| 7260 |
% \begin{macrocode} |
| 7261 |
\@ifdefinable\@cdp@rule@across@x{\def\@cdp@rule@across@x[#1]{% |
| 7262 |
\setlength\@tempdimb{#1}% |
| 7263 |
\@cdp@rule@across |
| 7264 |
}} |
| 7265 |
\@ifdefinable\@cdp@rule@across{\def\@cdp@rule@across{ |
| 7266 |
\nobreak |
| 7267 |
\vskip -\baselineskip |
| 7268 |
\hb@xt@ \hsize {% |
| 7269 |
\kern \@tempdima \hrulefill \kern \@tempdimb |
| 7270 |
}% |
| 7271 |
}} |
| 7272 |
% \end{macrocode} |
| 7273 |
% |
| 7274 |
% If the \opz{customletterhead} option is in force, install custom |
| 7275 |
% head\slash foot\slash logo. |
| 7276 |
% \begin{macrocode} |
| 7277 |
\if@custom@lh@ |
| 7278 |
\@temp@cdpaddon@a{@cdp@head}{\def\@cdp@head{% |
| 7279 |
\hss\copy\@cdp@custom@lhead@box\hss |
| 7280 |
}} |
| 7281 |
\@temp@cdpaddon@a{@cdp@foot}{\def\@cdp@foot{% |
| 7282 |
\hss\copy\@cdp@custom@lfoot@box\hss |
| 7283 |
}} |
| 7284 |
% \end{macrocode} |
| 7285 |
% \changes{0.36d}{2018 Feb 08}{Changed \texttt{\protect\bslash hb@xt@ |
| 7286 |
% \protect\bslash z@\protect\symbol{`\{}\protect\bslash |
| 7287 |
% hss}\,\ldots\texttt{\protect\symbol{`\}}} to \texttt{\protect\bslash |
| 7288 |
% llap\protect\symbol{`\{}}\,\ldots\texttt{\protect\symbol{`\}}} in the |
| 7289 |
% code that typesets the custom logo.}^^A |
| 7290 |
% The logo is assumed to protrude to the left of the header |
| 7291 |
% ("\llap" used in v.~0.36d). |
| 7292 |
% \begin{macrocode} |
| 7293 |
\@temp@cdpaddon@a{@cdp@logo}{\def\@cdp@logo{% |
| 7294 |
\llap{\copy\@cdp@custom@llogo@box}% |
| 7295 |
}} |
| 7296 |
% \end{macrocode} |
| 7297 |
% Do not forget to reset "\longindentation"! |
| 7298 |
% \begin{macrocode} |
| 7299 |
\setlength\longindentation{.5\textwidth} |
| 7300 |
\fi |
| 7301 |
% \end{macrocode} |
| 7302 |
% |
| 7303 |
% We now deal with hyperlinks. If the user requested them\ldots |
| 7304 |
% \begin{macrocode} |
| 7305 |
\if@use@hyper@ |
| 7306 |
% \end{macrocode} |
| 7307 |
% \ldots well, we take care of them. The precompilation of the footer must |
| 7308 |
% be deferred until the "\begin{document}" hook, because the macros of the |
| 7309 |
% \packlass{\HyperRef} package are not available for actual typesetting until |
| 7310 |
% that moment. Note that here we only add the "\href" command: the |
| 7311 |
% color-switching has already been taken care of inside the "\@cdp@foot" box |
| 7312 |
% (the use of color is independent of the use of hyperlinks). |
| 7313 |
% \changes{0.36d}{2018 Feb 08}{Added selection of OT1 font encoding to the |
| 7314 |
% code that presets the ``hyperlink'' version of |
| 7315 |
% \texttt{\protect\bslash @name@and@WWW@box}.}^^A |
| 7316 |
% Vers.~0.36d: added "\fontencoding{OT1}\selectfont". |
| 7317 |
% \begin{macrocode} |
| 7318 |
\AtBeginDocument{% |
| 7319 |
\@temp@cdpaddon@a{@name@and@WWW@box}{% |
| 7320 |
\setbox\@name@and@WWW@box = \vtop{% |
| 7321 |
\baselineskip 11\p@ |
| 7322 |
\fontencoding{OT1}\selectfont |
| 7323 |
\hb@xt@\z@{\hss \@lh@rm\Coordinamento \hss}% |
| 7324 |
\hb@xt@\z@{% |
| 7325 |
\hss |
| 7326 |
\@lh@it World Wide Web:\/ |
| 7327 |
\href{\CoordinamentoWWW}{\@lh@tt \CoordinamentoWWW}% |
| 7328 |
\hss |
| 7329 |
}% |
| 7330 |
}% |
| 7331 |
}% |
| 7332 |
% \end{macrocode} |
| 7333 |
% In this case we must defer releasing "\@temp@cdpaddon@a" until |
| 7334 |
% "\begin{document}". |
| 7335 |
% \begin{macrocode} |
| 7336 |
\let\@temp@cdpaddon@a\@undefined |
| 7337 |
} |
| 7338 |
% \end{macrocode} |
| 7339 |
% The following line has been removed from the code, since the |
| 7340 |
% bookmark level for paragraphs is now fixed in the file |
| 7341 |
% \filedir{\articoletteracdp.cls} (v.~0.34). |
| 7342 |
%\begin{verbatim} |
| 7343 |
%\def\toclevel@paragraph{2} |
| 7344 |
%\end{verbatim} |
| 7345 |
% If hyperlinks are not requested, we can release "\@temp@cdpaddon@a" |
| 7346 |
% right now. |
| 7347 |
% \begin{macrocode} |
| 7348 |
\else |
| 7349 |
\let\@temp@cdpaddon@a\@undefined |
| 7350 |
\fi |
| 7351 |
% \end{macrocode} |
| 7352 |
% |
| 7353 |
% We can do the same thing if the \packlass{\letteracdp} class is |
| 7354 |
% not loaded. |
| 7355 |
% \begin{macrocode} |
| 7356 |
\else |
| 7357 |
\let\@temp@cdpaddon@a\@undefined |
| 7358 |
\fi |
| 7359 |
% \end{macrocode} |
| 7360 |
% |
| 7361 |
% The memory taken by the following ``scratch'' macros can be freed |
| 7362 |
% in any case. |
| 7363 |
% \begin{macrocode} |
| 7364 |
\let\if@using@cdp@\@undefined |
| 7365 |
\let\@using@cdp@true\@undefined |
| 7366 |
\let\@using@cdp@false\@undefined |
| 7367 |
\let\if@use@color@\@undefined |
| 7368 |
\let\@use@color@true\@undefined |
| 7369 |
\let\@use@color@false\@undefined |
| 7370 |
\let\if@use@hyper@\@undefined |
| 7371 |
\let\@use@hyper@true\@undefined |
| 7372 |
\let\@use@hyper@false\@undefined |
| 7373 |
% \end{macrocode} |
| 7374 |
% Vers.~0.36 (2015 Feb~08): added the following three lines\ldots |
| 7375 |
% \begin{macrocode} |
| 7376 |
\let\if@custom@lh@\@undefined |
| 7377 |
\let\@custom@lh@true\@undefined |
| 7378 |
\let\@custom@lh@false\@undefined |
| 7379 |
% \end{macrocode} |
| 7380 |
% \ldots~and removed the following one: |
| 7381 |
%\begin{verbatim} |
| 7382 |
%\let\@back@folding@tag\@undefined |
| 7383 |
%\end{verbatim} |
| 7384 |
% \begin{macrocode} |
| 7385 |
\let\@cdpaddon@printer\@undefined |
| 7386 |
\let\@temp@cdpaddon@b\@undefined |
| 7387 |
% \end{macrocode} |
| 7388 |
% |
| 7389 |
% \subsubsection{Smiling faces} |
| 7390 |
% |
| 7391 |
% \begin{macro}{\facesmile} |
| 7392 |
% \begin{macro}{\facefrown} |
| 7393 |
% These commands produce happy or sad ``faces''. They are made |
| 7394 |
% ``transparent'' to the "\spacefactor", just like parentheses |
| 7395 |
% (the "\spacefactor" is saved in "\count@"). |
| 7396 |
% \begin{macrocode} |
| 7397 |
\DeclareRobustCommand*\facesmile{\@face\smile} |
| 7398 |
\DeclareRobustCommand*\facefrown{\@face\frown} |
| 7399 |
% \end{macrocode} |
| 7400 |
% \end{macro} |
| 7401 |
% \end{macro} |
| 7402 |
% |
| 7403 |
% \begin{macro}{\@face} |
| 7404 |
% The low-level command that draws the face ("\bigcirc"), the eyes, |
| 7405 |
% and the mouth: the latter is passed as an argument, so it can be |
| 7406 |
% either a "\smile" or a "\frown". |
| 7407 |
% \begin{macrocode} |
| 7408 |
\@ifdefinable\@face{\def\@face#1{% |
| 7409 |
\leavevmode |
| 7410 |
\count@\spacefactor |
| 7411 |
\hb@xt@ 1em{\hfil$% |
| 7412 |
\hb@xt@\z@ {\hss$\bigcirc$\hss}% |
| 7413 |
\lower .2ex \hb@xt@\z@ {\hss$\scriptscriptstyle #1$\hss}% |
| 7414 |
\raise .3ex \hb@xt@\z@ {\hss${\cdot}\mkern 2mu{\cdot}$\hss}% |
| 7415 |
$\hfil}% |
| 7416 |
\spacefactor\count@ |
| 7417 |
}} |
| 7418 |
% \end{macrocode} |
| 7419 |
% \end{macro} |
| 7420 |
% |
| 7421 |
% End of the module for the \packlass{\cdpaddon} package. |
| 7422 |
% \begin{macrocode} |
| 7423 |
%</addon> |
| 7424 |
% \end{macrocode} |
| 7425 |
% \noindent\null\par |
| 7426 |
% |
| 7427 |
% \section{The code for the \protect\packlass{\cdpbabel} package} |
| 7428 |
% |
| 7429 |
% This part of the file goes into \filedir{\cdpbabel.sty}. |
| 7430 |
% \begin{macrocode} |
| 7431 |
%<*babel> |
| 7432 |
% \end{macrocode} |
| 7433 |
% |
| 7434 |
% \subsection{Identification} |
| 7435 |
% |
| 7436 |
% As usual, the reason for requesting this specific version of \LaTeXe\ is |
| 7437 |
% shrouded in mystery\ldots |
| 7438 |
% \begin{macrocode} |
| 7439 |
\NeedsTeXFormat{LaTeX2e}[1998/09/02] % LaTeX2e is required! |
| 7440 |
\ProvidesPackage{cdpbabel} |
| 7441 |
[2018/02/08 v0.36d (development)] |
| 7442 |
\@ifdefinable\@cdpbabel{\def\@cdpbabel{cdpbabel}} |
| 7443 |
% \end{macrocode} |
| 7444 |
% |
| 7445 |
% \subsection{Initial code} |
| 7446 |
% |
| 7447 |
% Usual check for availability of names. |
| 7448 |
% \begin{macrocode} |
| 7449 |
\def\do#1{\@ifdefinable #1{\let #1\@empty}} |
| 7450 |
\do\@cdpbabel@perform@redefinitions |
| 7451 |
\do\@cdpbabel@letter@names |
| 7452 |
\do\@cdpbabel@artlet@names |
| 7453 |
% \end{macrocode} |
| 7454 |
% |
| 7455 |
% \subsection{Declaration of options} |
| 7456 |
% |
| 7457 |
% Options specify which languages should be activated. A language option is |
| 7458 |
% both passed on to the \packlass{\babel} package and used to select and |
| 7459 |
% load a ``C.D.P. language definition file''. |
| 7460 |
% \begin{macrocode} |
| 7461 |
\DeclareOption*{% |
| 7462 |
\IfFileExists{cdpnames\CurrentOption.ldf}{% |
| 7463 |
\input{cdpnames\CurrentOption.ldf}% |
| 7464 |
% \end{macrocode} |
| 7465 |
% If \( "\CurrentOption" = \mbox{\opz{italian}} \), say, |
| 7466 |
% then the following amounts to |
| 7467 |
%\begin{verbatim} |
| 7468 |
%\def\do#1{\g@addto@macro\@cdpbabel@perform@redefinitions{% |
| 7469 |
% \addto\captionsitalian{#1}% |
| 7470 |
%}} |
| 7471 |
%\end{verbatim} |
| 7472 |
% which is used just below with parameter~\#1 set equal to |
| 7473 |
% \emph{the expansion of} either "\@cdpbabel@letter@names" or |
| 7474 |
% "\@cdpbabel@artlet@names". |
| 7475 |
% \begin{macrocode} |
| 7476 |
\edef\do##1{% |
| 7477 |
\noexpand\g@addto@macro |
| 7478 |
\noexpand\@cdpbabel@perform@redefinitions |
| 7479 |
{% |
| 7480 |
\noexpand\addto \csname captions\CurrentOption \endcsname |
| 7481 |
{##1}% |
| 7482 |
}% |
| 7483 |
}% |
| 7484 |
\@ifclassloaded{letteracdp}{% |
| 7485 |
\expandafter\do \expandafter{\@cdpbabel@letter@names}% |
| 7486 |
}{}% |
| 7487 |
\@ifclassloaded{articoletteracdp}{% |
| 7488 |
\expandafter\do \expandafter{\@cdpbabel@artlet@names}% |
| 7489 |
}{}% |
| 7490 |
\PackageInfo{\@cdpbabel}{% |
| 7491 |
Redefined the names of "C.D.P. Bundle" captions\MessageBreak |
| 7492 |
for the language `\CurrentOption'% |
| 7493 |
}% |
| 7494 |
}{% |
| 7495 |
\PackageError{\@cdpbabel}{% |
| 7496 |
Name def. file `cdpnames\CurrentOption.ldf' not found% |
| 7497 |
}{% |
| 7498 |
Files of the form `cdpnames<language>.ldf' are meant |
| 7499 |
to define the names\MessageBreak |
| 7500 |
in the language <language> of some captions used by |
| 7501 |
the "C.D.P. Bundle".\MessageBreak |
| 7502 |
You requested\MessageBreak |
| 7503 |
\space\space<language> = `\CurrentOption',\MessageBreak |
| 7504 |
but the corresponding file is missing; therefore, |
| 7505 |
probably some of these\MessageBreak |
| 7506 |
captions will not be printed as intended.\MessageBreak |
| 7507 |
This error affects only the \@cdpbabel\space package, |
| 7508 |
but not the babel package.\MessageBreak |
| 7509 |
You may continue: |
| 7510 |
type \space <return> \space to proceed.% |
| 7511 |
}% |
| 7512 |
}% |
| 7513 |
\PassOptionsToPackage{\CurrentOption}{babel}% |
| 7514 |
} |
| 7515 |
% \end{macrocode} |
| 7516 |
% |
| 7517 |
% \subsection{Option processing} |
| 7518 |
% |
| 7519 |
% \mbox{$*$-form} of "\ProcessOptions" required here. |
| 7520 |
% \begin{macrocode} |
| 7521 |
\ProcessOptions* |
| 7522 |
% \end{macrocode} |
| 7523 |
% Now, the following are no longer needed. |
| 7524 |
% \begin{macrocode} |
| 7525 |
\let \do = \@undefined |
| 7526 |
\let \@cdpbabel@letter@names = \@undefined |
| 7527 |
\let \@cdpbabel@artlet@names = \@undefined |
| 7528 |
% \end{macrocode} |
| 7529 |
% |
| 7530 |
% \subsection{Package loading} |
| 7531 |
% |
| 7532 |
% Note that the \packlass{\cdpbabel} package is loaded \emph{instead} of |
| 7533 |
% \packlass{\babel}. |
| 7534 |
% \begin{macrocode} |
| 7535 |
\RequirePackage{babel} |
| 7536 |
% \end{macrocode} |
| 7537 |
% |
| 7538 |
% \subsection{Main code} |
| 7539 |
% |
| 7540 |
% At this point, "\@cdpbabel@perform@redefinitions" contains exactly the |
| 7541 |
% set of "\addto\captions"\meta{language}"{"\ldots"}" commands that need |
| 7542 |
% to be executed for the languages that have been specified in the options. |
| 7543 |
% So, execute them. |
| 7544 |
% \begin{macrocode} |
| 7545 |
\@cdpbabel@perform@redefinitions |
| 7546 |
% \end{macrocode} |
| 7547 |
% After that, "\@cdpbabel@perform@redefinitions" is no longer needed. |
| 7548 |
% \begin{macrocode} |
| 7549 |
\let \@cdpbabel@perform@redefinitions = \@undefined |
| 7550 |
% \end{macrocode} |
| 7551 |
% |
| 7552 |
% End of the module for the \packlass{\cdpbabel} package. |
| 7553 |
% \begin{macrocode} |
| 7554 |
%</babel> |
| 7555 |
% \end{macrocode} |
| 7556 |
% \noindent\null\par |
| 7557 |
% |
| 7558 |
% \section{Definition and configuration files} |
| 7559 |
% |
| 7560 |
% This section contains the ancillary files (definition and |
| 7561 |
% configuration files) used by the \packlass{\cdpaddon} and |
| 7562 |
% the \packlass{\cdpbabel} packages. |
| 7563 |
% |
| 7564 |
% \subsection{The \protect\filedir{\example} file} |
| 7565 |
% |
| 7566 |
% This part of the file goes into the prototype definition file |
| 7567 |
% \filedir{\example}. All comments are left in the code because this |
| 7568 |
% file is intended as an example of how to write color definition files |
| 7569 |
% for the \packlass{\cdpaddon} package. |
| 7570 |
% \begin{macrocode} |
| 7571 |
%<*example> |
| 7572 |
%%% |
| 7573 |
%%% The "\ProvidesFile" command allows LaTeX to check the name and |
| 7574 |
%%% the release date of the file; if either differs from what the |
| 7575 |
%%% user requested, a warning is issued when the file is loaded. |
| 7576 |
%%% This helps to pinpoint old files as well as files which have been |
| 7577 |
%%% installed incorrectly. It is not mandatory to include this |
| 7578 |
%%% command in a file, and you can omit it from your definition files |
| 7579 |
%%% if you want (but including it is more elegant); however, if you do |
| 7580 |
%%% leave this command in your definition files, you should modify |
| 7581 |
%%% both its mandatory and its optional argument so that they reflect |
| 7582 |
%%% the name and the release date, respectively, of your file. |
| 7583 |
%%% Note that the extension ".def" must be included in the file name, |
| 7584 |
%%% and that the date is in the format YYYY/MM/DD. |
| 7585 |
\ProvidesFile{cdpshues-example.def}[2018/02/08 Printer-dependent file] |
| 7586 |
%%% |
| 7587 |
%%% Define here the colors to use to draw the C.D.P. seal; |
| 7588 |
%%% "slight@col" is the color used to paint the inner of the D and |
| 7589 |
%%% of the P, "strong@col" is the color used to draw the lines. |
| 7590 |
%%% The colors are defined by means of the usual "\definecolor" |
| 7591 |
%%% command, which is part of the standard color package. The colors |
| 7592 |
%%% defined here, of course, are just a silly example. |
| 7593 |
\definecolor{slight@col}{named}{SpringGreen} |
| 7594 |
\definecolor{strong@col}{named}{OliveGreen} |
| 7595 |
%</example> |
| 7596 |
% \end{macrocode} |
| 7597 |
% |
| 7598 |
% \subsection{The \protect\filedir{\epson} file} |
| 7599 |
% |
| 7600 |
% This part of the file goes into the definition file |
| 7601 |
% \filedir{\epson}. |
| 7602 |
% \begin{macrocode} |
| 7603 |
%<*epson> |
| 7604 |
\ProvidesFile{epson-stylus-740.def}[2018/02/08 Printer-dependent file] |
| 7605 |
\definecolor{slight@col}{rgb}{.8,1,.8} |
| 7606 |
\definecolor{strong@col}{rgb}{0,.266667,0} |
| 7607 |
%</epson> |
| 7608 |
% \end{macrocode} |
| 7609 |
% |
| 7610 |
% \subsection{The \protect\filedir{\hplj} file} |
| 7611 |
% |
| 7612 |
% This part of the file goes into the definition file \filedir{\hplj}. |
| 7613 |
% \begin{macrocode} |
| 7614 |
%<*hplj> |
| 7615 |
\ProvidesFile{hp-laserjet-4500.def}[2018/02/08 Printer-dependent file] |
| 7616 |
\definecolor{slight@col}{cmyk}{.1,0,.1,0} |
| 7617 |
\definecolor{strong@col}{cmyk}{.5,0,.5,.5} |
| 7618 |
%</hplj> |
| 7619 |
% \end{macrocode} |
| 7620 |
% |
| 7621 |
% \subsection{The \protect\filedir{\cdpshues} file} |
| 7622 |
% |
| 7623 |
% This part of the file goes into the configuration file |
| 7624 |
% \filedir{\cdpshues}. Again, we leave all comments in the generated |
| 7625 |
% file because they are meant to help the final user to modify the file. |
| 7626 |
% \begin{macrocode} |
| 7627 |
%<*config> |
| 7628 |
%%% |
| 7629 |
%%% The argument of the "\DeclareCDPSealHuesDefault" command contains |
| 7630 |
%%% the name (w/o extension) of the default color definition file: |
| 7631 |
\DeclareCDPSealHuesDefault{cdpshues} |
| 7632 |
|
| 7633 |
==================== |
| 7634 |
EXPLANATORY COMMENTS |
| 7635 |
==================== |
| 7636 |
|
| 7637 |
This file is special in that the cdpaddon package stops reading it as |
| 7638 |
soon as it encounters the first "\DeclareCDPSealHuesDefault" command: |
| 7639 |
all subsequent lines are ignored, and can hence contain explanatory |
| 7640 |
comments, just like these. To save disk space (although, in this era |
| 7641 |
of terabytes, this is not a compelling issue!), you can, if you want, |
| 7642 |
delete all lines in this file except the one which contains the first |
| 7643 |
occurrence of a "\DeclareCDPSealHuesDefault" command (12 lines above); |
| 7644 |
but if you do so, please be sure to read them before deleting them! |
| 7645 |
(Anyway, I think it is a good idea to leave the comments in place.) |
| 7646 |
|
| 7647 |
The "\DeclareCDPSealHuesDefault" command has one argument, in which |
| 7648 |
you should put the name of a default file from which the definitions |
| 7649 |
of the hues for the C.D.P. seal are read when no other file has been |
| 7650 |
indicated in the options passed to the cdpaddon package. Note that |
| 7651 |
the extension ".def" is automatically added to the name; therefore, |
| 7652 |
you **must** leave it out in the name given as the argument of the |
| 7653 |
"\DeclareCDPSealHuesDefault" command. |
| 7654 |
|
| 7655 |
The C.D.P. Bundle comes with some definition files already included; |
| 7656 |
their names are listed below, without the extension ".def" (each one |
| 7657 |
is packaged in a "\DeclareCDPSealHuesDefault" command): |
| 7658 |
|
| 7659 |
\DeclareCDPSealHuesDefault{cdpshues-example} |
| 7660 |
\DeclareCDPSealHuesDefault{epson-stylus-740} |
| 7661 |
\DeclareCDPSealHuesDefault{hp-laserjet-4500} |
| 7662 |
|
| 7663 |
To make one of these files the default one, copy (or move) the line |
| 7664 |
containing its name to the top of the file, so that its becomes the |
| 7665 |
first line (yes, even above the opening comments, those four dozens |
| 7666 |
lines starting with "%%": let us keep things easy!). |
| 7667 |
|
| 7668 |
If you write a new definition file, you can make it the default by |
| 7669 |
writing a similar "\DeclareCDPSealHuesDefault" command and putting it |
| 7670 |
in the first line of this file (above the opening comments, why not). |
| 7671 |
Remember that only the first such command appearing in this file is |
| 7672 |
taken into consideration: all subsequent lines are ignored. |
| 7673 |
|
| 7674 |
%</config> |
| 7675 |
% \end{macrocode} |
| 7676 |
% |
| 7677 |
% \subsection{The \protect\filedir{\cdpnamesenglish} file} |
| 7678 |
% |
| 7679 |
% This part of the file goes into the language definition file |
| 7680 |
% \filedir{\cdpnamesenglish}. |
| 7681 |
% \begin{macrocode} |
| 7682 |
%<*lang-en> |
| 7683 |
\ProvidesFile{cdpnamesenglish.ldf}[2018/02/08] |
| 7684 |
\def\@cdpbabel@letter@names{% |
| 7685 |
\def\subjectname {Subject:}% |
| 7686 |
\def\registeredname {Registered}% |
| 7687 |
\def\registeredRRname {\registeredname~R.R.}% |
| 7688 |
\def\andccname {cc}% |
| 7689 |
\def\ccname {cc:}% |
| 7690 |
\def\enclname {Encl:}% |
| 7691 |
\def\PSname {P.S.:}% |
| 7692 |
\def\headtoname {To:}% |
| 7693 |
\def\lettername {Letter}% |
| 7694 |
} |
| 7695 |
\def\@cdpbabel@artlet@names{% |
| 7696 |
\def\contentsname {Contents}% |
| 7697 |
\def\listfigurename {List of figures}% |
| 7698 |
\def\listtablename {List of tables}% |
| 7699 |
%% \def\refname {References}% |
| 7700 |
%% \def\indexname {Index}% |
| 7701 |
%% \def\figurename {Figure}% |
| 7702 |
%% \def\tablename {Table}% |
| 7703 |
} |
| 7704 |
%</lang-en> |
| 7705 |
% \end{macrocode} |
| 7706 |
% |
| 7707 |
% \subsection{The \protect\filedir{\cdpnamesitalian} file} |
| 7708 |
% |
| 7709 |
% This part of the file goes into the language definition file |
| 7710 |
% \filedir{\cdpnamesitalian}. |
| 7711 |
% \begin{macrocode} |
| 7712 |
%<*lang-it> |
| 7713 |
\ProvidesFile{cdpnamesitalian.ldf}[2018/02/08] |
| 7714 |
\def\@cdpbabel@letter@names{% |
| 7715 |
\def\subjectname {Oggetto:}% |
| 7716 |
\def\registeredname {Raccomandata}% |
| 7717 |
\def\registeredRRname {\registeredname~A.R.}% |
| 7718 |
\def\andccname {e~p.~c.}% |
| 7719 |
\def\ccname {P.~c.:}% |
| 7720 |
\def\enclname {Allegati:}% |
| 7721 |
\def\PSname {P.S.:}% |
| 7722 |
\def\headtoname {A:}% |
| 7723 |
\def\lettername {Lettera}% |
| 7724 |
} |
| 7725 |
\def\@cdpbabel@artlet@names{% |
| 7726 |
\def\contentsname {Sommario}% |
| 7727 |
\def\listfigurename {Indice delle figure}% |
| 7728 |
\def\listtablename {Indice delle tabelle}% |
| 7729 |
\def\refname {Testi citati}% |
| 7730 |
%% \def\indexname {Indice analitico}% |
| 7731 |
%% \def\figurename {Figura}% |
| 7732 |
%% \def\tablename {Tabella}% |
| 7733 |
} |
| 7734 |
%</lang-it> |
| 7735 |
% \end{macrocode} |
| 7736 |
% |
| 7737 |
% \section{End of input} |
| 7738 |
% |
| 7739 |
% The usual "\endinput" which prevents the \DS\ program from putting |
| 7740 |
% garbage into the generated files. |
| 7741 |
% \begin{macrocode} |
| 7742 |
\endinput |
| 7743 |
% \end{macrocode} |
| 7744 |
% |
| 7745 |
% \Finale |
| 7746 |
% |