diff options
author | Karl Berry <karl@freefriends.org> | 2017-01-23 22:19:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-01-23 22:19:24 +0000 |
commit | 99e089b23abe768a5cb67b9aa6242ec366955b8e (patch) | |
tree | 57a1d88163541d42da8c85dfa986fbc793e50b29 /Master/texmf-dist/tex/latex/europasscv/europasscv.cls | |
parent | a6e7e67eaf91c9d379ad1bc5d91865df455187fd (diff) |
europasscv (23jan17)
git-svn-id: svn://tug.org/texlive/trunk@43033 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/europasscv/europasscv.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/europasscv/europasscv.cls | 121 |
1 files changed, 52 insertions, 69 deletions
diff --git a/Master/texmf-dist/tex/latex/europasscv/europasscv.cls b/Master/texmf-dist/tex/latex/europasscv/europasscv.cls index b19faa7eeee..46639ba84a4 100644 --- a/Master/texmf-dist/tex/latex/europasscv/europasscv.cls +++ b/Master/texmf-dist/tex/latex/europasscv/europasscv.cls @@ -8,12 +8,7 @@ % See http://www.latex-project.org/lppl.txt % for the details of that license \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{europasscv}[2016/10/12 The new Europass curriculum vitae class] - -% CV models and instructions: -% http://europass.cedefop.eu.int/htm/index.htm -% Recommendations: -% http://europa.eu.int/scadplus/leg/en/cha/c11057.htm +\ProvidesClass{europasscv}[2017/01/22 The new Europass curriculum vitae class] \newcommand\ecv@utf[1]{#1} @@ -175,8 +170,11 @@ } \DeclareOption{greek}{% \AtEndOfPackage{% - \InputIfFileExists{europasscv_gr.def}{}{% - \ClassWarningNoLine{europasscv}{Greek definition file 'europasscv_gr.def' not found}}% + \InputIfFileExists{europasscv_el.def}{}{% + \ClassWarningNoLine{europasscv}{Greek definition file 'europasscv_el.def' not found}}% + \ifPDFTeX + \PackageError{europasscv}{Please run XeLaTeX or LuaLaTeX for greek language support}{} + \fi }% } \DeclareOption{galician}{% @@ -192,49 +190,6 @@ }% } -% Input encodings -\DeclareOption{ascii}{\AtEndOfClass{\inputencoding{ascii}}} -\DeclareOption{latin1}{\AtEndOfClass{\inputencoding{latin1}}} -\DeclareOption{latin2}{\AtEndOfClass{\inputencoding{latin2}}} -\DeclareOption{latin3}{\AtEndOfClass{\inputencoding{latin3}}} -\DeclareOption{latin4}{\AtEndOfClass{\inputencoding{latin4}}} -\DeclareOption{latin5}{\AtEndOfClass{\inputencoding{latin5}}} -\DeclareOption{latin9}{\AtEndOfClass{\inputencoding{latin9}}} -\DeclareOption{latin10}{\AtEndOfClass{\inputencoding{latin10}}} -\DeclareOption{decmulti}{\AtEndOfClass{\inputencoding{decmulti}}} -\DeclareOption{cp850}{\AtEndOfClass{\inputencoding{cp850}}} -\DeclareOption{cp852}{\AtEndOfClass{\inputencoding{cp852}}} -\DeclareOption{cp858}{\AtEndOfClass{\inputencoding{cp858}}} -\DeclareOption{cp437}{\AtEndOfClass{\inputencoding{cp437}}} -\DeclareOption{cp437de}{\AtEndOfClass{\inputencoding{cp437de}}} -\DeclareOption{cp865}{\AtEndOfClass{\inputencoding{cp865}}} -\DeclareOption{applemac}{\AtEndOfClass{\inputencoding{applemac}}} -\DeclareOption{next}{\AtEndOfClass{\inputencoding{next}}} -\DeclareOption{cp1250}{\AtEndOfClass{\inputencoding{cp1250}}} -\DeclareOption{cp1252}{\AtEndOfClass{\inputencoding{cp1252}}} -\DeclareOption{cp1257}{\AtEndOfClass{\inputencoding{cp1257}}} -\DeclareOption{ansinew}{\AtEndOfClass{\inputencoding{ansinew}}} -\DeclareOption{utf8}{\AtEndOfClass{\inputencoding{utf8x}}} -\DeclareOption{utf8x}{\AtEndOfClass{\inputencoding{utf8x}}} -\DeclareOption{koi8-r}{\AtEndOfClass{\inputencoding{koi8-r}}} -\DeclareOption{koi8-ru}{\AtEndOfClass{\inputencoding{koi8-ru}}} -\DeclareOption{koi8-u}{\AtEndOfClass{\inputencoding{koi8-u}}} -\DeclareOption{cp1251}{\AtEndOfClass{\inputencoding{cp1251}}} -\DeclareOption{cp855}{\AtEndOfClass{\inputencoding{cp855}}} -\DeclareOption{cp866}{\AtEndOfClass{\inputencoding{cp866}}} -\DeclareOption{maccyr}{\AtEndOfClass{\inputencoding{maccyr}}} -\DeclareOption{macukr}{\AtEndOfClass{\inputencoding{macukr}}} - -% Set font -\DeclareOption{helvetica}{% - \renewcommand{\rmdefault}{phv} - \renewcommand{\sfdefault}{phv} -} -\DeclareOption{arial}{% - \renewcommand{\rmdefault}{ma1} % (this font is NOT installed by default!) - \renewcommand{\sfdefault}{ma1} -} - \DeclareOption{narrow}{ \def\ecv@narrow{} } @@ -251,7 +206,7 @@ \def\ecv@currvitaekey{} \newcommand{\ecvcurrvitae}{\ifx\@empty\ecv@currvitaekey Curriculum vitae \else \ecv@currvitaekey \fi} -\newcommand{\ecvcoloredtitle}{\fontfamily{phv}\fontseries{m}\selectfont \textcolor{ecvhighlightcolor}{\ecvcurrvitae}} +\newcommand{\ecvcoloredtitle}{\selectecvfont \textcolor{ecvhighlightcolor}{\ecvcurrvitae}} % Europass logo \newif\if@ecvlogo\@ecvlogotrue @@ -284,13 +239,18 @@ \ProcessOptions\relax \LoadClass{article} -\RequirePackage[utf8]{inputenc} +\RequirePackage{iftex} +\ifPDFTeX + \RequirePackage[utf8]{inputenc} + \RequirePackage[T1]{fontenc} +\else + \usepackage{fontspec} +\fi \RequirePackage{array} \RequirePackage{fancyhdr} % For page numbering \RequirePackage{xcolor} \RequirePackage{url} \RequirePackage{soul} -\RequirePackage{tabu} \RequirePackage{setspace} \RequirePackage{geometry} \RequirePackage{textcomp} % For copyright symbol @@ -299,9 +259,20 @@ \RequirePackage{colortbl} \RequirePackage{graphicx} \if@ecvdebug \RequirePackage{showframe} \fi -\RequirePackage[T1]{fontenc} +\newcommand{\selectecvfont}{\ifPDFTeX\fontfamily{\ecv@font}\selectfont\fi} +\newcommand*{\ecvfont}[1]{\def\ecv@font{#1}} +\ifPDFTeX + \ecvfont{phv} +\else + \ifx\@empty\ecv@narrow + \setmainfont{TeX Gyre Heros Cn} + \else + \setmainfont{TeX Gyre Heros} + \fi +\fi + \def\ecv@totpages{} \newcommand*{\ecvpage}[1]{\def\ecv@page{#1}} \ecvpage{\ecv@pagekey~\thepage\ecv@totpages} @@ -328,13 +299,13 @@ \fancyfoot{} \fancyfoot[L]{\begin{minipage}{\ecv@leftcolwidth} \begin{flushleft} -\footnotesize\textcolor{ecvhighlightcolor}{\fontfamily{phv}\fontseries{m}\selectfont\ecv@lfoot}\end{flushleft} -\end{minipage}\hspace*{\ecv@colsep}\footnotesize\textcolor{ecvhighlightcolor}{\fontfamily{phv}\fontseries{m}\selectfont\ecv@cfoot} +\footnotesize\textcolor{ecvhighlightcolor}{\selectecvfont\ecv@lfoot}\end{flushleft} +\end{minipage}\hspace*{\ecv@colsep}\footnotesize\textcolor{ecvhighlightcolor}{\selectecvfont\ecv@cfoot} } \fancyfoot[R]{\begin{minipage}{\ecv@rightcolwidth} \begin{flushright} -\footnotesize\textcolor{ecvhighlightcolor}{\fontfamily{phv}\fontseries{m}\selectfont\ecv@page}\end{flushright} +\footnotesize\textcolor{ecvhighlightcolor}{\selectecvfont\ecv@page}\end{flushright} \end{minipage}} \fancypagestyle{ecvfancy}{ @@ -343,7 +314,7 @@ \fancyhead{} \fancyhead[R]{ -\raggedleft \fontfamily{phv}\fontseries{m}\selectfont \textcolor{ecvhighlightcolor}{\ecv@name} +\raggedleft \selectecvfont \textcolor{ecvhighlightcolor}{\ecv@name} } \fancyhead[L]{ @@ -374,10 +345,10 @@ \fi % End \if@ecvnodocument } % End \AtBeginDocument -% Thanks to Roman Bertle for suggesting the following: \renewcommand{\labelitemi}{\normalfont\bfseries \textendash} -\renewcommand{\labelitemii}{\textasteriskcentered} -\renewcommand{\labelitemiii}{\textperiodcentered} +\renewcommand{\labelitemii}{\textbullet} +\renewcommand{\labelitemiii}{\normalfont\bfseries \textendash} +\renewcommand{\labelitemiv}{\textbullet} \newcommand*{\ecvfirstname}[1]{\def\ecv@firstname{#1}} % Deprecated \newcommand*{\ecvlastname}[1]{\def\ecv@lastname{#1}} % Deprecated @@ -634,7 +605,6 @@ } \newcommand*\ecvlanguage[7][0pt]{\ecvlangrow[#1]{#2}{#3}{#4}{#5}{#6}{#7}{\ecv@langinnerborderwidth}} -% \newcommand*\ecvlanguagecertificate[1]{\ecvitem[-0.7mm]{ciao}{\centering \raisebox{-1mm}{#1} \cellcolor{green!25} \hrule height \ecv@langouterborderwidth }} \newcommand*\ecvlastlanguage[7][0pt]{\ecvlangrow[#1]{#2}{#3}{#4}{#5}{#6}{#7}{\ecv@langouterborderwidth}} \newcommand*{\ecvlanguagefooter}[1][0pt]{ @@ -738,29 +708,42 @@ \addtolength{\ecv@langparwidth}{-2\tabcolsep} \addtolength{\ecv@langparwidth}{-2\arrayrulewidth} -\fontfamily{phv} \ifx\@empty\ecv@narrow \fontseries{mc} \else \fontseries{m} \fi -\if@ecvbigfont\else \fontsize{9}{10.8} \fi \selectfont + \ifPDFTeX + \fontfamily{\ecv@font} \ifx\@empty\ecv@narrow \fontseries{mc} \else \fontseries{m} \fi + \fi + \if@ecvbigfont\else \fontsize{9}{10.8} \fi \selectfont \setlength\baselineskip{0pt} \color{\ecv@textcolor} } + +\newif\if@ecvinsideEcvItemize\@ecvinsideEcvItemizefalse \newenvironment{ecvitemize}{ +\if@ecvinsideEcvItemize +\else +\ifhmode \newline \else \fi \ \vspace*{\ecv@itemizeskip} +\@ecvinsideEcvItemizetrue +\fi \begin{itemize}[leftmargin=*,nolistsep,nosep,topsep=0pt] }{ \end{itemize} +\if@ecvinsideEcvItemize +\else \ \vspace{-0.8\baselineskip} +\@ecvinsideEcvItemizefalse +\fi } % styles -\newcommand{\ecvsectionstyle}[1]{\textcolor{ecvsectioncolor}{\fontfamily{phv}\fontseries{m}\selectfont \MakeUppercase{\expandafter{#1}}}} -\newcommand{\ecvbluenormalstyle}[1]{\fontfamily{phv}\fontseries{m}\selectfont\textcolor{ecvsectioncolor}{#1}} +\newcommand{\ecvsectionstyle}[1]{\textcolor{ecvsectioncolor}{\MakeUppercase{\expandafter{#1}}}} +\newcommand{\ecvbluenormalstyle}[1]{\textcolor{ecvsectioncolor}{#1}} \newcommand{\ecvtitlestyle}[1]{\large{\ecvbluenormalstyle{#1}}} -\newcommand{\ecvlargenormalstyle}[1]{\large \fontfamily{phv}\fontseries{m}\selectfont #1} -\newcommand{\ecvLargenormalstyle}[1]{\Large \fontfamily{phv}\fontseries{m}\selectfont #1} +\newcommand{\ecvlargenormalstyle}[1]{\large #1} +\newcommand{\ecvLargenormalstyle}[1]{\Large #1} \newcommand{\ecvhighlight}[1]{\textcolor{ecvhighlightcolor}{#1}} \newcommand{\ecvbluestyle}[1]{\textcolor{ecvsectioncolor}{#1}} |