From dcbba316ad38f69871121fcbb50f004119258729 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 23 Apr 2013 22:03:59 +0000
Subject: moderncv (23apr13)

git-svn-id: svn://tug.org/texlive/trunk@30069 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/moderncv/moderncv.cls | 149 +++++++++++++---------
 1 file changed, 86 insertions(+), 63 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/moderncv/moderncv.cls')

diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncv.cls b/Master/texmf-dist/tex/latex/moderncv/moderncv.cls
index 08b24c9a1ae..476b0ffdba7 100644
--- a/Master/texmf-dist/tex/latex/moderncv/moderncv.cls
+++ b/Master/texmf-dist/tex/latex/moderncv/moderncv.cls
@@ -10,7 +10,7 @@
 %                identification
 %-------------------------------------------------------------------------------
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{moderncv}[2013/02/09 v1.3.0 modern curriculum vitae and letter document class]
+\ProvidesClass{moderncv}[2013/04/23 v1.5.0 modern curriculum vitae and letter document class]
 
 
 %-------------------------------------------------------------------------------
@@ -110,15 +110,6 @@
     {}
 %\fi
 
-% MarVoSym font for symbols
-%\RequirePackage{marvosym}
-\newcommand*{\marvosymbol}[1]{}
-%\ifxetexorluatex
-%  \renewcommand*{\marvosymbol}[1]{{\fontspec{MarVoSym}\char#1}}
-%\else
-  \renewcommand*{\marvosymbol}[1]{{\fontfamily{mvs}\fontencoding{U}\fontseries{m}\fontshape{n}\selectfont\char#1}}
-%\fi
-
 % hyper links (hyperref is loaded at the end of the preamble to pass options required by loaded packages such as CJK)
 \newcommand*\pdfpagemode{UseNone}% do not show thumbnails or bookmarks on opening (on supporting browsers); set \pdfpagemode to "UseOutlines" to show bookmarks
 \RequirePackage{url}
@@ -136,10 +127,10 @@
 %    pdfproducer   = {\LaTeX{}},% will/should be set automatically to the correct TeX engine used
     bookmarksopen = true,
     bookmarksdepth= 2,% to show sections and subsections
-    pdfauthor     = {\@firstname{}~\@familyname{}},
-    pdftitle      = {\@firstname{}~\@familyname{} -- \@title{}},
-    pdfsubject    = {Resum\'{e} of \@firstname{}~\@familyname{}},
-    pdfkeywords   = {\@firstname{}~\@familyname{}, curriculum vit\ae{}, resum\'{e}}}}
+    pdfauthor     = {\@firstname{}~\@lastname{}},
+    pdftitle      = {\@firstname{}~\@lastname{} -- \@title{}},
+    pdfsubject    = {Resum\'{e} of \@firstname{}~\@lastname{}},
+    pdfkeywords   = {\@firstname{}~\@lastname{}, curriculum vit\ae{}, resum\'{e}}}}
 
 % graphics
 \RequirePackage{graphicx}
@@ -161,7 +152,7 @@
           \newlength{\pagenumberwidth}%
           \settowidth{\pagenumberwidth}{\color{color2}\addressfont\itshape\strut\thepage/\pageref{lastpage}}%
           \fancypagestyle{plain}{%
-            \fancyfoot[r]{\parbox[b]{\pagenumberwidth}{\color{color2}\addressfont\itshape\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/\pageref{lastpage}}}}% the parbox is required to ensure alignment with a possible center footer (e.g., as in the casual style)
           \pagestyle{plain}}{}}%
       \AtEndDocument{\label{lastpage}}\else\fi}}
 \pagestyle{plain}
@@ -192,6 +183,9 @@
 % micro-typography (e.g., character protrusion, font expansion, hyphenatable letterspacing)
 \RequirePackage{microtype}
 
+% stack of key-value elements, used to save personal information
+\RequirePackage{moderncvcollection}
+
 % compatibility package with older versions of moderncv
 \RequirePackageWithOptions{moderncvcompatibility}
 
@@ -225,64 +219,86 @@
 %                overall design commands definitions
 %-------------------------------------------------------------------------------
 % elements
-% defines one's first name
-% usage: \firstname{<firstname>}
-\newcommand*{\firstname}[1]{\def\@firstname{#1}}
-% defines one's family name
-% usage: \familyname{<familyname>}
-\newcommand*{\familyname}[1]{\def\@familyname{#1}}
+%---------
+% defines one's name
+% usage: \name{<firstname>}{<lastname>}
+\newcommand*{\name}[2]{\def\@firstname{#1}\def\@lastname{#2}}
+
 % defines one's title (optional)
 % usage: \title{<title>}
 \renewcommand*{\title}[1]{\def\@title{#1}}
+
 % defines one's address (optional)
 % usage: \address{<street>}{<city>}{<country>}
 % where the <city> and <country> arguments can be omitted or provided empty
 \NewDocumentCommand{\address}{mG{}G{}}{\def\@addressstreet{#1}\def\@addresscity{#2}\def\@addresscountry{#3}}
-% defines one's mobile phone number (optional)
-% usage: \mobile{<number>}
-\newcommand*{\mobile}[1]{\def\@mobile{#1}}
-% defines one's fixed phone number (optional)
-% usage: \phone{<number>}
-\newcommand*{\phone}[1]{\def\@phone{#1}}
-% defines one's fax number (optional)
-% usage: \fax{<number>}
-\newcommand*{\fax}[1]{\def\@fax{#1}}
-% defines one's email address (optional)
-% usage: \email{<email>}
+
+% defines one's email (optional)
+% usage: \email{<email adress>}
 \newcommand*{\email}[1]{\def\@email{#1}}
+
 % defines one's home page (optional)
 % usage: \homepage{<url>}
 \newcommand*{\homepage}[1]{\def\@homepage{#1}}
+
+% adds a fixed/mobile/fax number to one's personal information (optional)
+% usage: \phone[<optional type>]{<number>}
+% where <optional type> should be either "fixed" (default), "mobile" or "fax
+\collectionnew{phones}
+\newcommand*{\phone}[2][fixed]{\collectionadd[#1]{phones}{#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 "linkedin", "twitter" or "github"
+\collectionnew{socials}
+\NewDocumentCommand{\social}{O{}O{}m}{%
+  \ifthenelse{\equal{#2}{}}%
+    {%
+      \ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\httplink[#3]{www.linkedin.com/in/#3}}}{}%
+      \ifthenelse{\equal{#1}{twitter}} {\collectionadd[twitter]{socials} {\protect\httplink[#3]{www.twitter.com/#3}}}    {}%
+      \ifthenelse{\equal{#1}{github}}  {\collectionadd[github]{socials}  {\protect\httplink[#3]{www.github.com/#3}}}     {}%
+    }
+    {\collectionadd[#1]{socials}{\protect\httplink[#3]{#2}}}}
+
 % defines additional personal information (optional)
 % usage: \extrainfo{<text>}
 \newcommand*{\extrainfo}[1]{\def\@extrainfo{#1}}
 
 % colors
+%-------
 \definecolor{color0}{rgb}{0,0,0}% main default color, normally left to black
-\definecolor{color1}{rgb}{0,0,0}% primary theme color
-\definecolor{color2}{rgb}{0,0,0}% secondary theme color
-\definecolor{color3}{rgb}{0,0,0}% tertiary theme color
+\definecolor{color1}{rgb}{0,0,0}% primary scheme color
+\definecolor{color2}{rgb}{0,0,0}% secondary scheme color
+\definecolor{color3}{rgb}{0,0,0}% tertiary scheme color
 
 % symbols
-%   itemize labels (the struts were added to correct inter-item spacing (works for single line items, until a solution is found for multi-line ones...)
-\newcommand*{\labelitemi}{\strut\textcolor{color1}{\marvosymbol{123}}}% equivalent to \Neutral from marvosym package; alternative: \fontencoding{U}\fontfamily{ding}\selectfont\tiny\symbol{'102}
-\newcommand*{\labelitemii}{\strut\textcolor{color1}{\large\bfseries-}}
-\newcommand*{\labelitemiii}{\strut\textcolor{color1}{\rmfamily\textperiodcentered}}% alternative: \textasteriskcentered; 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
-\newcommand*{\labelitemiv}{\labelitemiii}
-%   enumerate labels
-\renewcommand{\theenumi}{\@arabic\c@enumi}
-\renewcommand{\theenumii}{\@alph\c@enumii}
-\renewcommand{\theenumiii}{\@roman\c@enumiii}
-\renewcommand{\theenumiv}{\@Alph\c@enumiv}
-%   other symbols
-\newcommand*{\listitemsymbol}{\labelitemi~}
-\newcommand*{\addresssymbol}{}
-\newcommand*{\mobilesymbol}{}
-\newcommand*{\phonesymbol}{}
-\newcommand*{\faxsymbol}{}
-\newcommand*{\emailsymbol}{}
-\newcommand*{\homepagesymbol}{}
-
+%--------
+% itemize labels (the struts were added to correct inter-item spacing (works for single line items, until a solution is found for multi-line ones...)
+\newcommand*{\labelitemi}          {\strut\textcolor{color1}{\large\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
+\newcommand*{\labelitemii}         {\strut\textcolor{color1}{\large\bfseries-}}
+\newcommand*{\labelitemiii}        {\strut\textcolor{color1}{\rmfamily\textperiodcentered}}% alternative: \textasteriskcentered; 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
+\newcommand*{\labelitemiv}         {\labelitemiii}
+
+% enumerate labels
+\renewcommand{\theenumi}           {\@arabic\c@enumi}
+\renewcommand{\theenumii}          {\@alph\c@enumii}
+\renewcommand{\theenumiii}         {\@roman\c@enumiii}
+\renewcommand{\theenumiv}          {\@Alph\c@enumiv}
+
+% other symbols
+\newcommand*{\listitemsymbol}      {\labelitemi~}
+\newcommand*{\addresssymbol}       {}
+\newcommand*{\mobilephonesymbol}   {}
+\newcommand*{\fixedphonesymbol}    {}
+\newcommand*{\faxphonesymbol}      {}
+\newcommand*{\emailsymbol}         {}
+\newcommand*{\homepagesymbol}      {}
+\newcommand*{\linkedinsocialsymbol}{}
+\newcommand*{\twittersocialsymbol} {}
+\newcommand*{\githubsocialsymbol}  {}
+
+% other
+%------
 % fonts
 \AtBeginDocument{\normalfont\color{color0}}
 
@@ -294,14 +310,21 @@
 % usage: \makefooter
 \newcommand*{\makefooter}{}%
 
-% loads a style scheme
+% loads a style variant
+% usage: \moderncvstyle{<style variant name>}
 \newcommand*{\moderncvstyle}[1]{
   \RequirePackage{moderncvstyle#1}}
   
 % loads a color scheme
+% usage: \moderncvcolor{<color scheme name>}
 \newcommand*{\moderncvcolor}[1]{
   \RequirePackage{moderncvcolor#1}}
 
+% loads an icons set
+% usage: \moderncvicons{<icon set name>}
+\newcommand*{\moderncvicons}[1]{
+  \RequirePackage{moderncvicons#1}}
+
 % recomputes all automatic lengths
 \newcommand*{\recomputelengths}{\recomputecvlengths}
 \AtBeginDocument{\recomputelengths{}}
@@ -328,6 +351,7 @@
 \newcommand*{\sectionfont}{}
 \newcommand*{\subsectionfont}{}
 \newcommand*{\hintfont}{}
+\newcommand*{\pagenumberfont}{\addressfont\itshape}
 
 % styles
 \newcommand*{\namestyle}[1]{{\namefont#1}}
@@ -337,6 +361,7 @@
 \newcommand*{\sectionstyle}[1]{{\sectionfont#1}}
 \newcommand*{\subsectionstyle}[1]{{\subsectionfont#1}}
 \newcommand*{\hintstyle}[1]{{\hintfont#1}}
+\newcommand*{\pagenumberstyle}[1]{{\pagenumberfont#1}}
 
 % recompute all resume lengths
 \newcommand*{\recomputecvlengths}{}
@@ -360,15 +385,12 @@
 
 % makes a resume section
 % usage: \section{<title>}
-\newcommand*{\section}[1]{}
-% starred variant, which is identical but defined to allow its use (e.g. for natbib compatibility, who uses \section*{} for the bibliography header)
-\RequirePackage{suffix}
-\AtBeginDocument{\WithSuffix\newcommand\section*{\section}}
+% identical starred and non-starred variants should be defined for compatibility with other packages (e.g. with natbib, that uses \section*{} for the bibliography header)
+\NewDocumentCommand{\section}{sm}{}
 
 % makes a resume subsection
 % usage: \subsection{title}
-\newcommand*{\subsection}[1]{}
-\AtBeginDocument{\WithSuffix\newcommand\subsection*{\subsection}}
+\NewDocumentCommand{\subsection}{sm}{}
 
 % makes a resume line with a header and a corresponding text
 % usage: \cvitem[spacing]{header}{text}
@@ -477,8 +499,9 @@
     \cvitem{}{%
       \begin{tabular}{\cvcolumns@def}%
         \if@cvcolumns@head@empty\else%
-          \cvcolumns@head\\[-.8em]%
-          {\color{color1}\rule{\maincolumnwidth}{.25pt}}\\\fi%
+          \cvcolumns@head%\\[-.8em]%
+%          {\color{color1}\rule{\maincolumnwidth}{.25pt}}%
+          \\\fi%
         \cvcolumns@content%
       \end{tabular}}}
 
-- 
cgit v1.2.3

