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.
|
- added an optional title to the casual style.
|
||||||
- changed the definition of the font styles to avoid undesired extra spacing.
|
- changed the definition of the font styles to avoid undesired extra spacing.
|
||||||
- added a Spanish template, kindly provided by I. Buitrón.
|
- 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)
|
version 0.16 (15 Jan 2012)
|
||||||
- added starred versions of \section and \subsection (that are identical to their
|
- 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%
|
\if@displaypagenumbers%
|
||||||
\@ifundefined{r@lastpage}{}{%
|
\@ifundefined{r@lastpage}{}{%
|
||||||
\ifthenelse{\pageref{lastpage}>1}{%
|
\ifthenelse{\pageref{lastpage}>1}{%
|
||||||
|
\newlength{\pagenumberwidth}%
|
||||||
|
\settowidth{\pagenumberwidth}{\color{color2}\addressfont\itshape\strut\thepage/\pageref{lastpage}}%
|
||||||
\fancypagestyle{plain}{%
|
\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}}{}}%
|
\pagestyle{plain}}{}}%
|
||||||
\AtEndDocument{\label{lastpage}}\else\fi}}
|
\AtEndDocument{\label{lastpage}}\else\fi}}
|
||||||
|
|
||||||
|
|||||||
@ -32,34 +32,29 @@
|
|||||||
\renewcommand*{\addressfont}{\small\mdseries\slshape}
|
\renewcommand*{\addressfont}{\small\mdseries\slshape}
|
||||||
|
|
||||||
% cv footer
|
% cv footer
|
||||||
% internal command to print a footer symbol to separate footer elements when
|
% footer symbol used to separate footer elements
|
||||||
% required (i.e. when the element is not the first)
|
|
||||||
\newif\if@firstfooterelement\@firstfooterelementtrue
|
|
||||||
\newcommand*{\footersymbol}{%
|
\newcommand*{\footersymbol}{%
|
||||||
\if@firstfooterelement%
|
{~~~\textbullet~~~}}% \textbullet forces the use of the CMSY font, even when latin modern fonts are used :(
|
||||||
\else%
|
|
||||||
{ ~~\color{color2}\textbullet~~~}\fi}% \textbullet forces the use of the CMSY font, even when latin modern fonts are used :(
|
|
||||||
% internal command to add an element to the footer
|
% internal command to add an element to the footer
|
||||||
% it collects the elements in a temporary box, and checks when to flush the box
|
% it collects the elements in a temporary box, and checks when to flush the box
|
||||||
% and resets \@firstfooterelement
|
|
||||||
\newsavebox{\footertempabox}%
|
\newsavebox{\footertempabox}%
|
||||||
\newsavebox{\footertempbbox}%
|
\newsavebox{\footertempbbox}%
|
||||||
\newlength{\footerwidth}%
|
\newlength{\footerwidth}%
|
||||||
\newlength{\footerboxwidth}%
|
\newlength{\footerboxwidth}%
|
||||||
\newcommand*{\addtofooter}[1]{%
|
% adds an element to the footer, separated by footersymbol
|
||||||
\savebox{\footertempbbox}{\usebox{\footertempabox}\footersymbol#1}%
|
% usage: \addtofooter[footersymbol]{element}
|
||||||
|
\newcommand*{\addtofooter}[2][\footersymbol]{%
|
||||||
|
\savebox{\footertempbbox}{\usebox{\footertempabox}#1#2}%
|
||||||
\settowidth{\footerboxwidth}{\usebox{\footertempbbox}}%
|
\settowidth{\footerboxwidth}{\usebox{\footertempbbox}}%
|
||||||
\ifnum\footerboxwidth<\footerwidth%
|
\ifnum\footerboxwidth<\footerwidth%
|
||||||
\savebox{\footertempabox}{\usebox{\footertempbbox}}
|
\savebox{\footertempabox}{\usebox{\footertempbbox}}
|
||||||
\@firstfooterelementfalse%
|
|
||||||
\else%
|
\else%
|
||||||
\flushfooter{}\\%
|
\flushfooter{}\\%
|
||||||
\savebox{\footertempabox}{#1}%
|
\savebox{\footertempabox}{#2}%
|
||||||
\savebox{\footertempbbox}{#1}%
|
\savebox{\footertempbbox}{#2}\fi}
|
||||||
\@firstfooterelementfalse\fi}
|
|
||||||
% internal command to flush the footer
|
% internal command to flush the footer
|
||||||
\newcommand*{\flushfooter}{%
|
\newcommand*{\flushfooter}{%
|
||||||
\usebox{\footertempabox}%
|
\strut\usebox{\footertempabox}%
|
||||||
\savebox{\footertempabox}{}%
|
\savebox{\footertempabox}{}%
|
||||||
\savebox{\footertempbbox}{}}
|
\savebox{\footertempbbox}{}}
|
||||||
\renewcommand*{\makefooter}{%
|
\renewcommand*{\makefooter}{%
|
||||||
@ -68,11 +63,10 @@
|
|||||||
\fancyfoot[c]{%
|
\fancyfoot[c]{%
|
||||||
\parbox{\footerwidth}{%
|
\parbox{\footerwidth}{%
|
||||||
\centering%
|
\centering%
|
||||||
\addressfont\color{color2}%
|
\color{color2}\addressfont%
|
||||||
\ifthenelse{\isundefined{\@addressstreet}}{}{%
|
\ifthenelse{\isundefined{\@addressstreet}}{}{\addtofooter[]{\addresssymbol\@addressstreet}%
|
||||||
\addresssymbol\@addressstreet%
|
\ifthenelse{\isundefined{\@addresscity}}{}{\addtofooter[~--~]{\@addresscity}}\flushfooter}%
|
||||||
\ifthenelse{\isundefined{\@addresscity}}{}{~--~\@addresscity}\\}%
|
\ifthenelse{\isundefined{\@mobile}}{}{\addtofooter[]{\mobilesymbol\@mobile}}%
|
||||||
\ifthenelse{\isundefined{\@mobile}}{}{\addtofooter{\mobilesymbol\@mobile}}%
|
|
||||||
\ifthenelse{\isundefined{\@phone}}{}{\addtofooter{\phonesymbol\@phone}}%
|
\ifthenelse{\isundefined{\@phone}}{}{\addtofooter{\phonesymbol\@phone}}%
|
||||||
\ifthenelse{\isundefined{\@fax}}{}{\addtofooter{\faxsymbol\@fax}}%
|
\ifthenelse{\isundefined{\@fax}}{}{\addtofooter{\faxsymbol\@fax}}%
|
||||||
\ifthenelse{\isundefined{\@email}}{}{\addtofooter{\emailsymbol\emaillink{\@email}}}%
|
\ifthenelse{\isundefined{\@email}}{}{\addtofooter{\emailsymbol\emaillink{\@email}}}%
|
||||||
|
|||||||
Reference in New Issue
Block a user