The \closing
command in scrlttr2.cls
is
\newcommand*{\closing}[1]{{%
\setparsizes{\z@}{\z@}{\z@ plus 1fil}\par@updaterelative\nobreak\par%
\nobreak\vskip\baselineskip%
\stopbreaks\noindent%
\setlength{\@tempdima}{0pt}%
\expandafter\@tempdimaismaxwidthof\scr@signature@var\\\@nil
\expandafter\@tempdimaismaxwidthof\strut\ignorespaces#1\\\@nil
\setlength{\@tempdimb}{\hsize}%
\addtolength{\@tempdimb}{-\useplength{sigindent}}%
\ifdim\@tempdima>\@tempdimb\setlength{\@tempdima}{\@tempdimb}\fi%
\hspace{\useplength{sigindent}}%
\parbox{\@tempdima}{\raggedsignature\strut\ignorespaces%
#1\strut\\[\useplength{sigbeforevskip}]
\strut\usekomavar{signature}\strut}}\par
\nobreak\vskip\baselineskip%
}
How can one lift the signature
variable right next after the closing-phrase (in the same line), and add the \encl{}
, \cc{}
commands (from scrlttr2
) right after?
The code above is somewhat complicated (for there are instructions unknown to me). Likewise, trying to follow an example for the lettr.cls
, so as to renew the \closing
command in How to type specifically on this part of the page?, isn't easy.
Best Answer
Let's start of with an minimal example - something that really helps the community, regardless of what you may think, really. The following is taken from the KOMA-script documentation (section 4.20. Closing, p 190):
This is what the output looks like:
If we wish to modify the structure of the
\closing
, we should modify what is contained within the\parbox
command. Let's do this usingetoolbox
in the form of a\patchcmd
:The above code replaces
\parbox
for\parbox{..}{...}\@gobbletwo
. The replacement\parbox{..}{...}
uses elements of the older\parbox
, but doesn't insert asigbeforevskip
length that used to produce the vertical gap. Instead,\usekomavar{signature}
is set with a space between the actual\closing{#1}
. Also,\\
is\let
to\relax
(but might not be necessary) to avoid forced paragraph breaks. The latter\@gobbletwo
eats the old\parbox
's two arguments.Here's an example document showing the output results (note that I've also moved a
\ps
below\encl
and\cc
, as requested):Of course, other adjustments can also be made.