2011-12-12 01:23:29 +01:00
%% start of file `moderncvstyleclassic.sty'.
2012-01-15 02:04:15 +01:00
%% Copyright 2006-2012 Xavier Danaux (xdanaux@gmail.com).
2011-12-12 01:23:29 +01:00
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.
%-------------------------------------------------------------------------------
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
2012-07-30 03:43:09 +02:00
\ProvidesPackage{moderncvstyleclassic}[2012/07/29 v1.1 modern curriculum vitae and letter style scheme: classic]
2011-12-12 01:23:29 +01:00
%-------------------------------------------------------------------------------
% required packages
%-------------------------------------------------------------------------------
%-------------------------------------------------------------------------------
% package options
%-------------------------------------------------------------------------------
%-------------------------------------------------------------------------------
2012-03-25 01:28:58 -04:00
% overall style definition
%-------------------------------------------------------------------------------
2012-07-29 14:11:08 +02:00
% fonts
%\ifxetexorluatex
% \setmainfont{Latin Modern Roman}
% \setsansfont{Latin Modern Sans}
% \setmathfont{Latin Modern Math}
%\else
\IfFileExists{lmodern.sty}%
{\RequirePackage{lmodern}}%
{}
%\fi
2012-03-25 01:28:58 -04:00
2012-07-29 18:19:18 +02:00
% symbols
\renewcommand*{\mobilesymbol}{\marvosymbol{72}~}
\renewcommand*{\phonesymbol}{\marvosymbol{84}~}
\renewcommand*{\faxsymbol}{\marvosymbol{117}~}
\renewcommand*{\emailsymbol}{\marvosymbol{66}~}
\renewcommand*{\homepagesymbol}{{\Large\marvosymbol{205}}~}
2012-03-25 01:28:58 -04:00
%-------------------------------------------------------------------------------
% resume style definition
2011-12-12 01:23:29 +01:00
%-------------------------------------------------------------------------------
% fonts
\renewcommand*{\namefont}{\fontsize{34}{36}\mdseries\upshape}
\renewcommand*{\titlefont}{\LARGE\mdseries\slshape}
2012-03-26 01:34:25 +02:00
\renewcommand*{\addressfont}{\small\mdseries\slshape}
2011-12-12 01:23:29 +01:00
\renewcommand*{\quotefont}{\large\slshape}
\renewcommand*{\sectionfont}{\Large\mdseries\upshape}
\renewcommand*{\subsectionfont}{\large\mdseries\upshape}
2011-12-17 23:38:26 +01:00
\renewcommand*{\hintfont}{}
2011-12-12 01:23:29 +01:00
% styles
2012-01-22 20:26:14 +01:00
\newcommand*{\namestyle}[1]{{\namefont\textcolor{color0}{#1}}}
\newcommand*{\titlestyle}[1]{{\titlefont\textcolor{color2}{#1}}}
\newcommand*{\addressstyle}[1]{{\addressfont\textcolor{color1}{#1}}}
\newcommand*{\quotestyle}[1]{{\quotefont\textcolor{color1}{#1}}}
\newcommand*{\sectionstyle}[1]{{\sectionfont\textcolor{color1}{#1}}}
\newcommand*{\subsectionstyle}[1]{{\subsectionfont\textcolor{color1}{#1}}}
\newcommand*{\hintstyle}[1]{{\hintfont\textcolor{color0}{#1}}}
2011-12-12 01:23:29 +01:00
2012-03-25 01:28:58 -04:00
% lengths
2011-12-12 01:23:29 +01:00
\newlength{\quotewidth}
\newlength{\hintscolumnwidth}
2012-01-15 02:04:15 +01:00
\setlength{\hintscolumnwidth}{0.175\textwidth}
2011-12-12 01:23:29 +01:00
\newlength{\separatorcolumnwidth}
\setlength{\separatorcolumnwidth}{0.025\textwidth}
\newlength{\maincolumnwidth}
\newlength{\doubleitemmaincolumnwidth}
\newlength{\listitemsymbolwidth}
2011-12-19 00:50:29 +01:00
\settowidth{\listitemsymbolwidth}{\listitemsymbol}
2011-12-12 01:23:29 +01:00
\newlength{\listitemmaincolumnwidth}
\newlength{\listdoubleitemmaincolumnwidth}
2012-03-25 01:28:58 -04:00
% commands
\renewcommand*{\recomputecvlengths}{%
2011-12-12 01:23:29 +01:00
\setlength{\quotewidth}{0.65\textwidth}%
% main lenghts
2011-12-17 22:08:36 +01:00
\setlength{\maincolumnwidth}{\textwidth-\separatorcolumnwidth-\hintscolumnwidth}%
2011-12-12 01:23:29 +01:00
% listitem lengths
2011-12-17 22:08:36 +01:00
\setlength{\listitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth}%
2011-12-12 01:23:29 +01:00
% doubleitem lengths
2011-12-19 00:50:29 +01:00
\setlength{\doubleitemmaincolumnwidth}{\maincolumnwidth-\hintscolumnwidth-\separatorcolumnwidth-\separatorcolumnwidth}%
2011-12-12 01:23:29 +01:00
\setlength{\doubleitemmaincolumnwidth}{0.5\doubleitemmaincolumnwidth}%
% listdoubleitem lengths
2011-12-19 00:50:29 +01:00
\setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth-\separatorcolumnwidth-\listitemsymbolwidth}%
\setlength{\listdoubleitemmaincolumnwidth}{0.5\listdoubleitemmaincolumnwidth}%
2011-12-12 01:23:29 +01:00
% fancyhdr lengths
2012-07-30 03:31:10 +02:00
\renewcommand{\headwidth}{\textwidth}%
% regular lengths
\setlength{\parskip}{0\p@}}
2011-12-12 01:23:29 +01:00
2012-02-06 15:55:54 +01:00
% optional maketitle width to force a certain width (if set to 0pt, the width is calculated automatically)
2012-03-25 01:28:58 -04:00
\newlength{\makecvtitlenamewidth}
\setlength{\makecvtitlenamewidth}{0pt}% dummy value
\renewcommand*{\makecvtitle}{%
2012-03-26 01:34:25 +02:00
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
2011-12-12 01:23:29 +01:00
% optional detailed information box
2012-03-25 01:28:58 -04:00
\newbox{\makecvtitledetailsbox}%
\savebox{\makecvtitledetailsbox}{%
2011-12-23 11:13:25 +01:00
\addressfont\color{color2}%
2011-12-12 01:23:29 +01:00
\begin{tabular}[b]{@{}r@{}}%
2012-03-25 01:28:58 -04:00
\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}%
2011-12-12 01:23:29 +01:00
\end{tabular}
}%
% optional picture box
2012-03-25 01:28:58 -04:00
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
2011-12-12 01:23:29 +01:00
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
\hspace*{\separatorcolumnwidth}%
\color{color1}%
2012-02-06 15:55:54 +01:00
\setlength{\fboxrule}{\@photoframewidth}%
2011-12-12 01:23:29 +01:00
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
% name and title
2012-03-25 01:28:58 -04:00
\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}}%
2012-02-06 15:55:54 +01:00
{}%
2012-03-25 01:28:58 -04:00
\begin{minipage}[b]{\makecvtitlenamewidth}%
2011-12-12 01:23:29 +01:00
\namestyle{\@firstname\ \@familyname}%
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
\end{minipage}%
2012-02-06 15:55:54 +01:00
\hfill%
2011-12-12 01:23:29 +01:00
% detailed information
2012-03-25 01:28:58 -04:00
\llap{\usebox{\makecvtitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced
2011-12-12 01:23:29 +01:00
% optional photo
2012-03-25 01:28:58 -04:00
\usebox{\makecvtitlepicturebox}\\[2.5em]%
2011-12-12 01:23:29 +01:00
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
2012-02-04 22:45:53 +01:00
{{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
2012-03-25 01:28:58 -04:00
\par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvtitle
2011-12-12 01:23:29 +01:00
2012-01-15 02:04:15 +01:00
\newlength{\baseletterheight}
\settoheight{\baseletterheight}{\sectionstyle{o}}
\setlength{\baseletterheight}{\baseletterheight-0.95ex}
2011-12-12 01:23:29 +01:00
\renewcommand*{\section}[1]{%
2012-02-04 22:45:53 +01:00
\par\addvspace{2.5ex}%
2011-12-12 01:23:29 +01:00
\phantomsection{}% reset the anchor for hyperrefs
2012-02-04 16:14:01 +01:00
\addcontentsline{toc}{section}{#1}%
\parbox[t]{\hintscolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}%
2011-12-12 01:23:29 +01:00
\hspace{\separatorcolumnwidth}%
2012-01-15 01:32:34 +01:00
\parbox[t]{\maincolumnwidth}{\strut\sectionstyle{#1}}%
2012-02-04 22:45:53 +01:00
\par\nobreak\addvspace{1ex}\@afterheading}% to avoid a pagebreak after the heading
2011-12-12 01:23:29 +01:00
\renewcommand*{\subsection}[1]{%
2012-02-04 22:45:53 +01:00
\par\addvspace{1ex}%
2012-02-04 16:14:01 +01:00
\phantomsection{}% reset the anchor for hyperrefs
\addcontentsline{toc}{subsection}{#1}%
2011-12-12 01:23:29 +01:00
\begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
2012-02-04 23:56:48 +01:00
\raggedleft\hintstyle{} &{\strut\subsectionstyle{#1}}%
2011-12-12 01:23:29 +01:00
\end{tabular}%
2012-02-04 22:45:53 +01:00
\par\nobreak\addvspace{0.5ex}\@afterheading}% to avoid a pagebreak after the heading
2011-12-12 01:23:29 +01:00
\renewcommand*{\cvitem}[3][.25em]{%
\begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
2012-02-04 23:56:48 +01:00
\raggedleft\hintstyle{#2} &{#3}%
2012-02-04 22:45:53 +01:00
\end{tabular}%
\par\addvspace{#1}}
2011-12-12 01:23:29 +01:00
\renewcommand*{\cvdoubleitem}[5][.25em]{%
\cvitem[#1]{#2}{%
\begin{minipage}[t]{\doubleitemmaincolumnwidth}#3\end{minipage}%
2011-12-19 00:50:29 +01:00
\hfill% fill of \separatorcolumnwidth
2012-02-04 23:56:48 +01:00
\begin{minipage}[t]{\hintscolumnwidth}\raggedleft\hintstyle{#4}\end{minipage}%
2011-12-12 01:23:29 +01:00
\hspace*{\separatorcolumnwidth}%
\begin{minipage}[t]{\doubleitemmaincolumnwidth}#5\end{minipage}}}
\renewcommand*{\cvlistitem}[2][.25em]{%
2011-12-19 00:50:29 +01:00
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}}
2011-12-12 01:23:29 +01:00
2011-12-19 00:50:29 +01:00
\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}%
\hfill% fill of \separatorcolumnwidth
2011-12-12 01:23:29 +01:00
\ifthenelse{\equal{#3}{}}%
{}%
2011-12-19 00:50:29 +01:00
{\listitemsymbol\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}}
2011-12-12 01:23:29 +01:00
2011-12-19 00:50:29 +01:00
\renewcommand*{\cventry}[7][.25em]{%
\cvitem[#1]{#2}{%
{\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
2011-12-12 01:23:29 +01:00
\ifthenelse{\equal{#5}{}}{}{, #5}%
2011-12-19 00:50:29 +01:00
\ifthenelse{\equal{#6}{}}{}{, #6}%
2012-02-04 22:45:53 +01:00
.\strut%
2011-12-19 00:50:29 +01:00
\ifx&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}
\newbox{\cvitemwithcommentmainbox}
\newlength{\cvitemwithcommentmainlength}
\newlength{\cvitemwithcommentcommentlength}
\renewcommand*{\cvitemwithcomment}[4][.25em]{%
\savebox{\cvitemwithcommentmainbox}{{\bfseries#3}}%
\setlength{\cvitemwithcommentmainlength}{\widthof{\usebox{\cvitemwithcommentmainbox}}}%
\setlength{\cvitemwithcommentcommentlength}{\maincolumnwidth-\separatorcolumnwidth-\cvitemwithcommentmainlength}%
\cvitem[#1]{#2}{%
2012-02-04 23:56:48 +01:00
\begin{minipage}[t]{\cvitemwithcommentmainlength}\bfseries#3\end{minipage}%
2011-12-19 00:50:29 +01:00
\hfill% fill of \separatorcolumnwidth
\begin{minipage}[t]{\cvitemwithcommentcommentlength}\raggedleft\small\itshape#4\end{minipage}}}
2011-12-12 01:23:29 +01:00
\renewenvironment{thebibliography}[1]%
{%
\bibliographyhead{\refname}%
2012-02-04 22:45:53 +01:00
% \small%
2011-12-12 01:23:29 +01:00
\begin{list}{\bibliographyitemlabel}%
{%
\setlength{\topsep}{0pt}%
\setlength{\labelwidth}{\hintscolumnwidth}%
\setlength{\labelsep}{\separatorcolumnwidth}%
\leftmargin\labelwidth%
\advance\leftmargin\labelsep%
\@openbib@code%
\usecounter{enumiv}%
\let\p@enumiv\@empty%
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy\clubpenalty4000\widowpenalty4000%
% \sfcode`\.\@m%
% \sfcode `\=1000\relax%
}%
{%
\def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
\end{list}%
}
2012-03-25 01:28:58 -04:00
%-------------------------------------------------------------------------------
% letter style definition
%-------------------------------------------------------------------------------
% commands
2012-07-30 03:31:10 +02:00
\renewcommand*{\recomputeletterlengths}{%
2012-03-25 01:28:58 -04:00
\recomputecvlengths%
\setlength{\parskip}{6\p@}}
\renewcommand*{\makelettertitle}{%
2012-03-26 01:34:25 +02:00
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputeletterlengths%
2012-03-25 01:28:58 -04:00
% 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%
2012-03-26 01:34:25 +02:00
\addressfont%
{\bfseries\upshape\@recipientname}\\%
\@recipientaddress%
2012-03-25 01:28:58 -04:00
\end{minipage}
% date
2012-03-26 01:34:25 +02:00
\hfill% US style
% \\[1em]% UK style
2012-03-25 01:28:58 -04:00
\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%
2012-07-29 22:37:45 +02:00
{\color{color2}\itshape\enclname: \@enclosure}}}
2012-03-25 01:28:58 -04:00
2011-12-12 01:23:29 +01:00
\endinput
%% end of file `moderncvstyleclassic.sty'.