Clean-up of length calculations thanks to xcalc
This commit is contained in:
10
moderncv.cls
10
moderncv.cls
@ -185,11 +185,11 @@
|
|||||||
% other symbols
|
% other symbols
|
||||||
\newcommand*{\listitemsymbol}{\labelitemi}
|
\newcommand*{\listitemsymbol}{\labelitemi}
|
||||||
\newcommand*{\addresssymbol}{}
|
\newcommand*{\addresssymbol}{}
|
||||||
\newcommand*{\mobilesymbol}{\Mobilefone}
|
\newcommand*{\mobilesymbol}{\Mobilefone~}
|
||||||
\newcommand*{\phonesymbol}{\Telefon}
|
\newcommand*{\phonesymbol}{\Telefon~}
|
||||||
\newcommand*{\faxsymbol}{\FAX}
|
\newcommand*{\faxsymbol}{\FAX~}
|
||||||
\newcommand*{\emailsymbol}{\Letter}
|
\newcommand*{\emailsymbol}{\Letter~}
|
||||||
\newcommand*{\homepagesymbol}{{\Large\ComputerMouse}}
|
\newcommand*{\homepagesymbol}{{\Large\ComputerMouse}~}
|
||||||
|
|
||||||
% colors
|
% colors
|
||||||
\definecolor{color0}{rgb}{0,0,0}% main default color, normally left to black
|
\definecolor{color0}{rgb}{0,0,0}% main default color, normally left to black
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
\newcommand*{\footersymbol}{%
|
\newcommand*{\footersymbol}{%
|
||||||
\if@firstfooterelement%
|
\if@firstfooterelement%
|
||||||
\else%
|
\else%
|
||||||
{ ~~\color{color1}\textbullet~~~}\fi\@firstfooterelementfalse}% \textbullet forces the use of the CMSY font, even when lmodern fonts are used :(
|
{~~~\color{color1}\textbullet~~~}\fi\@firstfooterelementfalse}% \textbullet forces the use of the CMSY font, even when lmodern fonts are used :(
|
||||||
\renewcommand*{\makefooter}{%
|
\renewcommand*{\makefooter}{%
|
||||||
\fancypagestyle{plain}{%
|
\fancypagestyle{plain}{%
|
||||||
\fancyfoot[c]{%
|
\fancyfoot[c]{%
|
||||||
@ -47,14 +47,14 @@
|
|||||||
\centering%
|
\centering%
|
||||||
\addressfont\color{color2}%
|
\addressfont\color{color2}%
|
||||||
\ifthenelse{\isundefined{\@addressstreet}}{}{%
|
\ifthenelse{\isundefined{\@addressstreet}}{}{%
|
||||||
\addresssymbol~\@addressstreet%
|
\addresssymbol\@addressstreet%
|
||||||
\@firstfooterelementfalse%
|
\@firstfooterelementfalse%
|
||||||
\ifthenelse{\isundefined{\@addresscity}}{}{~--~\@addresscity}\\\@firstfooterelementtrue}%
|
\ifthenelse{\isundefined{\@addresscity}}{}{~--~\@addresscity}\\\@firstfooterelementtrue}%
|
||||||
\ifthenelse{\isundefined{\@mobile}}{}{\footersymbol\mobilesymbol~\@mobile\@firstfooterelementfalse}%
|
\ifthenelse{\isundefined{\@mobile}}{}{\footersymbol\mobilesymbol\@mobile\@firstfooterelementfalse}%
|
||||||
\ifthenelse{\isundefined{\@phone}}{}{\footersymbol\phonesymbol~\@phone\@firstfooterelementfalse}%
|
\ifthenelse{\isundefined{\@phone}}{}{\footersymbol\phonesymbol\@phone\@firstfooterelementfalse}%
|
||||||
\ifthenelse{\isundefined{\@fax}}{}{\footersymbol\faxsymbol~\@fax\@firstfooterelementfalse}%
|
\ifthenelse{\isundefined{\@fax}}{}{\footersymbol\faxsymbol\@fax\@firstfooterelementfalse}%
|
||||||
\ifthenelse{\isundefined{\@email}}{}{\footersymbol\emailsymbol~\emaillink{\@email}\@firstfooterelementfalse}%
|
\ifthenelse{\isundefined{\@email}}{}{\footersymbol\emailsymbol\emaillink{\@email}\@firstfooterelementfalse}%
|
||||||
\ifthenelse{\isundefined{\@homepage}}{}{\footersymbol\homepagesymbol~\httplink{\@homepage}\@firstfooterelementfalse}%
|
\ifthenelse{\isundefined{\@homepage}}{}{\footersymbol\homepagesymbol\httplink{\@homepage}\@firstfooterelementfalse}%
|
||||||
\ifthenelse{\isundefined{\@extrainfo}}{}{\footersymbol\@extrainfo\@firstfooterelementfalse}}}%
|
\ifthenelse{\isundefined{\@extrainfo}}{}{\footersymbol\@extrainfo\@firstfooterelementfalse}}}%
|
||||||
}%
|
}%
|
||||||
\pagestyle{plain}}
|
\pagestyle{plain}}
|
||||||
|
|||||||
@ -21,37 +21,6 @@
|
|||||||
%-------------------------------------------------------------------------------
|
%-------------------------------------------------------------------------------
|
||||||
% package options
|
% package options
|
||||||
%-------------------------------------------------------------------------------
|
%-------------------------------------------------------------------------------
|
||||||
% color options
|
|
||||||
% blue (default option)
|
|
||||||
%\DeclareOption{blue}{}
|
|
||||||
% orange
|
|
||||||
\newif\if@colororange\@colororangefalse
|
|
||||||
%\DeclareOption{orange}{\@colororangetrue}
|
|
||||||
% green
|
|
||||||
\newif\if@colorgreen\@colorgreenfalse
|
|
||||||
%\DeclareOption{green}{\@colorgreentrue}
|
|
||||||
% red
|
|
||||||
\newif\if@colorred\@colorredfalse
|
|
||||||
%\DeclareOption{red}{\@colorredtrue}
|
|
||||||
% purple
|
|
||||||
\newif\if@colorpurple\@colorpurplefalse
|
|
||||||
%\DeclareOption{purple}{\@colorpurpletrue}
|
|
||||||
% grey
|
|
||||||
\newif\if@colorgrey\@colorgreyfalse
|
|
||||||
%\DeclareOption{grey}{\@colorgreytrue}
|
|
||||||
% black
|
|
||||||
\newif\if@colorblack\@colorblackfalse
|
|
||||||
%\DeclareOption{black}{\@colorblacktrue}
|
|
||||||
|
|
||||||
% unused options
|
|
||||||
%\DeclareOption*{
|
|
||||||
% \PackageWarning{moderncvstyleclassic}{Unknown option '\CurrentOption'}}
|
|
||||||
|
|
||||||
% execute default options
|
|
||||||
%\ExecuteOptions{}
|
|
||||||
|
|
||||||
% process given options
|
|
||||||
%\ProcessOptions\relax
|
|
||||||
|
|
||||||
|
|
||||||
%-------------------------------------------------------------------------------
|
%-------------------------------------------------------------------------------
|
||||||
@ -92,20 +61,14 @@
|
|||||||
\renewcommand*{\recomputelengths}{%
|
\renewcommand*{\recomputelengths}{%
|
||||||
\setlength{\quotewidth}{0.65\textwidth}%
|
\setlength{\quotewidth}{0.65\textwidth}%
|
||||||
% main lenghts
|
% main lenghts
|
||||||
\setlength{\maincolumnwidth}{\textwidth}%
|
\setlength{\maincolumnwidth}{\textwidth-\separatorcolumnwidth-\hintscolumnwidth}%
|
||||||
\addtolength{\maincolumnwidth}{-\separatorcolumnwidth}%
|
|
||||||
\addtolength{\maincolumnwidth}{-\hintscolumnwidth}%
|
|
||||||
% listitem lengths
|
% listitem lengths
|
||||||
\setlength{\listitemmaincolumnwidth}{\maincolumnwidth}%
|
\setlength{\listitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth}%
|
||||||
\addtolength{\listitemmaincolumnwidth}{-\listitemsymbolwidth}%
|
|
||||||
% doubleitem lengths
|
% doubleitem lengths
|
||||||
\setlength{\doubleitemmaincolumnwidth}{\maincolumnwidth}%
|
\setlength{\doubleitemmaincolumnwidth}{\maincolumnwidth-\hintscolumnwidth-\separatorcolumnwidth}%
|
||||||
\addtolength{\doubleitemmaincolumnwidth}{-\hintscolumnwidth}%
|
|
||||||
\addtolength{\doubleitemmaincolumnwidth}{-\separatorcolumnwidth}%
|
|
||||||
\setlength{\doubleitemmaincolumnwidth}{0.5\doubleitemmaincolumnwidth}%
|
\setlength{\doubleitemmaincolumnwidth}{0.5\doubleitemmaincolumnwidth}%
|
||||||
% listdoubleitem lengths
|
% listdoubleitem lengths
|
||||||
\setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth}%
|
\setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth}%
|
||||||
\addtolength{\listdoubleitemmaincolumnwidth}{-\listitemsymbolwidth}%
|
|
||||||
\setlength{\listdoubleitemmaincolumnwidth}{0.475\listdoubleitemmaincolumnwidth}%
|
\setlength{\listdoubleitemmaincolumnwidth}{0.475\listdoubleitemmaincolumnwidth}%
|
||||||
% fancyhdr lengths
|
% fancyhdr lengths
|
||||||
\renewcommand{\headwidth}{\textwidth}}
|
\renewcommand{\headwidth}{\textwidth}}
|
||||||
@ -122,13 +85,13 @@
|
|||||||
\newbox{\maketitledetailsbox}%
|
\newbox{\maketitledetailsbox}%
|
||||||
\savebox{\maketitledetailsbox}{%
|
\savebox{\maketitledetailsbox}{%
|
||||||
\begin{tabular}[b]{@{}r@{}}%
|
\begin{tabular}[b]{@{}r@{}}%
|
||||||
\ifthenelse{\isundefined{\@addressstreet}}{}{\maketitledetailsnewline\addresssymbol~\@addressstreet}%
|
\ifthenelse{\isundefined{\@addressstreet}}{}{\maketitledetailsnewline\addresssymbol\@addressstreet}%
|
||||||
\ifthenelse{\isundefined{\@addresscity}}{}{\maketitledetailsnewline\@addresscity}%
|
\ifthenelse{\isundefined{\@addresscity}}{}{\maketitledetailsnewline\@addresscity}%
|
||||||
\ifthenelse{\isundefined{\@mobile}}{}{\maketitledetailsnewline\mobilesymbol~\@mobile}%
|
\ifthenelse{\isundefined{\@mobile}}{}{\maketitledetailsnewline\mobilesymbol\@mobile}%
|
||||||
\ifthenelse{\isundefined{\@phone}}{}{\maketitledetailsnewline\phonesymbol~\@phone}%
|
\ifthenelse{\isundefined{\@phone}}{}{\maketitledetailsnewline\phonesymbol\@phone}%
|
||||||
\ifthenelse{\isundefined{\@fax}}{}{\maketitledetailsnewline\faxsymbol~\@fax}%
|
\ifthenelse{\isundefined{\@fax}}{}{\maketitledetailsnewline\faxsymbol\@fax}%
|
||||||
\ifthenelse{\isundefined{\@email}}{}{\maketitledetailsnewline\emailsymbol~\emaillink{\@email}}%
|
\ifthenelse{\isundefined{\@email}}{}{\maketitledetailsnewline\emailsymbol\emaillink{\@email}}%
|
||||||
\ifthenelse{\isundefined{\@homepage}}{}{\maketitledetailsnewline\homepagesymbol~\httplink{\@homepage}}%
|
\ifthenelse{\isundefined{\@homepage}}{}{\maketitledetailsnewline\homepagesymbol\httplink{\@homepage}}%
|
||||||
\ifthenelse{\isundefined{\@extrainfo}}{}{\maketitledetailsnewline\@extrainfo}%
|
\ifthenelse{\isundefined{\@extrainfo}}{}{\maketitledetailsnewline\@extrainfo}%
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
}%
|
}%
|
||||||
@ -193,8 +156,6 @@
|
|||||||
\hspace*{\separatorcolumnwidth}%
|
\hspace*{\separatorcolumnwidth}%
|
||||||
\begin{minipage}[t]{\doubleitemmaincolumnwidth}#5\end{minipage}}}
|
\begin{minipage}[t]{\doubleitemmaincolumnwidth}#5\end{minipage}}}
|
||||||
|
|
||||||
%\renewcommand*{\cvlistitem}[2][\listitemsymbol]{%
|
|
||||||
% \cvitem[0pt]{}{#1~\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}}
|
|
||||||
\renewcommand*{\cvlistitem}[2][.25em]{%
|
\renewcommand*{\cvlistitem}[2][.25em]{%
|
||||||
\cvitem[#1]{}{\listitemsymbol~\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}}
|
\cvitem[#1]{}{\listitemsymbol~\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}}
|
||||||
|
|
||||||
@ -206,7 +167,7 @@
|
|||||||
{#1~\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}}
|
{#1~\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}}
|
||||||
|
|
||||||
\renewcommand*{\cventry}[6]{%
|
\renewcommand*{\cventry}[6]{%
|
||||||
\cvline{#1}{%
|
\cvitem{#1}{%
|
||||||
{\bfseries#2}%
|
{\bfseries#2}%
|
||||||
\ifthenelse{\equal{#3}{}}{}{, {\slshape#3}}%
|
\ifthenelse{\equal{#3}{}}{}{, {\slshape#3}}%
|
||||||
\ifthenelse{\equal{#4}{}}{}{, #4}%
|
\ifthenelse{\equal{#4}{}}{}{, #4}%
|
||||||
|
|||||||
Reference in New Issue
Block a user