Corrected the vertical misalignment between the page number and the center footer in the casual style
This commit is contained in:
@ -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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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}}
|
||||
|
||||
|
||||
@ -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}}}%
|
||||
|
||||
Reference in New Issue
Block a user