summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty')
-rw-r--r--Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty57
1 files changed, 37 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty b/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty
index a9c44f3904b..872d67d5796 100644
--- a/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty
+++ b/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvthemeclassic.sty'.
-%% Copyright 2007 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2008 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,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvthemeclassic}[2007/05/28 v0.6 modern curriculum vitae style: classic]
+\ProvidesPackage{moderncvthemeclassic}[2008/06/17 v0.7 modern curriculum vitae style: classic]
%-------------------------------------------------------------------------------
@@ -106,36 +106,53 @@
% styles
% maketitle
+% setmaketitlenamemaxwidth to the full name length, capped by \maketitlenamemaxwidth
+\newlength{\maketitlenamemaxwidth}
+\setlength{\maketitlenamemaxwidth}{.525\textwidth}
+\newlength{\maketitlenamefullwidth}
+\settowidth{\maketitlenamefullwidth}{\firstnamestyle{\@firstname~}\familynamestyle{\@familyname}}
+\newlength{\maketitlenamewidth}
+\ifnum\maketitlenamemaxwidth<\maketitlenamefullwidth\setlength{\maketitlenamewidth}{\maketitlenamemaxwidth}\else\setlength{\maketitlenamewidth}{\maketitlenamefullwidth}\fi
+% other lengths
+\newlength{\maketitlepicturewidth}
+\setlength{\maketitlepicturewidth}{\@photowidth}
+\newlength{\maketitledetailswidth}
+% recompute theme-specific lengths, called by class to recompute all lengths
+\renewcommand*{\recomputethemelengths}{%
+ \setlength{\maketitledetailswidth}{\textwidth}%
+ \addtolength{\maketitledetailswidth}{-\maketitlenamewidth}%
+ \addtolength{\maketitledetailswidth}{-\separatorcolumnwidth}%
+ \addtolength{\maketitledetailswidth}{-\maketitlepicturewidth}}
+\recomputethemelengths
+\newif\if@firstdetailselement\@firstdetailselementtrue
+\newcommand*{\maketitledetailsnewline}{
+ \if@firstdetailselement%
+ \@firstdetailselementfalse%
+ \else%
+ \\[.2em]\fi}
\renewcommand*{\maketitle}{%
% name and title
- \if@DEBUG\framebox{\fi
- \begin{minipage}[b]{.525\textwidth}%
+ \begin{minipage}[b]{\maketitlenamewidth}%
\firstnamestyle{\@firstname~}\familynamestyle{\@familyname}%
- \ifthenelse{\isundefined{\@title}}%
- {}%
- {\\[1.25em]\titlestyle{\@title}}%
+ \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
\end{minipage}%
- \if@DEBUG}\fi
- \hfill%
- \if@DEBUG\framebox{\fi%
% optional data
- \begin{minipage}[b]{.225\textwidth}%
+ \begin{minipage}[b]{\maketitledetailswidth}%
\raggedleft\addressfont\color{addresscolor}%
\ifthenelse{\isundefined{\@addressstreet}}{}{%
+ \maketitledetailsnewline%
\addresssymbol~\@addressstreet%
- \ifthenelse{\isundefined{\@addresscity}}{}{\\\@addresscity}%
- \\[.2em]}%
- \ifthenelse{\isundefined{\@mobile}}{}{\mobilesymbol~\@mobile\\[.2em]}%
- \ifthenelse{\isundefined{\@phone}}{}{\phonesymbol~\@phone\\[.2em]}%
- \ifthenelse{\isundefined{\@fax}}{}{\faxsymbol~\@fax\\[.2em]}%
- \ifthenelse{\isundefined{\@email}}{}{\emailsymbol~\emaillink{\@email}\\[.2em]}%
- \ifthenelse{\isundefined{\@extrainfo}}{}{\@extrainfo\\[.2em]}%
+ \ifthenelse{\isundefined{\@addresscity}}{}{\\\@addresscity}}%
+ \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{\@extrainfo}}{}{\maketitledetailsnewline\@extrainfo}%
\end{minipage}%
% optional photo
\ifthenelse{\isundefined{\@photo}}%
{}%
- {\hspace*{0.75em}\color{firstnamecolor}\framebox{\includegraphics[height=\@photoheight]{\@photo}}}\\[3em]%
- \if@DEBUG}\fi%
+ {\hspace*{\separatorcolumnwidth}\color{firstnamecolor}\framebox{\includegraphics[width=\maketitlepicturewidth]{\@photo}}}\\[3em]%
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%