summaryrefslogtreecommitdiff
path: root/macros/latex-dev/base/letter.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex-dev/base/letter.dtx')
-rw-r--r--macros/latex-dev/base/letter.dtx100
1 files changed, 62 insertions, 38 deletions
diff --git a/macros/latex-dev/base/letter.dtx b/macros/latex-dev/base/letter.dtx
index ee9a87cf84..7b31dfbbc9 100644
--- a/macros/latex-dev/base/letter.dtx
+++ b/macros/latex-dev/base/letter.dtx
@@ -45,7 +45,7 @@
%<*driver>
\ProvidesFile{letter.drv}
%</driver>
- [2014/09/29 v1.2z
+ [2020/03/11 v1.3b
%<+letter> Standard LaTeX document class]
% \end{macrocode}
%
@@ -115,10 +115,10 @@
% \end{macrocode}
% Some commonly used abbreviations
% \begin{macrocode}
-\newcommand*{\Lopt}[1]{\textsf {#1}}
-\newcommand*{\file}[1]{\texttt {#1}}
-\newcommand*{\Lcount}[1]{\textsl {\small#1}}
-\newcommand*{\pstyle}[1]{\textsl {#1}}
+\newcommand*\Lopt[1]{\textsf {#1}}
+\newcommand*\file[1]{\texttt {#1}}
+\newcommand*\Lcount[1]{\textsl {\small#1}}
+\newcommand*\pstyle[1]{\textsl {#1}}
% \end{macrocode}
% We also want the full details.
% \begin{macrocode}
@@ -162,6 +162,7 @@
% \changes{v1.2q}{1995/05/17}{cleaned up \cs{changes entries}}
% \changes{v1.2q}{1995/05/18}{replaced \cs{hbox to} by \cs{hb@xt@}}
% \changes{v1.2r}{1995/05/23}{removed a superfluous brace}
+% \changes{v1.3a}{2020/03/07}{merged changes to classes.dtx into letter.dtx}
%
% \iffalse
% Copyright (C) 1994 LaTeX3 project, Frank Mittelbach
@@ -751,29 +752,29 @@
% \item |\name{Dr. L. User}| : to be used for the return address on
% the envelope.
% \begin{macrocode}
-\newcommand*{\name}[1]{\def\fromname{#1}}
+\newcommand*\name[1]{\def\fromname{#1}}
% \end{macrocode}
% \item |\signature{Larry User}| : goes after the closing.
% \begin{macrocode}
-\newcommand*{\signature}[1]{\def\fromsig{#1}}
+\newcommand*\signature[1]{\def\fromsig{#1}}
% \end{macrocode}
% \item |\address{3245 Foo St.\\Gnu York}| : used as the return
% address in the
% letter and on the envelope. If not declared, then an
% institutional standard address is used.
% \begin{macrocode}
-\newcommand*{\address}[1]{\def\fromaddress{#1}}
+\newcommand*\address[1]{\def\fromaddress{#1}}
% \end{macrocode}
% \item |\location{Room 374}| : Acts as modifier to the standard
% institutional address.
% \begin{macrocode}
-\newcommand*{\location}[1]{\def\fromlocation{#1}}
+\newcommand*\location[1]{\def\fromlocation{#1}}
% \end{macrocode}
% \item |\telephone{(415)123-4567}| : Just in case some style puts it
% on the letter.
% \changes{v1.2m}{1994/06/23}{Removed typo (\#[] instead of [1])}
% \begin{macrocode}
-\newcommand*{\telephone}[1]{\def\telephonenum{#1}}
+\newcommand*\telephone[1]{\def\telephonenum{#1}}
% \end{macrocode}
% \end{itemize}
% \end{macro}
@@ -805,7 +806,7 @@
% \begin{macro}{\makelabels}
% The |\makelabels| declaration causes mailing labels to be made.
% \begin{macrocode}
-\newcommand*{\makelabels}{%
+\newcommand*\makelabels{%
% \end{macrocode}
% At the beginning of the document, we need to activate the
% |\@mlabel| and |\@startlabels| commands, as well as write
@@ -914,7 +915,7 @@
% When the command |\stopbreaks| is issued no page breaks should
% occur until |\startbreaks| is called.
% \begin{macrocode}
-\newcommand*{\stopbreaks}{%
+\newcommand*\stopbreaks{%
\interlinepenalty\@M
\def\par{\@@par\nobreak}%
\let\\\@nobreakcr
@@ -953,7 +954,7 @@
% \begin{macro}{\startbreaks}
% This cancels the effect of |\stopbreaks|.
% \begin{macrocode}
-\newcommand*{\startbreaks}{%
+\newcommand*\startbreaks{%
\let\\\@normalcr
\interlinepenalty 200%
\def\par{\@@par\penalty 200\relax}}
@@ -1004,7 +1005,7 @@
% declaration--null if none.
% \end{itemize}
% \begin{macrocode}
-\newcommand*{\opening}[1]{\ifx\@empty\fromaddress
+\newcommand*\opening[1]{\ifx\@empty\fromaddress
\thispagestyle{firstpage}%
{\raggedleft\@date\par}%
\else % home address
@@ -1039,7 +1040,7 @@
% \item |\stopbreaks| : a macro that inhibits page breaking.
% \end{itemize}
% \begin{macrocode}
-\newcommand{\closing}[1]{\par\nobreak\vspace{\parskip}%
+\newcommand\closing[1]{\par\nobreak\vspace{\parskip}%
\stopbreaks
\noindent
\ifx\@empty\fromaddress\else
@@ -1085,7 +1086,7 @@
% \changes{v1.2s}{1995/05/25}{replace \cs{reset@font} with
% \cs{normalfont}; remove \cs{rm}}
% \begin{macrocode}
-\newcommand*{\cc}[1]{%
+\newcommand*\cc[1]{%
\par\noindent
\parbox[t]{\textwidth}{%
\@hangfrom{\normalfont\ccname: }%
@@ -1100,7 +1101,7 @@
% & Bar
% \end{tabular}
% \begin{macrocode}
-\newcommand*{\encl}[1]{%
+\newcommand*\encl[1]{%
\par\noindent
\parbox[t]{\textwidth}{%
\@hangfrom{\normalfont\enclname: }%
@@ -1110,7 +1111,7 @@
% The only thing |\ps| needs to do is call |\startbreaks|,
% which allows page breaking again.
% \begin{macrocode}
-\newcommand*{\ps}{\par\startbreaks}
+\newcommand*\ps{\par\startbreaks}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1137,7 +1138,7 @@
% |\protect\standardreturnaddress|.
% \end{itemize}
% \begin{macrocode}
-\newcommand*{\stopletter}{}
+\newcommand*\stopletter{}
% \end{macrocode}
% \end{macro}
%
@@ -1159,7 +1160,7 @@
% The return address for the mailing labels can be stored in this
% macro.
% \begin{macrocode}
-\newcommand*{\returnaddress}{}
+\newcommand*\returnaddress{}
% \end{macrocode}
% \end{macro}
%
@@ -1177,7 +1178,7 @@
% 5352 address labels.
% \changes{v1.2q}{1995/03/14}{changed value of \cs{columnsep} by 1pt}
% \begin{macrocode}
-\newcommand*{\startlabels}{\labelcount\z@
+\newcommand*\startlabels{\labelcount\z@
\pagestyle{empty}%
\let\@texttop\relax
\topmargin -50\p@
@@ -1226,7 +1227,7 @@
% \changes{v1.2q}{1995/03/14}{changed width of the labels slightly to
% prevent \LaTeX\ stuffing two on each line}
% \begin{macrocode}
-\newcommand*{\mlabel}[2]{%
+\newcommand*\mlabel[2]{%
\parbox[b][2in][c]{262\p@}{\strut\ignorespaces #2}%
}
% \end{macrocode}
@@ -1267,7 +1268,7 @@
% For efficiency, level-one list's values are defined at top level, and
% |\@listi| is defined to set only |\leftmargin|.
% \begin{macrocode}
-\setlength\leftmargini {2.5em}
+\setlength\leftmargini {2.5em}
% \end{macrocode}
% The following three are calculated so that they are larger than
% the sum of |\labelsep| and the width of the default labels (which
@@ -1276,8 +1277,8 @@
\setlength\leftmarginii {2.2em}
\setlength\leftmarginiii {1.87em}
\setlength\leftmarginiv {1.7em}
-\setlength\leftmarginv {1em}
-\setlength\leftmarginvi {1em}
+\setlength\leftmarginv {1em}
+\setlength\leftmarginvi {1em}
% \end{macrocode}
% Here we set the top level leftmargin.
% \begin{macrocode}
@@ -1453,11 +1454,30 @@
% \changes{v1.2x}{1997/04/16}{Changed to \cs{textbullet},
% \cs{textasteriskcentered} and \cs{textperiodcentered}}
% \begin{macrocode}
-\newcommand\labelitemi{\textbullet}
-\newcommand\labelitemii{\normalfont\bfseries \textendash}
-\newcommand\labelitemiii{\textasteriskcentered}
-\newcommand\labelitemiv{\textperiodcentered}
+\newcommand\labelitemi {\labelitemfont \textbullet}
+\newcommand\labelitemii {\labelitemfont \bfseries \textendash}
+\newcommand\labelitemiii{\labelitemfont \textasteriskcentered}
+\newcommand\labelitemiv {\labelitemfont \textperiodcentered}
% \end{macrocode}
+%
+% \begin{macro}{\labelitemfont}
+% The default definition for \cs{labelitemfont} is to reset the
+% font to \cs{normalfont} so that always the same symbol is
+% produced regardless of surrounding conditions.
+%
+% \changes{v1.3a}{2020/03/07}{Normalize label fonts}
+% A possible alternative would be
+%\begin{verbatim}
+%\renewcommand\labelitemfont{%
+% \fontseries\seriesdefault
+% \fontshape\shapedefault\selectfont}
+%\end{verbatim}
+% which resets series and shape doesn't touch the family.
+% \begin{macrocode}
+\newcommand\labelitemfont{\normalfont}
+% \end{macrocode}
+% \changes{v1.3b}{2020/03/11}{Added a missing \cs{end{macro}} statement}
+% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
@@ -1484,8 +1504,8 @@
%
% \changes{v1.2q}{1995/03/14}{made command short}
% \begin{macrocode}
-\newcommand*{\descriptionlabel}[1]{\hspace\labelsep
- \normalfont\bfseries #1}
+\newcommand*\descriptionlabel[1]{\hspace\labelsep
+ \normalfont\bfseries #1}
% \end{macrocode}
% \end{macro}
%
@@ -1795,8 +1815,10 @@
% |\parindent| to the appropriate value for succeeding paragraphs
% and put the proper indentation before the mark.
%
+% \changes{v1.3b}{2020/03/11}{make the switch to the use of
+% \cs{newcommand} complete.}
% \begin{macrocode}
-\long\def\@makefntext#1{%
+\newcommand\@makefntext[1]{%
\noindent
\hangindent 5\p@
\hb@xt@5\p@{\hss\@makefnmark}#1}
@@ -1808,10 +1830,12 @@
% footnotes should be produced by the macro |\@makefnmark|. We use
% the default definition for it.
% \begin{macrocode}
-%\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
+%\renewcommand\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
% \end{macrocode}
% \end{macro}
%
+% \section{Initialization}
+%
% \subsection{Words}
%
% \begin{macro}{\ccname}
@@ -1823,10 +1847,10 @@
% English words must be replaced. All the English words that
% require replacement are defined below in command names.
% \begin{macrocode}
-\newcommand*{\ccname}{cc}
-\newcommand*{\enclname}{encl}
-\newcommand*{\pagename}{Page}
-\newcommand*{\headtoname}{To}
+\newcommand*\ccname{cc}
+\newcommand*\enclname{encl}
+\newcommand*\pagename{Page}
+\newcommand*\headtoname{To}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1839,7 +1863,7 @@
% This macro uses the \TeX\ primitives |\month|, |\day| and |\year|
% to provide the date of the \LaTeX-run.
% \begin{macrocode}
-\newcommand*{\today}{\ifcase\month\or
+\newcommand*\today{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space\number\day, \number\year}