Release 2.0.0
This commit is contained in:
@ -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,32 +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]
|
||||
|
||||
\newif\if@fullrules\@fullrulesfalse
|
||||
\DeclareOption{fullrules}{\@fullrulestrue\@mixedrulesfalse}
|
||||
\newif\if@shortrules\@shortrulesfalse
|
||||
\DeclareOption{shortrules}{\@shortrulestrue\@mixedrulesfalse}
|
||||
\newif\if@mixedrules\@mixedrulesfalse
|
||||
\DeclareOption{mixedrules}{\@mixedrulestrue}
|
||||
\newif\if@centeredrules\@centeredrulesfalse
|
||||
\DeclareOption{centeredrules}{\@centeredrulestrue\@mixedrulesfalse}
|
||||
\newif\if@norules\@norulesfalse
|
||||
\DeclareOption{norules}{\@norulestrue\@mixedrulesfalse}
|
||||
% 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}}
|
||||
|
||||
\ExecuteOptions{mixedrules}
|
||||
\ProcessOptions\relax
|
||||
% 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
|
||||
|
||||
|
||||
%-------------------------------------------------------------------------------
|
||||
% required packages
|
||||
% fonts & icons
|
||||
%-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
%-------------------------------------------------------------------------------
|
||||
% overall style definition
|
||||
%-------------------------------------------------------------------------------
|
||||
% fonts
|
||||
% TeX Gyre Pagella font
|
||||
%\ifxetexorluatex
|
||||
% \setmainfont{Tex-Gyre Pagella}
|
||||
% \setsansfont{Tex-Gyre Pagella}
|
||||
@ -54,281 +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}{%
|
||||
\if@norules%
|
||||
\Large\bfseries\scshape%
|
||||
\else%
|
||||
\Large\bfseries\upshape\fi}
|
||||
\renewcommand*{\subsectionfont}{%
|
||||
\if@norules%
|
||||
\large\mdseries\itshape%
|
||||
\else%
|
||||
\large\upshape\fontseries{sb}\selectfont\fi}
|
||||
\renewcommand*{\hintfont}{\bfseries}
|
||||
|
||||
% styles
|
||||
\renewcommand*{\namestyle}[1]{{\namefont\textcolor{color1}{#1}}}
|
||||
\renewcommand*{\titlestyle}[1]{{\titlefont\textcolor{color2!85}{#1}}}
|
||||
\renewcommand*{\addressstyle}[1]{{\addressfont\textcolor{color2}{#1}}}
|
||||
\renewcommand*{\quotestyle}[1]{{\quotefont\textcolor{color1}{#1}}}
|
||||
\renewcommand*{\sectionstyle}[1]{%
|
||||
\if@centeredrules%
|
||||
{\centering\sectionfont\textcolor{color1}{#1}\par}%
|
||||
\else
|
||||
{\sectionfont\textcolor{color1}{#1}}\fi}
|
||||
\renewcommand*{\subsectionstyle}[1]{%
|
||||
\if@centeredrules%
|
||||
{\centering\subsectionfont\textcolor{color1}{#1}\par}%
|
||||
\else
|
||||
{\subsectionfont\textcolor{color1}{#1}}\fi}
|
||||
\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}%
|
||||
\sectionrule%
|
||||
\par\nobreak\addvspace{1ex}\@afterheading}
|
||||
|
||||
\RenewDocumentCommand{\subsection}{sm}{%
|
||||
\par\addvspace{1ex}%
|
||||
\phantomsection{}%
|
||||
\addcontentsline{toc}{subsection}{#2}%
|
||||
\strut\subsectionstyle{#2}%
|
||||
\subsectionrule%
|
||||
\par\nobreak\addvspace{0.5ex}\@afterheading}
|
||||
|
||||
\newcommand*{\sectionrule}{}
|
||||
\newcommand*{\subsectionrule}{}
|
||||
\if@fullrules%
|
||||
\renewcommand*{\sectionrule}{\par\nobreak\vspace*{-.7\baselineskip}\leavevmode{\color{color1}\leaders\hbox{\rule{1pt}{0.4pt}}\hfill\kern0pt}}
|
||||
\renewcommand*{\subsectionrule}{\par\nobreak\vspace*{-.7\baselineskip}\leavevmode{\color{color1}\xleaders\hbox to 0.35em{\scriptsize.}\hfill}}\fi% different subsectionrules 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}
|
||||
\if@shortrules%
|
||||
\renewcommand*{\sectionrule}{\leavevmode{\color{color1}\leaders\hbox{\rule{1pt}{0.4pt}}\hfill\kern0pt}}
|
||||
\renewcommand*{\subsectionrule}{\leavevmode{\color{color1}\xleaders\hbox to 0.35em{\scriptsize.}\hfill}}\fi% different subsectionrules 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}}
|
||||
\if@mixedrules%
|
||||
\renewcommand*{\sectionrule}{\par\nobreak\vspace*{-.7\baselineskip}\leavevmode{\color{color1}\leaders\hbox{\rule{1pt}{0.4pt}}\hfill\kern0pt}}
|
||||
\renewcommand*{\subsectionrule}{\leavevmode{\color{color1}\xleaders\hbox to 0.35em{\scriptsize.}\hfill}}\fi% different subsectionrules 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}}
|
||||
\if@centeredrules%
|
||||
\renewcommand*{\sectionrule}{\par\nobreak\vspace*{-.7\baselineskip}\leavevmode{\color{color1}\leaders\hbox{\rule{1pt}{0.4pt}}\hfill\kern0pt}}
|
||||
\renewcommand*{\subsectionrule}{\par\nobreak\vspace*{-.7\baselineskip}\leavevmode{\color{color1}\xleaders\hbox to 0.35em{\scriptsize.}\hfill}}\fi% similar to full rules
|
||||
\if@norules%
|
||||
\renewcommand*{\sectionrule}{}
|
||||
\renewcommand*{\subsectionrule}{}\fi
|
||||
|
||||
\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&%
|
||||
\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
|
||||
|
||||
Reference in New Issue
Block a user