summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-07-29 20:38:14 +0000
committerKarl Berry <karl@freefriends.org>2015-07-29 20:38:14 +0000
commite76534e995ef3134f513b1a9951be0156c997631 (patch)
tree66887cff813a6f9f7b72f0831165ea188043fab0 /Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
parent6c09dd71fc1b55b7990d439747f090fa57a84b77 (diff)
moderncv (29jul15)
git-svn-id: svn://tug.org/texlive/trunk@37992 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty')
-rw-r--r--Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty274
1 files changed, 14 insertions, 260 deletions
diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty b/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
index 6e26240adf1..6addabb2c27 100644
--- a/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
+++ b/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvstyleclassic.sty'.
-%% Copyright 2006-2013 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,11 +10,19 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvstyleclassic}[2013/04/29 v1.5.1 modern curriculum vitae and letter style scheme: classic]
+\ProvidesPackage{moderncvstyleclassic}[2015/07/28 v2.0.0 modern curriculum vitae and letter style scheme: classic]
+% head section alignment options: "left" (default) or "right"
+\@initializecommand{\moderncvstyleheadoptions}{}
+\DeclareOption{left} {\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,left}}
+\DeclareOption{right}{\edef\moderncvstyleheadoptions{\moderncvstyleheadoptions,right}}
+
+\DeclareOption*{}% avoid choking on unknown options
+\ExecuteOptions{left}
+\ProcessOptions*\relax% \ProcessOptions* processes the options in the order provided (i.e., with the later ones possibly overriding the former ones), while \ProcessOptions processes them in the order of the package
%-------------------------------------------------------------------------------
-% required packages
+% fonts & icons
%-------------------------------------------------------------------------------
% Latin Modern fonts
%\ifxetexorluatex
@@ -27,269 +35,15 @@
{}
%\fi
-
-%-------------------------------------------------------------------------------
-% overall style definition
-%-------------------------------------------------------------------------------
% symbols
\moderncvicons{marvosym}
%-------------------------------------------------------------------------------
-% resume style definition
+% header, body & footer
%-------------------------------------------------------------------------------
-% fonts
-\renewcommand*{\namefont}{\fontsize{34}{36}\mdseries\upshape}
-\renewcommand*{\titlefont}{\LARGE\mdseries\slshape}
-\renewcommand*{\addressfont}{\small\mdseries\slshape}
-\renewcommand*{\quotefont}{\large\slshape}
-\renewcommand*{\sectionfont}{\Large\mdseries\upshape}
-\renewcommand*{\subsectionfont}{\large\mdseries\upshape}
-\renewcommand*{\hintfont}{}
-
-% styles
-\renewcommand*{\namestyle}[1]{{\namefont\textcolor{color0}{#1}}}
-\renewcommand*{\titlestyle}[1]{{\titlefont\textcolor{color2}{#1}}}
-\renewcommand*{\addressstyle}[1]{{\addressfont\textcolor{color1}{#1}}}
-\renewcommand*{\quotestyle}[1]{{\quotefont\textcolor{color1}{#1}}}
-\renewcommand*{\sectionstyle}[1]{{\sectionfont\textcolor{color1}{#1}}}
-\renewcommand*{\subsectionstyle}[1]{{\subsectionfont\textcolor{color1}{#1}}}
-\renewcommand*{\hintstyle}[1]{{\hintfont\textcolor{color0}{#1}}}
-
-% lengths
-\newlength{\quotewidth}
-\newlength{\hintscolumnwidth}
-\setlength{\hintscolumnwidth}{0.175\textwidth}
-\newlength{\separatorcolumnwidth}
-\setlength{\separatorcolumnwidth}{0.025\textwidth}
-\newlength{\maincolumnwidth}
-\newlength{\doubleitemmaincolumnwidth}
-\newlength{\listitemsymbolwidth}
-\settowidth{\listitemsymbolwidth}{\listitemsymbol}
-\newlength{\listitemmaincolumnwidth}
-\newlength{\listdoubleitemmaincolumnwidth}
-
-% commands
-\renewcommand*{\recomputecvlengths}{%
- \setlength{\quotewidth}{0.65\textwidth}%
- % main lenghts
- \setlength{\maincolumnwidth}{\textwidth-\separatorcolumnwidth-\hintscolumnwidth}%
- % listitem lengths
- \setlength{\listitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth}%
- % doubleitem lengths
- \setlength{\doubleitemmaincolumnwidth}{\maincolumnwidth-\hintscolumnwidth-\separatorcolumnwidth-\separatorcolumnwidth}%
- \setlength{\doubleitemmaincolumnwidth}{0.5\doubleitemmaincolumnwidth}%
- % listdoubleitem lengths
- \setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth-\separatorcolumnwidth-\listitemsymbolwidth}%
- \setlength{\listdoubleitemmaincolumnwidth}{0.5\listdoubleitemmaincolumnwidth}%
- % fancyhdr lengths
- \renewcommand{\headwidth}{\textwidth}%
- % regular lengths
- \setlength{\parskip}{0\p@}}
-
-% optional maketitle width to force a certain width (if set to 0pt, the width is calculated automatically)
-\newlength{\makecvtitlenamewidth}
-\setlength{\makecvtitlenamewidth}{0pt}% dummy value
-\renewcommand*{\makecvtitle}{%
- % recompute lengths (in case we are switching from letter to resume, or vice versa)
- \recomputecvlengths%
- % optional detailed information (pre-rendering)
- \def\phonesdetails{}%
- \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
- \protected@edef\phonesdetails{\phonesdetails\protect\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
- \def\socialsdetails{}%
- \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
- \protected@edef\socialsdetails{\socialsdetails\protect\makenewline\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
- \newbox{\makecvtitledetailsbox}%
- \savebox{\makecvtitledetailsbox}{%
- \addressfont\color{color2}%
- \begin{tabular}[b]{@{}r@{}}%
- \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
- \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
- \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
- \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
- \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
- \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
- \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
- \end{tabular}
- }%
- % optional photo (pre-rendering)
- \newbox{\makecvtitlepicturebox}%
- \savebox{\makecvtitlepicturebox}{%
- \ifthenelse{\isundefined{\@photo}}%
- {}%
- {%
- \hspace*{\separatorcolumnwidth}%
- \color{color1}%
- \setlength{\fboxrule}{\@photoframewidth}%
- \ifdim\@photoframewidth=0pt%
- \setlength{\fboxsep}{0pt}\fi%
- \framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
- % name and title
- \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]{\makecvtitlenamewidth}%
- \namestyle{\@firstname\ \@lastname}%
- \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
- \end{minipage}%
- \hfill%
- % optional detailed information (rendering)
- \llap{\usebox{\makecvtitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced
- % optional photo (rendering)
- \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 \makecvtitle
-
-\newlength{\baseletterheight}
-\settoheight{\baseletterheight}{\sectionstyle{o}}
-\setlength{\baseletterheight}{\baseletterheight-0.95ex}
-\RenewDocumentCommand{\section}{sm}{%
- \par\addvspace{2.5ex}%
- \phantomsection{}% reset the anchor for hyperrefs
- \addcontentsline{toc}{section}{#2}%
- \parbox[t]{\hintscolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}%
- \hspace{\separatorcolumnwidth}%
- \parbox[t]{\maincolumnwidth}{\strut\sectionstyle{#2}}%
- \par\nobreak\addvspace{1ex}\@afterheading}% to avoid a pagebreak after the heading
-
-\RenewDocumentCommand{\subsection}{sm}{%
- \par\addvspace{1ex}%
- \phantomsection{}% reset the anchor for hyperrefs
- \addcontentsline{toc}{subsection}{#2}%
- \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
- \raggedleft\hintstyle{} &{\strut\subsectionstyle{#2}}%
- \end{tabular}%
- \par\nobreak\addvspace{0.5ex}\@afterheading}% to avoid a pagebreak after the heading
-
-\renewcommand*{\cvitem}[3][.25em]{%
- \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
- \raggedleft\hintstyle{#2} &{#3}%
- \end{tabular}%
- \par\addvspace{#1}}
-
-\renewcommand*{\cvdoubleitem}[5][.25em]{%
- \cvitem[#1]{#2}{%
- \begin{minipage}[t]{\doubleitemmaincolumnwidth}#3\end{minipage}%
- \hfill% fill of \separatorcolumnwidth
- \begin{minipage}[t]{\hintscolumnwidth}\raggedleft\hintstyle{#4}\end{minipage}%
- \hspace*{\separatorcolumnwidth}%
- \begin{minipage}[t]{\doubleitemmaincolumnwidth}#5\end{minipage}}}
-
-\renewcommand*{\cvlistitem}[2][.25em]{%
- \cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}}
-
-\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
- \cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}%
- \hfill% fill of \separatorcolumnwidth
- \ifthenelse{\equal{#3}{}}%
- {}%
- {\listitemsymbol\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}}
-
-\renewcommand*{\cventry}[7][.25em]{%
- \cvitem[#1]{#2}{%
- {\bfseries#3}%
- \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
- \ifthenelse{\equal{#5}{}}{}{, #5}%
- \ifthenelse{\equal{#6}{}}{}{, #6}%
- .\strut%
- \ifx&#7&%
- \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}{%
- \begin{minipage}[t]{\cvitemwithcommentmainlength}\bfseries#3\end{minipage}%
- \hfill% fill of \separatorcolumnwidth
- \begin{minipage}[t]{\cvitemwithcommentcommentlength}\raggedleft\small\itshape#4\end{minipage}}}
-
-\renewenvironment{thebibliography}[1]%
- {%
- \bibliographyhead{\refname}%
-% \small%
- \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}%
- }
-
-
-%-------------------------------------------------------------------------------
-% letter style definition
-%-------------------------------------------------------------------------------
-% commands
-\renewcommand*{\recomputeletterlengths}{%
- \recomputecvlengths%
- \setlength{\parskip}{6\p@}}
-
-\renewcommand*{\makelettertitle}{%
- % recompute lengths (in case we are switching from letter to resume, or vice versa)
- \recomputeletterlengths%
- % sender contact info
- \hfill%
- \begin{minipage}{.5\textwidth}%
- \raggedleft%
- \addressfont\textcolor{color2}{%
- {\bfseries\upshape\@firstname~\@lastname}\@firstdetailselementfalse%
- \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
- \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
- \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
- \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
- \makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
- \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%
- \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"
- % 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~\@lastname}%
- \ifthenelse{\isundefined{\@enclosure}}{}{%
- \\%
- \vfill%
- {\color{color2}\itshape\enclname: \@enclosure}}}
+\moderncvhead[\moderncvstyleheadoptions]{1}
+\moderncvbody{1}
\endinput