Letter style and template for the "classic" and "casual" styles

This commit is contained in:
Xavier Danaux
2012-03-25 01:28:58 -04:00
parent d798fa6c35
commit 65b5322dec
16 changed files with 849 additions and 854 deletions

View File

@ -2,9 +2,13 @@ version 0.20 (xx Mar 2012)
- added commands to generate letters for every resume style: \recipient, \date,
\opening, \closing, \enclosure, \makelettertitle and \makeletterclosing. The
old \maketitle and \makefooter commands are now deprecated and replaced by
\makecvtitle (resp. \makelettertitle) and \makecvfooter (resp. \makeletterfooter).
\makecvtitle (resp. \makelettertitle) and \makecvfooter (resp.
\makeletterfooter).
- changed the alignment algorithm for the personal data display in the oldstyle
style, as to align on the baseline of the first line with the surrounding text.
- changed the font and linespacing of the address block display for the resume
part in the classic and casual styles, in order to be consistent with the
(required) block address display for the letter part.
version 0.19 (06 Feb 2012)
- reintroduced the ability to force the width reserved to display the name

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -50,7 +50,8 @@
%----------------------------------------------------------------------------------
\begin{document}
%\begin{CJK*}{UTF8}{gbsn} % to typeset your resume in Chinese using CJK
\maketitle
%----- resume ---------------------------------------------------------
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description} % arguments 3 to 6 can be left empty
@ -125,6 +126,24 @@ Detailed achievements:%
%\bibliographystylemisc{plain}
%\bibliographymisc{publications} % 'publications' is the name of a BibTeX file
\clearpage
%----- letter ---------------------------------------------------------
% recipient data
\recipient{Company Recruitment team}{Company, Inc.\\123 somestreet\\some city}
\date{January 01, 1984}
\opening{Dear Sir or Madam,}
\closing{Yours faithfully,}
\enclosure{curriculum vit\ae{}}
\makelettertitle
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ullamcorper neque sit amet lectus facilisis sed luctus nisl iaculis. Vivamus at neque arcu, sed tempor quam. Curabitur pharetra tincidunt tincidunt. Morbi volutpat feugiat mauris, quis tempor neque vehicula volutpat. Duis tristique justo vel massa fermentum accumsan. Mauris ante elit, feugiat vestibulum tempor eget, eleifend ac ipsum. Donec scelerisque lobortis ipsum eu vestibulum. Pellentesque vel massa at felis accumsan rhoncus.
Suspendisse commodo, massa eu congue tincidunt, elit mauris pellentesque orci, cursus tempor odio nisl euismod augue. Aliquam adipiscing nibh ut odio sodales et pulvinar tortor laoreet. Mauris a accumsan ligula. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse vulputate sem vehicula ipsum varius nec tempus dui dapibus. Phasellus et est urna, ut auctor erat. Sed tincidunt odio id odio aliquam mattis. Donec sapien nulla, feugiat eget adipiscing sit amet, lacinia ut dolor. Phasellus tincidunt, leo a fringilla consectetur, felis diam aliquam urna, vitae aliquet lectus orci nec velit. Vivamus dapibus varius blandit.
Duis sit amet magna ante, at sodales diam. Aenean consectetur porta risus et sagittis. Ut interdum, enim varius pellentesque tincidunt, magna libero sodales tortor, ut fermentum nunc metus a ante. Vivamus odio leo, tincidunt eu luctus ut, sollicitudin sit amet metus. Nunc sed orci lectus. Ut sodales magna sed velit volutpat sit amet pulvinar diam venenatis.
\makeletterclosing
%\clearpage\end{CJK*} % if you are typesetting your resume in Chinese using CJK; the \clearpage is required for fancyhdr to work correctly with CJK, though it kills the page numbering by making \lastpage undefined
\end{document}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -258,6 +258,15 @@
% recompute all resume lengths
\newcommand*{\recomputecvlengths}{}
% internal maketitle command to issue a new line only when required
\newif\if@firstdetailselement\@firstdetailselementtrue
\newcommand*{\makenewline}{
\if@firstdetailselement%
\strut% to ensure baseline alignment, e.g. with when put in the margin vs sections that also contains a \strut
\else%
\\\fi%
\@firstdetailselementfalse}
% makes the resume title
% usage: \makecvtitle
\newcommand*{\makecvtitle}{}%

