summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty')
-rw-r--r--Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty124
1 files changed, 88 insertions, 36 deletions
diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty b/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
index 2ee5989eb25..bb9d6c13f47 100644
--- a/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
+++ b/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvstyleclassic}[2012/02/06 v0.19 modern curriculum vitae style scheme: classic]
+\ProvidesPackage{moderncvstyleclassic}[2012/03/26 v1.0 modern curriculum vitae and letter style scheme: classic]
%-------------------------------------------------------------------------------
@@ -24,7 +24,12 @@
%-------------------------------------------------------------------------------
-% style scheme definition
+% overall style definition
+%-------------------------------------------------------------------------------
+
+
+%-------------------------------------------------------------------------------
+% resume style definition
%-------------------------------------------------------------------------------
% fonts
\renewcommand*{\namefont}{\fontsize{34}{36}\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}%
@@ -73,36 +78,30 @@
% fancyhdr lengths
\renewcommand{\headwidth}{\textwidth}}
-
% 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}{%
+ % recompute lengths (in case we are switching from letter to resume, or vice versa)
+ \recomputecvlengths%
% 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 +112,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 +224,59 @@
}
+%-------------------------------------------------------------------------------
+% 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~\@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%
+ \addressfont%
+ {\bfseries\upshape\@recipientname}\\%
+ \@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