From 0889a274f04e95ca6cfe59245364e90f30bcd351 Mon Sep 17 00:00:00 2001 From: Xavier Danaux Date: Mon, 17 Feb 2014 20:24:21 -0500 Subject: [PATCH] Added the \@initializeif and \@moderncvstrut general commands --- moderncv.cls | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/moderncv.cls b/moderncv.cls index d5ea224..8b97122 100644 --- a/moderncv.cls +++ b/moderncv.cls @@ -354,13 +354,23 @@ \else% \newlength{#1}\fi} -% creates a savebox if not yet defined +% creates a box if not yet defined \newcommand*{\@initializebox}[1]{% \ifdefined#1 \savebox{#1}{}% \else% \newsavebox{#1}\fi} +% creates an if switch if not yet defined +\newcommand*{\@initializeif}[1]{% + \ifdefined#1 + \else% + \newif#1\fi} + +% custom strut for spacing; the first argument is the vertical offset of the strut, the second its total height (both as a fraction of \baselineskip) +\newcommand*{\@moderncvstrut}[2]{% + \rule[-#1\baselineskip]{0pt}{#2\baselineskip}} + %------------------------------------------------------------------------------- % resume design commands definitions