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