summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/cdpbundl/cdpbundl.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-02-11 00:11:40 +0000
committerKarl Berry <karl@freefriends.org>2015-02-11 00:11:40 +0000
commit13e3251ec8da9abe378dd662a288d2261ae9b8c0 (patch)
treeb89235b38a35350bc55dd9fff1d8b0107a7cb08c /Master/texmf-dist/source/latex/cdpbundl/cdpbundl.dtx
parent06035cd2a957fc5063b466c181f360a743fc9d0a (diff)
cdpbundl (9feb15)
git-svn-id: svn://tug.org/texlive/trunk@36255 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/cdpbundl/cdpbundl.dtx')
-rw-r--r--Master/texmf-dist/source/latex/cdpbundl/cdpbundl.dtx2445
1 files changed, 1779 insertions, 666 deletions
diff --git a/Master/texmf-dist/source/latex/cdpbundl/cdpbundl.dtx b/Master/texmf-dist/source/latex/cdpbundl/cdpbundl.dtx
index 01d80c3291d..7177a03f800 100644
--- a/Master/texmf-dist/source/latex/cdpbundl/cdpbundl.dtx
+++ b/Master/texmf-dist/source/latex/cdpbundl/cdpbundl.dtx
@@ -5,7 +5,8 @@
%
% This file is part of a work named "C.D.P. Bundle".
%
-% Copyright (C) 1999-2006 by Gustavo MEZZETTI <mezzetti@math.unipd.it>.
+% Copyright (C) 1999-2015 by Gustavo MEZZETTI
+% <gustavo.mezzetti@istruzione.it>.
%
% The C.D.P. Bundle may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -13,7 +14,7 @@
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
+% version 2005/12/01 or later.
%
% The C.D.P. Bundle has the LPPL maintenance status
% "author-maintained".
@@ -31,14 +32,16 @@
% \fi
%
% \def\filename{cdpbundl.dtx}
-% \def\fileversion{0.34}
-% \def\filedate{2006/01/01}
-% \def\docdate {2006/01/01}
-% \def\doclongdate{January~1, 2006}
+% \def\fileversion{0.36}
+% \def\filedate{2015/02/08}
+% \def\docdate {2015/02/08}
+% \def\doclongdate{February~8, 2015}
%
-% \CheckSum{4829}
+% \CheckSum{4984}
%
-% \changes{0.30}{2001 Jul 01}{First release of the C.D.P. Bundle}
+% \DeclareRobustCommand*{\Bundle}{C.D.P. Bundle}
+%
+% \changes{0.30}{2001 Jul 01}{First release of the \Bundle}
% \changes{0.31}{2001 Dec 01}{Added support for the \protect\opz{usePS}
% option in the \protect\packlass{\protect\cdpaddon} package}
% \changes{0.32}{2002 Jul 01}{Removed support for the \protect\opz{usePS}
@@ -46,13 +49,39 @@
% \changes{0.33}{2005 Jan 01}{Reorganized code of the
% \protect\packlass{\protect\articoletteracdp} class and of the
% \protect\packlass{\protect\cdpaddon} package to make it compatible
-% with the \protect\packlass{\protect\hyperref} package}
+% with the \protect\packlass{\protect\HyperRef} package}
% \changes{0.34}{2006 Jan 01}{Improved interaction with the
-% \protect\packlass{\protect\hyperref} package}
+% \protect\packlass{\protect\HyperRef} package}
% \changes{0.34}{2006 Jan 01}{Corrected positioning of floats
% in float pages}
% \changes{0.34}{2006 Jan 01}{Added \protect\texttt{\protect\bslash place}
% command}
+% \changes{0.35}{About 2013}{Never publicly released. Some of the changes
+% listed below for vers.~0.36 were actually introduced in this version.}
+% \changes{0.36}{2015 Feb 08}{Added \protect\texttt{\protect\bslash
+% OpeningSequence} command and related macros, in part.\
+% the \protect\texttt{\protect\bslash ChosenMakeOpening} hook.}
+% \changes{0.36}{2015 Feb 08}{Added \protect\texttt{\protect\bslash
+% ClosingSequence} command and related macros, in particular
+% \protect\texttt{\protect\bslash ChosenMakeClosing} and
+% \protect\texttt{\protect\bslash ChosenMakeSignature}.}
+% \changes{0.36}{2015 Feb 08}{Eventually added functionality to the
+% \protect\packlass{\protect\cdpaddon} package to support user-defined
+% letterheads.}^^A
+% \changes{0.36}{2015 Feb 08}{Added \protect\relax the
+% \protect\opz{signaturerule} option, and its related stuff
+% (the \protect\texttt{\protect\bslash signaturerule} command,
+% the \protect\texttt{\protect\bslash signaturerulewidth} parameter),
+% to support rules that mark where to sign by hand.}
+% \changes{0.36}{2015 Feb 08}{Delegated to a new command
+% (\protect\texttt{\protect\bslash foldingtagrule}) the task of drawing
+% the sign that shows where the sheet is to be folded.}
+% \changes{0.36}{2015 Feb 08}{Removed the \protect\packlass{\protect\adiseal}
+% package and the \protect\packlass{\protect\lettcdpadi} document class.}
+% \changes{0.36}{2015 Feb 08}{Tidied up in several points the code of the
+% \protect\packlass{\protect\cdpaddon} package.}
+% \changes{0.36}{2015 Feb 08}{Added \protect\packlass{\protect\cdpbabel}
+% package and related language definition files for English and Italian.}
%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -102,13 +131,19 @@
% \newcommand*{\adiseal}{adiseal}
% \newcommand*{\lettcdpadi}{lettcdpadi}
% \newcommand*{\cdpaddon}{cdpaddon}
-% \newcommand*{\hyperref}{hyperref}
+% \newcommand*{\cdpbabel}{cdpbabel}
+% \newcommand*{\babel}{babel}
+% \newcommand*{\HyperRef}{hyperref}
+% \newcommand*{\pictee}{pict2e}
% \newcommand*{\epsfig}{epsfig}
+% \newcommand*{\cdpnamesenglish}{cdpnamesenglish.ldf}
+% \newcommand*{\cdpnamesitalian}{cdpnamesitalian.ldf}
% \newcommand*{\example}{cdpshues-example.def}
% \newcommand*{\epson}{epson-stylus-740.def}
% \newcommand*{\hplj}{hp-laserjet-4500.def}
% \newcommand*{\cdpshues}{cdpshues.cfg}
-% \newcommand*{\textoken}[1]{\( \langle\mbox{\normalfont #1}\rangle \)}
+% \newcommand*{\textoken}[1]{\(\langle\mbox{\normalfont #1}\rangle\)}
+% \newcommand*{\param}[1]{\(\mbox{\##1}\leftarrow {\,}\)}
% \makeatletter
% \newcommand*{\myspecialindex}[2]
% {\special@index{#1\actualchar#2\encapchar main}}
@@ -116,49 +151,69 @@
% \newcommand*{\counterindex}[1]{\myspecialindex{#1}{{\string\ttfamily
% \space #1} (counter)}\index{counters:\levelchar{\protect\ttfamily
% #1}\encapchar usage}}
-% \newcommand*{\optuseindex}[1]{\SortIndex{#1}{\protect\opz{#1}
+% \newcommand*{\optuseindex}[1]{\SortIndex{#1}{\protect\opz{#1}^^A
% (option)\encapchar usage}\index{options:\levelchar
% \protect\opz{#1}\encapchar usage}}
% \newcommand*{\opz}[1]{{\normalfont\ttfamily #1}}
% \newcommand*{\iopz}[1]{$\mbox{\opz{#1}}\optuseindex{#1}}
% \newcommand*{\eopz}[1]{\mathbin{|}\mbox{\opz{#1}}\optuseindex{#1}}
% \newcommand*{\fopz}{$}
-% \newcommand*{\packlass}[1]{{\normalfont\ttfamily #1}}
+% \newcommand*{\packlass}[1]{{\normalfont\sffamily #1}}
% \newcommand*{\filedir}[1]{{\normalfont\ttfamily #1}}
% \newcommand*{\env}[1]{{\normalfont\ttfamily #1}}
% \newcommand*{\cnt}[1]{{\normalfont\ttfamily #1}}
% \newcommand*{\sty}[1]{{\normalfont\ttfamily #1}}
% \newcommand*{\eqref}[1]{(\ref{#1})}
+% \newcommand*{\strongemph}[1]{\textbf{#1}}
+% \newcommand*{\zerolistvertspaces}{^^A
+% \setlength{\parskip}{0pt}^^A
+% \setlength{\topsep}{\parskip}^^A
+% \setlength{\partopsep}{\parskip}^^A
+% }
+% \newcommand*{\closeofsentencespace}{\spacefactor \sfcode `. \space}
%
-% \DeclareFixedFont{\lhnss}{OT1}{cmss}{m}{n} {12}
-% \DeclareFixedFont{\lhbss}{OT1}{cmss}{m}{n} {17}
-% \DeclareFixedFont{\lhrm} {OT1}{cmr} {m}{n} {9}
-% \DeclareFixedFont{\lhit} {OT1}{cmr} {m}{it}{9}
-% \DeclareFixedFont{\lhtt} {OT1}{cmtt}{m}{n} {9}
+% \DeclareFixedFont{\lhnss}{T1}{cmss}{m}{n} {12}
+% \DeclareFixedFont{\lhbss}{T1}{cmss}{m}{n} {17}
+% \DeclareFixedFont{\lhrm} {T1}{cmr} {m}{n} {9}
+% \DeclareFixedFont{\lhit} {T1}{cmr} {m}{it}{9}
+% \DeclareFixedFont{\lhtt} {T1}{cmtt}{m}{n} {9}
%
%
%
% \title{
-% The C.D.P.~Bundle\thanks{This file has version
+% The \Bundle\thanks{This file has version
% \fileversion, release date \filedate;
% last documentation update: \docdate.
-% Copyright \copyright~1999--2006 by G.~Mezzetti
+% Copyright \copyright~1999--2015 by G.~Mezzetti
% (see page~\pageref{S:Copy}).}
% }
% \author{G. Mezzetti}
% \date{\doclongdate}
%
+% \makeatletter
+% \@ifundefined{hypersetup}{}{
+% \hypersetup{
+% pdftitle = {The C.D.P. Bundle},
+% pdfauthor = {G. Mezzetti},
+% pdfsubject = {Documentation of the C.D.P. Bundle},
+% pdfkeywords = {letter, letterhead},
+% pdfcreationdate = {D:20150208120000},
+% pdfmoddate = {D:20150208120000}
+% }
+% }
+% \makeatother
+%
% \maketitle
%
% \begin{abstract}
% A bundle of \LaTeX\ (former \LaTeXe) classes and packages is
-% described, which is used by the \emph{Coordinamento dei Dottorandi e
+% described, which was used by the \emph{Coordinamento dei Dottorandi e
% dei Dottori di Ricerca dell'Universit\`{a} di Padova} (a free and
% informal association of Ph.D. students and Ph.D.'s at the
% university of Padua, Italy) to write its ``official'' letters.
-% These classes and packages take care of formatting the letters as
+% These classes and packages took care of formatting the letters as
% required by the standards of this association; in particular, they
-% make it very easy to include its seal, both in black-and-white and
+% made it very easy to include its seal, both in black-and-white and
% in color, at the top of pages.
% \end{abstract}
%
@@ -175,14 +230,14 @@
% \label{S:Copy}
% \vspace{-\parskip}
%
-% Copyright \copyright~1999--2006 by Gustavo \textsc{Mezzetti}. All
+% Copyright \copyright~1999--2015 by Gustavo \textsc{Mezzetti}. All
% rights are reserved, except as noted below.
%
% This document has been produced by feeding to a \LaTeX\ typesetting
% engine the file \filedir{\filename} version \fileversion\ (\docdate).
-% This file is part of a work named ``C.D.P. Bundle''.
+% This file is part of a work named ``\Bundle''.
%
-% The C.D.P. Bundle may be distributed and/or modified under the
+% The \Bundle\ may be distributed and/or modified under the
% conditions of the \LaTeX\ Project Public License, either version~1.3
% of this license or (at your option) any later version. The latest
% version of this license is in
@@ -191,12 +246,12 @@
% http://www.latex-project.org/lppl.txt
% \end{list}
% and version~1.3 or later is part of all distributions of \LaTeX\
-% version 2003/12/01 or later.
+% version 2005/12/01 or later.
%
-% The C.D.P. Bundle has the LPPL maintenance status ``author-maintained''.
+% The \Bundle\ has the LPPL maintenance status ``author-maintained''.
%
-% The file \filedir{manifest.txt} included in the C.D.P. Bundle
-% specifies what the C.D.P. Bundle consists of; more precisely,
+% The file \filedir{manifest.txt} included in the \Bundle\
+% specifies what the \Bundle\ consists of; more precisely,
% it explains how the locutions ``Work'' and ``Compiled Work'',
% used in the \LaTeX\ Project Public License, are to be interpreted
% in the case of this work.
@@ -205,23 +260,23 @@
% by any means (\emph{e.g.}, photocopying, direct printing from the
% electronic version, and so on).
%
-% Note, anyway, that the distribution of the file \filedir{\filename}
-% alone is ``distribution of only part of the Work'' in the sense of
-% the \LaTeX\ Project Public License, and is not allowed: you must
-% distribute it together with all other files in the C.D.P. Bundle
-% (see the file \filedir{manifest.txt}).
+% Note, though, that distribution of this document alone is
+% ``distribution of only part of the Work'' in the sense of the
+% \LaTeX\ Project Public License, and should therefore be avoided:
+% please distribute, in addition, the source file \filedir{\filename}
+% together with all other files listed in \filedir{manifest.txt},
+% as explained in the file \filedir{manifest.txt} itself and also in
+% Subsection~\ref{sS:License} on page~\pageref{sS:License}, to which you
+% are referred for more information.
%
-% See Subsection~\ref{sS:License} on page~\pageref{sS:License} for
-% more information.
-%
-% \section*{Author's addresses}
+% \section*{Author's address}
% \vspace{-\parskip}
%
% The recommended way to contact the author is by e-mail; his address is:
%
% \begin{list}{\setlength{\topsep}{0pt}}\item\relax
-% \ttfamily
-% mezzetti@math.unipd.it
+% \href{mailto:gustavo.mezzetti@istruzione.it}
+% {\nolinkurl{gustavo.mezzetti@istruzione.it}}
% \end{list}
%
% Please include the \emph{exact} phrase \verb*|C.D.P. Bundle| in the
@@ -231,16 +286,6 @@
% forbid the use of the above address for any kind of advertising,
% marketing, polling, or similar commercial or statistical contact.
%
-% If you have no e-mail access, write to:
-%
-% \begin{list}{\setlength{\topsep}{0pt}}\item\relax
-% Gustavo \textsc{Mezzetti}\\
-% Dip.\ di Matematica Pura e Applicata\\
-% Via G.~Belzoni, 7\\
-% I--35128\quad PADOVA\\
-% Italy
-% \end{list}
-%
% \endgroup
%
%
@@ -254,19 +299,19 @@
%
% The \emph{Coordinamento dei Dottorandi e dei Dottori di Ricerca
% dell'Universit\`a di Padova} (henceforth simply referred to as
-% ``\emph{Coordinamento}'') is a free association of Ph.D.'s and Ph.D.
-% students who took their degree, or are still studying, at the
+% ``\emph{Coordinamento}'') was a free association of Ph.D.'s and Ph.D.
+% students who took their degree, or were studying for it, at the
% University of Padova (Padua), Italy. Discussing its precise nature is
-% completely outside the scope of this document;\footnote{Readers who
-% are interested in learning precisely what the \emph{Coordinamento}
-% is should refer to the following web page:
-% \texttt{http://www.dei.unipd.it/\~{}assdott/}.} the only thing that
-% concerns us here is that it writes letters of a somewhat
-% ``official'' kind, which, for this reason, must bear its letterhead
-% on the top of their first page. These classes and packages serve to
-% prepare this kind of letters: they can print the letterhead, both in
-% black-and-white and in color, depending on what the user requires,
-% but they can do many other things too.
+% completely outside the scope of this document; the only thing that
+% concerns us here is that it wrote letters of a somewhat
+% ``official'' kind, which, for this reason, had to bear its letterhead
+% on the top of their first page. The classes and packages herein described
+% were used for preparing this kind of letters, automatically taking care of
+% printing the letterhead; but besides this, they incorporated much more
+% functionality than the standard \packlass{letter} \LaTeX\ class,
+% and it was precisely this additional functionality that proved useful
+% also in more general contexts, thus determining the adoption of the
+% \Bundle\ in (certain niches of) the \LaTeX\ community.
%
% \subsection{Credits and disclaimer}
%
@@ -319,17 +364,60 @@
% format; if you are not a \LaTeX\ hacker, this part will not mean
% anything to you.
%
-% \subsubsection{English, of course!}
-%
-% This document, as you can see, is written in English, although the
-% software it describes is intended mainly for Italian users, and was
-% actually developed for a specific application limited to an Italian
-% university (Padua). Previous versions of this document used to
-% contain in this place a section that, in a somewhat apologetic tone,
-% offered various reasons in support of the choice of English. Since
-% the inclusion of the C.D.P. Bundle in the Comprehensive \TeX\ Archive
-% Network, however, there is no longer need to justify what now looks
-% simply an obliged choice, due to the international nature of the CTAN.
+% \subsection{About this release: a provisional patch}
+%
+% The \Bundle\ was essentially written between 1999 and 2000 (for
+% an Italian audience), and even at that time it contained code that was
+% already deprecated; even worse, its design was flawed since the
+% beginning, because it had been conceived for a specific and limited
+% application (the letters of the C.D.P., exactly), and was adapted for
+% more general use only as an afterthought.
+%
+% A thorough redesign would therefore be needed; on the other hand, some
+% users have suggested, or asked for, improvements and additions, in
+% particular for what concerns the use of the bundle with other
+% languages besides Italian, that can be implemented rather easily by
+% means of provisional patches. I~have already been deferring the
+% introduction of these comparatively harmless enhancements for five
+% years, waiting for the right moment to undertake the task of
+% redesigning the bundle from scratch, but now I~have resolved to simply
+% patch up the existing version.
+%
+% The macros presented in this document, therefore, are far from being
+% optimal: no serious attempt has been made to remove ``fossil'' code, nor
+% to bring it up to date with modern \LaTeX\ usage. The only exception to
+% this is a small change that has been made to the fonts used to print the
+% letterhead of the \emph{Coordinamento}, switching them from OT1 encoding
+% to~T1---because this just required hitting the \meta{DEL} key half a dozen
+% of times!~^^A ( paren match
+% ;-)\closeofsentencespace Of course, nobody will
+% care about this, since the least likely reason for which you might want to
+% use the \Bundle\ is to produce that letterhead. For this same
+% motive, essentially, I~have also removed the \packlass{\adiseal} package
+% and the \packlass{\lettcdpadi} document class, of which, probably, nobody
+% besides me even remembers the purpose.
+%
+% Though\marginpar{\hfill\strongemph{$*{*}*\;$WOW!!$\;*{*}*$}},
+% ^^A Yes, I know, I should use \textasteriskcentered...
+% \strongemph{good news} are coming for all those users who asked
+% for a means to \strongemph{customize the letterhead} produced by the
+% \Bundle: a reasonably viable method for doing so has been provided
+% at last!~:-D\closeofsentencespace The method requires the use
+% of the \packlass{\cdpaddon} package, passing in the new option
+% \opz{customletterhead}. You specify the contents of your custom head and
+% foot by means of two new environments, called \env{customletterhead} and
+% \env{customletterfoot}, respectively, which are similar, to a certain
+% extent, to the \env{minipage} environment. This should give you maximum
+% freedom in designing the letterhead, whilst adopting an interface you are
+% surely well familiar with.
+% See Subsection~\ref{sS:Customization} for more information.
+%
+% Another nifty feature is the ability to draw a thin rule to guide your
+% hand in signing your letters: you ask for this behavior by passing the new
+% \opz{signaturerule} option to the \packlass{\letteracdp} document class.
+% See Subsection~\ref{sS:Options} for more information.
+%
+% Sorry, but for now I~cannot offer any more.
%
%
%
@@ -346,16 +434,16 @@
% how to generate this documentation; partial instructions on how to use
% the classes and packages contained in the bundle can be found
% in several documents written by the author
-% \cite{tutti,esempi,etichette,novita,nts,ver028,adi,cdpaddon,ver031}, but
-% a systematic user's manual is no longer foreseen.~\mbox{:-(}^^A ) match
-% \spacefactor\sfcode`. \space
+% \cite{tutti,esempi,etichette,novita,nts,ver028,cdpaddon,ver031,ver036},
+% but a systematic user's manual is no longer foreseen.~\mbox{:-(}^^A ) match
+% \closeofsentencespace
% Note that including in this document the instructions on how to generate
% the document itself may seem pretty useless, but actually isn't:
% you might be reading a copy obtained from another person.
%
-% \section{Installing the C.D.P. Bundle and generating this documentation}
+% \section{Installing the \Bundle\ and generating this documentation}
%
-% As usual for \LaTeX\ distributions, the C.D.P. Bundle is
+% As usual for \LaTeX\ distributions, the \Bundle\ is
% distributed in the form of a \filedir{.dtx} file, namely
% \filedir{cdpbundl.dtx}, and an accompanying \filedir{.ins} file,
% namely \filedir{cdpbundl.ins}.
@@ -367,14 +455,15 @@
% input files:
% \begin{quote}
% \ttfamily
-% \adiseal.sty\\
% \articoletteracdp.cls\\
% \cdpaddon.sty\\
+% \cdpbabel.sty\\
+% \cdpnamesenglish\\
+% \cdpnamesitalian\\
% \example\\
% \cdpshues\\
% \epson\\
% \hplj\\
-% \lettcdpadi.cls\\
% \letteracdp.cls
% \end{quote}
% To finish the installation, move them into a \LaTeX\ input
@@ -387,15 +476,18 @@
% of the file \filedir{cdpbundl.ins}. The documentation of your \TeX\
% installation should tell you how to find the \LaTeX\ input
% directory/ies, and probably also how to create new \LaTeX\ input
-% directories reserved to hold your private classes and packages. If
-% your \TeX\ installation offers you the chance of defining your
-% private \LaTeX\ input directories, I recommend you exploit this
-% possibility and place the generated files into such a directory.
+% directories reserved to hold your private classes and packages.
+%
+% Note that the TDS-compliant directory where the above files should be
+% put is
+% \begin{quote}
+% \texttt{tex/latex/cdpbundl/}
+% \end{quote}
%
% \subsection{Configuring the \packlass{\cdpaddon} package}
% \label{sS:config}
%
-% The \packlass{\cdpaddon} package is the part of the C.D.P. Bundle
+% The \packlass{\cdpaddon} package is the part of the \Bundle\
% that takes care of coloring the C.D.P. seal, which appears in
% black-and-white if you don't load this package. Experience by trial
% and error has shown that some configuration work may be necessary in
@@ -441,7 +533,7 @@
% best to use ``direct'' color models like \texttt{rgb} or
% \texttt{cmyk}, that allow you to drive the printer with precision:
% after all, it is exactly for this purpose that you are writing the
-% file! The other two definition files included in the C.D.P. Bundle
+% file. The other two definition files included in the \Bundle\
% illustrate the use of these color models.
%
% \subsubsection{Selecting a color definition file via an option}
@@ -454,19 +546,19 @@
% \langle\textit{bare file name}\rangle \) is the name of the
% definition file you want to load \emph{without} the extension
% \filedir{.def}. For example, to load a file called
-% \filedir{acme-wylejet.def}, you pass the option
-% \opz{printer:acme-wylejet}. Explicitly, you would write
-% \begin{verbatim}\usepackage[printer:acme-wylejet]{cdpaddon}\end{verbatim}
+% \filedir{acme-wilejet.def}, you pass the option
+% \opz{printer:acme-wilejet}. Explicitly, you would write
+% \begin{verbatim}\usepackage[printer:acme-wilejet]{cdpaddon}\end{verbatim}
% to load the \packlass{\cdpaddon} package and the color definitions
-% suitable for the ACME WyleJet printer (the printer preferred by
+% suitable for the ACME WileJet printer (the printer preferred by
% 8~coyotes out of~10). Similarly, to load the file
% \filedir{\example} you would write
% \begin{verbatim}\usepackage[printer:cdpshues-example]{cdpaddon}\end{verbatim}
% and so on. Of course, you can still specify, as well, the other
% options listed in~\cite{cdpaddon}: for instance,
-% \begin{verbatim}\usepackage[hypertext,printer:acme-wylejet]{cdpaddon}\end{verbatim}
+% \begin{verbatim}\usepackage[hypertext,printer:acme-wilejet]{cdpaddon}\end{verbatim}
% activates the hyperlinks and selects the colors for the
-% ACME WyleJet printer.
+% ACME WileJet printer.
%
% When no \opz{printer:}\ldots\ option is specified, a default
% definition file is loaded, as explained in the next section. For
@@ -500,7 +592,7 @@
% your configuration file, because the effect of any other command is
% undefined.
%
-% The \filedir{\cdpshues} file included in the C.D.P. Bundle contains
+% The \filedir{\cdpshues} file included in the \Bundle\ contains
% comments that help you to modify it in order to declare your
% personal default color definition file. The recommended way of
% doing this is:
@@ -524,81 +616,184 @@
% programmed to read the color definitions from a file called
% \filedir{cdpshues.def}, and this name was hard-coded in the package.
% To maintain compatibility with this version, the file
-% \filedir{\cdpshues} included in the C.D.P. Bundle designates as the
+% \filedir{\cdpshues} included in the \Bundle\ designates as the
% default color definition file exactly a file named
% \filedir{cdpshues.def}. Consequently, if you install the supplied
% files without making any change to them, the \packlass{\cdpaddon}
% package will continue to exhibit the old behavior, reading the
% legacy \filedir{cdpshues.def} file if you have one installed, and
% adopting the emergency colors otherwise. Note that no actual
-% \filedir{cdpshues.def} file is included in the C.D.P. Bundle.
-%
-% \subsection{The image of the ADI seal}
-%
-% The C.D.P. Bundle does \emph{not} include the file containing the
-% image of the ADI seal. The reason for this is purely legal: I~do
-% not own the copyright for the ADI seal, so I have no right to
-% distribute it under a license of my choice. But of course, without
-% this file it is impossible for the \packlass{\adiseal} package, the
-% part of the C.D.P. Bundle that has this task, to print, or display,
-% the seal. Since this is just a legal problem and not a \TeX nical one, I
-% cannot foresee how long it will take to solve it; perhaps I'll
-% never find a solution, because the problem does not depend on
-% me.
-%
-% However, by default the \packlass{\adiseal} package does \emph{not}
-% draw the ADI seal, but simply a placeholder; it will try to draw
-% the seal only if explicitly requested via the \opz{usepixmap} option
-% (see~\cite{adi}). This means that, by default, the package does
-% \emph{not} need the file with the image of the ADI seal, and will
-% try to access it only if invoked with the \opz{usepixmap} option;
-% moreover, this option will be ignored if the file cannot be found.
-% In conclusion, the \packlass{\adiseal} package can recover
-% gracefully even if the file is absent.
-%
-% The \packlass{\adiseal} package expects to find the image of the ADI
-% seal in a file in Encapsulated PostScript (EPS) format called
-% \filedir{\adiseal.eps}, unless PDF output is being generated, in
-% which case a file in Portable Document Format (PDF) named
-% \filedir{adiseal.pdf} is searched for instead. The image should be
-% exactly \( 60\,\mbox{bp} \) wide and \( 42\,\mbox{bp} \) tall;
-% larger images will be clipped, smaller images will not be well
-% aligned. The resolution is not fixed by the \packlass{\adiseal}
-% package, but of course the best results are obtained when it matches
-% the target printer resolution. I don't think that with this
-% information you will be able to manifacture the correct image by
-% yourself, but at least you can check whether a file you have got does
-% (not) fit!
-%
-% Of course, even if I cannot distribute it under the \LaTeX\
-% Project Public License, still I have prepared and made available on
-% the Web an ``official'' \filedir{\adiseal.eps} file (why didn't you
-% say it before, you'll say!): it can be found in
-% \begin{quote}
-% \ttfamily
-% \noindent
-% \rlap{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/adiseal.eps}
-% \end{quote}
-% Its resolution is \( 300\,\mbox{dpi} \), both vertical and
-% horizontal; the image is 250 pixels wide and 175 pixels tall, which,
-% at this resolution, correspond exactly to \( 60\,\mbox{bp} \) by \(
-% 42\,\mbox{bp} \). Again, I am sorry that you need to download this
-% file separately, but\ldots
-%
-% I have also prepared a special enhanced variation of the
-% \filedir{\adiseal.eps} file for use with O\kern-.03em
-% z\kern-.15em\TeX, Andrew Trevorrow's implementation of \TeX\ for the
-% Macintosh. This enhanced file enables O\kern-.03em z\kern-.15em\TeX\
-% to display the seal on its integrated previewer, and to print it
-% also on non-PostScript printers. To obtain this file, ask it
-% directly to me by e-mail; my address is:
-% \begin{quote}
-% \ttfamily
-% mezzetti@math.unipd.it
-% \end{quote}
-% Perhaps, in the future, I shall erect a mail filter to protect
-% myself from junk-mail, so be sure to cite the word
-% \texttt{\adiseal.eps} in the \emph{subject} of your message.
+% \filedir{cdpshues.def} file is included in the \Bundle.
+%
+% \subsection{Defining the captions for unsupported languages}
+%
+% Like many other document classes and packages, the classes and
+% packages of the \Bundle\ mark up some portions of the output they
+% produce by adding certain descriptive strings, that, by default, are
+% written in Italian. For example, when you have requested the
+% \sty{headings} page style, the name of the addressee, which is printed
+% atop pages, is preceded by the string ``\emph{A:}'' (=~``To:'');
+% similarly, when you issue the command "\tableofcontents" in a documents
+% that adopts the \packlass{\articoletteracdp} document class, the table it
+% produces is titled ``\emph{Sommario}'' (=~``Contents''); and so on.
+%
+% When the \Bundle\ was used only by the members of the
+% \emph{Coordinamento}, the Italian defaults it provided for those captions
+% were, of course, quite adequate; as long as its use remained circumscribed
+% to the Italian \LaTeX\ community, they were still acceptable; but now,
+% questions about how to adapt the \Bundle\ to foreign languages have
+% begun to be asked in some Internet forums by users around the world,
+% pushing me to reconsider the matter.
+%
+% Of course, the Italian captions are not (nor they have ever been)
+% ``hard-wired'' in the code: they are defined by macros that follow the
+% usual naming conventions ("\headtoname", "\contentsname", and so on).
+% Thus, it's only a matter of redefining these ``hooks'' to suit the target
+% language. However, it would be desirable to have some standard
+% definitions set for each language; but unfortunately, this cannot be
+% attained just by loading the \packlass{\babel} package, for two reasons.
+% In the first place, there are some captions that are specific to the
+% \Bundle\ and are therefore not cared for by the \packlass{\babel}
+% package: for example, the (optional) subject of a letter is preceded by
+% the expansion of "\subjectname" (which is ``\emph{Oggetto:}'' in Italian
+% and should be ``Subject:'' in English), a hook the
+% \packlass{\babel} package knows nothing about. Secondarily, even for
+% those hooks that are standard, sometimes the definition provided by the
+% \packlass{\babel} package seems (at least to me) not adequate for a
+% letter; in particular, alas, if you load \packlass{\babel} with the
+% \opz{italian} option (as you ordinarily do when you are writing in
+% Italian), it actually \emph{cancels} the definitions preset by the
+% \Bundle, substituting for them strings that I~deem more suitable for
+% articles or books, for which they are indeed intended, than for letters
+% (for example, \( "\contentsname" \to \mbox{``\emph{Indice}''} \)
+% in \packlass{\babel}, instead of
+% \( "\contentsname" \to \mbox{``\emph{Sommario}''} \), as defined by the
+% \Bundle;
+% \( "\refname" \to \mbox{``\emph{Riferimenti bibliografici}''} \)
+% in \packlass{\babel},
+% instead of \( "\refname" \to \mbox{``\emph{Testi citati}''} \), as
+% I~prefer; etc.).\footnote{I~do not insist on these captions being defined
+% in the way the \Bundle\ currently uses: if the \LaTeX\ community
+% thinks that such definitions are inadequate, I~have no objection at all,
+% of course, to changing them.}
+%
+% To supply a \emph{provisional} solution to this problem, a new component
+% has been added to the \Bundle: the \packlass{\cdpbabel} package.
+% The idea is that, when using one of the document classes of the
+% \Bundle, you load the \packlass{\cdpbabel} package \emph{instead of}
+% \packlass{\babel}, and let the former load the latter on your behalf;
+% in this way, you offer it a chance to augment, or amend, the definitions
+% made by \packlass{\babel} itself. This solution might seem inelegant
+% (and admittedly it is), but the problem is more subtle than it may look
+% at first sight, involving also compatibility issues with existing
+% documents, and I~need to further investigate it. Hopefully, a more
+% satisfactory scheme will be found for future releases.\footnote{More
+% generally, it can be observed that the document classes of the
+% \Bundle\ rely too heavily on ancillary packages, and that this reconfirms
+% the ``patched-up'' nature of their design; just think of the entanglement
+% between the \packlass{\letteracdp} class and the \packlass{\cdpaddon}
+% package---a typical Italian \emph{pasticcio}, it should be admitted!}
+%
+% In practice, all the \packlass{\cdpbabel} package has to do is (to load
+% \packlass{\babel} and) to issue an
+% "\addto{\captions"\meta{language}"}{"\ldots"}" command (or better,
+% one such command for each required \meta{language}), with ``\ldots''
+% replaced by the appropriate redefinitions; the list, and the details,
+% of such redefintions are of course dictated by \meta{language},
+% so \packlass{\cdpbabel} takes them from what we will call a ``C.D.P.
+% language definition file''. This is a text file that, by convention,
+% must be named \filedir{cdpnames}\meta{language}\filedir{.ldf},
+% where \meta{language} is the name of the corresponding language option
+% (for example,
+% \begin{verbatim}\usepackage[english,italian]{cdpbabel}\end{verbatim}
+% invokes both \filedir{\cdpnamesenglish} and \filedir{\cdpnamesitalian},
+% in this order), and which must adhere to the format shown
+% in fig.~\ref{fig:cdpnames}.
+%
+% \begin{figure}[tbp]
+% \fontsize{9}{11}\selectfont
+% \zerolistvertspaces
+% \begin{flushleft}
+% "\ProvidesFile{cdpnames"\meta{language}".ldf}["\meta{date \& version}"]"
+% \end{flushleft}
+% \begin{verbatim}
+%
+%\def\@cdpbabel@letter@names{%\end{verbatim}
+% \begin{flushleft}
+% " \def\subjectname {"\meta{Subject:}"}%"\\
+% " \def\registeredname {"\meta{Registered}"}%"\\
+% " \def\registeredRRname {"\meta{Registered R.R.}"}%"\\
+% " \def\andccname {"\meta{cc (in addresses)}"}%"\\
+% " \def\ccname {"\meta{cc (at end of letters)}"}%"\\
+% " \def\enclname {"\meta{Encl:}"}%"\\
+% " \def\PSname {"\meta{P.S.:}"}%"\\
+% " \def\headtoname {"\meta{To:}"}%"\\
+% " \def\lettername {"\meta{Letter}"}%"
+% \end{flushleft}
+% \begin{verbatim}
+% % More captions could be added in the future.
+%}
+%\def\@cdpbabel@artlet@names{%\end{verbatim}
+% \begin{flushleft}
+% " \def\contentsname {"\meta{Contents}"}%"\\
+% " \def\listfigurename {"\meta{List of figures}"}%"\\
+% " \def\listtablename {"\meta{List of tables}"}%"\\
+% " \def\refname {"\meta{References}"}%"\\
+% " \def\indexname {"\meta{Index}"}%"\\
+% " \def\figurename {"\meta{Figure}"}%"\\
+% " \def\tablename {"\meta{Table}"}%"\\
+% \end{flushleft}
+% \begin{verbatim}
+% % More captions could be added in the future.
+%}
+%
+%\endinput\end{verbatim}
+% \caption{Contents of a \filedir{cdpnames}\meta{language}\filedir{.ldf}
+% file}
+% \label{fig:cdpnames}
+% \end{figure}
+%
+% As you can see, a ``C.D.P. language definition file'' must define two
+% macros, named "\@cdpbabel@letter@names" and "\@cdpbabel@artlet@names",
+% respectively: in the first you put the redefinitions that should be
+% added to "\captions"\meta{language} when only the \packlass{\letteracdp}
+% class has been loaded; in the second you list the additional redefinitions
+% that apply if the \packlass{\articoletteracdp} class is loaded too;
+% and that's all. The listing shown in fig.~\ref{fig:cdpnames} details exactly
+% what hooks need to be redefined when switching to another language;
+% in principle, you must supply a suitable redefinition for each of them,
+% but of course, when a hook is already defined by the \packlass{\babel}
+% package in a way that you think suits, you may omit it from your list
+% (or, perhaps better, comment it out). Look at the two provided files
+% for inspiration, and in particular at \filedir{\cdpnamesenglish} for the
+% intended meaning of the captions (which sould be quite obvious, however).
+%
+% At present, the \Bundle\ ships with \emph{just two} such definition
+% files included, namely \filedir{\cdpnamesitalian} for Italian
+% and \filedir{\cdpnamesenglish} for English: for all other languages,
+% you'll have to write and install appropriate files yourself.
+% Needless to say, you are most welcome if, after doing so, you want to
+% contribute your work for inclusion in future releases of the
+% \Bundle. Suggestions for amending the captions specified in the two
+% existing files are most welcome too; for Italian, it is also a matter of
+% updating the captions originally defined by the \packlass{\letteracdp}
+% and \packlass{\articoletteracdp} document classes so that they remain
+% ``in sync'' with those specified in the \filedir{\cdpnamesitalian} file.
+%
+% It is hardly worth remarking that ``C.D.P. language definition files''
+% naturally belong to the same directory where the \Bundle\ is located,
+% and \emph{not} to any directory of the \packlass{\babel} system!
+%
+% One final word of clarification: two of the abovementioned captions,
+% namely "\ccname"
+% and "\andccname", look like they are the same, but they actually differ:
+% the latter is prepended to \emph{addresses} to which the letter is sent
+% as a ``carbon copy'', whilst the former is used when the names from those
+% addresses are enumerated again \emph{at the end} of a letter (in the same
+% place where enclosures are also listed). In Italian, "\andccname"
+% should expand to ``\emph{e~p.~c.}'', but "\ccname" just to
+% ``\emph{P.~c.}''; hence, there is at least one language in which the
+% distinction is relevant.
%
% \subsection{Documentation}
%
@@ -612,14 +807,48 @@
% distribution); then pass \filedir{\cdpbundl.dtx} through \LaTeX\
% twice more.
%
-% \section{How to use the C.D.P. Bundle}
+% Starting with version 0.36 of the \Bundle, a (quite trivial!\@) makefile
+% that ``knows'' how to produce the documentation is offered along with the
+% Bundle itself. Although it is not a required part of the distribution
+% (as per LPPL\@), you may find that some distributors supply it all the
+% same (I~hope the CTAN\@ sites will do so). With this makefile in the same
+% directory as \filedir{\filename}, the shell command
+% \begin{quote}
+% \ttfamily
+% make doc
+% \end{quote}
+% will take all the necessary actions to produce the full documentation
+% (in PDF\@; the modifications you need to introduce into the makefile
+% in order to obtain DVI\@ output should be quite obvious, however).
+%
+% The same makefile can also be used to extract the various class, package,
+% and ancillary (definition and configuration) files: simply issue the
+% command
+% \begin{quote}
+% \ttfamily
+% make code
+% \end{quote}
+% at the shell prompt; whereas
+% \begin{quote}
+% \ttfamily
+% make
+% \end{quote}
+% will \emph{both} extract the code files \emph{and} typeset the
+% documentation. Type
+% \begin{quote}
+% \ttfamily
+% make help
+% \end{quote}
+% for more information.
+%
+% \section{How to use the \Bundle}
%
-% The C.D.P. Bundle contains three \LaTeX\ document classes, namely
-% \packlass{\letteracdp}, \packlass{\articoletteracdp}, and
-% \packlass{\lettcdpadi}, two \LaTeX\ packages, called
-% \packlass{\adiseal} and \packlass{\cdpaddon}, and some definition
-% and configuration files pertaining to the \packlass{\cdpaddon}
-% package. As already said, the actual purpose of this section is not
+% The \Bundle\ v.~0.36 contains two \LaTeX\ document classes,
+% namely \packlass{\letteracdp} and \packlass{\articoletteracdp},
+% and two helper \LaTeX\ packages, called \packlass{\cdpaddon}
+% and \packlass{\cdpbabel}, plus a certain number of definition
+% and configuration files related to these packages.
+% As already said, the actual purpose of this section is not
% to explain you how to use these macro files, but only to give you
% references to documents where you can find the explanations.
%
@@ -642,8 +871,14 @@
%<*gobble>
% \fi
% \begin{figure}[tbp]
+% \zerolistvertspaces
% \begin{verbatim}\documentclass[boldsubject,italicsignature,smartindent]{letteracdp}
%% Of course, the above options are a matter of personal taste...
+%\usepackage[T1]{fontenc} % as it is now customary
+%% Since we are writing in English, we need to redefine some captions;
+%% the following package automatically takes care of this:
+%\usepackage[english]{cdpbabel}
+%% Presently only two languages are supported: "english" and "italian".
%
%% Name, address and signature of the sender (the name is optional):
%\name{Revinu Jitis Drofnats}
@@ -654,13 +889,9 @@
% Haga Alto, CA~94321 (U.S.A.)
%}
%\signature{R.~J. Drofnats\\Professor}
-%\date{January~1, 2006} % as usual, date is optional, default is \today
-%% Place where the letter is written (optional):
-%\place{St.\,Anford}
+%\date{February~8, 2015} % as usual, date is optional, default is \today
+%\place{St.\,Anford} % place where the letter is written (optional)
%
-%% Since we are writing in English, we redefine a couple of words:
-%\renewcommand*{\subjectname}{Subject:}
-%\renewcommand*{\headtoname}{To:}
%% Uncomment the following declaration if you want running heads:
%% \pagestyle{headings}
%
@@ -704,15 +935,16 @@
% For instructions on how to use the \packlass{\articoletteracdp}
% class, see~\cite{novita}.
%
-% For instructions on how to use the \packlass{\adiseal} package and
-% the \packlass{\lettcdpadi} class, see~\cite{adi}.
-%
% For instructions on how to use the \packlass{\cdpaddon} package,
% see~\cite{cdpaddon}. Note, however, that this document describes an
% obsolete version, which lacks the ability to deal with several color
-% definition files.
+% definition files. The use of the \packlass{\cdpaddon} package for
+% customizing the letterhead, though, is covered in~\cite{ver036}.
%
-% Please note that before using the C.D.P. Bundle you must read the
+% For instructions on how to use the \packlass{\cdpbabel} package,
+% see~\cite{ver036}.
+%
+% Please note that before using the \Bundle\ you must read the
% following license to see whether its terms are acceptable for you,
% especially for what concerns the lack of any warranty; if they are
% not, don't use this program.
@@ -720,14 +952,14 @@
% \subsection{License}
% \label{sS:License}
%
-% The C.D.P. Bundle is \emph{not} in the public domain: its author,
+% The \Bundle\ is \emph{not} in the public domain: its author,
% Gustavo \textsc{Mezzetti}, owns the copyright, and in general retains
% all the rights therein; but as a special exception, the author
% grants you the permissions indicated below.
%
% \subsubsection{Distribution and/or modification}
%
-% The C.D.P. Bundle may be distributed and/or modified under the
+% The \Bundle\ may be distributed and/or modified under the
% conditions of the \LaTeX\ Project Public License, either version~1.3
% of this license or (at your option) any later version. The latest
% version of this license is in
@@ -736,46 +968,47 @@
% http://www.latex-project.org/lppl.txt
% \end{quote}
% and version~1.3 or later is part of all distributions of \LaTeX\
-% version 2003/12/01 or later.
+% version 2005/12/01 or later.
%
-% The C.D.P. Bundle has the LPPL maintenance status ``author-maintained''.
+% The \Bundle\ has the LPPL maintenance status ``author-maintained''.
%
-% The file \filedir{manifest.txt} included in the C.D.P. Bundle
-% specifies what the C.D.P. Bundle consists of; more precisely,
+% The file \filedir{manifest.txt} included in the \Bundle\
+% specifies what the \Bundle\ consists of; more precisely,
% it explains how the locutions ``Work'' and ``Compiled Work'',
% used in the \LaTeX\ Project Public License, are to be interpreted
% in the case of this work.
%
% \subsubsection{Use}
%
-% The use of the C.D.P. Bundle is unrestricted, provided that you
+% The use of the \Bundle\ is unrestricted, provided that you
% accept the terms and conditions of the \LaTeX\ Project Public
% License and of the following subsection for what concerns the absence
% of any warranty.
%
% \subsubsection{No warranty}
%
-% There is absolutely no warranty for the C.D.P. Bundle. The
-% Copyright Holder provides the C.D.P. Bundle ``as is'', without
+% There is absolutely no warranty for the \Bundle. The
+% Copyright Holder provides the \Bundle\ ``as is'', without
% warranty of any kind, either expressed or implied, including, but
% not limited to, the implied warranties of merchantability and
% fitness for a particular purpose. The entire risk as to the quality
-% and performance of the C.D.P. Bundle is with you. Should the
-% C.D.P. Bundle prove defective, you assume the cost of all necessary
+% and performance of the \Bundle\ is with you. Should the
+% \Bundle\ prove defective, you assume the cost of all necessary
% servicing, repair, or correction.
%
% In no event will The Copyright Holder, or any other party who may
-% distribute and/or modify the C.D.P. Bundle as permitted by the
+% distribute and/or modify the \Bundle\ as permitted by the
% \LaTeX\ Project Public License, be liable to you for damages,
% including any general, special, incidental or consequential damages
-% arising out of any use of the C.D.P. Bundle or out of inability to
+% arising out of any use of the \Bundle\ or out of inability to
% use it (including, but not limited to, loss of data, data being
% rendered inaccurate, or losses sustained by anyone as a result of any
-% failure of the C.D.P. Bundle to operate with any other programs),
+% failure of the \Bundle\ to operate with any other programs),
% even if The Copyright Holder or said other party has been advised of
% the possibility of such damages.
%
% \subsection{Options of the \packlass{\letteracdp} class}
+% \label{sS:Options}
%
% Of course, you load the \packlass{\letteracdp} class by means of the
% usual "\documentclass" declaration, which allows you to specify
@@ -843,16 +1076,25 @@
% option makes it appear in italic shape. The default is
% \opz{uprightsignature}.
%
+% \item[\iopz{signaturerule}\eopz{nosignaturerule}\fopz]
+% Drawing or not a thin rule to mark the spot where you should sign a
+% letter is a matter of style that, as such, should apply to the whole
+% document; for this reason, this behavior is requested by menas of an
+% option, namely \opz{signaturerule}. As you can guess, \opz{signaturerule}
+% causes the rule to be drawn, while \opz{nosignaturerule}, which is defined
+% for the sake of completeness, suppresses it. Anyway, the rule is never
+% drawn inside a \env{signatureenv*} environment; this includes signatures
+% generated by the \mbox{$*$-form} of the "\closing" command.
+% You can adjust the width of the rule by modifying, with "\setlength",
+% the "\signaturerulewidth" rigid length.
+%
% \item[\iopz{noPS}\eopz{usePS}\fopz]
-% The \opz{noPS} option requests that the CDP seal be typest using
-% only the standard \LaTeX\ fonts, so that the output is printable on
-% any kind of printer, even without a PostScript interpreter. On the
-% other hand, the \opz{usePS} option requests that it be printed using
-% PostScript commands: this improves its graphical quality, but
-% printing the seal will require a PostScript interpreter. The
-% default is \opz{noPS}. \emph{Warning:} If you use this option with
-% the \packlass{\cdpaddon} package, parts of the seal will be
-% incorrectly drawn in black.
+% These two options are obsolete (to say the least!\@) and should
+% \emph{not} be used any longer. If you want to improve the graphical
+% quality of the seal, simply load the \packlass{\pictee} package in
+% your document, along with the \packlass{\cdpaddon} package (of course,
+% if you do so, PostScript or PDF\@ printing will be needed to produce the
+% output).
%
% \item[\iopz{indent}\eopz{noindent}\eopz{smartindent}\eopz{shortindent}\fopz]
% These options are used to specify the paragraph indentation, but
@@ -861,7 +1103,7 @@
% these options. The \opz{indent} option sets the paragraph
% indentation, for letters, to one tenth of the text width,
% unless this amount looks too bad, in which case the indentation
-% is set to 2~pica. The \opz{noindent} option completely
+% is set to 2~picas. The \opz{noindent} option completely
% suppressess paragraph indentation within letters. The \opz{smartindent}
% option sets the paragraph indentation, for letters, to the width
% of (the last line of) the salutation, unless this amount looks
@@ -887,16 +1129,254 @@
%
% \end{description}
%
+% \subsection{Customizing the letterhead}
+% \label{sS:Customization}
+%
+% A new, long-awaited feature is available at last: it is now possible,
+% with reasonable ease, to customize the letterhead produced by the
+% \env{letterhead} environment.~:-D\closeofsentencespace
+% As a matter of fact, this customization has always been possible---the
+% \env{letterhead} environment would have been completely useless
+% otherwise---but instructions on how to carry it out were given uniquely
+% in documents that were only privately circulated; moreover, these
+% instructions required you to modify some of the internal commands of the
+% \Bundle. What the present version does is to provide a reasonable user
+% interface for making these internal changes and (which is not less
+% important) to document this interface.
+%
+% The customization of the letterhead basically involves the following three
+% steps:
+%
+% \begin{enumerate}
+%
+% \item
+% First of all, you need to load the \packlass{\cdpaddon} package,
+% which is part of the \Bundle, passing to it the (new) option
+% \opz{customletterhead}.
+%
+% \item
+% The \packlass{\cdpaddon} package defines two environments, named
+% \env{customletterhead} and \env{customletterfoot}, respectively,
+% that can be used more or less like a \env{minipage} environment.
+% You should put, in any place before the first letter (not entirely exact,
+% but almost so: we'll refine this information underneath), a
+% \env{customletterhead} environment holding the
+% description of your letterhead. Just pretend you are composing a
+% \env{minipage} with your letterhead inside.
+%
+% \item
+% If you also want to customize the page footer (as it is ordinarily the
+% case), define its contents inside a similarly placed
+% \env{customletterfoot} environment.
+% If you omit this step, the footer will be empty.
+%
+% \end{enumerate}
+%
+% \DescribeEnv{customletterhead}^^A
+% \DescribeEnv{customletterfoot}^^A
+% More formally, the \packlass{\cdpaddon} package makes two new environments
+% available, named as stated above, that conform to the following syntax:
+%
+% \begin{flushleft}
+% "\begin{customletterhead}{"\meta{wdth}"}"\quad
+% \meta{text}\quad
+% "\end{customletterhead}"\\
+% "\begin{customletterfoot}{"\meta{wdth}"}"\quad
+% \meta{text}\quad
+% "\end{customletterfoot}"
+% \end{flushleft}
+%
+% Both these environments typeset \meta{text} in a \env{minipage} with
+% width \meta{wdth} and save the result in a box register specifically
+% reserved for this purpose (each environment has its own, dedicated
+% register); subsequently, if the \opz{customletterhead} option has been
+% specified, the contents of these box registers are used in place of the
+% header and footer ordinarily defined by the \packlass{\letteracdp}
+% document class. Note that the \packlass{\cdpaddon} package defines the
+% \env{customletterhead} and \env{customletterfoot} environments in any
+% case, \emph{independently} of which options you pass to it.
+%
+% The contents specified inside \env{customletterhead} and
+% \env{customletterfoot} will be horizontally centered in the header and
+% footer boxes, respectively; these boxes are defined by the page layout,
+% but normally their left and right edges coincide with those of the main
+% text. If the \meta{wdth} you have specified for the contents themselves
+% exceeds the width available in the header\slash footer, they will stick
+% out by the same amount of space on both sides (in brief: the contents are
+% centered with "\hss" at both ends). Normally, you pass "\textwidth" as
+% the \meta{wdth} parameter\footnote{I~have long been in doubt whether to make
+% \meta{wdth} an optional parameter, with default value equal to
+% \texttt{\bslash textwidth}; eventually, I~decided for a syntax that
+% parallels the syntax of the \env{minipage} environment, and should
+% therefore be obvious to remember.} and align things as you prefer
+% \emph{inside} the \env{minipage}, perhaps creating sub-boxes or using
+% \env{picture}s.
+%
+% Coming to vertical alignment, the boxes produced by the
+% \env{customletterhead}\slash\env{customletterfoot} environments are
+% ``smashed'' down to null height and depth;
+% for \env{customletterhead}, the bottom edge of the box
+% is aligned with the baseline of the header, whilst for
+% \env{customletterfoot} it is the top edge which is aligned
+% with the baseline of the footer. If you want the contents of
+% \env{customletterhead} to sink below the baseline of the header,
+% simply backspace vertically at their end, \emph{i.e.},
+% use "\vspace{"\meta{dist}"}" with a negative \meta{dist},
+% and the bottom edge of your custom header will be placed exactly
+% \( \left|\meta{dist}\right| \) below the baseline of the header
+% as defined by the general page layout.
+% Similarly, a "\vspace{"\meta{dist}"}" with a negative \meta{dist}
+% placed at the beginning of your custom footer will rise its top edge
+% exactly \( \left|\meta{dist}\right| \) above the baseline of the footer
+% defined by the general page layout.
+%
+% \iffalse
+% Meta-comment: a <*gobble> guard is needed here to prevent the
+% DocStrip program from putting the lines beginning with "%%" in the
+% generated files.
+%<*gobble>
+% \fi
+% \begin{figure}[tbp]
+% \zerolistvertspaces
+% \begin{verbatim}\documentclass
+% [twoside,boldsubject,italicsignature,shortindent,signaturerule]
+% {letteracdp}[2015/01/20]
+%\usepackage[T1]{fontenc}
+%\usepackage[english]{cdpbabel}
+%\usepackage[customletterhead]{cdpaddon}[2015/01/21]
+%\usepackage{url,lipsum}
+%
+%\address{
+% Gustavo \textsc{Mezzetti}\\
+% \protect\url{gustavo.mezzetti@istruzione.it}
+%}
+%\signature{Gustavo Mezzetti}
+%\date{February~8, 2015}
+%\place{Padova}
+%
+%
+%
+%% Definition of your letterhead occurs here:
+%
+%\begin{customletterhead}{\textwidth}
+% \centering \Huge
+% My Huge Centered Letterhead
+%\end{customletterhead}
+%\begin{customletterfoot}{\textwidth}
+% \raggedleft \tiny
+% \ruleacrossheadorfoot
+% My (almost unreadable) small print\\
+% flushed against the right margin.
+%\end{customletterfoot}
+%
+%
+%
+%\begin{document}
+%
+%\begin{foldedletterhead}[Whom it may concern]
+% {To whom it may concern}
+% [My own letterhead, at last!]
+%
+%\makepresentation
+%\maketopdate\relax
+%
+%\lipsum[1-2]
+%
+%\makesignature
+%
+%\end{foldedletterhead}
+%
+%\end{document}\end{verbatim}
+% \caption{How to customize the letterhead}
+% \label{fig:customletter}
+% \end{figure}
+% \iffalse
+%</gobble>
+% \fi
+%
+% Fig.~\ref{fig:customletter} shows a sample input file for a letter with
+% customized letterhead. Note that, among the others, we load the
+% \packlass{\cdpaddon} package with the \opz{customletterhead} option.
+% Note also that the \env{customletterhead}\slash\env{customletterfoot}
+% environments \emph{can} be placed in the preamble; this makes it very easy
+% to create a definition file containing the description of your custom
+% letterhead, to be subsequently loaded in your source files,
+% or even to define your custom version of the \packlass{\letteracdp}
+% and \packlass{\articoletteracdp} document classes. For example, the three
+% files \filedir{myletter.cls}, \filedir{myarticletter.cls}, and
+% \filedir{mylogo.def}, whose contents are listed in
+% fig.~\ref{fig:myletter}, \ref{fig:myarticletter}, and~\ref{fig:mylogo},
+% respectively, together define two new classes, called \packlass{myletter}
+% and \packlass{myarticletter}, that respectively parallel
+% \packlass{\letteracdp} and \packlass{\articoletteracdp}, but produce the
+% same letterhead as the file of fig.~\ref{fig:customletter}.
+%
+% \begin{figure}[tbp]
+% \zerolistvertspaces
+% \begin{verbatim}\NeedsTeXFormat{LaTeX2e} % LaTeX2e is required!
+%\ProvidesClass{myletter}
+% [2015/02/08 v0.01 (development)]
+%\DeclareOption*{\PassOptionsToClass{\CurrentOption}{letteracdp}}
+%\ProcessOptions\relax
+%\LoadClass{letteracdp}[2015/01/20]
+%\input{mylogo.def}
+%\endinput\end{verbatim}
+% \caption{Contents of the \filedir{myletter.cls} file}
+% \label{fig:myletter}
+% \end{figure}
+%
+% \begin{figure}[tbp]
+% \zerolistvertspaces
+% \begin{verbatim}\NeedsTeXFormat{LaTeX2e} % LaTeX2e is required!
+%\ProvidesClass{myarticletter}
+% [2015/02/08 v0.01 (development)]
+%\DeclareOption*{\PassOptionsToClass{\CurrentOption}{articoletteracdp}}
+%\ProcessOptions\relax
+%\LoadClass{articoletteracdp}[2015/01/20]
+%\input{mylogo.def}
+%\endinput\end{verbatim}
+% \caption{Contents of the \filedir{myarticletter.cls} file}
+% \label{fig:myarticletter}
+% \end{figure}
+%
+% \begin{figure}[tbp]
+% \zerolistvertspaces
+% \begin{verbatim}\ProvidesFile{mylogo.def}[2015/02/08 v0.01 (development)]
+%
+%\RequirePackage[customletterhead]{cdpaddon}[2015/01/21]
+%
+%\begin{customletterhead}{\textwidth}
+% \centering \Huge
+% My Huge Centered Letterhead
+%\end{customletterhead}
+%\begin{customletterfoot}{\textwidth}
+% \raggedleft \tiny
+% \ruleacrossheadorfoot
+% My (almost unreadable) small print\\
+% flushed against the right margin.
+%\end{customletterfoot}
+%
+%\endinput\end{verbatim}
+% \caption{Contents of the \filedir{mylogo.def} file}
+% \label{fig:mylogo}
+% \end{figure}
+%
+% One final word: the \env{customletterhead}\slash\env{customletterfoot}
+% environments save their contents in their respective box registers by
+% means of a \emph{local} assignment, subject to ordinary scoping rules:
+% this can be useful if you want to change the letterhead for just a single
+% letter in a source file that contains many ones.
+%
+% See~\cite{ver036} for more information.
+%
% \StopEventually{
% \setcounter{secnumdepth}{0}
% \providecommand*\bysame{\leavevmode\hbox to3em{\hrulefill}\thinspace}
%
% \clearpage
-% \begin{thebibliography}{9}
+% \begin{thebibliography}{99}
% \addcontentsline{toc}{section}{\refname}
%
-% \setcounter{enumiv}{-1}
-%
% \bibitem{LaTeXbook}
% L.~Lamport, \emph{\LaTeX---A Document Preparation System---User's
% Guide and Reference Manual}, 2nd~edition, Addison-Wesley,
@@ -906,49 +1386,47 @@
% G.~Mezzetti, \emph{Breve presentazione d'una classe \LaTeX, denominata
% \packlass{\letteracdp}, utile nella preparazione delle lettere del
% Coordinamento}, technical note downloadable from:\\
-% \rlap{\texttt{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/presentazione.tex}}
+% \rlap{\url{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/presentazione.tex}}
%
% \bibitem{esempi}
% \bysame, \emph{Esempi d'uso della classe \packlass{\letteracdp}},
% technical note downloadable from:\\
-% \rlap{\texttt{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/esempi.tex}}
+% \rlap{\url{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/esempi.tex}}
%
% \bibitem{etichette}
% \bysame, \emph{Etichette degli indirizzi con la classe \packlass{\letteracdp}},
% technical note downloadable from:\\
-% \rlap{\texttt{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/etichett.tex}}
+% \rlap{\url{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/etichett.tex}}
%
% \bibitem{novita}
% \bysame, \emph{Grandi novit\`{a} per \packlass{\letteracdp}:
% arriva \packlass{\articoletteracdp}!}, technical note downloadable from:\\
-% \rlap{\texttt{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/novita.tex}}
+% \rlap{\url{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/novita.tex}}
%
% \bibitem{nts}
% \bysame, \emph{Forse non tutti sanno che\ldots},
% technical note downloadable from:\\
-% \rlap{\texttt{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/nontuttisanno.tex}}
+% \rlap{\url{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/nontuttisanno.tex}}
%
% \bibitem{ver028}
% \bysame, \emph{Annuncio delle versioni 0.28 della classe \packlass{\letteracdp}
% e 0.08 della classe \packlass{\articoletteracdp}},
% technical note downloadable from:\\
-% \rlap{\texttt{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/ver0-28.tex}}
-%
-% \bibitem{adi}
-% \bysame, \emph{Come usare il pacchetto \packlass{\adiseal}
-% (e la classe \packlass{lettcdpadi})},
-% technical note downloadable from:\\
-% \rlap{\texttt{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/adisealistr.tex}}
+% \rlap{\url{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/ver0-28.tex}}
%
% \bibitem{cdpaddon}
% \bysame, \emph{Il pacchetto \packlass{\cdpaddon}},
% technical note downloadable from:\\
-% \rlap{\texttt{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/cdpaddonistr.tex}}
+% \rlap{\url{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/cdpaddonistr.tex}}
%
% \bibitem{ver031}
-% \bysame, \emph{Annuncio della versione 0.31 del \emph{C.D.P. Bundle}},
+% \bysame, \emph{Annuncio della versione 0.31 del \emph{\Bundle}},
% technical note downloadable from:\\
-% \rlap{\texttt{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/ver0-31.tex}}
+% \rlap{\url{http://www.math.unipd.it/\string~mezzetti/Gustavo/Ludic/CDP/ver0-31.tex}}
+%
+% \bibitem{ver036}
+% \bysame, \emph{The \Bundle\ version~0.36},
+% in preparation.
%
% \end{thebibliography}
% }
@@ -974,9 +1452,11 @@
%<*driver>
% \end{macrocode}
%
-% To begin with, we load the \packlass{ltxdoc} class.
+% To begin with, we load the \packlass{ltxdoc} class and the
+% \packlass{\HyperRef} package.
% \begin{macrocode}
\documentclass[a4paper]{ltxdoc}
+\usepackage[bookmarksnumbered,hyperindex=false]{hyperref}
% \end{macrocode}
% We now set a few typesetting options.
% First of all, we want a history listing and a full index, the latter
@@ -1022,6 +1502,7 @@
% \begin{macrocode}
%</driver>
% \end{macrocode}
+% \noindent\null\par
%
% \section{The code for the \packlass{\letteracdp} class}
%
@@ -1049,12 +1530,12 @@
% will eventually be removed, I hope!
% \begin{macrocode}
\ProvidesClass{letteracdp}
- [2006/01/01 v0.34 (**incomplete**)]
+ [2015/02/08 v0.36 (**incomplete**)]
% \end{macrocode}
% Print a copyright message on the terminal, just below the name
% of the class.
% \begin{macrocode}
-\typeout{Copyright (C) 1999-2006 by Gustavo MEZZETTI,
+\typeout{Copyright (C) 1999-2015 by Gustavo MEZZETTI,
all rights reserved.}
% \end{macrocode}
%
@@ -1068,7 +1549,6 @@
% \end{macrocode}
% \end{macro}
%
-%
% \subsection{Initial code}
%
% \begin{macro}{\Coordinamento}
@@ -1078,7 +1558,7 @@
% \begin{macrocode}
\newcommand*\Coordinamento{%
Coordinamento dei Dottorandi e dei Dottori di Ricerca
- dell'Universit\`a di Padova%
+ dell'Universit{\char "E0} di Padova%
}
% \end{macrocode}
% \end{macro}
@@ -1099,7 +1579,7 @@
% Main font for letterhead is Computer Modern Sans Serif 12pt
% (LetterHead\slash Normal Sans Serif):
% \begin{macrocode}
-\DeclareFixedFont\@lh@nss{OT1}{cmss}{m}{n} {12}
+\DeclareFixedFont\@lh@nss{T1}{cmss}{m}{n} {12}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@lh@bss}
@@ -1107,28 +1587,28 @@
% Computer Modern Sans Serif 17pt (LetterHead\slash Bigger Sans
% Serif):
% \begin{macrocode}
-\DeclareFixedFont\@lh@bss{OT1}{cmss}{m}{n} {17}
+\DeclareFixedFont\@lh@bss{T1}{cmss}{m}{n} {17}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@lh@rm}
% Main font for footer: Computer Modern Roman 9pt
% (LetterHead\slash RoMan):
% \begin{macrocode}
-\DeclareFixedFont\@lh@rm {OT1}{cmr} {m}{n} {9}
+\DeclareFixedFont\@lh@rm {T1}{cmr} {m}{n} {9}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@lh@it}
% The words ``World Wide Web'' are printed in italics
% (LetterHead\slash ITalics):
% \begin{macrocode}
-\DeclareFixedFont\@lh@it {OT1}{cmr} {m}{it}{9}
+\DeclareFixedFont\@lh@it {T1}{cmr} {m}{it}{9}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@lh@tt}
% And finally, the web address is printed in teletype font
% (LetterHead\slash TeleType):
% \begin{macrocode}
-\DeclareFixedFont\@lh@tt {OT1}{cmtt}{m}{n} {9}
+\DeclareFixedFont\@lh@tt {T1}{cmtt}{m}{n} {9}
% \end{macrocode}
% \end{macro}
%
@@ -1336,10 +1816,18 @@
\@newrigidlength\signaturewidth
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\signaturerulewidth}
+% The width of the rule drawn by the ``factory'' definition of
+% "\signaturerule" (which is backed up in "\CDPFactorySignatureRule"):
+% \begin{macrocode}
+\@newrigidlength\signaturerulewidth
+\setlength\signaturerulewidth{5cm}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\foldedheight}
% There are macros that provide the ability to typeset letters that
% are going to be folded before being put into the envelopes; these
-% macros assure that no text is typeset astride of the folding. The
+% macros ensure that no text is typeset astride of the folding. The
% vertical distance from the upper edge of the \emph{paper} (not of
% the text) to the folding is kept in "\foldedheight". A value of
% zero or less (\emph{e.g.}, $-"\maxdimen"$) prohibits folded letters:
@@ -1596,6 +2084,9 @@
\@ifdefinable\startaddrlabel{}
\@ifdefinable\stopaddrlabel{}
\@ifdefinable\ifactuallabel{}
+\@ifdefinable\ChosenMakeOpening{}
+\@ifdefinable\ChosenMakeClosing{}
+\@ifdefinable\ChosenMakeSignature{}
% \end{macrocode}
%
% \begin{macro}{\@lett@decl}
@@ -1728,6 +2219,13 @@
\do\@end@letter@hook
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\@begin@block@or@and@hook}
+% Vers.~0.36: new hook used in "\@block@everypar" to support signature
+% rules.
+% \begin{macrocode}
+\do\@begin@block@or@and@hook
+% \end{macrocode}
+% \end{macro}
%
% The following macros are defined only inside a \env{subject}
% environment. We want that they cause an error if used outside of that
@@ -1846,7 +2344,7 @@
% \end{macrocode}
% \end{macro}
%
-% Four internal switches are defined next.
+% Six internal switches are defined next.
% \begin{macrocode}
\def\do#1{\@ifdefinable#1{\newif#1}}
% \end{macrocode}
@@ -1870,6 +2368,24 @@
\do\if@do@fold@
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\if@making@labels@}
+% Prior to version~0.36, the code for generating the address labels (that
+% had been copied from the standard \packlass{letter} class) wrote to the
+% \filedir{.aux} file the data concerning the addresses even when no labels
+% were being produced. This is totally useless. Starting from
+% version~0.36, the following conditional has been introduced in order to
+% avoid this.
+% \begin{macrocode}
+\do\if@making@labels@
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\if@signature@rule@}
+% True if a typeset signature should be surmounted by a ``signature rule''
+% intended to guide the signer's hand. New in vers.~0.36 (2015 Feb~08).
+% \begin{macrocode}
+\do\if@signature@rule@
+% \end{macrocode}
+% \end{macro}
% The other two switches cannot be explained here. They are defined
% differently, without using "\newif", so that they are always changed
% "\global"ly.
@@ -1993,6 +2509,11 @@
% Set "\parindent" to the width of the last line of the salutation
% (\emph{i.e.}, the argument of "\opening" or "\makeopening"); if the
% salutation is not given, this is the same as~``F''.
+%
+% 2015 Feb~08 (v.~0.36): I~have conjectured that the choice of the
+% letter~``O'' for this key could have been suggested by the initial of
+% ``opening'', meaning, as it were, ``indent by the extent of the
+% opening''; but I~cannot remember of having thought of that.
% \end{description}
% The default setting is the same as the one implied by the
% \opz{indent} option.
@@ -2000,6 +2521,7 @@
\@ifdefinable\@indent@pref{\let\@indent@pref F}
% \end{macrocode}
% \end{macro}
+%
% \begin{macro}{\voidisOK}
% Sometimes, in a letter, you want to omit the sender or the
% addressee address, or the signature, and it is annoying to see a
@@ -2092,7 +2614,7 @@
%
% As a general rule, options pertaining to the same functional group
% are declared in reverse order of desirability, the default option of
-% the group being declared last. This assures that if more than
+% the group being declared last. This ensures that if more than
% one option of the same group is erroneously asked for by the
% user, the ``most desirable'' one (whatever this means) is
% executed last, thereby remaining in effect.
@@ -2220,6 +2742,26 @@
\DeclareOption{uprightsignature}{\let\@signature@style\upshape}
% \end{macrocode}
%
+% Vers.~0.36 (2015 Feb~08): new option \opz{signaturerule} requests that
+% each typeset signature be surmounted by a ``signature rule'' intended to
+% guide the signer's hand. This, however, should not affect at all
+% signatures contained in a \env{signatureenv*} environment, the variant of
+% the \env{signatureenv} environment meant for situations in which the
+% letter is not going to be signed by hand.
+% \begin{macrocode}
+\DeclareOption{signaturerule}{\@signature@rule@true}
+% \end{macrocode}
+% The \opz{nosignaturerule} option (also new in vers.~0.36) is the opposite
+% of the above, and is the default.
+% \begin{macrocode}
+\DeclareOption{nosignaturerule}{\@signature@rule@false}
+% \end{macrocode}
+% \emph{Remark:} the ability to draw a rule for handwritten signatures has
+% been explicitly requested by some users of the \Bundle, but I~deem the use
+% of such feature questionable, since only pupils in primary school need
+% rules to guide their writing. Nontheless, this usage is admittedly fairly
+% common in the business world, so it has been supported.
+%
% Next, we have the options used to tell whether PostScript
% commands, inserted by means of the \packlass{eepic} package, should be
% used, or not, to draw the CDP seal. Here we simply set the internal
@@ -2342,15 +2884,21 @@
% follows: \opz{boldsubject} in place of \opz{mediumsubject},
% \opz{italicsignature} in place of \opz{uprightsignature},
% \opz{shortindent} in place of \opz{indent}?
+%
+% Ver.~0.36 (2015 Feb~08): not yet determined to change the default options.
+% Added \opz{nosignaturerule}.
% \begin{macrocode}
-\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,%
-mediumsubject,uprightsignature,noPS,indent,105x37labels}
+\ExecuteOptions{%
+ a4paper,10pt,oneside,onecolumn,final,%
+ mediumsubject,uprightsignature,nosignaturerule,noPS,indent,%
+ 105x37labels%
+}
\ProcessOptions\relax
% \end{macrocode}
%
% \subsection{Package loading}
%
-% In this version of the C.D.P. Bundle, all the original code is
+% In this version of the \Bundle, all the original code is
% put in the file \filedir{\letteracdp.cls}, so in the normal operating
% mode no packages need to be loaded. This will change in future
% releases: the code will be split among several packages, to allow
@@ -2733,7 +3281,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% cannot tell what the single values of "\topmargin" and "\headheight"
% are. In the last case, the inherent uncertainty does no harm,
% because the "\headheight" parameter is not used to position any
-% graphical element of the letterhead: it suffices to assure that it
+% graphical element of the letterhead: it suffices to ensure that it
% allows enough room for the other, ordinary running heads; in
% practice, that there is room for a line of text in the largest
% supported font size (\emph{i.e.}, 12~points). Setting "\headheight"
@@ -2768,7 +3316,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
%
% \item[textwidth]
% This parameter is first of all initialized in the standard
-% \filedir{.clo} files: this assures that the standard \LaTeX\ initial
+% \filedir{.clo} files: this ensures that the standard \LaTeX\ initial
% value is used (cf.~step~\ref{plostep1} above). Nevertheless, the
% value can be subsequently adjusted as explained in
% step~\ref{plostep2}, to achieve a better alignment with some points
@@ -2776,7 +3324,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
%
% \item[oddsidemargin]
% This is set to \( \frac{1}{2}("\paperwidth"-"\textwidth") -
-% 1\,\mbox{in} \), to assure that the main body of text is
+% 1\,\mbox{in} \), to ensure that the main body of text is
% horizontally centered on the page. Note that \LaTeX\ measures
% "\oddsidemargin" from the \TeX\ origin, and not from the left edge
% of the paper.
@@ -2829,7 +3377,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
%
% \item[footskip]
% This is set to \( "\paperheight" - "\textheight" -
-% 6.5\,\mbox{cm} \): this assures that the baseline of the footer
+% 6.5\,\mbox{cm} \): this ensures that the baseline of the footer
% (along which the rule is traced) runs at \( 2.5\,\mbox{cm} \)
% from the bottom edge of the paper.
%
@@ -3050,7 +3598,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\fi
\fi
% \end{macrocode}
-% A final check is also made to assure that "\longindentation" falls
+% A final check is also made to ensure that "\longindentation" falls
% within the closed range \( [\frac{4}{10}"\textwidth",
% \frac{6}{10}"\textwidth"] \).
% \begin{macrocode}
@@ -3323,22 +3871,69 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
}%
}\hss
}}
+% \end{macrocode}
+%
+% \begin{macro}{\@folding@tag}
+% Invoked by the macros that implement the ``folded'' page styles,
+% more precisely by those which draw the header, to draw the small sign
+% that marks the point where the sheet should be folded.
+% \begin{macrocode}
\@ifdefinable\@folding@tag{\def\@folding@tag{%
\if@do@fold@
\raisebox{\@lh@folding@ht}[\z@][\z@]{%
\makebox[\z@][l]{%
- \dimen@ -\@lh@right@margin
- \advance\dimen@ 1cm%
+% \end{macrocode}
+% Vers.~0.36: new and more robust way of computing the horizontal position.
+% \begin{macrocode}
+ \dimen@ \paperwidth
+ \advance \dimen@ -1in%
+ \advance \dimen@ -\oddsidemargin
+ \advance \dimen@ -\textwidth
+ \advance\dimen@ -1cm%
+% \end{macrocode}
+% End of change.
+% \begin{macrocode}
\kern\dimen@ \vbox{%
- \kern -.1\p@
- \hrule \@height .1\p@ \@depth .1\p@ \@width 5mm%
- \kern -.1\p@
+% \end{macrocode}
+% Vers.~0.36: change to support the new "\foldingtagrule" user-level command
+% and the use of color.
+% \begin{macrocode}
+ \color@begingroup
+ \foldingtagrule
+ \color@endgroup
+% \end{macrocode}
+% End of change.
+% \begin{macrocode}
}%
}%
}%
\fi
}}
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\foldingtagrule}
+% Vers.~0.31 (2015 Feb~08): new command, redefinable by the user,
+% to draw the tag. It permits customization of the latter.
+% It should take up no vertical space in total
+% (\emph{i.e.}, it should backspace).
+% \begin{macrocode}
+\newcommand*\foldingtagrule{%
+ \kern -.1\p@
+ \hrule \@height .1\p@ \@depth .1\p@ \@width 5mm%
+ \kern -.1\p@
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\CDPFactoryFoldingTagRule}
+% Back up of the above. Should \emph{not} be redefined!
+% \begin{macrocode}
+\@ifdefinable\CDPFactoryFoldingTagRule{
+ \let \CDPFactoryFoldingTagRule = \foldingtagrule
+}
+% \end{macrocode}
+% \end{macro}
%
% \subsubsection{Macros for drawing the CDP seal}
%
@@ -3416,7 +4011,15 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\newcommand \address [1]{\def\thesenderaddress{#1}}
\newcommand \location [1]{\def\thesenderlocation{#1}}
\newcommand*\telephone[1]{\def\thesenderphone{#1}}
+% \end{macrocode}
+%
+% \begin{macro}{\makelabels}
+% \changes{0.36}{2015 Feb 08}{Added new instruction
+% \protect\texttt{\protect\bslash @making@labels@true}.}
+% The "\makelabels" command now sets the "\if@making@labels@" switch.
+% \begin{macrocode}
\newcommand*\makelabels{%
+ \@making@labels@true
\AtBeginDocument{%
\def\@beginlabels{\begin{labels}}%
\def\@beginlabelgroup{\begin{labelgroup}}%
@@ -3428,12 +4031,28 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\AtEndDocument{%
\if@filesw\immediate\write\@mainaux{\string\@endlabels}\fi}}
\@onlypreamble\makelabels
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cleardoubleemptypage}
+% Similar to "\cleardoublepage", but inserts pages with \sty{empty} page
+% style.
+% \begin{macrocode}
\newcommand*\cleardoubleemptypage{\par
\onecolumn
\if@twoside \ifodd\c@page \else
\thispagestyle{empty}\null\newpage
\fi\fi
}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@safe@space}
+% This macro inserts \#1 in the current horizontal lists; if it contributes
+% a (strictly) positive width, it also inserts~\#2. Usually \#1 is a
+% certain string, and \#2 is a spacing command that one wants to emit (if
+% and) only if the string is nonempty.
+% \begin{macrocode}
\@ifdefinable\@safe@space{\def\@safe@space#1#2{%
\setbox\z@\hbox{\ignorespaces #1\unskip}%
\ifdim\wd\z@>\z@
@@ -3443,6 +4062,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\fi
}}
% \end{macrocode}
+% \end{macro}
%
% \begin{environment}{baseletter}
% \changes{0.31}{2001 Dec 01}{Reintroduced the first mandatory argument
@@ -3509,8 +4129,10 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% allows to discard the glue after the signature if this is needed to
% fit the letter in the page, even if "\stopbreaks" is in effect after
% the signature. Should this be a ``"-\@M"''-cost page break instead?
-% (Probably yes, but not sure of all implications, so leave it this
-% way.)
+%
+% (2015 Feb~08, vers.~0.36: definitely \emph{no}, since that would stretch
+% out the last page of the letter! It was fortunate we didn't dare change
+% it in previous releases!)
% \begin{macrocode}
\@@par\addpenalty\z@
\clearpage
@@ -3524,12 +4146,19 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \end{macrocode}
% Write to the \filedir{.aux} file the data for the address labels.
% This is rather tricky because we can have multiple addressees
-% \emph{and} multiple senders.
-% \begin{macrocode}
- \if@filesw
+% \emph{and} multiple senders
+% \changes{0.36}{2015 Feb 08}{Added check for the
+% \protect\texttt{\protect\bslash if@making@labels@} switch before
+% writing to the \protect\filedir{.aux} file unneeded information for
+% generating the address labels.}
+% (v.~0.36: note the new check for "\if@making@labels@", in order to write
+% to the \filedir{.aux} file the information about the address labels
+% only when it is actually needed).
+% \begin{macrocode}
+ \if@filesw \if@making@labels@
\begingroup
% \end{macrocode}
-% Assure that "\\", "~" and "\protect"'ed tokens are written literally
+% Ensure that "\\", "~" and "\protect"'ed tokens are written literally
% instead of being expanded:
% \begin{macrocode}
\let\\\relax
@@ -3538,7 +4167,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \end{macrocode}
% ^^A { bracket match
% The following hack causes "\and" (and "\andcc") to expand into
-% "}\@gobble{"
+% ``"}\@gobble{"''.
% ^^A } bracket match
% \begin{macrocode}
\def\and{%
@@ -3551,11 +4180,40 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% "\@cdp@reserved", and the others are "\@gobble"'d.
% \begin{macrocode}
\edef\@cdp@reserved{{\returnaddress}}%
+% \end{macrocode}
+% We now cope with "\and"'s and "\andcc"'s inside "\theaddresseeaddress":
+% we write them to the \filedir{.aux} file as
+% ^^A { bracket match
+% ``"}"\,\meta{LF}\,"\@mlabel{"^^A
+% \( \langle\mbox{\itshape expansion of\/ } "\@cdp@reserved"\,\rangle \)^^A
+% "}{"'',
+% ^^A } bracket match
+% \emph{i.e.}, for what we have just said, as
+% ^^A { bracket match
+% ``"}"\,\meta{LF}\,"\@mlabel{"\meta{address of 1st~sender}"}{"''.
+% ^^A } bracket match
+% \begin{macrocode}
\def\and{%
\iffalse{\fi}^^J%
\string\@mlabel{\@cdp@reserved}{\iffalse}\fi
}%
\let\andcc\and
+% \end{macrocode}
+% We are now ready to write out the corrent sequence of commands,
+% \emph{e.g.}:
+% \begingroup
+% \fontsize{9}{11}\selectfont
+% \zerolistvertspaces
+% \begin{flushleft}
+% "\@beginlabelgroup"\\
+% "\@mlabel{"\meta{1st sender}"}{"\meta{1st addressee}"}"\\
+% "\@mlabel{"\meta{1st sender}"}{"\meta{2nd addressee}"}"\\
+% "\@mlabel{"\meta{1st sender}"}{"\meta{3rd addressee}"}"\\
+% \ldots\\
+% "\@endlabelgroup"\\
+% \end{flushleft}
+% \endgroup
+% \begin{macrocode}
\immediate\write\@auxout{%
\string\@beginlabelgroup ^^J%
\string\@mlabel
@@ -3563,7 +4221,11 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\string\@endlabelgroup
}%
\endgroup
- \fi
+% \end{macrocode}
+% Vers.~0.36: note the additional "\fi" to go with the new
+% "\if@making@labels@".
+% \begin{macrocode}
+ \fi \fi
}
% \end{macrocode}
% \end{environment}
@@ -3705,20 +4367,70 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
%
% \subsubsection{Addresses and subject}
%
+% The addresses and the subject are not composed inside inner boxes:
+% instead, they are constructed from ``blocks'' of lines, conveniently
+% indented, that are contributed directly to the main vertical list.
+% The correct indentation is achieved by a clever combination of "\parshape"
+% and "\everypar".
+% This unusual scheme was chosen with the intent of maintaining full control
+% over the interline glue, but other, and simpler, means to accomplish this
+% are actually available (\emph{if} the interline glue is \emph{rigid}).
+%
+% \begin{macro}{\@block@parshape}
+% This macro, invoked at every par., is responsible for setting the
+% indentation.
% \begin{macrocode}
\@ifdefinable\@block@parshape{\def\@block@parshape{%
\parshape \@ne\@block@inden\@block@width
}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@block@parshape}
+% The part of "\@block@everypar" that "\y@custom@block" uses directly.
+% \begin{macrocode}
\@ifdefinable\@block@@everypar{\def\@block@@everypar{%
\parskip\z@skip
\@nobreakfalse \@minipagefalse % these are already \global
\@new@block@false \@empty@and@false % these too
\everypar{\@block@parshape}%
}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@block@everypar}
+% Code executed when a block or an ``"\and"-section'' begins.
+% \changes{0.36}{2015 Feb 08}{Added a hook, \protect\texttt{\protect\bslash
+% @begin@block@or@and@hook}.}^^A
+% 2015 Feb~08 (v.~0.36): "\@begin@block@or@and@hook" added.
+% \begin{macrocode}
\@ifdefinable\@block@everypar{\def\@block@everypar{%
\@block@parshape
\@block@@everypar
+ \@begin@block@or@and@hook
}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\x@custom@block}
+% General utility macro for generating blocks that, like address blocks,
+% haven't got a label, but for which, in exchange, the indentation and the
+% width can be set independently of one another. Parameters:\strut\\*
+% \strut
+% \begin{tabular}{r@{}l}
+% \param{1} & switch: \( \mbox{Y} = \mbox{add} \) space above and below,
+% \( \mbox{N} = \mbox{don't} \) add it;\\
+% \param{2} & block indentation from left margin (\textoken{dimen});\\
+% \param{3} & block width (\textoken{dimen});\\
+% \param{4} & vertical space above block (\textoken{glue});\\
+% \param{5} & vertical space between ``"\and"-sections''
+% (\textoken{glue});\\
+% \param{6} & vertical space below block (\textoken{glue});\\
+% \param{7} & penalty for breaking before block;\\
+% \param{8} & penalty for breaking between ``"\and"-sections'';\\
+% \param{9} & penalty for breaking after block.\\
+% \end{tabular}\strut
+% \begin{macrocode}
\@ifdefinable\x@custom@block{\def\x@custom@block#1#2#3#4#5#6#7#8#9{%
\@custom@block#1#4#5#6#8#9%
\@block@inden #2%
@@ -3727,13 +4439,38 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\everypar{\@block@everypar}%
\@@custom@block #7%
}}
-\@ifdefinable\y@custom@block{\def\y@custom@block#1#2#3#4#5#6#7#8{%
- \@custom@block#1#3#4#5#7#8%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\y@custom@block}
+% General utility macro for generating blocks that, just like the block of
+% the subject, do have a label, but for which, in exchange, both the
+% indentation and the width are deduced from the width of the label itself.
+% \changes{0.36}{2015 Feb 08}{Added parameter for space after label.}^^A
+% 2015 Feb~08 (v.~0.36): added new parameter for the amount of
+% horizontal space after the label. Parameters now are:\strut\\*
+% \strut
+% \begin{tabular}{r@{}l}
+% \param{1} & switch: \( \mbox{Y} = \mbox{add} \) space above and below,
+% \( \mbox{N} = \mbox{don't} \) add it;\\
+% \param{2} & label;\\
+% \param{3} & horizontal space after label (\textoken{dimen});\\
+% \param{4} & vertical space above block (\textoken{glue});\\
+% \param{5} & vertical space between ``"\and"-sections''
+% (\textoken{glue});\\
+% \param{6} & vertical space below block (\textoken{glue});\\
+% \param{7} & penalty for breaking before block;\\
+% \param{8} & penalty for breaking between ``"\and"-sections'';\\
+% \param{9} & penalty for breaking after block.\\
+% \end{tabular}\strut
+% \begin{macrocode}
+\@ifdefinable\y@custom@block{\def\y@custom@block#1#2#3#4#5#6#7#8#9{%
+ \@custom@block#1#4#5#6#8#9%
\sbox\@labels{\normalfont\ignorespaces #2\unskip}%
% We use \@labels to save a box register.
\@block@inden\wd\@labels
\ifdim\@block@inden>\z@
- \advance \@block@inden by \subjectnamegap \relax
+ \advance \@block@inden #3\relax
\wd\@labels\@block@inden
\fi
\@block@width\textwidth \advance\@block@width -\@block@inden
@@ -3742,8 +4479,13 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\box\@labels
\@block@@everypar
}%
- \@@custom@block #6%
+ \@@custom@block #7%
}}
+% \end{macrocode}
+% \end{macro}
+%
+% Uncommented code.
+% \begin{macrocode}
\@ifdefinable\@custom@block{\def\@custom@block#1#2#3#4#5#6{%
\if@inlabel \indent \fi
\let\par\@@par \par
@@ -3881,10 +4623,21 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
try to type \space <return> \space to proceed.%
}%
}}
+% \end{macrocode}
+%
+% \begin{macro}{\@subject}
+% Inner implementation of \env{subject}\slash\env{subject*} environments.
+% \changes{0.36}{2015 Feb 08}{Now this macro passes
+% \protect\texttt{\protect\bslash subjectnamegap} as parameter~\#3 to
+% \protect\texttt{\protect\bslash y@custom@block}.}^^A
+% 2015 Feb~08 (v.~0.36): now passes the "\subjectnamegap" macro
+% as parameter~\#3 to "\y@custom@block", parameter added in this same
+% version.
+% \begin{macrocode}
\@ifdefinable\@subject{\def\@subject#1#2{%
\let\@empty@block\@empty
\y@custom@block #1%
- {#2}%
+ {#2}\subjectnamegap
\abovesubjectvspace\z@skip\belowsubjectvspace
\@b@subjpenalty\@M\@e@subjpenalty
\let\presubject\@good@prsbj
@@ -3895,6 +4648,11 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
}%
\@subject@style
}}
+% \end{macrocode}
+% \end{macro}
+%
+% Uncommented code.
+% \begin{macrocode}
\newenvironment*{subject} [1][\subjectname]
{\@subject Y{#1}}{\end@custom@block Y}
\newenvironment*{subject*}[1][\subjectname]
@@ -3929,6 +4687,11 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
%
% \subsubsection{Presentations}
%
+% With this funny term we denote the initial part of a letter
+% (addresses and the like).
+%
+% \begin{macro}{\@setup@pres}
+% Code for setting up style parameters.
% \begin{macrocode}
\@ifdefinable\@setup@pres{\def\@setup@pres{%
\global\@topnum\z@ % prevents figures from going at top of page
@@ -3953,6 +4716,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\endnormalpresentation
}
% \end{macrocode}
+% \end{macro}
%
% \begin{environment}{normalpresentation}
% The environment for making a normal presentation:
@@ -4001,9 +4765,9 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \begin{macrocode}
\if@do@fold@
% \end{macrocode}
-% \emph{Yes.} First, assure that we are at the beginning of a page;
+% \emph{Yes.} First, ensure that we are at the beginning of a page;
% note that \emph{numbered} pages, here, are inserted if there is a gap
-% to fill in.
+% to be filled.
% \begin{macrocode}
\cleardoublepage
% \end{macrocode}
@@ -4120,14 +4884,13 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% this box already includes "\topskip" glue at the
% top, no further interline glue must be inserted above it.
% \begin{macrocode}
- \nointerlineskip
- \box\tw@
+ {\topskip\z@skip \box\tw@
% \end{macrocode}
% Thanks to the above setting of "\splitmaxdepth", we are sure that
% the depth of the previous box is small; so the following line will
% take us exactly on the edge of the fold, with null depth\ldots
% \begin{macrocode}
- {\baselineskip\@above@folding@margin \nobreak\null}%
+ \baselineskip\@above@folding@margin \nobreak\null}%
% \end{macrocode}
% \ldots where we insert a costly, yet feasible breakpoint.
% \begin{macrocode}
@@ -4277,6 +5040,10 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
%
% \subsubsection{Date, salutation, signature, enclosures\ldots}
%
+% This section should be reorganized, with commands listed in a more
+% logical order: at present, they are rather mixed up.
+%
+% First comes the date.
% \begin{macrocode}
\@ifdefinable\@make@date{\def\@make@date#1#2#3{\par
\ifx#2Y%
@@ -4295,29 +5062,82 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
Empty signature%
}%
}}
+% \end{macrocode}
+%
+% Then, heaven knows why, the signature.
+%
+% \begin{macro}{\@signatureenv}
+% Inner implementation of the \env{signatureenv}\slash\env{signatureenv*}
+% environments.
+% \changes{0.36}{2015 Feb 08}{Added support for \protect\opz{signaturerule}
+% option.}^^A
+% Added support for the \opz{signaturerule} option (vers.~0.36), exploiting
+% the new ``hook'' "\@begin@block@or@and@hook", the gets executed whenever a
+% signature is typeset.
+% \begin{macrocode}
\@ifdefinable\@signatureenv{\def\@signatureenv#1{\par
\let\@empty@block\@empty@signature
\let\and\@block@nd
+ \if@signature@rule@
+ \let \@begin@block@or@and@hook \@make@signature@rule
+ \fi
\x@custom@block Y%
\signatureindentation\signaturewidth
#1#1\z@skip
\@M\@M\@M
\signaturealignment\@signature@style
}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\end@signatureenv}
+% Ends a \env{signatureenv}\slash\env{signatureenv*} environment.
+% \begin{macrocode}
\def\end@signatureenv{%
\end@custom@block N% not "Y" for efficiency
+% \end{macrocode}
+% The following line (also added, of course, in vers.~0.36) is not actually necessary ("\@begin@block@or@and@hook"
+% has been set by "\@signatureenv" inside a group), but redundancy does not
+% hurt.
+% \begin{macrocode}
+ \let \@begin@block@or@and@hook \@empty
\addvspace\belowsignaturevspace
}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{signatureenv}
+% For signatures that include vertical space for handwriting.
+% \begin{macrocode}
\newenvironment*{signatureenv}{%
\@signatureenv\abovesignaturevspace
}{%
\end@signatureenv
}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{signatureenv*}
+% For signatures that do \emph{not} include vertical space for handwriting;
+% these should \emph{never} display a rule, and for this reason\ldots
+% \begin{macrocode}
\newenvironment*{signatureenv*}{%
+% \end{macrocode}
+% \changes{0.36}{2015 Feb 08}{Taken care of always suppressing rules
+% here.}^^A
+% \ldots~we add the following line in vers.~0.36 (note that we are inside a
+% group).
+% \begin{macrocode}
+ \@signature@rule@false
\@signatureenv\abovesignatureshortvspace
}{%
\end@signatureenv
}
+% \end{macrocode}
+% \end{environment}
+%
+% Uncommented code.
+% \begin{macrocode}
\@ifdefinable\x@msignature{\def\x@msignature#1{%
\begin{signatureenv#1}%
\ifx\thesendersignature\@empty
@@ -4344,9 +5164,52 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
}%
}%
}
+% \end{macrocode}
+%
+% \begin{macro}{\@make@signature@rule}
+% Generate a fake, raised line, containing the rule. Added in vers.~0.36.
+% \begin{macrocode}
+\@ifdefinable\@make@signature@rule{\def\@make@signature@rule{%
+ \raisebox{\baselineskip}[0pt][0pt]{%
+ \signaturerule
+ }\\*[-\baselineskip]%
+}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\signaturerule}
+% User command to allow customization of the signature rule.
+% Added in vers.~0.36.
+% \begin{macrocode}
+\newcommand*\signaturerule{%
+ \makebox[\signaturerulewidth]{%
+ \leaders \hrule \@height .1\p@ \@depth .1\p@ \hfill
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% Now is the turn of the salutation (I~said the order isn't logical!).
+%
+% \begin{macro}{\makeopening}
+% This command generates the sheer salutation. It comes in two flavors:
+% \begin{description}
+% \item[normal form:]
+% "\makeopening{"\meta{text}"}"\\*
+% typeset the \meta{text} as the salutation;
+% \item[$+$-form:]
+% "\makeopening+"\\*
+% leave space for a handwritten salutation.
+% \end{description}
+% \begin{macrocode}
\newcommand*\makeopening{\par
\@ifnextchar +{\@firstoftwo\y@mopening}\x@mopening
}
+% \end{macrocode}
+% \end{macro}
+%
+% Uncommented code.
+% \begin{macrocode}
\@ifdefinable\x@mopening{\def\x@mopening#1{%
\ifx\@indent@pref O%
\dimen@\prevdepth
@@ -4378,20 +5241,89 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\@ifdefinable\y@mopening{\def\y@mopening{%
\@handwr@box\z@ \nobreak
}}
+% \end{macrocode}
+%
+% \begin{macro}{\opening}
+% Well-known command for opening a letter. In vers.~0.35, it,
+% and related macros, have been completely reimplemented to support the
+% "\OpeningSequence" feature.
+% \begin{macrocode}
\newcommand*\opening{\par
- \@ifnextchar +{%
- \let\@cdp@reserved\y@mopening
- \@firstoftwo\@opening
- }{%
- \let\@cdp@reserved\x@mopening
- \@opening
- }%
+ \@ifnextchar +{\@firstoftwo\y@opening}\x@opening
}
-\newcommand*\@opening[1][\@place]{%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\y@opening}
+% Implements the ``\mbox{$+$-form}'' of the "\opening" command (salutation
+% written by hand): "\ChosenMakeOpening" should expand to ``"\y@mopening"''.
+% \begin{macrocode}
+\newcommand*\y@opening[1][\@place]{%
+ \@opening \y@mopening {#1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\x@opening}
+% Implements the normal form of the "\opening" command (with typeset
+% salutation): "\ChosenMakeOpening" should expand to
+% ``"\x@mopening{"\meta{contents of~\#2}"}"''.
+% \begin{macrocode}
+\newcommand*\x@opening[2][\@place]{%
+ \@opening{\x@mopening{#2}}{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@opening}
+% Prepare call to "\OpeningSequence", then call it. Parameters:\strut\\*
+% \strut
+% \begin{tabular}{r@{}l}
+% \param{1} & intended meaning of "\ChosenMakeOpening";\\
+% \param{2} & contents of optional argument of "\opening"
+% (defaults to "\@place").\\
+% \end{tabular}\strut
+% \begin{macrocode}
+\@ifdefinable\@opening{\def\@opening#1#2{%
+% \end{macrocode}
+% Keep definition of "\ChosenMakeOpening" local.
+% \begin{macrocode}
+ \begingroup
+ \def\ChosenMakeOpening{#1}%
+% \end{macrocode}
+% Invoke user-customizable opening sequence.
+% \begin{macrocode}
+ \OpeningSequence{#2}%
+% \end{macrocode}
+% If the \opz{smartindent} option is in force, "\parindent" might have just
+% been changed: this change must be ``lifted'' out of the group.
+% \begin{macrocode}
+ \global\dimen@i\parindent
+ \endgroup
+ \parindent\dimen@i
+}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\OpeningSequence}
+% This command defines the ``opening sequence'', that is, the sequence of
+% commands that should be executed when the user-level "\opening" command
+% is given. Provided in vers.~0.35 to allow customization. The optional
+% argument of "\opening" is passed in the---mandatory!---argument of this
+% command; the mandatory argument of "\opening", if present (\emph{i.e.},
+% if not ``\mbox{$+$-form}'') is embodied in "\ChosenMakeOpening".
+% Factory definition:
+% \begin{macrocode}
+\newcommand*\OpeningSequence[1]{%
\makepresentation
\maketopdate[#1]%
- \@cdp@reserved
+ \ChosenMakeOpening
}
+% \end{macrocode}
+% \end{macro}
+%
+% A little bit of uncommented code.
+% \begin{macrocode}
\newcommand*\makeclosing{\@par@stopbreaks
\@ifnextchar +{\@firstoftwo\y@mclosing}\x@mclosing
}
@@ -4401,22 +5333,112 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\@ifdefinable\y@mclosing{\def\y@mclosing{%
\@handwr@box\closingindentation
}}
+% \end{macrocode}
+%
+% \begin{macro}{\closing}
+% Well-known command for closing a letter. In vers.~0.35, it,
+% and related macros, have been completely reimplemented to support the
+% "\ClosingSequence" feature. The present implementation support exactly
+% the same modifiers as the former one (cf.~\cite{nts}), \emph{i.e.}:
+% \begin{description}
+% \item[normal form:]
+% "\closing{"\meta{text}"}"\\*
+% typeset the \meta{text} as the closing sentence,
+% using the internal equivalent of "\makeclosing{"\meta{text}"}";
+% an ordinary signature (the internal equivalent of "\makesignature")
+% follows;
+% \item[$*$-form:]
+% "\closing*{"\meta{text}"}"\\*
+% typeset the \meta{text} as the closing sentence,
+% using the internal equivalent of "\makeclosing{"\meta{text}"}";
+% a compressed signature (the internal equivalent of
+% "\makesignature*") follows;
+% \item[$+$-form:]
+% "\closing+"\\*
+% leave space for a handwritten closing sentence (as "\makeclosing+"
+% would do),
+% followed by another space for an equally handwritten signature
+% (like the one produced by "\makesignature-");
+% \item[$-$-form:]
+% "\closing-{"\meta{text}"}"\\*
+% typeset the \meta{text} as the closing sentence,
+% using the internal equivalent of "\makeclosing{"\meta{text}"}",
+% followed by the space for a handwritten signature
+% (like the one produced by "\makesignature-").
+% \end{description}
+% \begin{macrocode}
\newcommand*\closing{\@par@stopbreaks
\@ifstar{%
\@closing{\x@msignature *}%
}{%
- \@ifnextchar +{%
- \@firstoftwo{\y@mclosing \y@msignature}%
- }{%
- \@ifnextchar -{%
- \@firstoftwo{\@closing \y@msignature}%
- }{%
+ \@ifnextchar +{\@firstoftwo{%
+ \@@closing \y@mclosing \y@msignature
+ }}{%
+ \@ifnextchar -{\@firstoftwo{%
+ \@closing \y@msignature
+ }}{%
\@closing{\x@msignature {}}%
}%
}%
}%
}
-\@ifdefinable\@closing{\def\@closing#1#2{\x@mclosing{#2}#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@closing}
+% The sole purpose of this macro is to absorb the argument destined for the
+% "\closing" command (which is absent in the ``\mbox{$+$-form}, though),
+% which becomes argument~\#2; argument~\#1 is the token sequence that should
+% be used to generate the signature.
+% \begin{macrocode}
+\@ifdefinable\@closing{\def\@closing#1#2{%
+ \@@closing{\x@mclosing{#2}}{#1}%
+}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@closing}
+% Prepare call to "\ClosingSequence", then call it. Parameters:\strut\\*
+% \strut
+% \begin{tabular}{r@{}l}
+% \param{1} & intended meaning of "\ChosenMakeClosing";\\
+% \param{2} & intended meaning of "\ChosenMakeSignature".\\
+% \end{tabular}\strut
+% \begin{macrocode}
+\@ifdefinable\@@closing{\def\@@closing#1#2{%
+% \end{macrocode}
+% Keep definitions local.
+% \begin{macrocode}
+ \begingroup
+ \def\ChosenMakeClosing{#1}%
+ \def\ChosenMakeSignature{#2}%
+% \end{macrocode}
+% Invoke user-customizable closing sequence.
+% \begin{macrocode}
+ \ClosingSequence
+ \endgroup
+}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ClosingSequence}
+% This command defines the ``closing sequence'', that is, the sequence of
+% commands that should be executed when the user-level "\closing" command
+% is given. Provided in vers.~0.35 to allow customization.
+% Factory definition:
+% \begin{macrocode}
+\newcommand*\ClosingSequence{%
+ \ChosenMakeClosing
+ \ChosenMakeSignature
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@handwr@box}
+% Draws an almost imperceptible sign that marks the spot where a handwritten
+% salutation, or closing sentence, should start. \#1~is the amount of
+% indentation.
+% \begin{macrocode}
\@ifdefinable\@handwr@box{\def\@handwr@box#1{%
\vskip .5\baselineskip
\setbox\z@\vbox{%
@@ -4425,12 +5447,32 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\wd\z@\z@ \ht\z@\z@ \dp\z@\z@ \noindent\hspace*{#1}\box\z@\par
\vskip .5\baselineskip\vskip\z@skip
}}
-\newcommand\@cc@encl[2]{\par
- \noindent\parbox[t]{\textwidth}{%
- \@hangfrom{\normalfont\@safe@space{#1}\enspace}%
- \ignorespaces #2\strut
- }\par
-}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@cc@encl}
+% Inner implementation for both "\cc" and "\encl".
+% \changes{0.36}{2015 Feb 08}{Fully reimplemented by means of
+% ``blocks''.}^^A
+% Wholly rewritten in vers.~0.36, now uses ``blocks'' (like addresses and
+% subject). This, among other things, ensures coherent treatment of the
+% interline glue.
+% \begin{macrocode}
+\@ifdefinable\@cc@encl{\long\def\@cc@encl#1#2{\par
+ \begingroup
+ \let\@empty@block\@empty
+ \y@custom@block N{#1}{.5em}%
+ \z@skip\z@skip\z@skip
+ \@M\z@\z@
+ \ignorespaces #2%
+ \end@custom@block N%
+ \endgroup
+}}
+% \end{macrocode}
+% \end{macro}
+%
+% Uncommented code.
+% \begin{macrocode}
\newcommand*\cc [1][\ccname] {\@cc@encl{#1}}
\newcommand*\encl[1][\enclname]{\@cc@encl{#1}}
\newenvironment{enclosures}[1][\enclname]{%
@@ -4462,7 +5504,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
{\normalfont\@safe@space{#1}\enspace}\ignorespaces
}
\newcommand*\@PS@rubber[1][\PSname]{%
- \@safe@space{#1}\space\ignorespaces
+ \@safe@space{#1}{\nobreak\space}\ignorespaces
}
\newcommand*\PS{%
\ps\@ifstar{\@PS@rubber}{\@PS@rigid}%
@@ -4479,7 +5521,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \subsubsection{Address labels}
%
% This part of the code should probably be detached and put in a
-% separte file to be loaded on demand.
+% separate file to be loaded on demand.
%
% The general idea is the following:
% \begin{itemize}
@@ -4564,8 +5606,8 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \begin{environment}{baselabels}
% This is the actual environment for producing sheets of address
% labels: the \env{labels} environment (see below) is simply a wrapper
-% that offers to the user the opportunity of changing some settings
-% before invoking \env{baselabels}.
+% that offers the user the opportunity of changing some settings before
+% invoking \env{baselabels}.
% \begin{macrocode}
\newenvironment*{baselabels}{%
\cleardoubleemptypage
@@ -4627,7 +5669,8 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \end{environment}
%
% \begin{environment}{labels}
-% It is the user-level environment for producing one or more sheets of address labels.
+% It is the user-level environment for producing one or more sheets of
+% address labels.
% Its default definition simply invokes \env{baselables}, but the
% user may redefine it to set some style parameters. For example:
%\begin{verbatim}
@@ -4847,6 +5890,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \begin{macrocode}
%</letter>
% \end{macrocode}
+% \noindent\null\par
%
% \section{The code for the \packlass{\articoletteracdp} class}
%
@@ -4860,9 +5904,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1996/06/01] % LaTeX2e is required!
\ProvidesClass{articoletteracdp}
- [2006/01/01 v0.34 (development)]
-%% \typeout{Copyright (C) 1999-2006 by Gustavo MEZZETTI,
-%% all rights reserved.}
+ [2015/02/08 v0.36 (development)]
% \end{macrocode}
%
% \subsection{Initial code}
@@ -4884,12 +5926,12 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \end{macrocode}
%
% \begin{macro}{\@letter@bookmark}
-% Support for pdf\TeX\slash\packlass{\hyperref}. If pdf\TeX\ is
-% being used to typeset the document, if the \packlass{\hyperref}
-% package is loaded, and if the user does not ask us to avoid it, we
-% shall generate a ``level~0'' bookmark for each letter we shall
+% Support for pdf\TeX\slash\packlass{\HyperRef}. If pdf\TeX\ is
+% being used to typeset the document, if the \packlass{\HyperRef}
+% package is loaded, and if the user doesn't ask us to avoid doing so,
+% we shall generate a ``level~0'' bookmark for each letter we shall
% typeset (sections are of level~1, so they will be bookmarked under
-% letters). This command serves to this purpose: it is defined either
+% letters). This command serves this purpose: it is defined either
% as "\@gobbletwo", if such bookmarks are \emph{not} being generated,
% or as a suitable invocation of "\pdfbookmark" if they are. To begin
% with, we set the former alternative, which makes it act as a no-op.
@@ -4930,9 +5972,9 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% The option \opz{letterbookmarks} causes the bookmarks for letters to
% be generated. Upon expansion, the 2~arguments of
% "\@letter@bookmark" will become arguments of "\pdfbookmark". We
-% also need to ask the \packlass{\hyperref} package to generate closed
+% also need to ask the \packlass{\HyperRef} package to generate closed
% bookmarks. Note that the user can later overwrite this setting;
-% note also that nothing will happen if \packlass{\hyperref} is not
+% note also that nothing will happen if \packlass{\HyperRef} is not
% loaded later.
% \begin{macrocode}
\DeclareOption{letterbookmarks}{%
@@ -4949,7 +5991,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \end{macrocode}
% The option \opz{openletterbookmarks} causes the bookmarks for
% letters to be generated and to be presented open to the reader. We
-% ask the \packlass{\hyperref} package to generate open bookmarks, but
+% ask the \packlass{\HyperRef} package to generate open bookmarks, but
% only one level deep. Note that the user can later overwrite this
% setting. This is made the default option, below.
% \begin{macrocode}
@@ -4970,12 +6012,12 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \subsection{Class loading}
%
% \begin{macrocode}
-\LoadClass{letteracdp}[2006/01/01]
+\LoadClass{letteracdp}[2015/02/08]
% \end{macrocode}
%
% \subsection{Main code}
%
-% Unfortunately, the code is not commented (yet).
+% Unfortunately, most of the code is not commented (yet).
%
% \subsubsection{More initializations}
%
@@ -4986,12 +6028,12 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\newcounter{table}[letter]
% \end{macrocode}
%
-% Stuff for dealing with the \packlass{\hyperref} package. The
+% Stuff for dealing with the \packlass{\HyperRef} package. The
% problem is our non-standard hierarchy of sectioning commands, with
% paragraphs placed directly below sections. In this version (0.34) we
% choose a different approach than the one we adopted in version 0.33,
% redefining "\theHparagraph"; of course, this must be done
-% \emph{after} \packlass{\hyperref} has been loaded, and we could not
+% \emph{after} \packlass{\HyperRef} has been loaded, and we could not
% find any better place for this than the "\AtBeginDocument" hook.
% Within the same hook, we also redefine "\theHsection" (the counter
% used by \packlass{\@hyperref} to generate hyperlinks to sections) so
@@ -5007,7 +6049,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\def\toclevel@paragraph{2}%
}{%
% \end{macrocode}
-% If the \packlass{\@hyperref} package is not loaded, we assure that
+% If the \packlass{\@hyperref} package is not loaded, we ensure that
% "\@letter@bookmarks" acts as a no-op:
% \begin{macrocode}
\let\@letter@bookmark\@gobbletwo
@@ -5017,7 +6059,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
%
% \begin{macro}{\hyper@last}
% The following line is to deactivate the check that
-% \packlass{\hyperref} makes against old files; this is necessary
+% \packlass{\HyperRef} makes against old files; this is necessary
% because otherwise, on the first \LaTeX\ run, it would overwrite our
% redefinition of "\@starttoc", possibly writing unwanted
% \filedir{.toc}, \filedir{.lof}, and \filedir{.lot} files, and (much
@@ -5025,8 +6067,8 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% "\tableofcontents", "\listoffigures", or "\listoftables". Of
% course, this means that the user must be informed that (s)he has to
% delete the old files by hand.~\mbox{:-(}^^A ) paren match
-% \spacefactor\sfcode`. \space Note, anyway, that the automatic check
-% made by \packlass{\hyperref} would not work with the C.D.P. Bundle
+% \closeofsentencespace Note, anyway, that the automatic check
+% made by \packlass{\HyperRef} would not work with the \Bundle\
% in any case (because it looks for \filedir{.toc}, \filedir{.lof},
% etc.\ files, not for, say, \filedir{.toc1}, etc.), so\ldots
% \begin{macrocode}
@@ -5364,292 +6406,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \begin{macrocode}
%</artico>
% \end{macrocode}
-%
-% \section{The code for the \packlass{\adiseal} package}
-%
-% This part of the file goes into \filedir{\adiseal.sty}.
-% \emph{Very obsolete:} eliminate?
-% \begin{macrocode}
-%<*adipk>
-% \end{macrocode}
-%
-% \subsection{Identification}
-%
-% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}[1998/06/01] % LaTeX2e is required!
-\ProvidesPackage{adiseal}
- [2006/01/01 v0.34 (development)]
-\@ifdefinable\@adiseal{\def\@adiseal{adiseal}}
-% \end{macrocode}
-%
-% \subsection{Initial code}
-%
-% This segment contains also code that could have been deferred to
-% the Main Code segment, but which is handy to have here, right at
-% the beginning.
-%
-% \begin{macro}{\ADIWWW}
-% The web address of ADI-PD is stored in a macro accessible to the
-% user.
-% \begin{macrocode}
-\newcommand*\ADIWWW{%
- http://www.math.unipd.it/\string~favero/adipd/%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@seal@graph@file}
-% \changes{0.34}{2006 Jan 01}{Got rid of the \filedir{.eps} extension
-% in the name of the file of the ADI seal: thus, the extension
-% \filedir{.eps} or \filedir{.pdf} will be automatically supplied
-% by the \packlass{epsgif} package according to the actual
-% typesetting engine employed (\TeX\ or pdf\TeX)}
-% The name of the file which contains the image of the ADI seal is
-% also kept in a macro, to allow customization, but this macro is not
-% made accessible to the user. \emph{Note:} the image must be contained
-% in a file in Encapsulated PostScript format or, for pdf\TeX, in
-% Portable Document Format, and it should be exactly \( 60\,\mbox{bp} \)
-% wide by \( 42\,\mbox{bp} \) tall. The appropriate file extension
-% will be supplied by the \packlass{epsfig} package.
-% \begin{macrocode}
-\@ifdefinable\@seal@graph@file{\def\@seal@graph@file{%
- adiseal% must be an EPS or a PDF file
-}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\if@use@pixmap@}
-% The following switch is used to implement the
-% \iopz{nopixmap}\eopz{usepixmap}\fopz\space mutually exclusive
-% options: see subsection~\ref{sS:adisealoptdec} for details.
-% \begin{macrocode}
-\@ifdefinable\if@use@pixmap@{\newif\if@use@pixmap@}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@temp@adiseal}
-% A ``scratch'' macro, used as a temporary storage in the sequel.
-% Here, we simply check that this name can be used as a macro name.
-% \begin{macrocode}
-\@ifdefinable\@temp@adiseal{}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Declaration of options}
-% \label{sS:adisealoptdec}
-%
-% The \opz{nopixmap} option inhibits the printing of the seal; more
-% precisely, it prevents the \packlass{\adiseal} package from trying to
-% load the \packlass{\epsfig} package and the file containing the image
-% of the seal. The \opz{usepixmap} option, on the contrary, tries to load
-% the file containing the image and the \packlass{\epsfig} package,
-% and, if both are succesfully loaded, causes the printing of the seal.
-% Should the \packlass{\epsfig} package or the file containing the image
-% of the seal be unavailable, the \opz{usepixmap} option will be
-% converted to \opz{nopixmap} at package-loading time (actually, it is
-% the "\if@use@pixmap@" switch that will be forced to ``false''). When,
-% for either reason, the seal is not displayed, a placeholder is printed
-% in its place.
-%
-% \begin{macrocode}
-\DeclareOption{nopixmap}{\@use@pixmap@false}
-\DeclareOption{usepixmap}{\@use@pixmap@true}
-% \end{macrocode}
-%
-% \subsection{Option processing}
-%
-% We select the \opz{nopixmap} option by default, because the file
-% containing the image of the seal is not included in the C.D.P.
-% Bundle.
-% \begin{macrocode}
-\ExecuteOptions{nopixmap}
-\ProcessOptions\relax
-% \end{macrocode}
-%
-% \subsection{Package loading}
-%
-% \begin{macrocode}
-\def\@temp@adiseal#1{%
- \@use@pixmap@false
- \PackageWarningNoLine{\@adiseal}{%
- Can't find the #1;\MessageBreak
- option usepixmap ignored (converted to nopixmap).\MessageBreak
- The ADI seal will _not_ be printed%
- }%
-}
-\if@use@pixmap@
- \IfFileExists{\@seal@graph@file.eps}{%
- \IfFileExists{epsfig.sty}{%
- \RequirePackage{epsfig}%
- }{%
- \@temp@adiseal{epsfig package}%
- }%
- }{%
- \@temp@adiseal{pixel map for the ADI seal}%
- }%
-\fi
-\let\@temp@adiseal\@undefined
-% \end{macrocode}
-%
-% \subsection{Main code}
-%
-% Unfortunately, the code is not commented (yet).
-%
-% \subsubsection{The two main commands}
-%
-% \begin{macrocode}
-\@ifdefinable\@seal@box{\def\@seal@box#1{%
- \parbox[t][42bp][c]{60bp}{\centerline{#1}}%
-}}
-\newcommand*\ADIconcert{\par\noindent
- \emph\concertname
- \ADIaddress
-}
-\DeclareRobustCommand*\ADIaddress{\par
- \setbox\z@\vtop{%
- \normalfont\normalsize
- \leftline{%
- \vtop{%
- \hbox{%
- \if@use@pixmap@
- \edef\@temp@adiseal{%
- \noexpand\epsfig{file=\@seal@graph@file,%
- height=42bp,width=60bp,clip=}%
- }%
- \@seal@box\@temp@adiseal
- \let\@temp@adiseal\@undefined
- \else
- \setlength\fboxrule{.2pt}%
- \setlength\fboxsep{-\fboxrule}%
- \fbox{\@seal@box\substitutesealname}%
- \fi
- }%
- }%
- \kern\baselineskip
- \vtop{%
- \null\nointerlineskip
- \hbox{%
- \Large ADI%
- \setbox\z@\hbox{\ignorespaces\seatacronym\unskip}%
- \ifdim\wd\z@>\z@
- -\unhbox\z@
- \else
- \unhbox\z@
- \fi
- }%
- \ialign{##\cr
- \spaceskip \fontdimen\tw@\font
- \@plus \@ne fil%
- \@minus \fontdimen4\font
- Associazione Dottorandi e\cr
- Dottori di Ricerca Italiani\cr
- }%
- \hbox{%
- \setbox\z@\hbox{\ignorespaces\seatname\unskip}%
- \ifdim\wd\z@>\z@
- --- \unhbox\z@
- \else
- \unhbox\z@
- \fi
- }%
- \global\dimen@i\prevdepth
- }%
- }%
- \kern\p@
- \prevdepth \dimen@i
- \leftline{\ttfamily\small\ADIWWW}%
- \global\dimen@i\prevdepth
- }%
- \dimen@ \dp\z@
- \advance \dimen@ -\dimen@i
- \dimen@ii .5\baselineskip
- \divide \dimen@ \dimen@ii
- \count@ \dimen@
- \advance \count@ 1
- \dimen@ \dp\z@
- \advance \dimen@ -\count@\dimen@ii
- \box\z@
- \prevdepth\dimen@
-}
-% \end{macrocode}
-%
-% \subsubsection{Names}
-%
-% Note that "\seatacronym" and "\seatname" can also be redefined as
-% empty strings: in this case, the package automatically suppresses
-% some of the surrounding printings that have no meaning when those
-% strings are empty.
-%
-% \begin{macrocode}
-\newcommand*\concertname {di concerto con}
-\newcommand*\seatacronym {PD}
-\newcommand*\seatname {Sede di Padova}
-\newcommand*\substitutesealname{Logo ADI}
-% \end{macrocode}
-%
-% End of the module for the \packlass{\adiseal} package.
-% \begin{macrocode}
-%</adipk>
-% \end{macrocode}
-%
-% \section{The code for the \packlass{\lettcdpadi} class}
-%
-% This part of the file goes into \filedir{\lettcdpadi.cls}.
-% \begin{macrocode}
-%<*adicl>
-% \end{macrocode}
-%
-% The purpose of this file is simply to supply ``glue code'' to
-% support the legacy \packlass{\lettcdpadi} class. The document
-% class is ``redirected'' to \packlass{\letteracdp}, and the
-% \packlass{\adiseal} package is automatically loaded. Options are
-% properly shunted, too.
-%
-% It should be time to expunge this file from the Bundle, perhaps
-% [v0.33], but it is also true that it occupies so few
-% bytes\ldots\space(that is, an entire block of the disk!).
-%
-% \subsection{Identification}
-%
-% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}[1998/06/01] % LaTeX2e is required!
-\ProvidesClass{lettcdpadi}
- [2006/01/01 v0.34 (development)]
-% \end{macrocode}
-%
-% \subsection{Initial code}
-%
-% This segment is empty in the \packlass{\lettcdpadi} class.
-%
-% \subsection{Declaration of options}
-%
-% \begin{macrocode}
-\DeclareOption{nopixmap} {\PassOptionsToPackage{nopixmap} {adiseal}}
-\DeclareOption{usepixmap}{\PassOptionsToPackage{usepixmap}{adiseal}}
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{letteracdp}}
-% \end{macrocode}
-%
-% \subsection{Option processing}
-%
-% \begin{macrocode}
-\ProcessOptions\relax
-% \end{macrocode}
-%
-% \subsection{Class and package loading}
-%
-% \begin{macrocode}
-\LoadClass{letteracdp}[2006/01/01]
-\RequirePackage{adiseal}[2006/01/01]
-% \end{macrocode}
-%
-% \subsection{Main code}
-%
-% This segment is empty in the \packlass{\lettcdpadi} class.
-%
-% End of the module for the \packlass{\lettcdpadi} class.
-% \begin{macrocode}
-%</adicl>
-% \end{macrocode}
+% \noindent\null\par
%
% \section{The code for the \packlass{\cdpaddon} package}
%
@@ -5664,26 +6421,26 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1998/06/01] % LaTeX2e is required!
\ProvidesPackage{cdpaddon}
- [2006/01/01 v0.34 (development)]
+ [2015/02/08 v0.36 (development)]
\@ifdefinable\@cdpaddon{\def\@cdpaddon{cdpaddon}}
% \end{macrocode}
%
% \subsection{Initial code}
%
-% Switches.
+% Switches; "\if@custom@lh@" added in vers.~0.36 (2015 Feb~08).
% \begin{macrocode}
\def\do#1{\@ifdefinable#1{\newif#1}}
\do\if@using@cdp@
\do\if@use@color@
\do\if@use@hyper@
+\do\if@custom@lh@
% \end{macrocode}
%
% \begin{macro}{\@cdpaddon@printer}
% Below, we shall store in this macro the name (without the extension
% \filedir{.def}) of the definition file from which to read the
-% definitions of the colors for the C.D.P. seal. It is needed only
-% during the initialization of the package, and it is "\@undefined"
-% before the end. If it is empty, the emergency colors will be used:
+% definitions of the colors for the C.D.P. seal.
+% If it is empty, the emergency colors will be used:
% we make this the default.
% \begin{macrocode}
\@ifdefinable\@cdpaddon@printer{\let\@cdpaddon@printer\@empty}
@@ -5737,13 +6494,25 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\@unknownoptionerror
\fi
}
-\DeclareOption{bw}{\@use@color@false}
-\DeclareOption{color}{\@use@color@true}
-\DeclareOption{hypertext}{\@use@hyper@true}
-\DeclareOption{plaintext}{\@use@hyper@false}
% \end{macrocode}
-% The purpose of the following ``catch-all'' option is to intercept
-% a \opz{printer:}\ldots\ option requesting a color definition file.
+% Vers.~0.36 (2015 Feb~08): modified the existing option so that they also
+% deal with the new "\if@custom@lh@" switch\ldots
+% \begin{macrocode}
+\DeclareOption{bw}{\@use@color@false\@custom@lh@false}
+\DeclareOption{color}{\@use@color@true\@custom@lh@false}
+\DeclareOption{hypertext}{\@use@hyper@true\@custom@lh@false}
+\DeclareOption{plaintext}{\@use@hyper@false\@custom@lh@false}
+% \end{macrocode}
+% \ldots~and added new \opz{customletterhead} option.
+% \begin{macrocode}
+\DeclareOption{customletterhead}{%
+ \@use@color@false
+ \@use@hyper@false
+ \@custom@lh@true
+}
+% \end{macrocode}
+% Otherwise, we can have a \opz{printer:}\ldots\ option requesting a color
+% definition file.
% \begin{macrocode}
\DeclareOption*{%
\expandafter\@temp@cdpaddon@a\CurrentOption,printer:,\@@@%
@@ -5768,23 +6537,19 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
%
% \subsection{Package loading}
%
+% V.~0.34a: fixed up the use of dvips names
+% (bug reported by Tommaso Gordini).^^A
+% \changes{0.34a}{2010 Jun 01}{Fixed up the use of dvips names in the
+% \protect\packlass{\protect\cdpaddon} package (bug reported by Tommaso
+% Gordini).}
+% V.~0.36: also removed the ridiculous check for the presence of standard
+% packages on the system!
% \begin{macrocode}
-\def\@temp@cdpaddon@a#1#2#3#4#5{%
- \IfFileExists{#1.sty}{%
- \RequirePackage[#2]{#1}%
- }{%
- \@nameuse{@use@#3@false}
- \PackageWarningNoLine{\@cdpaddon}{%
- Can't find the #1 package;\MessageBreak
- option #4 ignored (converted to #5)%
- }%
- }%
-}
\if@use@color@
- \@temp@cdpaddon@a{color}{}{color}{color}{bw}
+ \RequirePackage[dvipsnames]{color}
\fi
\if@use@hyper@
- \@temp@cdpaddon@a{hyperref}{}{hyper}{hypertext}{plaintext}
+ \RequirePackage{hyperref}
\fi
% \end{macrocode}
%
@@ -5794,29 +6559,28 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
%
% \subsubsection{Redefinition of the seal, etc.}
%
-% The following macro is used to draw in color the thin, small line
-% that, when the page needs to be folded, indicates where to fold it.
-% We need to define it here, outside of the conditionals, and to
-% assign it later to "\@folding@tag" using "\let" (see below) because
-% it contains a "\fi" (mumble grumble\ldots).
-% \begin{macrocode}
-\@ifdefinable\@back@folding@tag{\def\@back@folding@tag{%
- \if@do@fold@
- \raisebox{\@lh@folding@ht}[\z@][\z@]{%
- \makebox[\z@][l]{%
- \color{strong@col}%
- \dimen@ -\@lh@right@margin
- \advance\dimen@ 1cm%
- \kern\dimen@ \vbox{%
- \kern -.1\p@
- \hrule \@height .1\p@ \@depth .1\p@ \@width 5mm%
- \kern -.1\p@
- }%
- }%
- }%
- \fi
-}}
-% \end{macrocode}
+% Vers.~0.36 (2015 Feb~08): removed the "\@back@folding@tag" macro,
+% now become unnecessary because of the introduction of the
+% "\foldingtagrule" user command.
+% We leave the code in place, but commented out, for documentation purposes.
+%\begin{verbatim}
+%\@ifdefinable\@back@folding@tag{\def\@back@folding@tag{%
+% \if@do@fold@
+% \raisebox{\@lh@folding@ht}[\z@][\z@]{%
+% \makebox[\z@][l]{%
+% \color{strong@col}%
+% \dimen@ -\@lh@right@margin
+% \advance\dimen@ 1cm%
+% \kern\dimen@ \vbox{%
+% \kern -.1\p@
+% \hrule \@height .1\p@ \@depth .1\p@ \@width 5mm%
+% \kern -.1\p@
+% }%
+% }%
+% }%
+% \fi
+%}}
+%\end{verbatim}
%
% If the \packlass{\letteracdp} class is loaded\ldots
% \begin{macrocode}
@@ -5830,9 +6594,9 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% error if \meta{name} is undefined, and executes \meta{code}
% otherwise. It is intended that \meta{code} is the code that does the
% actual redefinition. Note that \meta{name} must be indicated
-% \emph{without} the backslash. Note also that it is not necessary to
-% put in a second parameter for \meta{code}: simply, "{"\meta{code}"}"
-% will become the third parameter of "\@ifundefined".
+% \emph{without} the backslash. Note also that it is not necessary
+% a second parameter for \meta{code}: "{"\meta{code}"}" becomes the
+% third parameter of "\@ifundefined".
% \begin{macrocode}
\def\@temp@cdpaddon@a#1{%
\@ifundefined{#1}{%
@@ -5845,7 +6609,10 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
is actually undefined.\MessageBreak
Probably, you are using an old or modified version
of that class.\MessageBreak
- Proceed, but some of the colors won't come out right.%
+% \end{macrocode}
+% Vers.~0.36 (2015 Feb~08): modified the following line:
+% \begin{macrocode}
+ Proceed, but keep your fingers crossed!%
}%
}%
}
@@ -5963,7 +6730,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% We define another handy subroutine. Given the name \meta{boxname}
% of an hbox, "\@temp@cdpaddon@b{"\meta{boxname}"}" causes a
% "\color{strong@col}" declaration to be added at the beginning of
-% "\"\meta{boxname}, properly contained in a group to assure that the
+% "\"\meta{boxname}, properly contained in a group to ensure that the
% "\special" for restoring the previous colors is included in the box too.
% We use this method of setting and resetting the color inside the
% individual boxes because the one used in the previous versions, of
@@ -5980,18 +6747,19 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
%
% Actual redefinition of macros begins here.
%
-% \begin{macro}{\@folding@tag}
-% First, install the redefinition of "\@folding@tag" that we had
-% prepared in advance.
+% Vers.~0.36 (2015 Feb~08): no need, now, to redefine the "\@folding@tag"
+% macro: just redefine the user-level command "\foldingtagrule"
+% (much neater!).
% \begin{macrocode}
- \@temp@cdpaddon@a{@folding@tag}{%
- \let\@folding@tag\@back@folding@tag
+ \renewcommand*\foldingtagrule{%
+ \color{strong@col}%
+ \CDPFactoryFoldingTagRule
}
% \end{macrocode}
-% \end{macro}
+%
% \begin{macro}{\@logo@box@base}
% \changes{0.32}{2002 Jul 01}{Eliminated an awful bug introduced with
-% version 0.31 (a conditional that could not appear at this spot)}
+% version 0.31 (a conditional that could not appear at this spot).}^^A
% Color the main part of the seal.
% \begin{macrocode}
\@temp@cdpaddon@a{@logo@box@base}{%
@@ -6098,6 +6866,147 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\fi
% \end{macrocode}
%
+% Support for user-defined letterheads added in vers.~0.36 (2015 Feb~08).
+% Support for custom logo (cf.~\sty{logo} pagestyle and its relatives)
+% still kept hidden.
+%
+% First, define storage boxes to hold custom head, foot, and logo.
+% \begin{macrocode}
+ \newsavebox\@cdp@custom@lhead@box
+ \newsavebox\@cdp@custom@lfoot@box
+ \newsavebox\@cdp@custom@llogo@box
+% \end{macrocode}
+%
+% \begin{environment}{customletterhead}
+% \begin{environment}{customletterfoot}
+% \begin{environment}{customletterlogo}
+% These three environments are defined similarly, so we use one of the
+% ``scratch'' macros to perform their definition
+% The parameters are:\strut\\*
+% \strut
+% \begin{tabular}{r@{}l}
+% \param{1} & \( \texttt{head} \mathbin{|} \texttt{foot} \mathbin{|}
+% \texttt{logo} \);\\
+% \param{2} & intended alignment of the \env{minipage}
+% (\( \texttt{b} \mathbin{|} \texttt{t} \));\\
+% \param{3} & either "\vss" or nothing;\\
+% \param{4} & either "\vss" or nothing.\\
+% \end{tabular}\strut
+% \begin{macrocode}
+ \def\@temp@cdpaddon@b#1#2#3#4{%
+ \newenvironment*{customletter#1}[1]{%
+% \end{macrocode}
+% Save in the appropriate box, pretending that they have zero height and
+% depth\ldots
+% \begin{macrocode}
+ \setbox\@nameuse{@cdp@custom@l#1@box}\vbox to\z@ \bgroup
+ \hsize ##1\relax
+ \parskip \z@skip
+ #3% either \vss or nothing
+% \end{macrocode}
+% \ldots~the contents of a temporary \env{minipage}; note that we need to
+% disable the ``"Missing \begin{document}"'' error, which is triggered by
+% "\everypar".
+% \begin{macrocode}
+ \everypar{}%
+ \noindent\minipage[#2]{##1}%
+ \null
+ }{%
+% \end{macrocode}
+% Code for ending the \env{minipage}: note that we smash to zero the
+% possible depth of the contents.
+% \begin{macrocode}
+ \par
+ \vskip -\baselineskip
+ \null
+ \endminipage
+ #4% either \vss or nothing
+ \egroup
+% \end{macrocode}
+% ``Lift'' the definition out of the group implied by the environment.
+% We have used the outer boxes, above, because we prefer not to keep around
+% any ``scratch'' boxes (\emph{e.g.}, "\box1") when we must pass control to
+% the final user.
+% \begin{macrocode}
+ \global \setbox \@ne \box \@nameuse{@cdp@custom@l#1@box}%
+ \xdef\@cdp@reserved{%
+ \setbox \@nameuse{@cdp@custom@l#1@box}\box \@ne
+ }%
+ \aftergroup \@cdp@reserved
+ }%
+ }%
+% \end{macrocode}
+% Perform definitions of the three abovementioned environments.
+% \begin{macrocode}
+ \@temp@cdpaddon@b{head}{b}{\vss}{}
+ \@temp@cdpaddon@b{foot}{t}{}{\vss}
+ \@temp@cdpaddon@b{logo}{b}{\vss}{}
+% \end{macrocode}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+%
+% \begin{macro}{\ruleacrossheadorfoot}
+% Draw a rule across head or foot. Synopsis:
+% \begin{flushleft}
+% "\ruleacrossheadorfoot["\meta{wdth\_l}"]["\meta{wdth\_r}"]"
+% \end{flushleft}
+% \meta{wdth\_l} is the inset from the left margin (defaults to zero),
+% a negative inset causes the rule to protrude into the margin itself;
+% \meta{wdth\_r} is the inset from the right margin (defaults to
+% \meta{wdth\_l}). Both \meta{wdth\_l} and \meta{wdth\_r} must be
+% rigid lengths. \emph{Note:} "\@tempdima" and "\@tempdimb" are used here.
+% \begin{macrocode}
+ \newcommand*\ruleacrossheadorfoot[1][\z@]{\par
+ \setlength\@tempdima{#1}%
+ \@ifnextchar [% ] bracket matching
+ \@cdp@rule@across@x
+ {%
+ \@tempdimb \@tempdima
+ \@cdp@rule@across
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% Inner implementation.
+% \begin{macrocode}
+ \@ifdefinable\@cdp@rule@across@x{\def\@cdp@rule@across@x[#1]{%
+ \setlength\@tempdimb{#1}%
+ \@cdp@rule@across
+ }}
+ \@ifdefinable\@cdp@rule@across{\def\@cdp@rule@across{
+ \nobreak
+ \vskip -\baselineskip
+ \hb@xt@ \hsize {%
+ \kern \@tempdima \hrulefill \kern \@tempdimb
+ }%
+ }}
+% \end{macrocode}
+%
+% If the \opz{customletterhead} option is in force, install custom
+% head\slash foot\slash logo.
+% \begin{macrocode}
+ \if@custom@lh@
+ \@temp@cdpaddon@a{@cdp@head}{\def\@cdp@head{%
+ \hss\copy\@cdp@custom@lhead@box\hss
+ }}
+ \@temp@cdpaddon@a{@cdp@foot}{\def\@cdp@foot{%
+ \hss\copy\@cdp@custom@lfoot@box\hss
+ }}
+% \end{macrocode}
+% The logo is assumed to protrude to the left of the header line.
+% \begin{macrocode}
+ \@temp@cdpaddon@a{@cdp@logo}{\def\@cdp@logo{%
+ \hb@xt@ \z@ {\hss\copy\@cdp@custom@llogo@box}%
+ }}
+% \end{macrocode}
+% Do not forget to reset "\longindentation"!
+% \begin{macrocode}
+ \setlength\longindentation{.5\textwidth}
+ \fi
+% \end{macrocode}
+%
% We now deal with hyperlinks. If the user requested them\ldots
% \begin{macrocode}
\if@use@hyper@
@@ -6108,7 +7017,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% typesetting until that moment. Note that we just need to encapsulate
% the web address of the \emph{Coordinamento} into an "\href" command:
% the color-switching command has already been given above, inside the
-% "\@cdp@foot" box (the color must be changed independently from the use
+% "\@cdp@foot" box (the color must be changed independently of the use
% of hyperlinks).
% \begin{macrocode}
\AtBeginDocument{%
@@ -6165,7 +7074,18 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
\let\if@use@hyper@\@undefined
\let\@use@hyper@true\@undefined
\let\@use@hyper@false\@undefined
-\let\@back@folding@tag\@undefined
+% \end{macrocode}
+% Vers.~0.36 (2015 Feb~08): added the following three lines\ldots
+% \begin{macrocode}
+\let\if@custom@lh@\@undefined
+\let\@custom@lh@true\@undefined
+\let\@custom@lh@false\@undefined
+% \end{macrocode}
+% \ldots~and removed the following one:
+%\begin{verbatim}
+%\let\@back@folding@tag\@undefined
+%\end{verbatim}
+% \begin{macrocode}
\let\@cdpaddon@printer\@undefined
\let\@temp@cdpaddon@b\@undefined
% \end{macrocode}
@@ -6206,11 +7126,144 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \begin{macrocode}
%</addon>
% \end{macrocode}
+% \noindent\null\par
+%
+% \section{The code for the \packlass{\cdpbabel} package}
+%
+% This part of the file goes into \filedir{\cdpbabel.sty}.
+% \begin{macrocode}
+%<*babel>
+% \end{macrocode}
+%
+% \subsection{Identification}
+%
+% As usual, the reason for requesting this specific version of \LaTeXe\ is
+% shrouded in mystery\ldots
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[1998/09/02] % LaTeX2e is required!
+\ProvidesPackage{cdpbabel}
+ [2015/02/08 v0.36 (development)]
+\@ifdefinable\@cdpbabel{\def\@cdpbabel{cdpbabel}}
+% \end{macrocode}
+%
+% \subsection{Initial code}
+%
+% Usual check for availability of names.
+% \begin{macrocode}
+\def\do#1{\@ifdefinable #1{\let #1\@empty}}
+\do\@cdpbabel@perform@redefinitions
+\do\@cdpbabel@letter@names
+\do\@cdpbabel@artlet@names
+% \end{macrocode}
+%
+% \subsection{Declaration of options}
+%
+% Options specify which languages should be activated. A language option is
+% both passed on to the \packlass{\babel} package and used to select and
+% load a ``C.D.P. language definition file''.
+% \begin{macrocode}
+\DeclareOption*{%
+ \IfFileExists{cdpnames\CurrentOption.ldf}{%
+ \input{cdpnames\CurrentOption.ldf}%
+% \end{macrocode}
+% If \( "\CurrentOption" = \mbox{\opz{italian}} \), say,
+% then the following amounts to
+%\begin{verbatim}
+%\def\do#1{\g@addto@macro\@cdpbabel@perform@redefinitions{%
+% \addto\captionsitalian{#1}%
+%}}
+%\end{verbatim}
+% which is used just below with parameter~\#1 set equal to
+% \emph{the expansion of} either "\@cdpbabel@letter@names" or
+% "\@cdpbabel@artlet@names".
+% \begin{macrocode}
+ \edef\do##1{%
+ \noexpand\g@addto@macro
+ \noexpand\@cdpbabel@perform@redefinitions
+ {%
+ \noexpand\addto \csname captions\CurrentOption \endcsname
+ {##1}%
+ }%
+ }%
+ \@ifclassloaded{letteracdp}{%
+ \expandafter\do \expandafter{\@cdpbabel@letter@names}%
+ }{}%
+ \@ifclassloaded{articoletteracdp}{%
+ \expandafter\do \expandafter{\@cdpbabel@artlet@names}%
+ }{}%
+ \PackageInfo{\@cdpbabel}{%
+ Redefined the names of "C.D.P. Bundle" captions\MessageBreak
+ for the language `\CurrentOption'%
+ }%
+ }{%
+ \PackageError{\@cdpbabel}{%
+ Name def. file `cdpnames\CurrentOption.ldf' not found%
+ }{%
+ Files of the form `cdpnames<language>.ldf' are meant
+ to define the names\MessageBreak
+ in the language <language> of some captions used by
+ the "C.D.P. Bundle".\MessageBreak
+ You requested\MessageBreak
+ \space\space<language> = `\CurrentOption',\MessageBreak
+ but the corresponding file is missing; therefore,
+ probably some of these\MessageBreak
+ captions will not be printed as intended.\MessageBreak
+ This error affects only the \@cdpbabel\space package,
+ but not the babel package.\MessageBreak
+ You may continue:
+ type \space <return> \space to proceed.%
+ }%
+ }%
+ \PassOptionsToPackage{\CurrentOption}{babel}%
+}
+% \end{macrocode}
+%
+% \subsection{Option processing}
+%
+% \mbox{$*$-form} of "\ProcessOptions" required here.
+% \begin{macrocode}
+\ProcessOptions*
+% \end{macrocode}
+% Now, the following are no longer needed.
+% \begin{macrocode}
+\let \do = \@undefined
+\let \@cdpbabel@letter@names = \@undefined
+\let \@cdpbabel@artlet@names = \@undefined
+% \end{macrocode}
+%
+% \subsection{Package loading}
+%
+% Note that the \packlass{\cdpbabel} package is loaded \emph{instead} of
+% \packlass{\babel}.
+% \begin{macrocode}
+\RequirePackage{babel}
+% \end{macrocode}
+%
+% \subsection{Main code}
+%
+% At this point, "\@cdpbabel@perform@redefinitions" contains exactly the
+% set of "\addto\captions"\meta{language}"{"\ldots"}" commands that need
+% to be executed for the languages that have been specified in the options.
+% So, execute them.
+% \begin{macrocode}
+\@cdpbabel@perform@redefinitions
+% \end{macrocode}
+% After that, "\@cdpbabel@perform@redefinitions" is no longer needed.
+% \begin{macrocode}
+\let \@cdpbabel@perform@redefinitions = \@undefined
+% \end{macrocode}
+%
+% End of the module for the \packlass{\cdpbabel} package.
+% \begin{macrocode}
+%</babel>
+% \end{macrocode}
+% \noindent\null\par
%
% \section{Definition and configuration files}
%
% This section contains the ancillary files (definition and
-% configuration files) used by the \packlass{\cdpaddon} package.
+% configuration files) used by the \packlass{\cdpaddon} and
+% the \packlass{\cdpbabel} packages.
%
% \subsection{The \filedir{\example} file}
%
@@ -6233,7 +7286,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
%%% the name and the release date, respectively, of your file.
%%% Note that the extension ".def" must be included in the file name,
%%% and that the date is in the format YYYY/MM/DD.
-\ProvidesFile{cdpshues-example.def}[2006/01/01 Printer-dependent file]
+\ProvidesFile{cdpshues-example.def}[2015/02/08 Printer-dependent file]
%%%
%%% Define here the colors to use to draw the C.D.P. seal;
%%% "slight@col" is the color used to paint the inner of the D and
@@ -6252,7 +7305,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% \filedir{\epson}.
% \begin{macrocode}
%<*epson>
-\ProvidesFile{epson-stylus-740.def}[2006/01/01 Printer-dependent file]
+\ProvidesFile{epson-stylus-740.def}[2015/02/08 Printer-dependent file]
\definecolor{slight@col}{rgb}{.8,1,.8}
\definecolor{strong@col}{rgb}{0,.266667,0}
%</epson>
@@ -6263,7 +7316,7 @@ mediumsubject,uprightsignature,noPS,indent,105x37labels}
% This part of the file goes into the definition file \filedir{\hplj}.
% \begin{macrocode}
%<*hplj>
-\ProvidesFile{hp-laserjet-4500.def}[2006/01/01 Printer-dependent file]
+\ProvidesFile{hp-laserjet-4500.def}[2015/02/08 Printer-dependent file]
\definecolor{slight@col}{cmyk}{.1,0,.1,0}
\definecolor{strong@col}{cmyk}{.5,0,.5,.5}
%</hplj>
@@ -6289,7 +7342,7 @@ This file is special in that the cdpaddon package stops reading it as
soon as it encounters the first "\DeclareCDPSealHuesDefault" command:
all subsequent lines are ignored, and can hence contain explanatory
comments, just like these. To save disk space (although, in this era
-of gigabytes, this is not a compelling issue!), you can, if you want,
+of terabytes, this is not a compelling issue!), you can, if you want,
delete all lines in this file except the one which contains the first
occurrence of a "\DeclareCDPSealHuesDefault" command (12 lines above);
but if you do so, please be sure to read them before deleting them!
@@ -6325,6 +7378,66 @@ taken into consideration: all subsequent lines are ignored.
%</config>
% \end{macrocode}
%
+% \subsection{The \filedir{\cdpnamesenglish} file}
+%
+% This part of the file goes into the language definition file
+% \filedir{\cdpnamesenglish}.
+% \begin{macrocode}
+%<*lang-en>
+\ProvidesFile{cdpnamesenglish.ldf}[2015/02/08]
+\def\@cdpbabel@letter@names{%
+ \def\subjectname {Subject:}%
+ \def\registeredname {Registered}%
+ \def\registeredRRname {\registeredname~R.R.}%
+ \def\andccname {cc}%
+ \def\ccname {cc:}%
+ \def\enclname {Encl:}%
+ \def\PSname {P.S.:}%
+ \def\headtoname {To:}%
+ \def\lettername {Letter}%
+}
+\def\@cdpbabel@artlet@names{%
+ \def\contentsname {Contents}%
+ \def\listfigurename {List of figures}%
+ \def\listtablename {List of tables}%
+%% \def\refname {References}%
+%% \def\indexname {Index}%
+%% \def\figurename {Figure}%
+%% \def\tablename {Table}%
+}
+%</lang-en>
+% \end{macrocode}
+%
+% \subsection{The \filedir{\cdpnamesitalian} file}
+%
+% This part of the file goes into the language definition file
+% \filedir{\cdpnamesitalian}.
+% \begin{macrocode}
+%<*lang-it>
+\ProvidesFile{cdpnamesitalian.ldf}[2015/02/08]
+\def\@cdpbabel@letter@names{%
+ \def\subjectname {Oggetto:}%
+ \def\registeredname {Raccomandata}%
+ \def\registeredRRname {\registeredname~A.R.}%
+ \def\andccname {e~p.~c.}%
+ \def\ccname {P.~c.:}%
+ \def\enclname {Allegati:}%
+ \def\PSname {P.S.:}%
+ \def\headtoname {A:}%
+ \def\lettername {Lettera}%
+}
+\def\@cdpbabel@artlet@names{%
+ \def\contentsname {Sommario}%
+ \def\listfigurename {Indice delle figure}%
+ \def\listtablename {Indice delle tabelle}%
+ \def\refname {Testi citati}%
+%% \def\indexname {Indice analitico}%
+%% \def\figurename {Figura}%
+%% \def\tablename {Tabella}%
+}
+%</lang-it>
+% \end{macrocode}
+%
% \section{End of input}
%
% The usual "\endinput" which prevents the \DS\ program from putting