diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/europasscv/europasscv.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/europasscv/europasscv.cls | 226 |
1 files changed, 134 insertions, 92 deletions
diff --git a/Master/texmf-dist/tex/latex/europasscv/europasscv.cls b/Master/texmf-dist/tex/latex/europasscv/europasscv.cls index 02716b4fa45..086e0f46e8a 100644 --- a/Master/texmf-dist/tex/latex/europasscv/europasscv.cls +++ b/Master/texmf-dist/tex/latex/europasscv/europasscv.cls @@ -8,7 +8,7 @@ % See http://www.latex-project.org/lppl.txt % for the details of that license \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{europasscv}[2016/05/15 Europass curriculum vitae class, 2013 version] +\ProvidesClass{europasscv}[2016/08/16 Europass curriculum vitae class, 2013 version] % CV models and instructions: % http://europass.cedefop.eu.int/htm/index.htm @@ -322,7 +322,7 @@ \ecvColSep{10pt} % Set layout - +\newlength{\difflength} \if@ecvnodocument\else \newgeometry{body={18.5cm,24cm}, vratio={4:3}} \fancyfoot{} @@ -347,25 +347,25 @@ } \fancyhead[L]{ -\noindent -\begin{minipage}{0.5\textwidth} -\noindent\makebox[\ecv@leftcolwidth][l]{\noindent\raisebox{-0.68\height}[0pt][0pt]{\if@ecvlogo\includegraphics[width=0.6\ecv@logowidth]{europasslogo2013.pdf}\fi}} -\hspace*{\ecv@leftcolwidth}\hspace*{\ecv@colsep}\noindent -\raisebox{\dp\strutbox}{\ecvcoloredtitle} -\end{minipage} -} + \setlength{\difflength}{\ecv@leftcolwidth} + \addtolength{\difflength}{-0.6\ecv@logowidth} + \noindent + \begin{minipage}{0.5\textwidth} + \noindent\makebox[\ecv@leftcolwidth][l]{\noindent\raisebox{-6.5pt}[0pt][0pt]{\if@ecvlogo\includegraphics[width=0.6\ecv@logowidth]{europasslogo2013.pdf}\else \hspace{\ecv@logowidth}\fi}\hspace{\difflength}\hspace{\ecv@colsep}\ecvcoloredtitle} + \end{minipage} + } } \fancypagestyle{first}{ \fancyhead[R]{} \fancyhead[L]{ -\noindent -\begin{minipage}{0.5\textwidth} -\noindent\makebox[\ecv@leftcolwidth][l]{\noindent\raisebox{-0.52\height}[0pt][0pt]{\if@ecvlogo\includegraphics[width=\ecv@logowidth]{europasslogo2013.pdf}\fi}} -\hspace*{\ecv@leftcolwidth}\hspace*{\ecv@colsep}\noindent -\raisebox{\dp\strutbox}{\ecvcoloredtitle} -\end{minipage} -} + \setlength{\difflength}{\ecv@leftcolwidth} + \addtolength{\difflength}{-\ecv@logowidth} + \noindent + \begin{minipage}{0.5\textwidth} + \noindent\makebox[\ecv@leftcolwidth][l]{\noindent\raisebox{-10.5pt}[0pt][0pt]{\if@ecvlogo\includegraphics[width=\ecv@logowidth]{europasslogo2013.pdf}\else \hspace{\ecv@logowidth}\fi}\hspace{\difflength}\hspace{\ecv@colsep}\ecvcoloredtitle} + \end{minipage} + } } \thispagestyle{first} @@ -396,6 +396,9 @@ \newcommand*{\ecvdateofbirth}[1]{\def\ecv@birth{#1}\@ecvpiextrafieldstrue} \newcommand*{\ecvgender}[1]{\def\ecv@gender{#1}\@ecvpiextrafieldstrue} % Personal picture +\newif\if@ecvpictureright\@ecvpicturerighttrue +\newif\if@ecvpictureleft +\newcommand*{\ecvpictureleft}{\@ecvpicturerightfalse \@ecvpicturelefttrue} \newcommand*{\ecvdrawpicture}{} \newcommand*{\ecvbeforepicture}[1]{\def\ecv@beforepic{#1}} \newcommand*{\ecvafterpicture}[1]{\def\ecv@afterpic{#1}} @@ -428,64 +431,102 @@ \ecvpicture{} +% see http://tex.stackexchange.com/a/12811 +\def\processlinks#1{% + \begingroup + \edef\@tempa{#1\space}% + \expandafter\endgroup + \expandafter\readwords\@tempa\relax +} +\def\readwords#1 #2\relax{% + \convertstring{#1}% #1 = substr, #2 = rest of string + \begingroup + \ifx\relax#2\relax % is #2 empty? + \def\next{\endgroup}% your own end-macro if required + \else + \quad + \def\next{\endgroup\readwords#2\relax}% + \fi + \next +} + +\newif\if@processlinks@converttoemail +\def\convertstring#1{\if@processlinks@converttoemail \toemail{#1} \else \tourl{#1} \fi} +\def\tourl#1{\setul{.5pt}{.4pt}\href{#1}{\ul{\mbox{#1}}}} +\def\toemail#1{\setul{.5pt}{.4pt}\href{mailto:#1}{\ul{\mbox{#1}}}} + \newif\if@ecvpineedspipe\@ecvpineedspipefalse \providecommand{\ecvpersonalinfo}[1][0pt]{% -\ecvitem[#1]{\ecvsectionstyle{\ecv@infosectionkey}}{ -\begin{doublespacing} -\begin{tabular}[t]{@{}p{\if@ecvpicture 0.7\ecv@rightcolwidth \else \ecv@rightcolwidth\fi}@{}p{\if@ecvpicture 0.3\ecv@rightcolwidth \else 0pt\fi}@{}} -\raggedright -{\ecvLargenormalstyle{\ecv@name}} \newline -\ifx\@empty\ecv@address\else - \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{address_europass_icon.pdf}}\hspace{0.2mm} {\fontseries{m}\selectfont \ecv@address} \newline -\fi -\ifx\@empty\ecv@mobile - \ifx\@empty\ecv@telephone\else - \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{telephone_europass_icon.pdf}}\hspace{0.2mm} {\fontseries{m}\selectfont \ecv@telephone} \newline - \fi -\else - \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{mobile_europass_icon.pdf}}\hspace{0.2mm} {\fontseries{m}\selectfont \ecv@mobile} \quad \ifx\@empty\ecv@telephone\else \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{telephone_europass_icon.pdf}}\hspace{0.2mm} {\fontseries{m}\selectfont \ecv@telephone\ \newline}\fi -\fi -\ifx\@empty\ecv@fax\else - \ecv@faxkey \ecv@fax -\fi -\ifx\@empty\ecv@email\else - \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{mail_europass_icon.pdf}}\hspace{0.2mm} {\fontseries{m}\selectfont \setul{.5pt}{.4pt}\href{mailto:\ecv@email}{\ul{\mbox{\ecv@email}}}} \newline -\fi -\ifx\@empty\ecv@homepage\else - \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{website_europass_icon.pdf}}\hspace{0.2mm} {\fontseries{m}\selectfont \setul{.5pt}{.4pt}\href{\ecv@homepage}{\ul{\mbox{\ecv@homepage}}}} \newline -\fi -\ifx\@empty\ecv@im\else - \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{im_europass_icon.pdf}} \hspace{0.2mm}{\fontseries{m}\selectfont \ecv@im} \newline -\fi - \ifx\@empty\ecv@gender\else - \if@ecvpineedspipe\else \hspace*{-0.5ex}\fi - \fontseries{m}\selectfont \ecvhighlight{~\if@ecvpineedspipe | \fi \ecv@genderkey} \ecv@gender \@ecvpineedspipetrue - \fi - \ifx\@empty\ecv@birth\else - \if@ecvpineedspipe\else \hspace*{-0.5ex}\fi - \fontseries{m}\selectfont \ecvhighlight{~\if@ecvpineedspipe | \fi\ecv@birthkey} \ecv@birth \@ecvpineedspipetrue - \fi - \if@ecvpicture - \ifx\@empty\ecv@nationality\else - \ifx\@empty\ecv@gender\else + \ecvitem[#1]{ % left column + \ecvsectionstyle{\ecv@infosectionkey} + \if@ecvpicture + \if@ecvpictureleft + \raisebox{-\height}{\ecvdrawpicture} + \fi + \fi + } + { % right column + \begin{doublespacing} + \begin{tabular}[t]{@{}p{\if@ecvpicture \if@ecvpictureleft \ecv@rightcolwidth \else 0.7\ecv@rightcolwidth \fi \else \ecv@rightcolwidth\fi}@{}p{\if@ecvpicture 0.3\ecv@rightcolwidth \else 0pt\fi}@{}} + \raggedright + {\ecvLargenormalstyle{\ecv@name}} \newline + \ifx\@empty\ecv@address\else + \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{address_europass_icon.pdf}}\hspace{0.2mm} {\fontseries{m}\selectfont \ecv@address} \newline + \fi + \ifx\@empty\ecv@mobile + \ifx\@empty\ecv@telephone\else + \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{telephone_europass_icon.pdf}}\hspace{0.2mm} {\fontseries{m}\selectfont \ecv@telephone} \newline + \fi + \else + \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{mobile_europass_icon.pdf}}\hspace{0.2mm} {\fontseries{m}\selectfont \ecv@mobile} \quad \ifx\@empty\ecv@telephone\else \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{telephone_europass_icon.pdf}}\hspace{0.2mm} {\fontseries{m}\selectfont \ecv@telephone\ \newline}\fi + \fi + \ifx\@empty\ecv@fax\else + \ecv@faxkey \ecv@fax + \fi + \ifx\@empty\ecv@email\else + \@processlinks@converttoemailtrue + \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{mail_europass_icon.pdf}}\hspace{0.2mm} {\fontseries{m}\selectfont \processlinks{\ecv@email}} \newline + \@processlinks@converttoemailfalse + \fi + \ifx\@empty\ecv@homepage\else + \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{website_europass_icon.pdf}}\hspace{0.2mm} {\fontseries{m}\selectfont \processlinks{\ecv@homepage}} \newline + \fi + \ifx\@empty\ecv@im\else + \raisebox{-2\lineskip}{\includegraphics[width=0.4cm]{im_europass_icon.pdf}} \hspace{0.2mm}{\fontseries{m}\selectfont \ecv@im} \newline + \fi + \ifx\@empty\ecv@gender\else + \if@ecvpineedspipe\else \hspace*{-0.5ex}\fi + \fontseries{m}\selectfont \ecvhighlight{~\if@ecvpineedspipe | \fi \ecv@genderkey} \ecv@gender \@ecvpineedspipetrue + \fi + \ifx\@empty\ecv@birth\else + \if@ecvpineedspipe\else \hspace*{-0.5ex}\fi + \fontseries{m}\selectfont \ecvhighlight{~\if@ecvpineedspipe | \fi\ecv@birthkey} \ecv@birth \@ecvpineedspipetrue + \fi + \if@ecvpictureright + \if@ecvpicture + \ifx\@empty\ecv@nationality\else + \ifx\@empty\ecv@gender\else \ifx\@empty\ecv@birth\else - \linebreak - \@ecvpineedspipefalse + \linebreak + \@ecvpineedspipefalse \fi + \fi \fi + \fi + \fi + \ifx\@empty\ecv@nationality\else + \if@ecvpineedspipe\else \hspace*{-0.5ex}\fi + \fontseries{m}\selectfont \ecvhighlight{~\if@ecvpineedspipe | \fi \ecv@nationalitykey}~\ecv@nationality \@ecvpineedspipetrue + \fi + & + \if@ecvpictureright + \Large \vspace{-\baselineskip} + \raisebox{-\height}{\ecvdrawpicture} \fi - \fi - \ifx\@empty\ecv@nationality\else - \if@ecvpineedspipe\else \hspace*{-0.5ex}\fi - \fontseries{m}\selectfont \ecvhighlight{~\if@ecvpineedspipe | \fi \ecv@nationalitykey}~\ecv@nationality \@ecvpineedspipetrue - \fi -& -\Large \vspace{-\baselineskip} -\raisebox{-\height}{\ecvdrawpicture} -\end{tabular} -\end{doublespacing} -} -\ecvspace{\ecv@afterpic} + \end{tabular} + \end{doublespacing} + } + \ecvspace{\ecv@afterpic} } % Spoken language information @@ -594,20 +635,13 @@ \newlength\ecv@leftcolwidth \newlength\ecv@rightcolwidth \newlength\ecv@extrarowheight -\newlength\ecv@leftboxwidth -\newlength\ecv@rightboxwidth \newcommand*{\ecvRuleWidth}[1]{\setlength\ecv@rulewidth{#1}} -\newcommand*{\ecvColSep}[1]{% - \setlength\ecv@colsep{#1} - \addtolength{\ecv@rightcolwidth}{-\ecv@colsep} - \addtolength{\ecv@rightboxwidth}{-\ecv@colsep} - } -\newcommand*{\ecvLeftColumnWidth}[1]{\setlength\ecv@leftcolwidth{#1}% - \setlength{\ecv@rightcolwidth}{\textwidth} - \addtolength{\ecv@rightcolwidth}{-\ecv@leftcolwidth} - \addtolength{\ecv@rightcolwidth}{-\ecv@rulewidth} - \setlength{\ecv@rightboxwidth}{\ecv@rightcolwidth} - \setlength{\ecv@leftboxwidth}{\ecv@leftcolwidth} +\newcommand*{\ecvColSep}[1]{\setlength\ecv@colsep{#1}} +\newcommand*{\ecvLeftColumnWidth}[1]{ + \setlength\ecv@leftcolwidth{#1} + \setlength{\ecv@rightcolwidth}{\textwidth} + \addtolength{\ecv@rightcolwidth}{-\ecv@leftcolwidth} + \addtolength{\ecv@rightcolwidth}{-\ecv@colsep} } \newcommand*{\ecvExtraRowHeight}[1]{\setlength\ecv@extrarowheight{#1}} \newcommand*{\ecvNoHorRule}{\def\ecv@hrule{}} @@ -690,6 +724,7 @@ \setlength{\baselineskip}{1.5\ht\strutbox} }p{#1} } +\newcolumntype{R}[1]{>{\raggedleft}p{#1}} \newcommand\ecvitem[3][\ecv@itemskip]{% \if@ecvdebug \renewcommand{\ecv@secondarg}{#2} @@ -698,7 +733,12 @@ \message{[europasscv] typesetting ^^J} \message{[europasscv] \meaning\ecv@secondarg^^J} \message{[europasscv] \meaning\ecv@thirdarg^^J} - \message{[europasscv] ecvitemskip = \if@ecvitemskip true, skipping \the\ecv@currentskip \else false\fi} + \message{[europasscv] ecvitemskip = \if@ecvitemskip true, skipping \the\ecv@currentskip \else false\fi^^J} + \message{[europasscv] leftcolwidth = \the\ecv@leftcolwidth^^J} +% \message{[europasscv] tabcolsep = \the\tabcolsep^^J} + \message{[europasscv] ecv@colsep = \the\ecv@colsep^^J} + \message{[europasscv] rightcolwidth = \the\ecv@rightcolwidth^^J} + \message{[europasscv] textwidth = \the\textwidth^^J} \fi \if@ecvitemskip @@ -714,9 +754,11 @@ \setlength\ecv@itemizeskip{-\ht\strutbox}\addtolength{\ecv@itemizeskip}{-2\dp\strutbox} - \begin{tabular}{@{}p{\ecv@leftcolwidth}@{\extracolsep{\ecv@colsep}}P{\ecv@rightcolwidth}@{}} - \if@ecvdebug\cellcolor{yellow!25}\fi \raggedleft #2 & \if@ecvdebug\cellcolor{blue!25}\fi #3 + \noindent\begin{tabular}{@{}R{\ecv@leftcolwidth}@{\hspace{\ecv@colsep}}P{\ecv@rightcolwidth}@{}} + \if@ecvdebug\cellcolor{yellow!25}\fi #2 & \if@ecvdebug\cellcolor{blue!25}\fi #3 \end{tabular} + % do not delete the blank line below + \@ecvitemskiptrue \@ecvlastitemwassectionfalse \@ecvitemcommandtrue @@ -724,7 +766,7 @@ \newlength{\ecv@sectionrulelength} -\newcommand{\ecvsection}[2][1.3\bigskipamount]{% +\newcommand{\ecvsection}[2][\bigskipamount]{% \@ecvitemcommandfalse \setlength{\ecv@sectionrulelength}{\ecv@rightcolwidth} \addtolength{\ecv@sectionrulelength}{-7pt} @@ -741,11 +783,11 @@ \ecvitem[#1]{\small \ecvbluenormalstyle{#2}}{\ecvtitlestyle{#3}} } -\newcommand{\ecvtitlelevel}[4][\if@ecvitemskip 1.3\bigskipamount \else 0pt \fi]{\ecvtitle[#1]{#2}{ - \begin{tabular}[t]{@{}p{0.8\ecv@rightcolwidth}@{}p{0.2\ecv@rightcolwidth}@{}} - #3 & \if@ecvdebug\cellcolor{green!25}\fi \raggedleft \ecvhighlight{\small #4} - \end{tabular} \nolinebreak[4] -} +\newcommand{\ecvtitlelevel}[4][\if@ecvitemskip 1.3\bigskipamount \else 0pt \fi]{ + \ecvtitle[#1]{#2}{ + #3 \if@ecvdebug\cellcolor{green!25}\fi \hfill \ecvhighlight{\small #4} + \nolinebreak[4] + } } \newcommand\ecvblueitem[3][\if@ecvitemskip 1.3\bigskipamount\else 0pt \fi]{\ecvitem[#1]{\textcolor{ecvsectioncolor}{#2}}{ @@ -753,9 +795,9 @@ #3} } -\newcommand{\ecvbigitem}[3][\bigskipamount]{ +\newcommand{\ecvbigitem}[3][0.8\bigskipamount]{ \ecvitem[#1]{\ecvsectionstyle{#2}}{\ecvlargenormalstyle{#3}} - \vspace{\bigskipamount} + \vspace{0.8\bigskipamount} \@ecvitemskipfalse } |