summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/elzcards/elzcards.dtx
blob: 7bc378f59ebf9d973300544738ebf4d9feebca4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
% \iffalse meta-comment
%
% elzcards.dtx
% Copyright 2015 Emilio Lazo Zaia <emiliolazozaia@gmail.com>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any later
% version. This version of this license is in
%   http://www.latex-project.org/lppl/lppl-1-3c.{html|txt|tex|pdf}
% and the latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of
% LaTeX version 2008/05/04 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Emilio Lazo Zaia.
%
% This work consists of the files README and elzcards.dtx with
% its derived files elzcards.ins, elzcards.cls and
% elzcards-example.tex.
%
%<*internalbatchfile>
\begingroup
%</internalbatchfile>
%<*batchfile>
\input docstrip.tex
\preamble

Copyright 2015 Emilio Lazo Zaia <emiliolazozaia@gmail.com>

This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3c of this license or (at your option) any later
version. This version of this license is in
 http://www.latex-project.org/lppl/lppl-1-3c.{html|txt|tex|pdf}
and the latest version of this license is in
 http://www.latex-project.org/lppl.txt
and version 1.3c or later is part of all distributions of
LaTeX version 2008/05/04 or later.

This work has the LPPL maintenance status `maintained'.

The Current Maintainer of this work is Emilio Lazo Zaia.

This work consists of the files README and elzcards.dtx with
its derived files elzcards.ins, elzcards.cls and
elzcards-example.tex.

\endpreamble
\keepsilent
\askforoverwritefalse
\obeyspaces
\Msg{************************************************************}
\Msg{************************* \jobname *************************}
\Msg{************************************************************}
\generate{\file{\jobname.cls}{\from{\jobname.dtx}{class}}}
\Msg{\jobname.cls written.}
\immediate\write18{makeindex -s gind.ist -o \jobname.ind \jobname.idx}
\immediate\write18{makeindex -s gglo.ist -o \jobname.gls \jobname.glo}
\postamble
\endpostamble
%</batchfile>
%<*internalbatchfile>
\generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}}
\Msg{\jobname.ins written.}
%</internalbatchfile>
%<*batchfile>
\generate{\file{\jobname-example.tex}{\from{\jobname.dtx}{ejemplo}}}
\Msg{\jobname-example.tex written.}
\Msg{************************************************************}
\Msg{To produce the documentation, compile \jobname.dtx file with}
\Msg{ pdflatex \jobname.dtx}
\Msg{To update the index and changelog, type}
\Msg{ makeindex -s gind.ist -o \jobname.ind \jobname.idx}
\Msg{ makeindex -s gglo.ist -o \jobname.gls \jobname.glo}
\Msg{respectively, and recompile the documentation.}
\Msg{************************************************************}
\Msg{}
%</batchfile>
%<batchfile>\endbatchfile
%<*internalbatchfile>
\endgroup
%</internalbatchfile>
%<*driver>
\ProvidesFile{elzcards.dtx}
%</driver>
%<class>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
%<class>\ProvidesClass{elzcards}
%<*class>
[2015/03/05 v1.00 ELZ cards]
%</class>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage[letterpaper,vmargin={3cm,2cm},hmargin={3cm,2cm}]{geometry}
\usepackage{paralist,calc}
\usepackage[usenames,dvipsnames]{color}
\EnableCrossrefs
\CodelineIndex
% \OnlyDescription
\RecordChanges
\setlength{\parskip}{5pt}
\begin{document}
 \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{534}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
%
% \changes{v1.00}{2015/03/05}{First release.}
%
% \GetFileInfo{\jobname.dtx}
%
% \DoNotIndex{\addtocounter, \arabic, \@auxout, \advance, \begin, \circle, \cleardoublepage, \csname, \CurrentOption, \def, \DeclareOption, \else, \end, \endcsname, \endinput, \expandafter, \fi, \forloop, \FPupn, \elzc@DefFichaXdim, \elzc@DefFichaYdim, \elzc@DefTPXdim, \elzc@DefTPYdim, elzc@DefPunto, elzc@DefArista, \elzc@DefLinea, \@elzc@guiasfalse, \@elzc@guiastrue, \@elzc@fichaconreversofalse, \@elzc@fichaconreversotrue, \@elzc@reversofichafalse, \@elzc@reversofichatrue, \IfBooleanTF, \IfFileExists, \if@elzc@guias, \if@elzc@lineas, \ifnum, \if@elzc@reversoficha, \if@elzc@fichaconreverso, \if@elzc@puntos, \IfValueTF, \IfValueT, \immediate, \input, \jobname, \line, \@elzc@lineasfalse, \@elzc@lineastrue, \linethickness, \LoadClass, \loop, \makebox, \@mparswitchtrue, \multiput, \newcommand, \newcounter, \NewDocumentCommand, \newif, \newlength, \newpage, \not, \numexpr, \pagestyle, \parbox, \parindent, \PassOptionsToClass, \ProcessOptions, \@elzc@puntosfalse, \@elzc@puntostrue, \put, \relax, \repeat, \RequirePackage, \romannumeral, \setcounter, \setlength, \string, \elzc@TarjXdim, \elzc@TarjYdim, \elzc@TempLen, \textheight, \textwidth, \@twosidetrue, \unitlength, \value, \write, \example, \hfill, \vfill, \LARGE, \mbox, \usepackage, \documentclass, \mycenter, \\}
%
% \title{The \textsf{\jobname} class\thanks{This document
%   corresponds to \textsf{\jobname}~\fileversion, dated \filedate.}}
% \author{Emilio Lazo Zaia\\ \texttt{< emiliolazozaia at gmail.com >}}
%
% \maketitle
%
% \section{Introduction}
%
% |elzcards| is a class meant to be an easy and flexible way to typeset business cards, index cards and flash cards, with its back side as an option. You must bother only by setting the paper size, margins and the design of your card\footnote{No predefined design is given; you must typeset your card.}. Everything else is done by |elzcards|.
%
% \section{Writing business cards}
%
% Please load the class. It hasn't options. Any option you specify will be passed to |article| class, in which |elzcards| is based on.
%
% \noindent {\color{RoyalBlue}|\documentclass{elzcards}|}
%
% \noindent Now I'll recommend you inserting the |geometry| package and setting the margins according to
%
% \noindent \hspace*{2em}\parbox{\textwidth-2em}{\begin{enumerate}[\bfseries 1.]
%  \item the desired size of your card,
%  \item the paper you'll use,
%  \item the printable area of your printer.
% \end{enumerate}}
%
% \noindent For example, for the default business card size (3.5 inches x 2 inches) in a letter paper, you may use:
%
% \noindent {\color{RoyalBlue}|\usepackage[letterpaper,landscape,vmargin={0.25in,0.25in},hmargin={0.25in,0.25in}]|
%
% \hfill |{geometry}|}
%
% \noindent After beginning your document, the only command you would use to produce the cards is |\MakeBC|, described below.
%
% \DescribeMacro{\MakeBC}{\color{RoyalBlue}|\MakeBC[*][*]|\oarg{xlen}\oarg{ylen}\oarg{zlen}\marg{front side design}\oarg{back side design}}
% The only mandatory argument is the design of the card's front face. Everything you put inside |{}| will be stored in a box of size \meta{xlen} x \meta{ylen} and repeated in a grid until the page was filled.
%
% After closing the braces of the front side design of the card you can specify its back side design, if desired, as the last optional argument of |\MakeBC|\footnote{There is no need to specify the |twoside| option when loading the class even if you are writing twosided cards, but you must compile it twice.} (with square brackets).
%
% Both \meta{xlen} and \meta{ylen} are optional parameters to |\MakeBC|, and are \LaTeX{} lenghts; you can change the size of your cards specifying these lengths. Default values are, as stated before: 3.5 inches x 2 inches.
%
% The third optional parameter \meta{zlen} is also a length and has different meanings, depending on how you execute |\MakeBC|, i.e. starred or not starred. This will be explained just after clarifying what starred versions of |\MakeBC| are.
%
% Looking at the usage of |\MakeBC| we see the two optional stars, so we have three possible behaviors. Issuing |\MakeBC| without stars will print a grid of cards with segments and crosses as crop marks. The starred version |\MakeBC*| will print dots as crop marks, and the double starred version |\MakeBC**| will print lines between all the cards, like a grill. This may be useful also if you want the line as the border of the card, part of the design itself of the card\footnote{None of these crop marks will be added to the back side of a twosided document.}.
%
% Finally, the \meta{zlen} dimension represents the length of the segments when the standard cutting marks applies (no stars); also it represents the diameter of the dots (with one star), and the width of the line (with two stars). Its defaults values are: \meta{0.1mm}, \meta{1pt} and \meta{0.1mm} respectively.
%
%^^A Regarding the card's design, it's important to know that the |\unitlength| dimension, used in |picture| environment is defaulted to \meta{1mm}. This class relies on defining this length to \meta{1sp} to make its calculations, but it was set to \meta{1mm} inside the card to be used in |picture|, if you wish.
%
% \section{Writing index and flash cards}
%
% When writing other type of cards, like index cards and flash cards, you need to store all your cards in a stack and run the macro used to process them, that is |\MakeIC| (or |\MakeFC|, which is an alias to |\MakeIC|).
%
% \DescribeMacro{\Card}{\color{RoyalBlue}|\Card|\marg{front side design}\oarg{back side design}}
% With this macro your add a card into the stack. You can add the number of cards you want with more instances of |\Card|. All these cards will be processed when you issue |\MakeIC| with the following syntax:
%
% \DescribeMacro{\MakeIC}
% \DescribeMacro{\MakeFC}{\color{RoyalBlue}|\MakeIC[*][*]|\oarg{xlen}\oarg{ylen}\oarg{zlen}}
% The syntax is the same as for business cards but without the business card's specific arguments because you've added all cards into the stack before. It accepts two optional stars and three optional lengths as parameters\footnote{Exactly the same as \cs{MakeBC} except there are no mandatory arguments.}.
%
% \section{Final words}
%
% In the same document you can write many different sets of cards. You can combine business cards with index cards in the order you want; also using different sizes of cards, different designs, cropping options and even changing the paper geometry with |\geometry|.
%
% If only one card has back side, the whole document behaves like a twosided document, i.e. it will swap horizontal margins and will have interleaved blank pages when a set of cards has only front side; this is the behavior of |twoside| option but you don't have to specify it by hand when loading the class.
%
% Take into account that this is \LaTeX, so you can define your own command and use it inside the |\MakeIC| and |\MakeBC|, like in the following example with |\mycenter|.
%
% \section{All-in-one example}
%
% The following example is included as |elzcards-example.tex|.
%
% \StopEventually{\clearpage\PrintIndex}
%
%    \begin{macrocode}
%<*ejemplo>
\documentclass{elzcards}
\usepackage[landscape,letterpaper,vmargin={0.25in,0.25in},hmargin={0.25in,0.25in}]{geometry}
\newcommand{\mycenter}[1]{\vfill\mbox{}\begin{center}\LARGE#1\end{center}\mbox{}\vfill}
\begin{document}
 \MakeBC{\mycenter{Business card \\ only front side \\ default options}}%
 \MakeBC*{\mycenter{Business card \\ front side \\ with dots}}%
  [\mycenter{Business card \\ back side}]
 \MakeBC**{\mycenter{Business card \\ front side \\ with lines}}%
  [\mycenter{Business card \\ back side}]
 \MakeBC*[2in][3.5in][1mm]{\mycenter{Business card \\ vertical \\ front side \\ with 1mm dots}}%
  [\mycenter{Business card \\ vertical \\ back side}]
 \Card{\mycenter{Index/flash card \\ front card 1}}[\mycenter{Index/flash card \\ back card 1}]
 \Card{\mycenter{Index/flash card \\ front card 2}}[\mycenter{Index/flash card \\ back card 2}]
 \Card{\mycenter{Index/flash card \\ front card 3}}[\mycenter{Index/flash card \\ back card 3}]
 \Card{\mycenter{Index/flash card \\ front card 4}}[\mycenter{Index/flash card \\ back card 4}]
 \Card{\mycenter{Index/flash card \\ front card 5}}[\mycenter{Index/flash card \\ back card 5}]
 \Card{\mycenter{Index/flash card \\ front card 6}}[\mycenter{Index/flash card \\ back card 6}]
 \Card{\mycenter{Index/flash card \\ front card 7}}[\mycenter{Index/flash card \\ back card 7}]
 \MakeIC
 \Card{\mycenter{Index/flash card \\ 3x3in \\ with 2mm dots \\ card 1}}
 \Card{\mycenter{Index/flash card \\ 3x3in \\ with 2mm dots \\ card 2}}
 \Card{\mycenter{Index/flash card \\ 3x3in \\ with 2mm dots \\ card 3}}
 \Card{\mycenter{Index/flash card \\ 3x3in \\ with 2mm dots \\ card 4}}
 \Card{\mycenter{Index/flash card \\ 3x3in \\ with 2mm dots \\ card 5}}
 \Card{\mycenter{Index/flash card \\ 3x3in \\ with 2mm dots \\ card 6}}
 \MakeFC*[3in][3in][2mm]
\end{document}
%</ejemplo>
%    \end{macrocode}
%
% \section{Implementation}
%
%    \begin{macrocode}
%<*class>
\RequirePackage{calc}
\RequirePackage{xparse}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
\LoadClass{article}

\newif\if@elzc@puntos
\newif\if@elzc@lineas
\newif\if@elzc@guias
\newif\if@elzc@fichaconreverso
\newif\if@elzc@reversoficha

\newlength{\elzc@TarjXdim}
\newlength{\elzc@TarjYdim}
\newlength{\elzc@TempLen}

\newcounter{elzc@TarjXdim}
\newcounter{elzc@TarjYdim}
\newcounter{elzc@PapelX}
\newcounter{elzc@PapelY}
\newcounter{elzc@NumX}
\newcounter{elzc@NumY}
\newcounter{elzc@ContX}
\newcounter{elzc@ContY}
\newcounter{elzc@PosX}
\newcounter{elzc@PosY}
\newcounter{elzc@RestoX}
\newcounter{elzc@XInicial}
\newcounter{elzc@Punto}
\newcounter{elzc@Arista}
\newcounter{elzc@Fichas}
\newcounter{elzc@TempFichaActual}
\newcounter{elzc@TempFichaActualII}

\setlength{\parindent}{0pt}
\setlength{\unitlength}{1sp}
\pagestyle{empty}

\newlength{\elzc@DefTPXdim}
\newlength{\elzc@DefTPYdim}
\newlength{\elzc@DefFichaXdim}
\newlength{\elzc@DefFichaYdim}
\newlength{\elzc@DefLinea}
\newcounter{elzc@DefArista}
\newcounter{elzc@DefPunto}

\setlength{\elzc@DefTPXdim}{3.5in}
\setlength{\elzc@DefTPYdim}{2in}
\setlength{\elzc@DefFichaXdim}{5in}
\setlength{\elzc@DefFichaYdim}{3in}
\setlength{\elzc@DefLinea}{0.1mm}
\setcounter{elzc@DefArista}{186468}
\setcounter{elzc@DefPunto}{65536}

\newcommand{\elzc@Cuadricula}[1]{%
 \setcounter{elzc@TarjXdim}{\elzc@TarjXdim}%
 \setcounter{elzc@TarjYdim}{\elzc@TarjYdim}%
 \setcounter{elzc@PapelX}{\textwidth}%
 \setcounter{elzc@PapelY}{\textheight}%
 \setcounter{elzc@NumX}{\value{elzc@PapelX} / \value{elzc@TarjXdim}}%
 \setcounter{elzc@NumY}{\value{elzc@PapelY} / \value{elzc@TarjYdim}}%
 \setcounter{elzc@ContX}{-1}%
 \setcounter{elzc@ContY}{-1}%
 \setcounter{elzc@RestoX}{- \value{elzc@PapelX} + \value{elzc@NumX} * \value{elzc@TarjXdim}}%
 \begin{picture}(\value{elzc@PapelX},\value{elzc@PapelY})(\value{elzc@XInicial},0)%
  \loop \ifnum\value{elzc@ContY} < \value{elzc@NumY} \advance\value{elzc@ContY} by 1{%
   \loop \ifnum\value{elzc@ContX} < \value{elzc@NumX} \advance\value{elzc@ContX} by 1{%
    \if@elzc@reversoficha
     \setcounter{elzc@PosX}{\value{elzc@NumX} * \value{elzc@TarjXdim} - %
      \value{elzc@ContX} * \value{elzc@TarjXdim} - \value{elzc@TarjXdim}}%
    \else
     \setcounter{elzc@PosX}{\value{elzc@ContX} * \value{elzc@TarjXdim}}%
    \fi
    \setcounter{elzc@PosY}{\value{elzc@ContY} * \value{elzc@TarjYdim}}%
    \ifnum \value{elzc@ContX} < \value{elzc@NumX}%
     \ifnum \value{elzc@ContY} < \value{elzc@NumY}%
      \put(\value{elzc@PosX},\value{elzc@PosY}){%
      \makebox(\value{elzc@TarjXdim}, \value{elzc@TarjYdim}){%
       \ifnum\value{elzc@TempFichaActual} < \value{elzc@Fichas}%
        \addtocounter{elzc@TempFichaActual}{1}%
        \addtocounter{elzc@TempFichaActualII}{1}%
        \parbox[t][\elzc@TarjYdim]{\elzc@TarjXdim}{%
         \if@elzc@reversoficha
          \expandafter\csname FichaReverso\romannumeral\value{elzc@TempFichaActual}\endcsname
         \else
          \expandafter\csname Ficha\romannumeral\value{elzc@TempFichaActual}\endcsname
         \fi}%
       \else
         \parbox[t][\elzc@TarjYdim]{\elzc@TarjXdim}{#1}%
       \fi}}%
     \fi
    \fi
    \if@elzc@guias
     \ifnum \value{elzc@ContX} = 0
      \put(\value{elzc@PosX},\value{elzc@PosY}){\line(-1,0){\value{elzc@Arista}}}%
     \else
      \ifnum \value{elzc@ContX} = \value{elzc@NumX}%
       \put(\value{elzc@PosX},\value{elzc@PosY}){\line(2,0){\value{elzc@Arista}}}%
      \else
       \put(\value{elzc@PosX},\value{elzc@PosY}){\line(-1,0){\value{elzc@Arista}}}%
       \put(\value{elzc@PosX},\value{elzc@PosY}){\line(2,0){\value{elzc@Arista}}}%
      \fi
     \fi
     \ifnum \value{elzc@ContY} = 0
      \put(\value{elzc@PosX},\value{elzc@PosY}){\line(0,-1){\value{elzc@Arista}}}%
     \else
      \ifnum \value{elzc@ContY} = \value{elzc@NumY}%
       \put(\value{elzc@PosX},\value{elzc@PosY}){\line(0,0){\value{elzc@Arista}}}%
      \else
       \put(\value{elzc@PosX},\value{elzc@PosY}){\line(0,0){\value{elzc@Arista}}}%
       \put(\value{elzc@PosX},\value{elzc@PosY}){\line(0,-1){\value{elzc@Arista}}}%
      \fi
     \fi
    \fi
    \if@elzc@lineas
     \multiput(\value{elzc@PosX}, 0)(0, \value{elzc@TarjYdim})%
      {\value{elzc@NumY}}{\line(0,1){\value{elzc@TarjYdim}}}%
     \multiput(0, \value{elzc@PosY})(\value{elzc@TarjXdim}, 0)%
      {\value{elzc@NumX}}{\line(1,0){\value{elzc@TarjXdim}}}%
    \fi
    \if@elzc@puntos
     \put(\value{elzc@PosX}, \value{elzc@PosY}){\circle*{\value{elzc@Punto}}}
    \fi}%
   \repeat}%
  \repeat
 \end{picture}%
 \@elzc@lineasfalse\@elzc@puntosfalse\@elzc@guiasfalse\@elzc@reversofichafalse}

\NewDocumentCommand{\elzc@Tarjetas}{s s o o o m o}{%
 \IfBooleanTF{#2}{\@elzc@lineastrue}{\IfBooleanTF{#1}{\@elzc@puntostrue}{\@elzc@guiastrue}}%
 \setlength{\elzc@TarjXdim}{#3}%
 \setlength{\elzc@TarjYdim}{#4}%
 \IfValueTF{#5}{%
  \IfBooleanTF{#2}
   {\linethickness{#5}}
   {\IfBooleanTF{#1}
    {\setlength{\elzc@TempLen}{#5}\setcounter{elzc@Punto}{\elzc@TempLen}}
    {\setlength{\elzc@TempLen}{#5}\setcounter{elzc@Arista}{\elzc@TempLen}%
     \linethickness{\elzc@DefLinea}}}%
 }{%
  \IfBooleanTF{#2}
   {\linethickness{\elzc@DefLinea}}
   {\IfBooleanTF{#1}
    {\setcounter{elzc@Punto}{\value{elzc@DefPunto}}}
    {\setcounter{elzc@Arista}{\value{elzc@DefArista}}\linethickness{\elzc@DefLinea}}%
   }%
  }%
 \elzc@Cuadricula{\setlength{\unitlength}{1mm}#6}%
 \if@elzc@fichaconreverso
  \addtocounter{elzc@TempFichaActual}{-\value{elzc@TempFichaActualII}}%
  \newpage
  \setcounter{elzc@XInicial}{\value{elzc@RestoX}}%
  \@elzc@reversofichatrue
  \elzc@Cuadricula{\setlength{\unitlength}{1mm}}%
 \else
  \IfValueT{#7}{%
   \immediate\write\@auxout{\string\@twosidetrue\string\@mparswitchtrue}%
   \newpage
   \setcounter{elzc@XInicial}{\value{elzc@RestoX}}%
   \elzc@Cuadricula{\setlength{\unitlength}{1mm}#7}}%
 \fi
 \cleardoublepage
 \setcounter{elzc@TempFichaActualII}{0}%
 \setcounter{elzc@XInicial}{0}%
 \ifnum\value{elzc@TempFichaActual} < \value{elzc@Fichas}%
  \IfBooleanTF{#2}{\MakeIC**[#3][#4][#5]}{\IfBooleanTF{#1}{%
    \MakeIC*[#3][#4][#5]}{\MakeIC[#3][#4][#5]}}%
 \fi
 \setcounter{elzc@Fichas}{0}%
 \setcounter{elzc@TempFichaActual}{0}%
 \@elzc@fichaconreversofalse}

\NewDocumentCommand{\MakeBC}{s s O{\elzc@DefTPXdim} O{\elzc@DefTPYdim} o m o}{%
 \IfBooleanTF{#2}
  {\elzc@Tarjetas**[#3][#4][#5]{#6}[#7]}
  {\IfBooleanTF{#1}
   {\elzc@Tarjetas*[#3][#4][#5]{#6}[#7]}
   {\elzc@Tarjetas[#3][#4][#5]{#6}[#7]}}}

\NewDocumentCommand{\MakeIC}{s s O{\elzc@DefFichaXdim} O{\elzc@DefFichaYdim} o}{%
 \IfBooleanTF{#2}
  {\elzc@Tarjetas**[#3][#4][#5]{}}
  {\IfBooleanTF{#1}
   {\elzc@Tarjetas*[#3][#4][#5]{}}
   {\elzc@Tarjetas[#3][#4][#5]{}}}}
   
\let\MakeFC\MakeIC

\NewDocumentCommand{\Card}{m o}{%
 \addtocounter{elzc@Fichas}{1}%
 \expandafter\def\csname Ficha\romannumeral\value{elzc@Fichas}\endcsname{#1}%
 \IfValueTF{#2}{%
  \@elzc@fichaconreversotrue
  \expandafter\def\csname FichaReverso\romannumeral\value{elzc@Fichas}\endcsname{#2}%
  \immediate\write\@auxout{\string\@twosidetrue\string\@mparswitchtrue}}
 {\expandafter\def\csname FichaReverso\romannumeral\value{elzc@Fichas}\endcsname{}}}

\IfFileExists{\jobname.aux}{\input\jobname.aux}

%</class>
%    \end{macrocode}
% \Finale