View File

@ -25,11 +25,16 @@
%-------------------------------------------------------------------------------
% style scheme definition
% overall style definition
%-------------------------------------------------------------------------------
%-------------------------------------------------------------------------------
% resume style definition
%-------------------------------------------------------------------------------
% fonts
\renewcommand*{\namefont}{\fontsize{38}{40}\mdseries\upshape}
\renewcommand*{\addressfont}{\small\mdseries\slshape}
\renewcommand*{\addressfont}{\normalsize\mdseries\slshape}
% cv footer
% footer symbol used to separate footer elements
@ -107,6 +112,11 @@
\par}% to avoid weird spacing bug at the first section if no blank line is left after \maketitle
%-------------------------------------------------------------------------------
% letter style definition
%-------------------------------------------------------------------------------
\endinput

View File

@ -24,12 +24,17 @@
%-------------------------------------------------------------------------------
% style scheme definition
% overall style definition
%-------------------------------------------------------------------------------
%-------------------------------------------------------------------------------
% resume style definition
%-------------------------------------------------------------------------------
% fonts
\renewcommand*{\namefont}{\fontsize{34}{36}\mdseries\upshape}
\renewcommand*{\titlefont}{\LARGE\mdseries\slshape}
\renewcommand*{\addressfont}{\small\mdseries\slshape}
\renewcommand*{\addressfont}{\normalsize\mdseries\slshape}
\renewcommand*{\quotefont}{\large\slshape}
\renewcommand*{\sectionfont}{\Large\mdseries\upshape}
\renewcommand*{\subsectionfont}{\large\mdseries\upshape}
@ -44,7 +49,7 @@
\newcommand*{\subsectionstyle}[1]{{\subsectionfont\textcolor{color1}{#1}}}
\newcommand*{\hintstyle}[1]{{\hintfont\textcolor{color0}{#1}}}
% length used
% lengths
\newlength{\quotewidth}
\newlength{\hintscolumnwidth}
\setlength{\hintscolumnwidth}{0.175\textwidth}
@ -57,8 +62,8 @@
\newlength{\listitemmaincolumnwidth}
\newlength{\listdoubleitemmaincolumnwidth}
% recompute all the lengths that depends on the text width
\renewcommand*{\recomputelengths}{%
% commands
\renewcommand*{\recomputecvlengths}{%
\setlength{\quotewidth}{0.65\textwidth}%
% main lenghts
\setlength{\maincolumnwidth}{\textwidth-\separatorcolumnwidth-\hintscolumnwidth}%
@ -75,34 +80,27 @@
% optional maketitle width to force a certain width (if set to 0pt, the width is calculated automatically)
\newlength{\maketitlenamewidth}
\setlength{\maketitlenamewidth}{0pt}% dummy value
% internal maketitle command to issue a new line only when required
\newif\if@firstdetailselement\@firstdetailselementtrue
\newcommand*{\maketitledetailsnewline}{
\if@firstdetailselement%
\else%
\\[.2em]\fi%
\@firstdetailselementfalse}
\renewcommand*{\maketitle}{%
\newlength{\makecvtitlenamewidth}
\setlength{\makecvtitlenamewidth}{0pt}% dummy value
\renewcommand*{\makecvtitle}{%
% optional detailed information box
\newbox{\maketitledetailsbox}%
\savebox{\maketitledetailsbox}{%
\newbox{\makecvtitledetailsbox}%
\savebox{\makecvtitledetailsbox}{%
\addressfont\color{color2}%
\begin{tabular}[b]{@{}r@{}}%
\ifthenelse{\isundefined{\@addressstreet}}{}{\maketitledetailsnewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\maketitledetailsnewline\@addresscity}}% if \addresstreet is defined, \addresscity will always be defined but could be empty
\ifthenelse{\isundefined{\@mobile}}{}{\maketitledetailsnewline\mobilesymbol\@mobile}%
\ifthenelse{\isundefined{\@phone}}{}{\maketitledetailsnewline\phonesymbol\@phone}%
\ifthenelse{\isundefined{\@fax}}{}{\maketitledetailsnewline\faxsymbol\@fax}%
\ifthenelse{\isundefined{\@email}}{}{\maketitledetailsnewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\maketitledetailsnewline\homepagesymbol\httplink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\maketitledetailsnewline\@extrainfo}%
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}}% if \addresstreet is defined, \addresscity will always be defined but could be empty
\ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile}%
\ifthenelse{\isundefined{\@phone}}{}{\makenewline\phonesymbol\@phone}%
\ifthenelse{\isundefined{\@fax}}{}{\makenewline\faxsymbol\@fax}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
\end{tabular}
}%
% optional picture box
\newbox{\maketitlepicturebox}%
\savebox{\maketitlepicturebox}{%
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
@ -113,25 +111,25 @@
\setlength{\fboxsep}{0pt}\fi%
\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
% name and title
\newlength{\maketitledetailswidth}\settowidth{\maketitledetailswidth}{\usebox{\maketitledetailsbox}}%
\newlength{\maketitlepicturewidth}\settowidth{\maketitlepicturewidth}{\usebox{\maketitlepicturebox}}%
\ifthenelse{\lengthtest{\maketitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\maketitlenamewidth=0pt)
{\setlength{\maketitlenamewidth}{\textwidth-\maketitledetailswidth-\maketitlepicturewidth}}%
\newlength{\makecvtitledetailswidth}\settowidth{\makecvtitledetailswidth}{\usebox{\makecvtitledetailsbox}}%
\newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
\ifthenelse{\lengthtest{\makecvtitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvtitlenamewidth=0pt)
{\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitledetailswidth-\makecvtitlepicturewidth}}%
{}%
\begin{minipage}[b]{\maketitlenamewidth}%
\begin{minipage}[b]{\makecvtitlenamewidth}%
\namestyle{\@firstname\ \@familyname}%
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
\end{minipage}%
\hfill%
% detailed information
\llap{\usebox{\maketitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of maketitlenamewidth is forced
\llap{\usebox{\makecvtitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced
% optional photo
\usebox{\maketitlepicturebox}\\[2.5em]%
\usebox{\makecvtitlepicturebox}\\[2.5em]%
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
\par}% to avoid weird spacing bug at the first section if no blank line is left after \maketitle
\par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvtitle
\newlength{\baseletterheight}
\settoheight{\baseletterheight}{\sectionstyle{o}}
@ -225,6 +223,57 @@
}
%-------------------------------------------------------------------------------
% letter style definition
%-------------------------------------------------------------------------------
% commands
\renewcommand*{\recomputeletterlengths}{
\recomputecvlengths%
\setlength{\parskip}{6\p@}}
\renewcommand*{\makelettertitle}{%
\recomputeletterlengths{}%
% sender contact info
\hfill%
\begin{minipage}{.5\textwidth}%
\raggedleft%
\addressfont\textcolor{color2}{%
{\bfseries\upshape\@firstname~\@familyname}\@firstdetailselementfalse%
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}}%
\ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile}%
\ifthenelse{\isundefined{\@phone}}{}{\makenewline\phonesymbol\@phone}%
\ifthenelse{\isundefined{\@fax}}{}{\makenewline\faxsymbol\@fax}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}%
\end{minipage}\\[1em]
% recipient block
\begin{minipage}[t]{.5\textwidth}
\raggedright%
{\bfseries\@recipientname}\\%
\itshape\@recipientaddress%
\end{minipage}
% date
\hfill % US style
% \\[1em] % UK style
\hbox{\today}\\[2em]% US informal style: "April 6, 2006"; UK formal style: "05/04/2006"
% 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}}
\renewcommand*{\makeletterclosing}{
\@closing\\[3em]%
{\bfseries \@firstname~\@familyname}%
\ifthenelse{\isundefined{\@enclosure}}{}{%
\\%
\vfill%
{\color{color2}\itshape Enclosure: \@enclosure}}}
\endinput

View File

@ -49,7 +49,7 @@
% fonts
\renewcommand*{\namefont}{\fontsize{34}{36}\mdseries\upshape}
\renewcommand*{\titlefont}{\LARGE\mdseries\slshape}
\renewcommand*{\addressfont}{\small\mdseries}
\renewcommand*{\addressfont}{\normalsize\mdseries}
\renewcommand*{\quotefont}{\large\itshape}
\renewcommand*{\sectionfont}{\Large\bfseries\upshape}
\renewcommand*{\subsectionfont}{\large\bfseries\itshape}
@ -98,19 +98,11 @@
\savebox{\makecvinfobox}{\parbox[t]{\hintscolumnwidth}{#1}}%
\newlength{\makecvinfoheight}%
\setlength{\makecvinfoheight}{\totalheightof{\usebox{\makecvinfobox}}}% the total height of the parbox is the sum of its height (\the\ht\makeinfobox) and its depth (\the\dp\makeinfobox); the \totalheightof command is provided by the "calc" package
\usebox{\makecvinfobox}\vspace*{-\makecvinfoheight}%
\usebox{\makecvinfobox}\vspace{-\makecvinfoheight}%
\newlength{\leftcolumnwidth}%
\setlength{\leftcolumnwidth}{\hintscolumnwidth+\separatorcolumnwidth}%
\par\vspace*{-\baselineskip}\vspace*{-\parskip}\leftskip=\leftcolumnwidth}
\par\vspace{-\baselineskip}\vspace{-\parskip}\leftskip=\leftcolumnwidth}
\newif\if@firstdetailselement\@firstdetailselementtrue
\newcommand*{\makecvtitledetailsnewline}{
\if@firstdetailselement%
\strut% to ensure baseline alignment with the first section, that also contains a \strut
\else%
\\[.2em]\fi%
\@firstdetailselementfalse%
\addressfont\color{color2}}
\renewcommand*{\makecvtitle}{
% optional picture box
\newbox{\makecvtitlepicturebox}%
@ -138,14 +130,15 @@
{{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
% optional details
\makecvinfo{%
\ifthenelse{\isundefined{\@addressstreet}}{}{\makecvtitledetailsnewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makecvtitledetailsnewline\@addresscity}}% if \addresstreet is defined, \addresscity will always be defined but could be empty
\ifthenelse{\isundefined{\@mobile}}{}{\makecvtitledetailsnewline\mobilesymbol\@mobile}%
\ifthenelse{\isundefined{\@phone}}{}{\makecvtitledetailsnewline\phonesymbol\@phone}%
\ifthenelse{\isundefined{\@fax}}{}{\makecvtitledetailsnewline\faxsymbol\@fax}%
\ifthenelse{\isundefined{\@email}}{}{\makecvtitledetailsnewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makecvtitledetailsnewline\homepagesymbol\httplink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makecvtitledetailsnewline\@extrainfo}}}
\addressfont\color{color2}%
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}}% if \addresstreet is defined, \addresscity will always be defined but could be empty
\ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile}%
\ifthenelse{\isundefined{\@phone}}{}{\makenewline\phonesymbol\@phone}%
\ifthenelse{\isundefined{\@fax}}{}{\makenewline\faxsymbol\@fax}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}}
\renewcommand*{\section}[1]{%
\par\addvspace{2.5ex}%
@ -249,24 +242,24 @@
% letter style definition
%-------------------------------------------------------------------------------
% commands
\newlength{\textwidthdelta}%
%\newlength{\textwidthdelta}%
\renewcommand*{\recomputeletterlengths}{%
\recomputecvlengths{}%
\setlength{\parskip}{6\p@}%
\leftskip=0pt%
\setlength{\textwidthdelta}{+\marginparwidth+\marginparsep}%
% \setlength{\textwidthdelta}{+\marginparwidth+\marginparsep}%
\setlength{\marginparwidth}{\hintscolumnwidth}%
\setlength{\marginparsep}{2\separatorcolumnwidth}%
\addtolength{\textwidthdelta}{-\marginparwidth-\marginparsep}%
% \addtolength{\textwidthdelta}{-\marginparwidth-\marginparsep}%
% \changepage{}{\textwidthdelta}{-\textwidthdelta}{}{}{}{}{}{}%\changepage{<textheight>}{<textwidth>}{<evensidemargin>}{<oddsidemargin>}{<columnsep>}{<topmargin>}{<headheight>}{<headsep>}{<footskip>}
\changepage{}{-\marginparwidth-\marginparsep}{}{}{}{}{}{}{}%\changepage{<textheight>}{<textwidth>}{<evensidemargin>}{<oddsidemargin>}{<columnsep>}{<topmargin>}{<headheight>}{<headsep>}{<footskip>}
}
\renewcommand*{\makelettertitle}{
\renewcommand*{\makelettertitle}{%
\recomputeletterlengths{}%
% recipient block
{\bfseries \@recipientname}\\%
\upshape \@recipientaddress\\[1em]%
{\bfseries\@recipientname}\\%
\upshape\@recipientaddress\\[1em]%
% date
\@date\\[2em]%
% opening
@ -275,26 +268,26 @@
\hspace{0pt}%
\marginpar{%
\addressfont\textcolor{color2}{%
{\bfseries \@firstname~\@familyname}\@firstdetailselementfalse%
\ifthenelse{\isundefined{\@addressstreet}}{}{\makecvtitledetailsnewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makecvtitledetailsnewline\@addresscity}}%
\ifthenelse{\isundefined{\@mobile}}{}{\makecvtitledetailsnewline\mobilesymbol\@mobile}%
\ifthenelse{\isundefined{\@phone}}{}{\makecvtitledetailsnewline\phonesymbol\@phone}%
\ifthenelse{\isundefined{\@fax}}{}{\makecvtitledetailsnewline\faxsymbol\@fax}%
\ifthenelse{\isundefined{\@email}}{}{\makecvtitledetailsnewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makecvtitledetailsnewline\homepagesymbol\httplink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makecvtitledetailsnewline\@extrainfo}}}%
{\bfseries\@firstname~\@familyname}\@firstdetailselementfalse%
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}}%
\ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile}%
\ifthenelse{\isundefined{\@phone}}{}{\makenewline\phonesymbol\@phone}%
\ifthenelse{\isundefined{\@fax}}{}{\makenewline\faxsymbol\@fax}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}}%
% ensure no extra spacing after \makelettertitle due to a possible blank line
% \ignorespacesafterend% not working
\par\vspace*{-\baselineskip}\vspace*{-\parskip}}
\par\vspace{-\baselineskip}\vspace{-\parskip}}
\renewcommand*{\makeletterclosing}{
\@closing\\[3em]
{\bfseries \@firstname~\@familyname}%
\@closing\\[3em]%
{\bfseries\@firstname~\@familyname}%
\ifthenelse{\isundefined{\@enclosure}}{}{%
\\%
\vfill%
{\color{color2}\itshape Enclosure: \@enclosure}}}
{\color{color2}\itshape{}Enclosure: \@enclosure}}}
\endinput