As discussed on this forum latex-community: How to include Subject to letter, I'd like to add an extra field "Subject: " to moderncv letter template.
\bigskip
\textbf{Subject: \@subject}
\bigskip\noindent
the new \makeletterhead
command will be something like this:
\renewcommand*{\makeletterhead}{%
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputeletterlengths%
% sender block
\makehead%
\par%
% recipient block
\begin{minipage}[t]{.5\textwidth}
\raggedright%
\addressfont%
{\bfseries\upshape\@recipientname}\\%
\@recipientaddress%
\end{minipage}
% date
\hfill% US style
% \\[1em]% UK style
\@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
%_______________________
\bigskip
\textbf{Subject: \@subject}
\bigskip\noindent
%_______________________
% opening
\raggedright%
\@opening\\[1.5em]%
% ensure no extra spacing after \makelettertitle due to a possible blank line
% \ignorespacesafterend% not working
\hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}
Not to forget that the parameter \@subject
should be retrieved somewhere.
EDIT
The question is how to add a "Subject" field in a way that when the command \makelettertitle
is executed the subject text will be placed before the openning statement.
Best Answer
Thanks to David Carlisle's comment I have corrected my attempt, here's an example:
The definition of the command
\makeletterhead
was picked from moderncvbodyiii.sty since thebanking
style (used in the example) usesmoderncvbodyiii.sty
file.