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.dtx28
1 files changed, 25 insertions, 3 deletions
diff --git a/macros/latex-dev/base/letter.dtx b/macros/latex-dev/base/letter.dtx
index 7b31dfbbc9..faece887f8 100644
--- a/macros/latex-dev/base/letter.dtx
+++ b/macros/latex-dev/base/letter.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2020
+% Copyright (C) 1993-2021
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file.
%
@@ -45,7 +45,7 @@
%<*driver>
\ProvidesFile{letter.drv}
%</driver>
- [2020/03/11 v1.3b
+ [2021/01/07 v1.3c
%<+letter> Standard LaTeX document class]
% \end{macrocode}
%
@@ -1019,7 +1019,29 @@
\@date \end{tabular}\par}%
\fi
\vspace{2\parskip}%
- {\raggedright \toname \\ \toaddress \par}%
+% \end{macrocode}
+% If the address field used \verb=\\[...]= then we have
+% \cs{toaddress} starting with the bracket argument as the split
+% was done simply at \verb=\\=. So we add \cs{expandafter} here so
+% that is will be used and not typeset. A better fix would be to do
+% a proper parsing but \ldots
+%
+% Other classes based on \texttt{letter.cls} could benefit from the same fix, e.g.,
+% \texttt{akletter.cls},
+% \texttt{bletter.cls},
+% \texttt{letter.cls},
+% \texttt{chletter.cls},
+% \texttt{extletter.cls},\\
+% \texttt{frletter.cls},
+% \texttt{hletter.cls},
+% \texttt{scrlttr2.cls},
+% \texttt{lettre.cls},
+% \texttt{beletter.cls},\\
+% \texttt{brief.cls} and perhaps others.
+%
+% \changes{v1.3c}{2020/12/28}{Add \cs{expandafter} (gh/427)}
+% \begin{macrocode}
+ {\raggedright \toname \expandafter\\\toaddress \par}%
\vspace{2\parskip}%
#1\par\nobreak}
% \end{macrocode}