diff --git a/CHANGELOG b/CHANGELOG index 5dc5e51..b33f363 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,8 @@ version 0.17 (xx Jan 2012) - added an optional title to the casual style. - changed the definition of the font styles to avoid undesired extra spacing. - added a Spanish template, kindly provided by I. BuitrĂ³n. + - corrected the vertical misalignment between the page number and the center + footer in the casual style. version 0.16 (15 Jan 2012) - added starred versions of \section and \subsection (that are identical to their diff --git a/examples/template-es.pdf b/examples/template-es.pdf index a18aec8..9534082 100644 Binary files a/examples/template-es.pdf and b/examples/template-es.pdf differ diff --git a/examples/template-zh.pdf b/examples/template-zh.pdf index 1cf32a5..591b370 100644 Binary files a/examples/template-zh.pdf and b/examples/template-zh.pdf differ diff --git a/examples/template.pdf b/examples/template.pdf index 1dce91a..2c79e2e 100644 Binary files a/examples/template.pdf and b/examples/template.pdf differ diff --git a/examples/template_casual_orange.pdf b/examples/template_casual_orange.pdf index 9ff7734..b4b68f0 100644 Binary files a/examples/template_casual_orange.pdf and b/examples/template_casual_orange.pdf differ diff --git a/examples/template_classic_green.pdf b/examples/template_classic_green.pdf index 93d0659..50751c7 100644 Binary files a/examples/template_classic_green.pdf and b/examples/template_classic_green.pdf differ diff --git a/examples/template_multibib.pdf b/examples/template_multibib.pdf index 44756f3..9e8e1e4 100644 Binary files a/examples/template_multibib.pdf and b/examples/template_multibib.pdf differ diff --git a/moderncv.cls b/moderncv.cls index 0babaff..b5097d7 100644 --- a/moderncv.cls +++ b/moderncv.cls @@ -314,8 +314,10 @@ \if@displaypagenumbers% \@ifundefined{r@lastpage}{}{% \ifthenelse{\pageref{lastpage}>1}{% + \newlength{\pagenumberwidth}% + \settowidth{\pagenumberwidth}{\color{color2}\addressfont\itshape\strut\thepage/\pageref{lastpage}}% \fancypagestyle{plain}{% - \fancyfoot[r]{\color{color2}\footnotesize\itshape\thepage/\pageref{lastpage}}}% + \fancyfoot[r]{\parbox{\pagenumberwidth}{\color{color2}\addressfont\itshape\strut\thepage/\pageref{lastpage}}}}% the parbox is required to ensure alignment with a possible center footer (e.g., as in the casual style) \pagestyle{plain}}{}}% \AtEndDocument{\label{lastpage}}\else\fi}} diff --git a/moderncvstylecasual.sty b/moderncvstylecasual.sty index 41a1f26..1efc394 100644 --- a/moderncvstylecasual.sty +++ b/moderncvstylecasual.sty @@ -32,34 +32,29 @@ \renewcommand*{\addressfont}{\small\mdseries\slshape} % cv footer -% internal command to print a footer symbol to separate footer elements when -% required (i.e. when the element is not the first) -\newif\if@firstfooterelement\@firstfooterelementtrue +% footer symbol used to separate footer elements \newcommand*{\footersymbol}{% - \if@firstfooterelement% - \else% - { ~~\color{color2}\textbullet~~~}\fi}% \textbullet forces the use of the CMSY font, even when latin modern fonts are used :( + {~~~\textbullet~~~}}% \textbullet forces the use of the CMSY font, even when latin modern fonts are used :( % internal command to add an element to the footer % it collects the elements in a temporary box, and checks when to flush the box -% and resets \@firstfooterelement \newsavebox{\footertempabox}% \newsavebox{\footertempbbox}% \newlength{\footerwidth}% \newlength{\footerboxwidth}% -\newcommand*{\addtofooter}[1]{% - \savebox{\footertempbbox}{\usebox{\footertempabox}\footersymbol#1}% +% adds an element to the footer, separated by footersymbol +% usage: \addtofooter[footersymbol]{element} +\newcommand*{\addtofooter}[2][\footersymbol]{% + \savebox{\footertempbbox}{\usebox{\footertempabox}#1#2}% \settowidth{\footerboxwidth}{\usebox{\footertempbbox}}% \ifnum\footerboxwidth<\footerwidth% \savebox{\footertempabox}{\usebox{\footertempbbox}} - \@firstfooterelementfalse% \else% \flushfooter{}\\% - \savebox{\footertempabox}{#1}% - \savebox{\footertempbbox}{#1}% - \@firstfooterelementfalse\fi} + \savebox{\footertempabox}{#2}% + \savebox{\footertempbbox}{#2}\fi} % internal command to flush the footer \newcommand*{\flushfooter}{% - \usebox{\footertempabox}% + \strut\usebox{\footertempabox}% \savebox{\footertempabox}{}% \savebox{\footertempbbox}{}} \renewcommand*{\makefooter}{% @@ -68,11 +63,10 @@ \fancyfoot[c]{% \parbox{\footerwidth}{% \centering% - \addressfont\color{color2}% - \ifthenelse{\isundefined{\@addressstreet}}{}{% - \addresssymbol\@addressstreet% - \ifthenelse{\isundefined{\@addresscity}}{}{~--~\@addresscity}\\}% - \ifthenelse{\isundefined{\@mobile}}{}{\addtofooter{\mobilesymbol\@mobile}}% + \color{color2}\addressfont% + \ifthenelse{\isundefined{\@addressstreet}}{}{\addtofooter[]{\addresssymbol\@addressstreet}% + \ifthenelse{\isundefined{\@addresscity}}{}{\addtofooter[~--~]{\@addresscity}}\flushfooter}% + \ifthenelse{\isundefined{\@mobile}}{}{\addtofooter[]{\mobilesymbol\@mobile}}% \ifthenelse{\isundefined{\@phone}}{}{\addtofooter{\phonesymbol\@phone}}% \ifthenelse{\isundefined{\@fax}}{}{\addtofooter{\faxsymbol\@fax}}% \ifthenelse{\isundefined{\@email}}{}{\addtofooter{\emailsymbol\emaillink{\@email}}}%