summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/moderncv/moderncvstylebanking.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-07-29 20:38:14 +0000
committerKarl Berry <karl@freefriends.org>2015-07-29 20:38:14 +0000
commite76534e995ef3134f513b1a9951be0156c997631 (patch)
tree66887cff813a6f9f7b72f0831165ea188043fab0 /Master/texmf-dist/tex/latex/moderncv/moderncvstylebanking.sty
parent6c09dd71fc1b55b7990d439747f090fa57a84b77 (diff)
moderncv (29jul15)
git-svn-id: svn://tug.org/texlive/trunk@37992 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/moderncv/moderncvstylebanking.sty')
-rw-r--r--Master/texmf-dist/tex/latex/moderncv/moderncvstylebanking.sty266
1 files changed, 21 insertions, 245 deletions
diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncvstylebanking.sty b/Master/texmf-dist/tex/latex/moderncv/moderncvstylebanking.sty
index c49e6e31d72..783f9606a46 100644
--- a/Master/texmf-dist/tex/latex/moderncv/moderncvstylebanking.sty
+++ b/Master/texmf-dist/tex/latex/moderncv/moderncvstylebanking.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvstylebanking.sty'.
-%% Copyright 2006-2013 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,18 +10,29 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvstylebanking}[2013/04/29 v1.5.1 modern curriculum vitae and letter style scheme: banking]
+\ProvidesPackage{moderncvstylebanking}[2015/07/28 v2.0.0 modern curriculum vitae and letter style scheme: banking]
+% body rules type options: "fullrules", "shortrules", "mixedrules" (default) or "norules"
+\@initializecommand{\moderncvstylebodyoptions}{}
+\DeclareOption{fullrules} {\edef\moderncvstylebodyoptions{\moderncvstylebodyoptions,fullrules}}
+\DeclareOption{shortrules} {\edef\moderncvstylebodyoptions{\moderncvstylebodyoptions,shortrules}}
+\DeclareOption{mixedrules} {\edef\moderncvstylebodyoptions{\moderncvstylebodyoptions,mixedrules}}
+\DeclareOption{norules} {\edef\moderncvstylebodyoptions{\moderncvstylebodyoptions,norules}}
-%-------------------------------------------------------------------------------
-% required packages
-%-------------------------------------------------------------------------------
+% body section alignment options: "left" (default), "center" or "right"
+\DeclareOption{left} {\edef\moderncvstylebodyoptions{\moderncvstylebodyoptions,left}}
+\DeclareOption{center} {\edef\moderncvstylebodyoptions{\moderncvstylebodyoptions,center}}
+\DeclareOption{right} {\edef\moderncvstylebodyoptions{\moderncvstylebodyoptions,right}}
+
+\DeclareOption*{}% avoid choking on unknown options
+\ExecuteOptions{mixedrules,left}
+\ProcessOptions*\relax% \ProcessOptions* processes the options in the order provided (i.e., with the later ones possibly overriding the former ones), while \ProcessOptions processes them in the order of the package
%-------------------------------------------------------------------------------
-% overall style definition
+% fonts & icons
%-------------------------------------------------------------------------------
-% fonts
+% TeX Gyre Pagella font
%\ifxetexorluatex
% \setmainfont{Tex-Gyre Pagella}
% \setsansfont{Tex-Gyre Pagella}
@@ -40,247 +51,12 @@
% symbols
\moderncvicons{awesome}
-% commands
-\newcommand*{\maketitlesymbol}{%
- {~~~{\rmfamily\textbullet}~~~}}% the \rmfamily is required to force Latin Modern fonts when using sans serif, as OMS/lmss/m/n is not defined and gets substituted by OMS/cmsy/m/n
-% internal command to add an element to the footer
-% it collects the elements in a temporary box, and checks when to flush the box
-\newsavebox{\maketitlebox}%
-\newsavebox{\maketitletempbox}%
-\newlength{\maketitlewidth}%
-\newlength{\maketitleboxwidth}%
-\newif\if@firstmaketitleelement\@firstmaketitleelementtrue%
-% adds an element to the maketitle, separated by maketitlesymbol
-% usage: \addtomaketitle[maketitlesymbol]{element}
-\newcommand*{\addtomaketitle}[2][\maketitlesymbol]{%
- \if@firstmaketitleelement%
- \savebox{\maketitletempbox}{\usebox{\maketitlebox}#2}%
- \else%
- \savebox{\maketitletempbox}{\usebox{\maketitlebox}#1#2}\fi%
- \settowidth{\maketitleboxwidth}{\usebox{\maketitletempbox}}%
- \ifnum\maketitleboxwidth<\maketitlewidth%
- \savebox{\maketitlebox}{\usebox{\maketitletempbox}}%
- \@firstmaketitleelementfalse%
- \else%
- \flushmaketitle{}\\%
- \savebox{\maketitlebox}{#2}%
- \savebox{\maketitletempbox}{#2}%
- \settowidth{\maketitleboxwidth}{\usebox{\maketitlebox}}%
- \@firstmaketitleelementfalse\fi}
-% internal command to flush the maketitle
-\newcommand*{\flushmaketitle}{%
- \strut\usebox{\maketitlebox}%
- \savebox{\maketitlebox}{}%
- \savebox{\maketitletempbox}{}%
- \setlength{\maketitleboxwidth}{0pt}}
-\renewcommand*{\maketitle}{%
- \setlength{\maketitlewidth}{0.8\textwidth}%
- \hfil%
- \parbox{\maketitlewidth}{%
- \centering%
- % name and title
- \namestyle{\@firstname~\@lastname}%
- \ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\\% \isundefined doesn't work on \@title, as LaTeX itself defines \@title (before it possibly gets redefined by \title)
- % detailed information
- \addressfont\color{color2}%
- \ifthenelse{\isundefined{\@addressstreet}}{}{\addtomaketitle{\addresssymbol\@addressstreet}%
- \ifthenelse{\equal{\@addresscity}{}}{}{\addtomaketitle[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
- \ifthenelse{\equal{\@addresscountry}{}}{}{\addtomaketitle[~--~]{\@addresscountry}}%
- \flushmaketitle\@firstmaketitleelementtrue\\}%
- \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
- \addtomaketitle{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
- \ifthenelse{\isundefined{\@email}}{}{\addtomaketitle{\emailsymbol\emaillink{\@email}}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\addtomaketitle{\homepagesymbol\httplink{\@homepage}}}%
- \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
- \addtomaketitle{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
- \ifthenelse{\isundefined{\@extrainfo}}{}{\addtomaketitle{\@extrainfo}}%
- \flushmaketitle}\\[2.5em]}% need to force a \par after this to avoid weird spacing bug at the first section if no blank line is left after \maketitle
-
%-------------------------------------------------------------------------------
-% resume style definition
+% header, body & footer
%-------------------------------------------------------------------------------
-% fonts
-\renewcommand*{\namefont}{\Huge\bfseries\upshape}
-\renewcommand*{\titlefont}{\Huge\mdseries\upshape}
-\renewcommand*{\addressfont}{\normalsize\mdseries\upshape}
-\renewcommand*{\quotefont}{\large\slshape}
-\renewcommand*{\sectionfont}{\Large\bfseries\upshape}
-\renewcommand*{\subsectionfont}{\large\upshape\fontseries{sb}\selectfont}
-\renewcommand*{\hintfont}{\bfseries}
-
-% styles
-\renewcommand*{\namestyle}[1]{{\namefont\textcolor{color1}{#1}}}
-\renewcommand*{\titlestyle}[1]{{\titlefont\textcolor{color2!85}{#1}}}
-\renewcommand*{\addressstyle}[1]{{\addressfont\textcolor{color1}{#1}}}
-\renewcommand*{\quotestyle}[1]{{\quotefont\textcolor{color1}{#1}}}
-\renewcommand*{\sectionstyle}[1]{{\sectionfont\textcolor{color1}{#1}}}
-\renewcommand*{\subsectionstyle}[1]{{\subsectionfont\textcolor{color1}{#1}}}
-\renewcommand*{\hintstyle}[1]{{\hintfont\textcolor{color0}{#1}}}
-
-% lengths
-\newlength{\quotewidth}
-\newlength{\hintscolumnwidth}
-\setlength{\hintscolumnwidth}{0.3\textwidth}%
-\newlength{\separatorcolumnwidth}
-\setlength{\separatorcolumnwidth}{0.025\textwidth}%
-\newlength{\maincolumnwidth}
-\newlength{\doubleitemcolumnwidth}
-\newlength{\listitemsymbolwidth}
-\settowidth{\listitemsymbolwidth}{\listitemsymbol}
-\newlength{\listitemmaincolumnwidth}
-\newlength{\listdoubleitemmaincolumnwidth}
-
-% commands
-\renewcommand*{\recomputecvlengths}{%
- \setlength{\quotewidth}{0.65\textwidth}%
- % main lenghts
- \setlength{\maincolumnwidth}{\textwidth}%
- % listitem lengths
- \setlength{\listitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth}%
- % doubleitem lengths
- \setlength{\doubleitemcolumnwidth}{\maincolumnwidth-\separatorcolumnwidth}%
- \setlength{\doubleitemcolumnwidth}{0.5\doubleitemcolumnwidth}%
- % listdoubleitem lengths
- \setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth-\separatorcolumnwidth-\listitemsymbolwidth}%
- \setlength{\listdoubleitemmaincolumnwidth}{0.5\listdoubleitemmaincolumnwidth}%
- % fancyhdr lengths
- \renewcommand{\headwidth}{\textwidth}%
- % regular lengths
- \setlength{\parskip}{0\p@}}
-
-\renewcommand*{\makecvtitle}{%
- % recompute lengths (in case we are switching from letter to resume, or vice versa)
- \recomputecvlengths%
- \maketitle%
- % optional quote
- \ifthenelse{\isundefined{\@quote}}%
- {}%
- {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
- \par}% to avoid weird spacing bug at the first section if no blank line is left after \maketitle}
-
-\RenewDocumentCommand{\section}{sm}{%
- \par\addvspace{2.5ex}%
- \phantomsection{}% reset the anchor for hyperrefs
- \addcontentsline{toc}{section}{#2}%
- \strut\sectionstyle{#2}%
- {\color{color1}\hrule}%
- \par\nobreak\addvspace{1ex}\@afterheading}
-
-\newcommand{\subsectionfill}{\xleaders\hbox to 0.35em{\scriptsize.}\hfill}% different subsectionfills will not be perfectly aligned, but remaining space at the end of the fill will be distributed evenly between leaders, so it will be barely visible
-\RenewDocumentCommand{\subsection}{sm}{%
- \par\addvspace{1ex}%
- \phantomsection{}%
- \addcontentsline{toc}{subsection}{#2}%
- \strut\subsectionstyle{#2}{\color{color1}{\subsectionfill}}%
- \par\nobreak\addvspace{0.5ex}\@afterheading}
-
-\renewcommand*{\cvitem}[3][.25em]{%
- \ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }{#3}%
- \par\addvspace{#1}}
-
-\renewcommand*{\cvdoubleitem}[5][.25em]{%
- \begin{minipage}[t]{\doubleitemcolumnwidth}\hintstyle{#2}: #3\end{minipage}%
- \hfill% fill of \separatorcolumnwidth
- \begin{minipage}[t]{\doubleitemcolumnwidth}\ifthenelse{\equal{#4}{}}{}{\hintstyle{#4}: }#5\end{minipage}%
- \par\addvspace{#1}}
-
-\renewcommand*{\cvlistitem}[2][.25em]{%
- \listitemsymbol\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}%
- \par\addvspace{#1}}
-
-\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
- \cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}%
- \hfill% fill of \separatorcolumnwidth
- \ifthenelse{\equal{#3}{}}%
- {}%
- {\listitemsymbol\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}}
-
-\renewcommand*{\cventry}[7][.25em]{
- \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}%
- {\bfseries #4} & {\bfseries #5} \\%
- {\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%
- \end{tabular*}%
- \ifx&#7&%
- \else{\\\vbox{\small#7}}\fi%
- \par\addvspace{#1}}
-
-\newbox{\cvitemwithcommentmainbox}
-\newlength{\cvitemwithcommentmainlength}
-\newlength{\cvitemwithcommentcommentlength}
-\renewcommand*{\cvitemwithcomment}[4][.25em]{%
- \savebox{\cvitemwithcommentmainbox}{\ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }#3}%
- \setlength{\cvitemwithcommentmainlength}{\widthof{\usebox{\cvitemwithcommentmainbox}}}%
- \setlength{\cvitemwithcommentcommentlength}{\maincolumnwidth-\separatorcolumnwidth-\cvitemwithcommentmainlength}%
- \begin{minipage}[t]{\cvitemwithcommentmainlength}\ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }#3\end{minipage}%
- \hfill% fill of \separatorcolumnwidth
- \begin{minipage}[t]{\cvitemwithcommentcommentlength}\raggedleft\small\itshape#4\end{minipage}%
- \par\addvspace{#1}}
-
-\renewenvironment{thebibliography}[1]%
- {%
- \bibliographyhead{\refname}%
-% \small%
- \begin{list}{\bibliographyitemlabel}%
- {%
- \setlength{\topsep}{0pt}%
- \setlength{\labelwidth}{0pt}%
- \setlength{\labelsep}{0pt}%
- \leftmargin\labelwidth%
- \advance\leftmargin\labelsep%
- \@openbib@code%
- \usecounter{enumiv}%
- \let\p@enumiv\@empty%
- \renewcommand\theenumiv{\@arabic\c@enumiv}}%
- \sloppy\clubpenalty4000\widowpenalty4000%
-% \sfcode`\.\@m%
-% \sfcode `\=1000\relax%
- }%
- {%
- \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
- \end{list}%
- }
-
-
-%-------------------------------------------------------------------------------
-% letter style definition
-%-------------------------------------------------------------------------------
-% commands
-\renewcommand*{\recomputeletterlengths}{
- \recomputecvlengths%
- \setlength{\parskip}{6\p@}}
-
-\renewcommand*{\makelettertitle}{%
- % recompute lengths (in case we are switching from letter to resume, or vice versa)
- \recomputeletterlengths%
- % sender block
- \maketitle%
- \par%
- % recipient block
- \begin{minipage}[t]{.5\textwidth}
- \raggedright%
- \addressfont%
- {\bfseries\upshape\@recipientname}\\%
- \@recipientaddress%
- \end{minipage}
- % date
- \hfill % US style
-% \\[1em] % UK style
- \@date\\[2em]% US informal style: "April 6, 2006"; UK formal style: "05/04/2006"
- % opening
- \raggedright%
- \@opening\\[1.5em]%
- % ensure no extra spacing after \makelettertitle due to a possible blank line
-% \ignorespacesafterend% not working
- \hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}
-
-\renewcommand*{\makeletterclosing}{
- \@closing\\[3em]%
- {\bfseries \@firstname~\@lastname}%
- \ifthenelse{\isundefined{\@enclosure}}{}{%
- \\%
- \vfill%
- {\color{color2}\itshape\enclname: \@enclosure}}}
+\moderncvhead{3}
+\moderncvbody[\moderncvstylebodyoptions]{3}
\endinput