mirror of
https://github.com/moderncv/moderncv.git
synced 2026-02-06 10:05:19 +01:00
Merge branch 'master' into many_colors
This commit is contained in:
commit
b56f362150
31 changed files with 714 additions and 600 deletions
71
moderncv.cls
71
moderncv.cls
|
|
@ -116,10 +116,15 @@
|
|||
bookmarksdepth= 2,% to show sections and subsections
|
||||
pdfauthor = {\@firstname{}~\@lastname{}},
|
||||
pdftitle =
|
||||
{\@firstname{}~\@lastname{}\expandafter\notblank\expandafter{\@title}{ -- \@title}{}}, %\notblank does not expand argument automatically
|
||||
{\@firstname{}~\@lastname{}\expandafter\notblank\expandafter{\@title}{ -- \@title}{}}, %\notblank does not expand argument automatically
|
||||
pdfsubject = {R\'{e}sum\'{e} of \@firstname{}~\@lastname{}},
|
||||
pdfkeywords = {\@firstname{}~\@lastname{}, curriculum vit\ae{}, r\'{e}sum\'{e}}}}
|
||||
|
||||
% pdftex not using pdfmanagement-testphase requires T1 font encoding in order to handle links containing special characters somewhat properly
|
||||
\ifpdftex
|
||||
\IfPDFManagementActiveTF{}{\RequirePackage[T1]{fontenc}}
|
||||
\fi
|
||||
|
||||
% graphics
|
||||
\RequirePackage{graphicx}
|
||||
|
||||
|
|
@ -140,9 +145,9 @@
|
|||
\@ifundefined{r@lastpage}{}{%
|
||||
\ifthenelse{\pageref{lastpage}>1}{%
|
||||
\newlength{\pagenumberwidth}%
|
||||
\settowidth{\pagenumberwidth}{\color{color2}\addressfont\itshape\strut\thepage/\pageref{lastpage}}%
|
||||
\settowidth{\pagenumberwidth}{\color{color2}\pagenumberfont\strut\thepage/\pageref{lastpage}}%
|
||||
\fancypagestyle{plain}{%
|
||||
\fancyfoot[r]{\parbox[b]{\pagenumberwidth}{\color{color2}\pagenumberfont\strut\thepage/\pageref{lastpage}}}}% the parbox is required to ensure alignment with a possible center footer (e.g., as in the casual style)
|
||||
\fancyfoot[r]{\parbox[b]{\pagenumberwidth}{\color{color2}\pagenumberfont\strut\thepage/\protect\NoHyper\pageref{lastpage}\protect\endNoHyper}}}% the parbox is required to ensure alignment with a possible center footer (e.g., as in the casual style)
|
||||
\pagestyle{plain}}{}}\fi}%
|
||||
\AtEndDocument{\label{lastpage}}}
|
||||
\pagestyle{plain}
|
||||
|
|
@ -233,8 +238,9 @@
|
|||
\newcommand*{\email}[1]{\def\@email{#1}}
|
||||
|
||||
% defines one's home page (optional)
|
||||
% usage: \homepage{<url>}
|
||||
\newcommand*{\homepage}[1]{\def\@homepage{#1}}
|
||||
% usage: \homepage[<optional protocol>]{<url>}
|
||||
% where <optional protocol> should be either "https" (default) or "http"
|
||||
\NewDocumentCommand{\homepage}{O{https}m}{\def\@homepageprotocol{#1}\def\@homepage{#2}}
|
||||
|
||||
% adds a fixed/mobile/fax number to one's personal information (optional)
|
||||
% usage: \phone[<optional type>]{<number>}
|
||||
|
|
@ -249,8 +255,8 @@
|
|||
|
||||
% http://latex.org/forum/viewtopic.php?t=12239
|
||||
\def\SplitMyMacro#1/#2{#2}
|
||||
|
||||
|
||||
|
||||
|
||||
% adds a social link to one's personal information (optional)
|
||||
% usage: \social[<optional type>][<optional url>]{<account name>}
|
||||
% where <optional type> should be either:
|
||||
|
|
@ -282,6 +288,8 @@
|
|||
% - "xbox"
|
||||
% - "playstation"
|
||||
% - "battlenet"
|
||||
% - "arxiv"
|
||||
% - "inspire"
|
||||
\collectionnew{socials}
|
||||
\NewDocumentCommand{\social}{O{}O{}m}{%
|
||||
\ifthenelse{\equal{#2}{}}%
|
||||
|
|
@ -314,6 +322,8 @@
|
|||
\ifthenelse{\equal{#1}{xbox}} {\collectionadd[xbox]{socials} {\protect\httpslink[#3]{account.xbox.com/profile?gamertag=#3}}} {}%
|
||||
\ifthenelse{\equal{#1}{playstation}} {\collectionadd[playstation]{socials} {#3}} {}%
|
||||
\ifthenelse{\equal{#1}{battlenet}} {\collectionadd[battlenet]{socials} {#3}} {}%
|
||||
\ifthenelse{\equal{#1}{arxiv}} {\collectionadd[arxiv]{socials} {\protect\httpslink[#3]{arxiv.org/a/#3}}} {}%
|
||||
\ifthenelse{\equal{#1}{inspire}} {\collectionadd[inspire]{socials} {\protect\httpslink[#3]{inspirehep.net/authoris/#3}}} {}%
|
||||
}
|
||||
{\collectionadd[#1]{socials}{\protect\httpslink[#3]{#2}}}}%
|
||||
|
||||
|
|
@ -379,6 +389,8 @@
|
|||
\newcommand*{\xboxsocialsymbol} {}
|
||||
\newcommand*{\playstationsocialsymbol} {}
|
||||
\newcommand*{\battlenetsocialsymbol} {}
|
||||
\newcommand*{\arxivsocialsymbol} {}
|
||||
\newcommand*{\inspiresocialsymbol} {}
|
||||
|
||||
% other
|
||||
%------
|
||||
|
|
@ -549,11 +561,11 @@
|
|||
\newcommand*{\cvdoubleitem}[5][.25em]{}
|
||||
|
||||
% makes a resume line with a list item
|
||||
% usage: \cvlistitem[label]{item}
|
||||
% usage: \cvlistitem[spacing]{item}
|
||||
\newcommand*{\cvlistitem}[2][\listitemsymbol]{}
|
||||
|
||||
% makes a resume line with 2 list items
|
||||
% usage: \cvlistdoubleitem[label]{item1}{item2}
|
||||
% usage: \cvlistdoubleitem[spacing]{item1}{item2}
|
||||
\newcommand*{\cvlistdoubleitem}[3][\listitemsymbol]{}
|
||||
|
||||
% makes a typical resume job / education entry
|
||||
|
|
@ -566,25 +578,39 @@
|
|||
|
||||
% makes a generic hyperlink
|
||||
% usage: \link[optional text]{link}
|
||||
\newcommand*{\link}[2][]{%
|
||||
\ifthenelse{\equal{#1}{}}%
|
||||
{\href{#2}{#2}}%
|
||||
{\href{#2}{#1}}}
|
||||
% uses pdfmanagement-testphase when available, which provides url encoding of special characters
|
||||
\NewDocumentCommand{\link}{O{}m}{%
|
||||
\IfPDFManagementActiveTF{%
|
||||
\ifthenelse{\equal{#1}{}}%
|
||||
{\hrefurl[urlencode]{#2}{#2}}%
|
||||
{\hrefurl[urlencode]{#2}{#1}}}{%
|
||||
\ifthenelse{\equal{#1}{}}%
|
||||
{\href{#2}{#2}}%
|
||||
{\href{#2}{#1}}}}
|
||||
|
||||
% makes a http hyperlink
|
||||
% usage: \httplink[optional text]{link}
|
||||
\newcommand*{\httplink}[2][]{%
|
||||
\ifthenelse{\equal{#1}{}}%
|
||||
{\href{http://#2}{#2}}%
|
||||
{\href{http://#2}{#1}}}
|
||||
|
||||
% uses pdfmanagement-testphase when available, which provides url encoding of special characters
|
||||
\NewDocumentCommand{\httplink}{O{}m}{%
|
||||
\IfPDFManagementActiveTF{%
|
||||
\ifthenelse{\equal{#1}{}}%
|
||||
{\hrefurl[urlencode]{http://#2}{#2}}%
|
||||
{\hrefurl[urlencode]{http://#2}{#1}}}{%
|
||||
\ifthenelse{\equal{#1}{}}%
|
||||
{\href{http://#2}{#2}}%
|
||||
{\href{http://#2}{#1}}}}
|
||||
|
||||
% makes an https hyperlink
|
||||
% usage: \httpslink[optional text]{link}
|
||||
\newcommand*{\httpslink}[2][]{%
|
||||
\ifthenelse{\equal{#1}{}}%
|
||||
{\href{https://#2}{#2}}%
|
||||
{\href{https://#2}{#1}}}
|
||||
% uses pdfmanagement-testphase when available, which provides url encoding of special characters
|
||||
\NewDocumentCommand{\httpslink}{O{}m}{%
|
||||
\IfPDFManagementActiveTF{%
|
||||
\ifthenelse{\equal{#1}{}}%
|
||||
{\hrefurl[urlencode]{https://#2}{#2}}%
|
||||
{\hrefurl[urlencode]{https://#2}{#1}}}{%
|
||||
\ifthenelse{\equal{#1}{}}%
|
||||
{\href{https://#2}{#2}}%
|
||||
{\href{https://#2}{#1}}}}
|
||||
|
||||
% makes an email hyperlink
|
||||
% usage: \emaillink[optional text]{link}
|
||||
|
|
@ -771,6 +797,7 @@
|
|||
\newcommand*{\subject}[1]{\def\@subject{#1}}
|
||||
\newcommand*{\opening}[1]{\def\@opening{#1}}
|
||||
\newcommand*{\closing}[1]{\def\@closing{#1}}
|
||||
\newcommand*{\signature}[2]{\def\@signature{\includegraphics[scale=#1]{#2}}}
|
||||
\newcommand*{\enclosure}[2][]{%
|
||||
% if an optional argument is provided, use it to redefine \enclname
|
||||
\ifthenelse{\equal{#1}{}}{}{\renewcommand*{\enclname}{#1}}%
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue