summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/limecv/limecv.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/limecv/limecv.dtx')
-rw-r--r--macros/latex/contrib/limecv/limecv.dtx232
1 files changed, 162 insertions, 70 deletions
diff --git a/macros/latex/contrib/limecv/limecv.dtx b/macros/latex/contrib/limecv/limecv.dtx
index 99600b830c..2230f498ac 100644
--- a/macros/latex/contrib/limecv/limecv.dtx
+++ b/macros/latex/contrib/limecv/limecv.dtx
@@ -1,14 +1,14 @@
% \iffalse meta-comment
%
-% Copyright (C) 2017 - 2020 by Olivier Pieters
+% Copyright (C) 2017 - 2021 by Olivier Pieters
% --------------------------------------------------------------------------
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008-05-04 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
@@ -26,7 +26,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{limecv}
%<*class>
- [2020/03/15 v0.1.8 limecv Document class for CVs.]
+ [2021/12/01 v0.1.12 limecv Document class for CVs.]
%</class>
%
%<*driver>
@@ -69,7 +69,7 @@
%</driver>
% \fi
%
-% \CheckSum{1632}
+% \CheckSum{1697}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -98,13 +98,20 @@
% \changes{v0.1.6}{2018/06/17}{Added support for French.}
% \changes{v0.1.7}{2020/02/08}{Added support for Italian.}
% \changes{v0.1.8}{2020/03/15}{Upgrade to Font Awesome 5.}
+% \changes{v0.1.9}{2021/01/21}{Added support for Spanish.}
+% \changes{v0.1.10}{2021/12/01}{Bug fix in cover letter design for long names. %
+% Fixes issue when counter environments were used multiple times.}
+% \changes{v0.1.11}{2021/12/01}{Implement option to add email key to %
+% references.}
+% \changes{v0.1.12}{2021/12/01}{Fix alignment issue for cvMainContent* and %
+% cvSidebar*.}
%
% \DoNotIndex{\NewDocumentCommand,\NewDocumentEnvironment}
%
% \providecommand*{\url}{\texttt}
%
-% \def\fileversion{v0.1.8}
-% \def\filedate{2020/03/15}
+% \def\fileversion{v0.1.12}
+% \def\filedate{2021/12/01}
%
% \GetFileInfo{limecv.dtx}
% \title{The \textsf{limecv} document class\thanks{This document corresponds %
@@ -173,7 +180,8 @@
%
% \DescribeMacro{\cvSetLanguage} The default language is English and can
% be modified using the |\cvSetLanguage| macro. Possible arguments are:
-% |chinese|, |dutch|, |english|, |french|, |german|, |italian|.
+% |chinese|, |dutch|, |english|, |french|, |german|, |italian|, and
+% |spanish|.
% If your language is not supported or you want to override a word in any
% supported language, you can modify the keys that hold the different
% section titles. These can be in the source code. The following snippet
@@ -606,6 +614,24 @@
% \iffalse
%</example>
% \fi
+%
+% \DescribeMacro{cvList}
+% If the above sections do not fit your needs, you can define a new section
+% using
+% |cvList{|\meta{environment name}|}{|\meta{storage key}|}{|\meta{icon}|}|.
+% It is also used internally for |cvExperience| and |cvEducation|, e.g.:
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}[%
+ caption={\lstinline!cvList! code example.},
+ label=cvList]
+ \cvList{cvEducation}{education}{\faGraduationCap}
+ \end{lstlisting}
+% \iffalse
+%</example>
+% \fi
%
% \section{Cover Letter}
%
@@ -836,18 +862,18 @@ Dear Miss.\ Smith
%
% limecv.cls
%
-% Copyright 2017 Olivier Pieters
+% Copyright 2017 - 2021 by Olivier Pieters
%
% A (Xe/Lua)LaTeX document class
%
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008-05-04 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
@@ -1670,13 +1696,13 @@ Dear Miss.\ Smith
\pgfkeys{/@cv/names/languages = Sprachen}%
\pgfkeys{/@cv/names/interests = Interessen}%
\pgfkeys{/@cv/names/professional = Beruflich}%
- \pgfkeys{/@cv/names/personal = Persönlich}%
+ \pgfkeys{/@cv/names/personal = Pers\"{o}nlich}%
\pgfkeys{/@cv/names/projects = Projekte}%
\pgfkeys{/@cv/names/education = Ausbildung}%
\pgfkeys{/@cv/names/experience = Berufliche Erfahrung}%
\pgfkeys{/@cv/names/references = Referenzen}%
\pgfkeys{/@cv/names/skills = Kenntnisse}%
- \pgfkeys{/@cv/names/publications = Veröffentlichungen}%
+ \pgfkeys{/@cv/names/publications = Ver\"{o}ffentlichungen}%
}
% \end{macrocode}
%
@@ -1700,6 +1726,25 @@ Dear Miss.\ Smith
% \end{macrocode}
%
%
+% Set the title names to Spanish:
+% \begin{macrocode}
+\NewDocumentCommand{\cv@setSpanish}{}{
+ \pgfkeys{/@cv/names/profile = Perfil}%
+ \pgfkeys{/@cv/names/contact = Contacto}%
+ \pgfkeys{/@cv/names/languages = Idiomas}%
+ \pgfkeys{/@cv/names/interests = Intereses}%
+ \pgfkeys{/@cv/names/professional = Profesionales}%
+ \pgfkeys{/@cv/names/personal = Personales}%
+ \pgfkeys{/@cv/names/projects = Proyectos}%
+ \pgfkeys{/@cv/names/education = Formación}%
+ \pgfkeys{/@cv/names/experience = Experiencia}%
+ \pgfkeys{/@cv/names/skills = Habilidades}%
+ \pgfkeys{/@cv/names/references = Referencias}%
+ \pgfkeys{/@cv/names/publications = Publicaciones}%
+}
+% \end{macrocode}
+%
+%
% Set the actual language to English. This can be overwritten by the user in the
% preamble
%
@@ -1714,14 +1759,15 @@ Dear Miss.\ Smith
{french} {\cv@setFrench}
{german} {\cv@setGerman}
{italian} {\cv@setItalian}
+ {spanish} {\cv@setSpanish}
{chinese} {%
\usepackage[BoldFont,SlantFont]{xeCJK}%
\cv@setChinese%
}
}
{\ClassError{limecv}{Unknown option `#1' for cvLanguage %
- macro.}{Only `english', `chinese`, `dutch`, `french`, `german` %
- and `italian` are valid options for this macro.}}
+ macro.}{Only `english', `chinese`, `dutch`, `french`, `german`, %
+ `italian` and `spanish` are valid options for this macro.}}
}
\ExplSyntaxOff
\cvSetLanguage{english}
@@ -1774,6 +1820,11 @@ Dear Miss.\ Smith
%
% \begin{macrocode}
\NewDocumentEnvironment{cvMainContent}{}{%
+ \stepcounter{cv@titlePrev}
+ \stepcounter{cv@titleNext}
+ \stepcounter{cv@itemPrev}
+ \stepcounter{cv@itemNext}
+ \stepcounter{cv@lastItem}
\begin{tikzpicture}[%
every node/.style={%
inner sep=0pt,
@@ -1786,8 +1837,11 @@ Dear Miss.\ Smith
\end{tikzpicture}
}
\NewDocumentEnvironment{cvMainContent*}{}{%
- \stepcounter{titlePrev}
- \stepcounter{titleNext}
+ \stepcounter{cv@titlePrev}
+ \stepcounter{cv@titleNext}
+ \stepcounter{cv@itemPrev}
+ \stepcounter{cv@itemNext}
+ \stepcounter{cv@lastItem}
\begin{tikzpicture}[%
every node/.style={
inner sep=0pt,
@@ -1802,11 +1856,14 @@ Dear Miss.\ Smith
% \end{macrocode}
%------------------------------------------------------
%
-% cvEductation environment
+% cvList environment: a general environment for
+% grouped lists. This environment is used to
+% generate e.g.\ |cvEducation|, |cvExperience| etc.
%
% \begin{macrocode}
-\NewDocumentEnvironment{cvEducation}{}{%
- \cv@Title{\pgfkeysvalueof{/@cv/names/education}}{\faGraduationCap}
+\NewDocumentCommand{\cvList}{mmm} {%
+ \NewDocumentEnvironment{#1}{}{%
+ \cv@Title{\pgfkeysvalueof{/@cv/names/#2}}{#3}
% \end{macrocode}
% insures uniqueness
% \begin{macrocode}
@@ -1818,27 +1875,22 @@ Dear Miss.\ Smith
\stepcounter{cv@lastItem}
\draw (item \the\value{cv@itemPrev}.south west)
node (cv@last item \the\value{cv@lastItem}) {};
+ }
}
% \end{macrocode}
%------------------------------------------------------
%
-% cvExperience environment
+% cvEductation environment
%
% \begin{macrocode}
-\NewDocumentEnvironment{cvExperience}{}{%
- \cv@Title{\pgfkeysvalueof{/@cv/names/experience}}{\faBriefcase}
+\cvList{cvEducation}{education}{\faGraduationCap}
% \end{macrocode}
-% insures uniqueness
+%------------------------------------------------------
+%
+% cvExperience environment
+%
% \begin{macrocode}
- \stepcounter{cv@itemPrev}
- \stepcounter{cv@itemNext}
- \cv@definecvItem
-}{%
- \cv@EndSectionDraw
- \stepcounter{cv@lastItem}
- \draw (item \the\value{cv@itemPrev}.south west)
- node (cv@last item \the\value{cv@lastItem}) {};
-}
+\cvList{cvExperience}{experience}{\faBriefcase}
% \end{macrocode}
%------------------------------------------------------
%
@@ -1848,6 +1900,7 @@ Dear Miss.\ Smith
\NewDocumentEnvironment{cvSkills}{}{%
\cv@Title{\pgfkeysvalueof{/@cv/names/skills}}{\faStar}
\global\cv@firstskilltrue
+ \RenewDocumentCommand{\cv@skillsTable}{}{}
}{%
\node[
below=\cvSectionSep of cv@title \the\value{cv@titlePrev}%
@@ -1866,20 +1919,7 @@ Dear Miss.\ Smith
% cvPublications environment
%
% \begin{macrocode}
-\NewDocumentEnvironment{cvPublications}{}{%
-\cv@Title{\pgfkeysvalueof{/@cv/names/publications}}{\faNewspaper}
-% \end{macrocode}
-% insures uniqueness
-% \begin{macrocode}
- \stepcounter{cv@itemPrev}
- \stepcounter{cv@itemNext}
- \cv@definecvItem
-}{%
- \cv@EndSectionDraw
- \stepcounter{cv@lastItem}
- \draw (item \the\value{cv@itemPrev}.south west)
- node (cv@last item \the\value{cv@lastItem}) {};
-}
+\cvList{cvPublications}{publications}{\faNewspaper}
% \end{macrocode}
%------------------------------------------------------
%
@@ -1935,6 +1975,10 @@ Dear Miss.\ Smith
\pgfkeys{/@cv/references/mobile phone/.is if=%
cv@refMobilePhone}
\pgfkeys{/@cv/references/mobile phone=false}
+\newif\ifcv@refEmail
+\pgfkeys{/@cv/references/email/.is if=%
+ cv@refEmail}
+\pgfkeys{/@cv/references/email=false}
\newif\ifcv@refStored
\pgfkeys{/@cv/references/value stored/.is if=%
cv@refStored}
@@ -1997,6 +2041,11 @@ Dear Miss.\ Smith
\@IfNoValueOrEmptyTF{#1}{}{\pgfkeys{/@cv/references/mobile phone = true}}}
% \end{macrocode}
%
+% \begin{macrocode}
+\define@key{cvAddReferenceA}{email}{%
+ \global\def\cv@refAEmail{#1}%
+ \@IfNoValueOrEmptyTF{#1}{}{\pgfkeys{/@cv/references/email = true}}}
+% \end{macrocode}
%
% \begin{macrocode}
\define@key{cvAddReferenceB}{name}{%
@@ -2051,6 +2100,17 @@ Dear Miss.\ Smith
\define@key{cvAddReferenceB}{mobile phone}{%
\global\def\cv@refBMobilePhone{#1}%
\@IfNoValueOrEmptyTF{#1}{}{\pgfkeys{/@cv/references/mobile phone = true}}}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\define@key{cvAddReferenceB}{email}{%
+ \global\def\cv@refBEmail{#1}%
+ \@IfNoValueOrEmptyTF{#1}{}{\pgfkeys{/@cv/references/email = true}}}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
\NewDocumentCommand{\cvAddReference}{sm}{%
\IfBooleanTF{#1}{%
\setkeys{cvAddReferenceA}{name=,company=,
@@ -2074,6 +2134,7 @@ Dear Miss.\ Smith
\ifcv@refAddressLineC \\ \cv@refAAddressLineC & \cv@refBAddressLineC \fi %
\ifcv@refWorkPhone \\ \cv@refAPhoneWork & \cv@refBPhoneWork \fi %
\ifcv@refMobilePhone \\ \cv@refAMobilePhone & \cv@refBMobilePhone \fi %
+ \ifcv@refEmail \\ \cv@refAEmail & \cv@refBEmail \fi %
\end{tabular}%
\pgfkeys{/@cv/references/value stored = false}%
\else%
@@ -2087,6 +2148,7 @@ Dear Miss.\ Smith
\ifcv@refAddressLineC \\ \cv@refBAddressLineC \fi %
\ifcv@refWorkPhone \\ \cv@refBPhoneWork \fi %
\ifcv@refMobilePhone \\ \cv@refBMobilePhone \fi %
+ \ifcv@refEmail \\ \cv@refBEmail \fi %
\end{tabular}%
\fi%
}%
@@ -2113,13 +2175,14 @@ Dear Miss.\ Smith
\end{minipage}
\vspace*{\fill}
}
-\NewDocumentEnvironment{cvSidear*}{}{%
+\NewDocumentEnvironment{cvSidebar*}{}{%
\vspace*{\fill}
\vspace*{-0.5\cvMargin}
\begin{tikzpicture}[remember picture,overlay]
\fill[cvGreenLight] (current page.north east) rectangle %
++(-\cvSideWidth-2\cvMargin,-\paperheight);
\end{tikzpicture}%
+ \hspace*{\paperwidth-\cvSideWidth-2\cvMargin}%
\begin{minipage}{\cvSideWidth}
\begin{center}
}{%
@@ -2319,6 +2382,9 @@ Dear Miss.\ Smith
for this environment.}}
}
+ \stepcounter{cv@cvInterestCounter}
+ \stepcounter{cv@cvInterestCounterPrev}
+
\cv@definecv@interestSection
% \end{macrocode}
% define new commands
@@ -2344,6 +2410,7 @@ Dear Miss.\ Smith
\vspace{\cvSectionSBSep}
}{%
\cv@interestClose
+ \global\cv@interestContentfalse
}
\ExplSyntaxOff
% \end{macrocode}
@@ -2489,27 +2556,48 @@ Dear Miss.\ Smith
\pgfkeys{/@cv/languages/.is family,
/@cv/languages/.unknown/.style = {%
\pgfkeyscurrentpath/\pgfkeyscurrentname/.initial = #1}}
-\NewDocumentEnvironment{cvLanguages}{}{%
- \NewDocumentCommand{\cvLanguage}{mm}{%
- {\globaldefs=1\relax\pgfkeys{%
- /@cv/languages/lang\the\value{cv@languages} = ##2}}
- \node[cv@languageText]{##1}; \pgfmatrixnextcell %
- \node[cv@progressArea] (cv@language \the\value{cv@languages}) {}; \\
- \stepcounter{cv@languages}
- }%
+
+\newif\ifcv@languagerating
+\cv@languageratingtrue
+\NewDocumentEnvironment{cvLanguages}{ o }{%
+ \IfNoValueTF{#1}{
+ \NewDocumentCommand{\cvLanguage}{mm}{%
+ {\globaldefs=1\relax\pgfkeys{%
+ /@cv/languages/lang\the\value{cv@languages} = ##2}}
+ \node[cv@languageText]{##1}; \pgfmatrixnextcell %
+ \node[cv@progressArea] (cv@language \the\value{cv@languages}) {}; \\
+ \stepcounter{cv@languages}
+ }%
+ \cv@languageratingtrue
+ }{
+ \NewDocumentCommand{\cvLanguage}{m}{%
+ \node[cv@languageText]{##1}; \\
+ \stepcounter{cv@languages}
+ }%
+ \cv@languageratingfalse
+ }
\vspace{\cvSectionSBSep}
\ruleline{\pgfkeysvalueof{/@cv/names/languages}}%
\vspace{\cvSectionSBSep}
\begin{tikzpicture}[%
every node/.style={text depth=0pt,inner sep=0pt,outer sep=0pt}]
- \matrix [
+ \ifcv@languagerating
+ \matrix [%
column 1/.style={anchor=east},
column sep=1.5\cvSectionSBSep,
row sep=1.5\cvSectionSBSep,
column 2/.style={anchor=west,align=left}
] (contact) \bgroup
+ \else
+ \matrix [%
+ column sep=1.5\cvSectionSBSep,
+ row sep=1.5\cvSectionSBSep,
+ column 2/.style={anchor=west,align=left}
+ ] (contact) \bgroup
+ \fi
}{%
\\\egroup;
+ \ifcv@languagerating
\newcounter{cv@languagelevel}
\setcounter{cv@languagelevel}{1}
\loop\ifnum\value{cv@languagelevel}<\value{cv@languages}
@@ -2521,6 +2609,7 @@ Dear Miss.\ Smith
{};
\stepcounter{cv@languagelevel}
\repeat
+ \fi
\end{tikzpicture}
}
% \end{macrocode}
@@ -2654,25 +2743,28 @@ Dear Miss.\ Smith
\draw (current page.north east) %
++(-0.5\paperwidth+0.5\cvCoverLetterWidth,
-\cvCoverLetterHeight/2) node (cv@h7) {};
- \node[anchor=east] at (cv@h7) (cv cover letter name){%
- \fontsize{50}{60}\selectfont
+ \node[%
+ anchor=east,
+ align=flush right,
+ text width=\textwidth] at (cv@h7) (cv cover letter name){%
+ \fontsize{50}{60}\selectfont
% \end{macrocode}
% trick to expand argument such that `kleft` sees an
% alphabetic constant (i.e. a single letter)
% \begin{macrocode}
- \begingroup\edef\y{\endgroup%
- \noexpand\kleft{\cv@FirstNameLetter}}%
- \y
- \StrGobbleLeft{\pgfkeysvalueof{/@cv/info/first name}}{1}\space
- \StrGobbleRight{\pgfkeysvalueof{/@cv/info/last name}}{1}
+ \begingroup\edef\y{\endgroup%
+ \noexpand\kleft{\cv@FirstNameLetter}}%
+ \y
+ \StrGobbleLeft{\pgfkeysvalueof{/@cv/info/first name}}{1}\space
+ \StrGobbleRight{\pgfkeysvalueof{/@cv/info/last name}}{1}
% \end{macrocode}
% same trick
% trick to expand argument such that `kleft` sees an
% alphabetic constant (i.e. a single letter)
% \begin{macrocode}
- \begingroup\edef\y{\endgroup%
- \noexpand\kright{\cv@LastNameLetter}}%
- \y
+ \begingroup\edef\y{\endgroup%
+ \noexpand\kright{\cv@LastNameLetter}}%
+ \y
};
\node[%
align=right,
@@ -2733,9 +2825,9 @@ Dear Miss.\ Smith
}
{\LARGE
\vspace{\cvIDNameSep}
- #1
+ \color{cvAccent} #1
\vspace{\cvIDNameSep}
- #2}
+ \color{cvAccent} #2}
\vspace{\cvPositionSep}