Change the footer algorithm of style casual to avoid lines starting with a footer symbol

This commit is contained in:
Xavier Danaux
2012-01-22 19:00:38 +01:00
parent cd56d14420
commit d4b40f96fc
9 changed files with 51 additions and 21 deletions

View File

@ -1,3 +1,7 @@
version 0.17 (xx Jan 2012)
- changed the footer algorithm of style casual to avoid starting lines with
the footer symbol.
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
non-starred version, to e.g. enable biblatex support as requested by S. Verberkt non-starred version, to e.g. enable biblatex support as requested by S. Verberkt

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -99,7 +99,7 @@
% hyper links % hyper links
\RequirePackage{url} \RequirePackage{url}
\urlstyle{tt} \urlstyle{tt}
% load hyperred at the end of the preamble to pass options required by loaded packages (like CJK) % load hyperref at the end of the preamble to pass options required by loaded packages (like CJK)
\AtEndPreamble{ \AtEndPreamble{
\@ifpackageloaded{CJK} \@ifpackageloaded{CJK}
{\RequirePackage[unicode]{hyperref}} {\RequirePackage[unicode]{hyperref}}
@ -313,9 +313,9 @@
\AtBeginDocument{% \AtBeginDocument{%
\if@displaypagenumbers% \if@displaypagenumbers%
\@ifundefined{r@lastpage}{}{% \@ifundefined{r@lastpage}{}{%
\ifthenelse{\pageref{lastpage} > 1}{% \ifthenelse{\pageref{lastpage}>1}{%
\fancypagestyle{plain}{% \fancypagestyle{plain}{%
\fancyfoot[r]{\addressfont\color{color2}\footnotesize\thepage/\pageref{lastpage}}}% \fancyfoot[r]{\color{color2}\footnotesize\itshape\thepage/\pageref{lastpage}}}%
\pagestyle{plain}}{}}% \pagestyle{plain}}{}}%
\AtEndDocument{\label{lastpage}}\else\fi}} \AtEndDocument{\label{lastpage}}\else\fi}}

View File

@ -32,28 +32,53 @@
\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
% required (i.e. when the element is not the first)
\newif\if@firstfooterelement\@firstfooterelementtrue \newif\if@firstfooterelement\@firstfooterelementtrue
\newcommand*{\footersymbol}{% \newcommand*{\footersymbol}{%
\if@firstfooterelement% \if@firstfooterelement%
\else% \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}{% \renewcommand*{\makefooter}{%
\setlength{\footerwidth}{0.8\textwidth}%
\fancypagestyle{plain}{% \fancypagestyle{plain}{%
\fancyfoot[c]{% \fancyfoot[c]{%
\parbox{0.8\textwidth}{% \parbox{\footerwidth}{%
\centering% \centering%
\addressfont\color{color2}% \addressfont\color{color2}%
\ifthenelse{\isundefined{\@addressstreet}}{}{% \ifthenelse{\isundefined{\@addressstreet}}{}{%
\addresssymbol\@addressstreet% \addresssymbol\@addressstreet%
\@firstfooterelementfalse% \ifthenelse{\isundefined{\@addresscity}}{}{~--~\@addresscity}\\}%
\ifthenelse{\isundefined{\@addresscity}}{}{~--~\@addresscity}\\\@firstfooterelementtrue}% \ifthenelse{\isundefined{\@mobile}}{}{\addtofooter{\mobilesymbol\@mobile}}%
\ifthenelse{\isundefined{\@mobile}}{}{\footersymbol\mobilesymbol\@mobile\@firstfooterelementfalse}% \ifthenelse{\isundefined{\@phone}}{}{\addtofooter{\phonesymbol\@phone}}%
\ifthenelse{\isundefined{\@phone}}{}{\footersymbol\phonesymbol\@phone\@firstfooterelementfalse}% \ifthenelse{\isundefined{\@fax}}{}{\addtofooter{\faxsymbol\@fax}}%
\ifthenelse{\isundefined{\@fax}}{}{\footersymbol\faxsymbol\@fax\@firstfooterelementfalse}% \ifthenelse{\isundefined{\@email}}{}{\addtofooter{\emailsymbol\emaillink{\@email}}}%
\ifthenelse{\isundefined{\@email}}{}{\footersymbol\emailsymbol\emaillink{\@email}\@firstfooterelementfalse}% \ifthenelse{\isundefined{\@homepage}}{}{\addtofooter{\homepagesymbol\httplink{\@homepage}}}%
\ifthenelse{\isundefined{\@homepage}}{}{\footersymbol\homepagesymbol\httplink{\@homepage}\@firstfooterelementfalse}% \ifthenelse{\isundefined{\@extrainfo}}{}{\addtofooter{\@extrainfo}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\footersymbol\@extrainfo\@firstfooterelementfalse}}}% \flushfooter}}}%
}%
\pagestyle{plain}} \pagestyle{plain}}
% maketitle % maketitle

View File

@ -174,7 +174,7 @@
\newlength{\cventrytitleboxwidth} \newlength{\cventrytitleboxwidth}
\renewcommand*{\cventry}[7][.25em]{% \renewcommand*{\cventry}[7][.25em]{%
\savebox{\cventryyearbox}{% \savebox{\cventryyearbox}{%
\hspace*{\separatorcolumnwidth}% \hspace*{2\separatorcolumnwidth}%
{\hintfont#2}}% {\hintfont#2}}%
\setlength{\cventrytitleboxwidth}{\widthof{\usebox{\cventryyearbox}}}% \setlength{\cventrytitleboxwidth}{\widthof{\usebox{\cventryyearbox}}}%
\setlength{\cventrytitleboxwidth}{\maincolumnwidth-\cventrytitleboxwidth}% \setlength{\cventrytitleboxwidth}{\maincolumnwidth-\cventrytitleboxwidth}%
@ -186,10 +186,11 @@
\ifthenelse{\equal{#6}{}}{}{, #6}% \ifthenelse{\equal{#6}{}}{}{, #6}%
.}% .}%
\usebox{\cventryyearbox}% \usebox{\cventryyearbox}%
\ifx&#7&% \end{minipage}%
\ifx&#7&%
\else{% \else{%
\newline{}\begin{minipage}[t]{\maincolumnwidth}\small#7\end{minipage}}\fi% \newline{}\begin{minipage}[t]{\maincolumnwidth}\small#7\end{minipage}}\fi%
\end{minipage}\\[#1]} \\[#1]}
\newbox{\cvitemwithcommentmainbox} \newbox{\cvitemwithcommentmainbox}