diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/moderncv/moderncvstyleoldstyle.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/moderncv/moderncvstyleoldstyle.sty | 150 |
1 files changed, 104 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncvstyleoldstyle.sty b/Master/texmf-dist/tex/latex/moderncv/moderncvstyleoldstyle.sty index 9877e45d971..3718c48c116 100644 --- a/Master/texmf-dist/tex/latex/moderncv/moderncvstyleoldstyle.sty +++ b/Master/texmf-dist/tex/latex/moderncv/moderncvstyleoldstyle.sty @@ -10,12 +10,14 @@ % identification %------------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{moderncvstyleoldstyle}[2012/02/06 v0.19 modern curriculum vitae style: oldstyle] +\ProvidesPackage{moderncvstyleoldstyle}[2012/03/26 v1.0 modern curriculum vitae and letter style scheme: oldstyle] %------------------------------------------------------------------------------- % required packages %------------------------------------------------------------------------------- +% change the layout of the page on the fly, for resume or letter layout +\RequirePackage{changepage} %------------------------------------------------------------------------------- @@ -24,12 +26,27 @@ %------------------------------------------------------------------------------- -% style definition +% overall style definition %------------------------------------------------------------------------------- % fonts \IfFileExists{kurier.sty} {\RequirePackage[light,math]{kurier}} {} + +% symbols +\renewcommand*{\listitemsymbol}{\labelitemi~} +\renewcommand*{\addresssymbol}{} +\renewcommand*{\mobilesymbol}{\textbf{M}~} +\renewcommand*{\phonesymbol}{\textbf{T}~} +\renewcommand*{\faxsymbol}{\textbf{F}~} +\renewcommand*{\emailsymbol}{\textbf{E}~} +\renewcommand*{\homepagesymbol}{} + + +%------------------------------------------------------------------------------- +% resume style definition +%------------------------------------------------------------------------------- +% fonts \renewcommand*{\namefont}{\fontsize{34}{36}\mdseries\upshape} \renewcommand*{\titlefont}{\LARGE\mdseries\slshape} \renewcommand*{\addressfont}{\small\mdseries} @@ -47,16 +64,7 @@ \newcommand*{\subsectionstyle}[1]{{\subsectionfont\textcolor{color1}{#1}}} \newcommand*{\hintstyle}[1]{{\hintfont\textcolor{color0}{#1}}} -% symbols -\renewcommand*{\listitemsymbol}{\labelitemi~} -\renewcommand*{\addresssymbol}{} -\renewcommand*{\mobilesymbol}{\textbf{M}~} -\renewcommand*{\phonesymbol}{\textbf{T}~} -\renewcommand*{\faxsymbol}{\textbf{F}~} -\renewcommand*{\emailsymbol}{\textbf{E}~} -\renewcommand*{\homepagesymbol}{} - -% length used +% lengths \newlength{\quotewidth} \newlength{\hintscolumnwidth} \setlength{\hintscolumnwidth}{0.3\textwidth}% @@ -69,8 +77,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-\hintscolumnwidth-\separatorcolumnwidth}% @@ -85,27 +93,22 @@ % fancyhdr lengths \renewcommand{\headwidth}{\textwidth}} -\newcommand{\makeinfo}[1]{% - \newbox{\makeinfobox}% - \savebox{\makeinfobox}{\parbox[b]{\hintscolumnwidth}{\if@DEBUG\rule{20cm}{.1pt}\\\fi#1}}% - \newlength{\makeinfoheight}% - \setlength{\makeinfoheight}{\totalheightof{\usebox{\makeinfobox}}}% 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{\makeinfobox}\vspace*{-\makeinfoheight}% +\newcommand{\makecvinfo}[1]{% + \newbox{\makecvinfobox}% + \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}% \newlength{\leftcolumnwidth}% - \setlength{\leftcolumnwidth}{\hintscolumnwidth+\separatorcolumnwidth} - \par\nointerlineskip\vspace*{-\parskip}\vspace*{-2.5ex}\leftskip=\leftcolumnwidth\if@DEBUG\rule{20cm}{.1pt}\fi}% the -2.5ex vertical slip is to counter the 2.5ex skip of sections - -\newif\if@firstdetailselement\@firstdetailselementtrue -\newcommand*{\maketitledetailsnewline}{ - \if@firstdetailselement% - \else% - \\[.2em]\fi% - \@firstdetailselementfalse% - \addressfont\color{color2}} -\renewcommand*{\maketitle}{ + \setlength{\leftcolumnwidth}{\hintscolumnwidth+\separatorcolumnwidth}% + \par\vspace{-\baselineskip}\vspace{-\parskip}\leftskip=\leftcolumnwidth} + +\renewcommand*{\makecvtitle}{ + % recompute lengths (in case we are switching from letter to resume, or vice versa) + \recomputecvlengths% % optional picture box - \newbox{\maketitlepicturebox}% - \savebox{\maketitlepicturebox}{% + \newbox{\makecvtitlepicturebox}% + \savebox{\makecvtitlepicturebox}{% \ifthenelse{\isundefined{\@photo}}% {}% {% @@ -115,28 +118,29 @@ \setlength{\fboxsep}{0pt}\fi% \framebox{\includegraphics[width=\@photowidth]{\@photo}}}}% % name and title - \newlength{\maketitlepicturewidth}\settowidth{\maketitlepicturewidth}{\usebox{\maketitlepicturebox}}% - \newlength{\maketitlenamewidth}\setlength{\maketitlenamewidth}{\textwidth-\maketitlepicturewidth}% - \begin{minipage}[b]{\maketitlenamewidth}% + \newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}% + \newlength{\makecvtitlenamewidth}\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitlepicturewidth}% + \begin{minipage}[b]{\makecvtitlenamewidth}% \namestyle{\@firstname\ \@familyname}% \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}% \end{minipage}% % 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]}}% % optional details - \makeinfo{% - \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}}} + \makecvinfo{% + \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}% @@ -236,6 +240,60 @@ } +%------------------------------------------------------------------------------- +% letter style definition +%------------------------------------------------------------------------------- +% commands +%\newlength{\textwidthdelta}% +\renewcommand*{\recomputeletterlengths}{% + \recomputecvlengths{}% + \setlength{\parskip}{6\p@}% + \leftskip=0pt% +% \setlength{\textwidthdelta}{+\marginparwidth+\marginparsep}% + \setlength{\marginparwidth}{\hintscolumnwidth}% + \setlength{\marginparsep}{2\separatorcolumnwidth}% +% \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}{% + % recompute lengths (in case we are switching from letter to resume, or vice versa) + \recomputeletterlengths% + % recipient block + {\addressfont% + {\bfseries\upshape\@recipientname}\\% + \@recipientaddress}\\[1em]% + % date + \@date\\[2em]% + % opening + \@opening\\[1.5em]% + % sender contact info + \hspace{0pt}% + \marginpar{% + \addressfont\textcolor{color2}{% + {\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}} + +\renewcommand*{\makeletterclosing}{ + \@closing\\[3em]% + {\bfseries\@firstname~\@familyname}% + \ifthenelse{\isundefined{\@enclosure}}{}{% + \\% + \vfill% + {\color{color2}\itshape{}Enclosure: \@enclosure}}} + + \endinput |