Add the possibility to add a subject line in the letter

This is the suggestion given by Matthias Baur on launchpad
https://answers.launchpad.net/moderncv/+question/222784 in comment 12
Closes #113

I included small layout tweaks in the different moderncvhead variants.
This commit is contained in:
Johannes Ranke 2022-03-09 14:56:03 +01:00
commit 9de98f64c6
8 changed files with 20 additions and 6 deletions

View file

@ -716,6 +716,7 @@
% elements
\newcommand*{\recipient}[2]{\def\@recipientname{#1}\def\@recipientaddress{#2}}
\renewcommand*{\date}[1]{\def\@date{#1}}\date{\today}
\newcommand*{\subject}[1]{\def\@subject{#1}}
\newcommand*{\opening}[1]{\def\@opening{#1}}
\newcommand*{\closing}[1]{\def\@closing{#1}}
\newcommand*{\enclosure}[2][]{%

View file

@ -161,7 +161,7 @@
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi%
\end{minipage}\\[1em]
\end{minipage}\\[2em]
% recipient block
\begin{minipage}[t]{.5\textwidth}
\raggedright%
@ -173,6 +173,8 @@
\hfill% US style
% \\[1em]% UK style
\@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
% optional subject
\ifthenelse{\isundefined{\@subject}}{}{{\bfseries\@subject\\[2em]}}
% opening
\raggedright%
\@opening\\[1.5em]%

View file

@ -189,7 +189,9 @@
% date
\hfill% US style
% \\[1em]% UK style
\@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
\@date\\[3em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
% optional subject
\ifthenelse{\isundefined{\@subject}}{}{{\bfseries\@subject\\[3em]}}
% opening
\raggedright%
\@opening\\[1.5em]%

View file

@ -145,7 +145,9 @@
% date
\hfill% US style
% \\[1em]% UK style
\@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
\@date\\[3em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
% optional subject
\ifthenelse{\isundefined{\@subject}}{}{{\bfseries\@subject\\[3em]}}
% opening
\raggedright%
\@opening\\[1.5em]%

View file

@ -143,6 +143,8 @@
\@recipientaddress}\\[1em]%
% date
\@date\\[2em]%
% optional subject
\ifthenelse{\isundefined{\@subject}}{}{{\bfseries\@subject\\[2em]}}
% opening
\@opening\\[1.5em]%
% sender contact info

View file

@ -148,7 +148,7 @@
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi%
\end{minipage}\\[1em]
\end{minipage}\\[2em]
% recipient block
\begin{minipage}[t]{.5\textwidth}
\raggedright%
@ -159,7 +159,9 @@
% date
\hfill% US style
% \\[1em]% UK style
\@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
\@date\\[3em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
% optional subject
\ifthenelse{\isundefined{\@subject}}{}{{\bfseries\@subject\\[2em]}}
% opening
\raggedright%
\@opening\\[1.5em]%

View file

@ -154,7 +154,9 @@
% date
\hfill% US style
% \\[1em]% UK style
\@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
\@date\\[3em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
% optional subject
\ifthenelse{\isundefined{\@subject}}{}{{\bfseries\@subject\\[3em]}}
% opening
\raggedright%
\@opening\\[1.5em]%

View file

@ -239,6 +239,7 @@ Detailed achievements:
% recipient data
\recipient{Company Recruitment team}{Company, Inc.\\123 somestreet\\some city}
\date{January 01, 1984}
\subject{Job application}
\opening{Dear Sir or Madam,}
\closing{Yours faithfully,}
\enclosure[Attached]{curriculum vit\ae{}} % use an optional argument to use a string other than "Enclosure", or redefine \enclname