~xdanaux/moderncv/trunk

« back to all changes in this revision

Viewing changes to moderncv.cls

  • Committer: Xavier Danaux
  • Date: 2014-02-18 01:24:21 UTC
  • Revision ID: xdanaux@gmail.com-20140218012421-q9baxj97v7zfa691
Added the \@initializeif and \@moderncvstrut general commands

Show diffs side-by-side

added added

removed removed

Lines of Context:
354
354
  \else%
355
355
    \newlength{#1}\fi}
356
356
 
357
 
% creates a savebox if not yet defined
 
357
% creates a box if not yet defined
358
358
\newcommand*{\@initializebox}[1]{%
359
359
  \ifdefined#1
360
360
    \savebox{#1}{}%
361
361
  \else%
362
362
    \newsavebox{#1}\fi}
363
363
 
 
364
% creates an if switch if not yet defined
 
365
\newcommand*{\@initializeif}[1]{%
 
366
  \ifdefined#1
 
367
  \else%
 
368
    \newif#1\fi}
 
369
 
 
370
% 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)
 
371
\newcommand*{\@moderncvstrut}[2]{%
 
372
  \rule[-#1\baselineskip]{0pt}{#2\baselineskip}}
 
373
 
364
374
 
365
375
%-------------------------------------------------------------------------------
366
376
%                resume design commands definitions