optional arguments

- add pancvphone command
- add optional arguments whit xifthen
This commit is contained in:
Raffaele Mignone 2020-02-22 14:15:21 +01:00
parent 0f540201d0
commit 027bca9940
Signed by: norangebit
GPG Key ID: F5255658CB220573

View File

@ -7,6 +7,14 @@
$endif$
}
\newcommand{\pancvphone}[1]{
$if(europass)$
\ecvtelephone{#1}
$else$
\phone{#1}
$endif$
}
\newcommand{\pancvmobile}[1]{
$if(europass)$
\ecvmobile{#1}
@ -41,7 +49,12 @@
\newcommand{\pancventry}[6]{
$if(europass)$
\ecvitem{#1}{\textbf{#6}. #2, #3, #4. #5}
\ecvitem{#1}{
\textbf{#2},
#3.
\ifthenelse{\isempty{#4}}{}{#4}
\ifthenelse{\isempty{#5}}{}{#5.}
\ifthenelse{\isempty{#6}}{}{\newline #6}}
$else$
\cventry{#1}{#2}{#3}{#4}{#5}{#6}
$endif$
@ -66,6 +79,8 @@ $else$
$endif$
$endif$
\usepackage{xifthen}
$if(name)$
\pancvname{$name.first$}{$name.family$}
$endif$
@ -82,6 +97,10 @@ $if(mobile)$
\pancvmobile{$mobile$}
$endif$
$if(phone)$
\pancvphone{$phone$}
$endif$
\begin{document}
$if(europass)$
@ -94,7 +113,7 @@ $for(cron-sections)$
\pancvsection{$if(it.section)$$it.section$$endif$}
$for(it.entries)$
\pancventry{$if(it.year)$$it.year$$endif$}
{$if(it.degre)$$it.degre$$endif$}
{$if(it.degree)$$it.degree$$endif$}
{$if(it.institution)$$it.institution$$endif$}
{$if(it.city)$$it.city$$endif$}
{$if(it.grade)$$it.grade$$endif$}