Change the footer algorithm of style casual to avoid lines starting with a footer symbol
This commit is contained in:
@ -32,28 +32,53 @@
|
||||
\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
|
||||
\newcommand*{\footersymbol}{%
|
||||
\if@firstfooterelement%
|
||||
\else%
|
||||
{ ~~\color{color2}\textbullet~~~}\fi\@firstfooterelementfalse}% \textbullet forces the use of the CMSY font, even when latin modern fonts are used :(
|
||||
{ ~~\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
|
||||
% 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}%
|
||||
\settowidth{\footerboxwidth}{\usebox{\footertempbbox}}%
|
||||
\ifnum\footerboxwidth<\footerwidth%
|
||||
\savebox{\footertempabox}{\usebox{\footertempbbox}}
|
||||
\@firstfooterelementfalse%
|
||||
\else%
|
||||
\flushfooter{}\\%
|
||||
\savebox{\footertempabox}{#1}%
|
||||
\savebox{\footertempbbox}{#1}%
|
||||
\@firstfooterelementfalse\fi}
|
||||
% internal command to flush the footer
|
||||
\newcommand*{\flushfooter}{%
|
||||
\usebox{\footertempabox}%
|
||||
\savebox{\footertempabox}{}%
|
||||
\savebox{\footertempbbox}{}}
|
||||
\renewcommand*{\makefooter}{%
|
||||
\setlength{\footerwidth}{0.8\textwidth}%
|
||||
\fancypagestyle{plain}{%
|
||||
\fancyfoot[c]{%
|
||||
\parbox{0.8\textwidth}{%
|
||||
\centering%
|
||||
\addressfont\color{color2}%
|
||||
\ifthenelse{\isundefined{\@addressstreet}}{}{%
|
||||
\addresssymbol\@addressstreet%
|
||||
\@firstfooterelementfalse%
|
||||
\ifthenelse{\isundefined{\@addresscity}}{}{~--~\@addresscity}\\\@firstfooterelementtrue}%
|
||||
\ifthenelse{\isundefined{\@mobile}}{}{\footersymbol\mobilesymbol\@mobile\@firstfooterelementfalse}%
|
||||
\ifthenelse{\isundefined{\@phone}}{}{\footersymbol\phonesymbol\@phone\@firstfooterelementfalse}%
|
||||
\ifthenelse{\isundefined{\@fax}}{}{\footersymbol\faxsymbol\@fax\@firstfooterelementfalse}%
|
||||
\ifthenelse{\isundefined{\@email}}{}{\footersymbol\emailsymbol\emaillink{\@email}\@firstfooterelementfalse}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\footersymbol\homepagesymbol\httplink{\@homepage}\@firstfooterelementfalse}%
|
||||
\ifthenelse{\isundefined{\@extrainfo}}{}{\footersymbol\@extrainfo\@firstfooterelementfalse}}}%
|
||||
}%
|
||||
\parbox{\footerwidth}{%
|
||||
\centering%
|
||||
\addressfont\color{color2}%
|
||||
\ifthenelse{\isundefined{\@addressstreet}}{}{%
|
||||
\addresssymbol\@addressstreet%
|
||||
\ifthenelse{\isundefined{\@addresscity}}{}{~--~\@addresscity}\\}%
|
||||
\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}}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\addtofooter{\homepagesymbol\httplink{\@homepage}}}%
|
||||
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtofooter{\@extrainfo}}%
|
||||
\flushfooter}}}%
|
||||
\pagestyle{plain}}
|
||||
|
||||
% maketitle
|
||||
|
||||
Reference in New Issue
Block a user