From 027bca99409e21d4387109ebfbd914db3e9d2a6a Mon Sep 17 00:00:00 2001 From: norangebit Date: Sat, 22 Feb 2020 14:15:21 +0100 Subject: [PATCH] optional arguments - add pancvphone command - add optional arguments whit xifthen --- pancv.tex | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/pancv.tex b/pancv.tex index f016314..70fe9bd 100644 --- a/pancv.tex +++ b/pancv.tex @@ -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$}