summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/elzcards/elzcards.dtx
blob: 9aed607ee06f52179260ffd93b03701d773acad3 (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
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
% \iffalse meta-comment
%
% elzcards.dtx
% Copyright 2017 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.sty and
% elzcards-examples.tex.
%
%<*internalbatchfile>
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX
\else
  \expandafter\begingroup
\fi
%</internalbatchfile>
%<*batchfile>
\input docstrip.tex
\preamble

Copyright 2017 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.sty and
elzcards-examples.tex.

\endpreamble
\keepsilent
\askforoverwritefalse
\obeyspaces
\Msg{************************************************************}
\Msg{************************* \jobname *************************}
\Msg{************************************************************}
\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}}
\Msg{\jobname.sty written.}
\Msg{}
\immediate\write18{makeindex -s gind.ist -o \jobname.ind \jobname.idx}
\immediate\write18{makeindex -s gglo.ist -o \jobname.gls \jobname.glo}
\Msg{}
\Msg{Change history and index updated.}
\postamble
\endpostamble
%</batchfile>
%<*internalbatchfile>
\generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}}
\Msg{\jobname.ins written.}
%</internalbatchfile>
%<*batchfile>
\generate{\file{\jobname-examples.tex}{\from{\jobname.dtx}{ejemplo}}}
\Msg{\jobname-examples.tex written.}
\Msg{************************************************************}
\Msg{To produce the documentation, compile \jobname.dtx file with}
\Msg{ pdflatex \jobname.dtx}
\Msg{If write18 is not enabled, type}
\Msg{ makeindex -s gind.ist -o \jobname.ind \jobname.idx}
\Msg{ makeindex -s gglo.ist -o \jobname.gls \jobname.glo}
\Msg{to update index and changelog respectively.}
\Msg{In either case, compile again.}
\Msg{************************************************************}
\Msg{}
%</batchfile>
%<batchfile>\endbatchfile
%<*internalbatchfile>
\ifx\fmtname\nameofplainTeX
  \expandafter\endbatchfile
\else
  \expandafter\endgroup
\fi
%</internalbatchfile>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage[letterpaper,vmargin={2.5cm,2cm},hmargin={3cm,2cm}]{geometry}
\usepackage[usenames,dvipsnames]{color}
\usepackage[english]{babel}
\usepackage{paralist,calc,array,xpatch}
\usepackage{elzcards}

\def\generalname{}
\makeatletter\patchcmd{\changes@}{:}{}{}{}\makeatother

\EnableCrossrefs
\CodelineIndex
\RecordChanges

\setlength{\parskip}{5pt}

\begin{document}
 \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{1043}
%
% \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 as a class.}
% \changes{v1.20}{2015/04/26}{01. Changes in \texttt{.dtx} header and spaces on embedded \texttt{.ins} file. Now it should compile with pdf\TeX{} to produce only package files.}
% \changes{v1.20}{2015/04/26}{02. It isn't a class anymore. Now is a package.}
% \changes{v1.20}{2015/04/26}{03. Supports adjustable gaps between cards.}
% \changes{v1.20}{2015/04/26}{04. Added commands to control default values of optional arguments of {\slshape make} commands.}
% \changes{v1.20}{2015/04/26}{05. \cs{unitlength} is handled transparently.}
% \changes{v1.20}{2015/04/26}{06. Added key-val package to drop positional parameters and stars on {\slshape make} commands.}
% \changes{v1.20}{2015/04/26}{07. Added \cs{BusinessCard} command instead of defining the card's design with \cs{MakeBC}.}
% \changes{v1.20}{2015/04/26}{08. Added optional stars on {\slshape make} commands to allow not clearing the cards in order to have the possibility of being processed again.}
% \changes{v1.20}{2015/04/26}{09. Added informational output to log and console about what is being processed.}
% \changes{v1.20}{2015/04/26}{10. Added macros to change default crop behavior.}
% \changes{v1.23}{2017/07/10}{11. Added an option to not printing cutting marks.}
% \changes{v1.23}{2017/07/10}{12. Renamed \cs{BCgap} to \cs{CardGap} and obviously removed the aliases \cs{ICgap} and \cs{FCgap}.}
% \changes{v1.23}{2017/07/10}{13. Added support for colors on cropping marks.}
% \changes{v1.23}{2017/07/10}{14. Added support for external segments as cropping marks.}
% \changes{v1.23}{2017/07/10}{15. Renamed macro \cs{CrossSegment} to \cs{SegmentLength}.}
%
% \GetFileInfo{\jobname.sty}
%
% \DoNotIndex{\\, \addtocounter, \advance, \arabic, \@auxout, \begin, \BusinessCard, \circle, \cleardoublepage, \clearpage, \color, \CropMarksSize, \csname, \def, \define@key, \documentclass, \else, \@elzc@conreversofalse, \@elzc@conreversotrue, \elzc@ColorMarcas, \elzc@DefArista, \elzc@DefMarcasCorte, \elzc@DefColorMarcas, \elzc@DefFichaXdim, \elzc@DefFichaYdim, \elzc@DefLinea, \elzc@DefPunto, \elzc@DefSeparaX, \elzc@DefSeparaY, \elzc@DefTPXdim, \elzc@DefTPYdim, \elzc@aux@cruces, \elzc@aux@segmentos, \elzc@aux@puntos, \elzc@aux@lineas, \elzc@aux@sinmarcas, \@elzc@fichaconreversofalse, \@elzc@fichaconreversotrue, \@elzc@crucesfalse, \@elzc@crucestrue, \@elzc@lineasfalse, \@elzc@lineastrue, \@elzc@puntosfalse, \@elzc@puntostrue, \@elzc@segmentosfalse, \@elzc@segmentostrue, \@elzc@sinmarcasfalse, \@elzc@sinmarcastrue, \@elzc@reversofalse, \@elzc@reversotrue, \elzc@SeparaX, \elzc@SeparaY, \@elzc@TarjetaAnverso, \@elzc@tarjetaconreversofalse, \@elzc@tarjetaconreversotrue, \@elzc@tarjetafalse, \@elzc@TarjetaReverso, \@elzc@tarjetatrue, \elzc@TarjXdim, \elzc@TarjYdim, \elzc@TempLen, \elzc@TempUnitLength, \end, \endcsname, \expandafter, \fi, \hfill, \hspace, \if@elzc@conreverso, \if@elzc@fichaconreverso, \if@elzc@cruces, \if@elzc@lineas, \if@elzc@puntos, \if@elzc@segmentos, \if@elzc@sinmarcas, \if@elzc@reverso, \if@elzc@tarjeta, \if@elzc@tarjetaconreverso, \InputIfFileExists, \ifnum, \IfBooleanF, \IfBooleanTF, \IfValueT, \IfValueTF, \ifx, \immediate, \input, \jobname, \LARGE, \let, \line, \linethickness, \LineThickness, \loop, \makebox, \mbox, \@mparswitchtrue, \message, \mycenter, \NeedsTeXFormat, \newcommand, \newcounter, \NewDocumentCommand, \newif, \newlength, \nwarrow, \PackageError, \pagestyle, \parbox, \parindent, \ProvidesPackage, \put, \relax, \repeat, \RequirePackage, \romannumeral, \searrow, \setcounter, \setkeys, \setlength, \string, \textheight, \textwidth, \the, \thispagestyle, \TotalFC, \TotalIC, \@twosidetrue, \undefined, \unitlength, \usepackage, \value, \vfill, \vspace, \@wholewidth, \write}
%
% \title{The \textsf{\jobname} package\thanks{This document
%   corresponds to \textsf{\jobname}~\fileversion, dated \filedate.}}
% \author{Emilio Lazo Zaia\\ \texttt{< emiliolazozaia at gmail.com >}}
%
% \maketitle
%
% \tableofcontents
%
% \section{Introduction}
%
% |elzcards| is a package meant to be an easy and flexible way to typeset business cards, index cards and flash cards, with -optional- back side. You should bother only by setting the paper size, margins and the design of your cards\footnote{No predefined design is given; you must compose your cards.}. Everything else is done by |elzcards|.
%
% It uses the printable area of the paper to print the cards, so it relies on |\textwidth| and |\textheight| (not on |\paperwidth| and |\paperheight|) to calculate how many cards fits on a page.
%
% You should typeset the design of your cards with the macro provided for your case, depending on the type of card, followed by another macro to write them on the paper. Macros used to manage business cards are not the same as for index/flash cards because they are not the same thing. Business cards are all equal and they are repeated many times in a page. Index/flash cards are all different, so the macro to typeset index/flash cards manages a stack of cards. You should execute it many times as index/flash cards you have and all them will be stored internally to be processed when you have finished adding them.
%
% Index cards and flash cards are in essence the same; the package provides macros for ``both'' cases but they behave the same. Macro aliases for flash cards were added for completeness.
%
% \section{Usage}
%
% Please load your class (i.e. |article|) and load the package ({\itshape it doesn't has options}).
%
% \noindent {\color{RoyalBlue}|\documentclass{article}|}
%
% \noindent {\color{RoyalBlue}|\usepackage{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 cards,
%  \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 might use:
%
% \noindent {\color{RoyalBlue}|\usepackage[letterpaper,landscape,vmargin={0.25in,0.25in},hmargin={0.25in,0.25in}]|
%
% \hfill |{geometry}|}
%
% After |\begin|ning your |{document}|, you have four principal macros to produce the cards you want. These macros are:
% \begin{itemize}
%  \item |\BusinessCard| and |\IndexCard|\footnote{The package provides the alias \cs{FlashCard} for your convenience when writing flash cards but it is the same as \cs{IndexCard}.} to typeset business cards and index cards.
%  \item |\MakeBC| and |\MakeIC|\footnote{Also the package provides the alias \cs{MakeFC}.} to write them on paper.
% \end{itemize}
%
% The package prints cropping marks to guide the cutting of the cards; these cutting marks may be crosses inside the printed area, segments outside the printed area, dots inside and outside the printed area, or continuous lines. You can change the length of that segments, thickness of lines, size of dots and colors of all these cutting marks.
%
% \subsection{Typesetting the cards}
%
% You typeset (compose) your cards using macros described in this subsection; your cards will be stored internally in boxes or stacks and will be processed later by issuing the appropriate macro (described in the following subsection). Only two commands: storing cards, and later processing them.
%
% \noindent \DescribeMacro{\BusinessCard}{\color{RoyalBlue}|\BusinessCard|\marg{front side design}\oarg{back side design}}
%
% To produce a business card, you should issue the macro |\BusinessCard|. What you write as the first argument (with braces) will be the card's front face design, and its second -optional- argument (with square brackets) is the card's back side\footnote{There is no need to specify the |twoside| option when loading your class (i.e. |article| of whatever) even if you are writing twosided cards, but you must compile your document twice to be added the |twoside| option automatically to the compilation.}. Everything you put inside |{ }| and -optionally- inside |[ ]| will be stored in a box and nothing will be printed on the page until you issue a macro to process the cards and write them to the page (see the following subsection).
%
% \noindent \DescribeMacro{\IndexCard}{\color{RoyalBlue}|\IndexCard|\marg{front side design}\oarg{back side design}}
%
% \noindent \DescribeMacro{\FlashCard}{\color{RoyalBlue}|\FlashCard|\marg{front side design}\oarg{back side design}}
%
% To compose an index/flash card you have to issue |\IndexCard|\footnote{Or \cs{FlashCard}, which is the same command.}. This command has the same syntax as |\BusinessCard|, but it manages a stack of index/flash cards. You must invoke it many times as cards you have to add all them into the stack. You can add the number of cards you by want executing |\IndexCard| or |\FlashCard| many times {\bfseries no matter how many pages are needed to print all them}. All cards will be stored and and won't be processed until you invoke the macro intended to process them, described on the next subsection.
%
% \noindent \DescribeMacro{\CurrentIC}{\color{RoyalBlue}|\CurrentIC|}
% \noindent \DescribeMacro{\CurrentFC}{\color{RoyalBlue}|\CurrentFC|}
%
% \noindent \DescribeMacro{\TotalIC}{\color{RoyalBlue}|\TotalIC|}
% \noindent \DescribeMacro{\TotalFC}{\color{RoyalBlue}|\TotalFC|}
%
% With |\CurrentIC| and |\TotalIC|\footnote{Or their \texttt{FC} versions, which are the same.} you can access the counters associated with index/flash cards. When used {\bfseries inside a card}, the macro |\CurrentIC| prints the number of the current index/flash card and |\TotalIC| prints the total of cards stored in the stack. For example, you can add something like |Card: \CurrentIC{} of \TotalIC| somewhere on the content of your card if you are writing some type of numbered index cards.
%
% \subsection{Writing cards on paper}
%
% At this time, nothing has been written on paper. The macros described on past section {\bfseries only stores the contents of all cards}; to write them on paper you should issue |\MakeBC| for business cards or |\MakeIC|\footnote{Or \cs{MakeFC}, which is also an alias for convenience.} for index/flash cards.
%
% \noindent \DescribeMacro{\MakeBC}{\color{RoyalBlue}|\MakeBC[*]|\oarg{key-val comma separated list of options}}
%
% \noindent \DescribeMacro{\MakeIC}{\color{RoyalBlue}|\MakeIC[*]|\oarg{key-val comma separated list of options}}
%
% \noindent \DescribeMacro{\MakeFC}{\color{RoyalBlue}|\MakeFC[*]|\oarg{key-val comma separated list of options}}
%
% They have an optional star and a key-val list of options in square brackets. The key-val options are intented to change sizes, optional gaps between cards, and cutting options (these cutting or cropping options are described on next section). The star means that the {\slshape make} command won't clear the cards after processing them. Normally, when you execute any of these {\slshape make} commands, all cards processed are purged from memory and you must add them again to process them a second time. If you issue a {\slshape make} command with a star |*| you can use again a {\slshape make} command because the cards weren't removed from memory. Otherwise, without |*| all stacks and boxes will be cleared being ready to add a different set of cards.
%
% \subsection{key-val options: defining sizes, gaps and crop options}
%
% Both {\slshape make} commands accepts a key-val list of comma-separated options. These options are:
%
% {\tabcolsep4pt
% \begin{tabular}{lll}
%  Option & What changes? & \rmfamily Default value \\ \hline
%  hsize= & horizontal size of each card & |3.5in| on business cards \\
%                                       && |5in| on index/flash cards \\
%  vsize= & vertical size of each card & |2in| on business cards \\
%                                     && |3in| on index/flash cards \\
%  hgap= & horizontal gap between cards & |0pt| \\
%  vgap= & vertical gap between cards & |0pt| \\
%  segment length= & segment length (arista) when \\
%                  & marking with crosses or segments & |1mm| \\
%  line thickness= & line thickness when marking with \\
%                  & crosses, external segments or lines & |0.1mm| \\
%  dot size= & diameter of crop dots & |1pt| \\
%  crosses & use crosses as cropping marks & true \\
%  segments & use external segments as cropping marks & false \\
%  lines & use lines as cropping marks & false \\
%  dots & use dots as cropping marks & false \\
%  crop color & change color for cropping marks & \color{Red!90!Black} |90%| red and |10%| black \\
%  no marks & do not print cropping marks & false \\
% \end{tabular}}
%
% You can change whatever length on this list\footnote{All sizes and gaps on that list are lengths in the \LaTeX{} sense.}. Everything you won't specify will be taken from its default value, so nothing is mandatory. As you can see, business cards and index/flash cards has different default sizes, but both can be changed with |hsize| and |vsize| in the {\slshape make} command. Both gaps are set by default to zero, meaning no distance between cards. The default crop mark is the cross (which really are segments and crosses); if you want external segments, dots or lines, you must specify one of them. Using lines you'll have lines between all cards, like a grid. This might be useful also if you want the line as the border of the card, part of the design itself of the card. {\itshape Back side cards will have no cutting marks, they aren't needed.}
%
% \subsection{Changing default values and default options}
%
% You can change all the default behavior and values; it might be convenient instead of issuing {\slshape make} commands with parameters, specially if you are writing more than one set of cards in the same document and they shares some not-default options. Changing default values at some point of the document might be preferred than calling these {\slshape make} commands with optional arguments over and over. This package provides commands to change all default values in whatever place of the document and that will apply to every card onwards:
%
% {\parindent0pt
% \DescribeMacro{\BCdim}{\color{RoyalBlue}|\BCdim|\marg{h-size}\marg{v-size}}
%
% This command |\BCdim| takes two arguments, the default horizontal and vertical size of business cards. \\
% {\slshape Key-val options: |hsize=| and |vsize=|}
%
% \DescribeMacro{\ICdim}{\color{RoyalBlue}|\ICdim|\marg{h-size}\marg{v-size}}
% \DescribeMacro{\FCdim}
%
% With |\ICdim| or |\FCdim| you can change default size of index/flash cards, like as |\BCdim|. \\
% {\slshape Key-val options: |hsize=| and |vsize=|}
%
% \DescribeMacro{\CardGap}{\color{RoyalBlue}|\CardGap|\marg{h-gap}\marg{v-gap}}
%
% With |\CardGap| you can modify the default gap between cards. {\itshape If you specify only one parameter, this will be taken as the gap in both directions.} \\
% {\slshape Key-val options: |hgap=| and |vgap=|}
%
% \DescribeMacro{\SegmentLength}{\color{RoyalBlue}|\SegmentLength|\marg{segment length}}
%
% This macro may be used to change the segment length when using crosses or external segments as cutting marks. Applies when using crosses or external segments as cutting guides. \\
% {\slshape Key-val option: |segment length=|}
%
% \DescribeMacro{\LineThickness}{\color{RoyalBlue}|\LineThickness|\marg{line thickness}}
%
% |\LineThickness| changes the default thickness of the lines used for cutting the paper. Applies when using lines, crosses or segments as cutting guides. \\
% {\slshape Key-val option: |line thickness=|}
%
% \DescribeMacro{\DotSize}{\color{RoyalBlue}|\DotSize|\marg{dot size}}
%
% With |\DotSize| you can alter the diameter of the dots printed as a cutting guide. \\
% {\slshape Key-val option: |dot size=|}
%
% \DescribeMacro{\CropCrosses}{\color{RoyalBlue}|\CropCrosses|}
%
% This command make default drawing crosses and segments as crop marks. {\itshape That's the default, but you can change it with the followind two macros.} \\
% {\slshape Key-val option: |crosses|}
%
% \DescribeMacro{\CropSegments}{\color{RoyalBlue}|\CropSegments|}
%
% This command make default drawing {\slshape external} segments as crop marks. Unlike the crosses, there are no cutting marks printed on the internal part of paper, everything is printed on borders outside the printed area. \\
% {\slshape Key-val option: |segments|}
%
% \newpage
% \DescribeMacro{\CropLines}{\color{RoyalBlue}|\CropLines|}
%
% This command make default drawing lines as crop marks. \\
% {\slshape Key-val option: |lines|}
%
% \DescribeMacro{\CropDots}{\color{RoyalBlue}|\CropDots|}
%
% This command make default drawing dots as crop marks.\\
% {\slshape Key-val option: |dots|}
%
% \DescribeMacro{\CropColor}{\color{RoyalBlue}|\CropColor|}
%
% With |\CropColor| you can change the color used for cropping marks; the argument is the color name in the syntax of the |xcolor| package loaded with |usenames| and |dvipsnames| as its options. \\
% {\slshape Key-val option: |crop color|}
%
% \DescribeMacro{\NoCropMarks}{\color{RoyalBlue}|\NoCropMarks|}
%
% This command defaults not printing cutting marks. \\
% {\slshape Key-val option: |no marks|}
% }
%
% \section{Final words}
%
% In the same document you can typeset 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 gaps, 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 in |\documentclass| even when having cards with back side.
%
% Take into account that this is \LaTeX, so you can define your own commands and use them inside the |\BusinessCard| and |\IndexCard| macros, like in examples with macro |\mycenter|.
%
% \section{Sample output of a business card}
%
% In the next page you'll see the first set of business cards of the all-in-one included example whose code is the following:
% \begin{verbatim}
% \documentclass{article}
% \usepackage{elzcards}
% \usepackage{geometry}
% \geometry{vmargin={0.5in,0.5in},hmargin={0.75in,0.75in}}
% \newcommand{\mycenter}[1]{%
%  \vspace*{2pt}\hspace*{2pt}$\nwarrow$ top left corner\vfill
%  \begin{center}\LARGE#1\end{center}%
%  \vfill\hfill bottom right corner $\searrow$\hspace*{2pt}\vspace*{2pt}}
% \begin{document}
% \BusinessCard{\mycenter{Business card \\ only front side \\ default options}}%
% \MakeBC
% \end{document}
% \end{verbatim}
%
% \savegeometry{migeo}
% \newgeometry{vmargin={0.5in,0.5in},hmargin={0.75in,0.75in}}
% \newcommand{\mycenter}[1]{%
%  \vspace*{2pt}\hspace*{2pt}$\nwarrow$ top left corner\vfill
%  \begin{center}\LARGE#1\end{center}%
%  \vfill\hfill bottom right corner $\searrow$\hspace*{2pt}\vspace*{2pt}}
% \BusinessCard{\mycenter{Business card \\ only front side \\ default options}}%
% \MakeBC
% \newpage
% \loadgeometry{migeo}
%
% \section{Code of the all-in-one example included}
%
% The following example is included as |elzcards-examples.tex|.
%
% \StopEventually{\clearpage\PrintIndex\PrintChanges}
%
%    \begin{macrocode}
%<*ejemplo>
\documentclass{article}
\usepackage{elzcards}
\usepackage[landscape,letterpaper,vmargin={0.25in,0.25in},hmargin={0.25in,0.25in}]{geometry}

\newcommand{\mycenter}[1]{%
 \vspace*{2pt}\hspace*{2pt}$\nwarrow$ top left corner\vfill
 \begin{center}\LARGE#1\end{center}%
 \vfill\hfill bottom right corner $\searrow$\hspace*{2pt}\vspace*{2pt}}

\begin{document}
 %% Printing business cards with different options, showing all elzcards can do:
 \BusinessCard{\mycenter{Business card \\ only front side \\ default options}}
 \MakeBC

 \BusinessCard{\mycenter{Business card \\ front side \\ vertical shaped \\
  with thicker and longer external segments}}%
  [\mycenter{Business card \\ back side \\ vertical shaped}]
 \MakeBC[segments,hsize=2in, vsize=3.5in, line thickness=1pt, segment length=0.5cm]

 \BusinessCard{\mycenter{Business card \\ only front side \\ with dots}}
 %% Using \MakeBC* to avoid purging the card from memory:
 \MakeBC*[dots]

 %% We can do \MakeBC again because we've used \MakeBC* before:
 \MakeBC[crop color=blue]

 \BusinessCard{\mycenter{Business card \\ only front side \\ with big dots and gaps}}
 \MakeBC[dots, dot size=4pt, hgap=1.666cm, vgap=0.666cm]

 \BusinessCard{\mycenter{Business card \\ only front side \\ with lines}}
 \MakeBC[crop color=green, lines]

 \BusinessCard{\mycenter{Business card \\ only front side \\ with thicker lines}}
 \MakeBC[lines, line thickness=2pt]

 \BusinessCard{\mycenter{Business card \\ only front side \\ without cropping marks}}
 \MakeBC[no marks]

 \BusinessCard{\mycenter{Business card \\ front side \\ other size \\ with gaps}}%
  [\mycenter{Business card \\ back side \\ other size \\ with gaps}]
 %% We can specify the size also with \BCdim command; this will make default that change onwards:
 \BCdim{74mm}{52mm}
 \MakeBC[segments,hgap=1.666cm, vgap=0.666cm]

 %% Testing with index/flash cards:
 \IndexCard{\mycenter{Index/flash card \\ front side \CurrentIC{} of \TotalIC}}%
  [\mycenter{Index/flash card \CurrentIC{} of \TotalIC \\ back side}]
 %% Note that not all cards has back side.
 \IndexCard{\mycenter{Index/flash card \\ only front side \CurrentIC{} of \TotalIC}}
 \IndexCard{\mycenter{Index/flash card \\ only front side \CurrentIC{} of \TotalIC}}
 \IndexCard{\mycenter{Index/flash card \\ front side \CurrentIC{} of \TotalIC}}%
  [\mycenter{Index/flash card \CurrentIC{} of \TotalIC \\ back side}]
 \IndexCard{\mycenter{Index/flash card \\ only front side \CurrentIC{} of \TotalIC}}
 \IndexCard{\mycenter{Index/flash card \\ only front side \CurrentIC{} of \TotalIC}}
 \IndexCard{\mycenter{Index/flash card \\ only front side \CurrentIC{} of \TotalIC}}
 %% Now \MakeIC* instead of \MakeIC,
 %% so we can process the same set of cards again with \MakeIC or \MakeIC*.
 \MakeIC*

 %% We redefine some default parameters instead of giving options to \MakeIC:
 \CardGap{0.5cm}{0.5cm}
 \SegmentLength{10pt}
 \LineThickness{1pt}
 \CropColor{Orange}
 \CropSegments
 %% \MakeIC* again because we did use \MakeIC* before and the cards weren't cleared:
 \MakeIC*[hsize=2.5in,vsize=1.5in]

 %% We redefine again some default parameters:
 \CardGap{0pt}{0pt}
 \ICdim{4in}{2in}
 \DotSize{1mm}
 \CropDots
 %% Also we can change some other defaults with
 %% \CropCrosses, \CropLines, \NoCropMarks and \CropColor.
 %% \MakeFC is an alias to \MakeIC:
 \MakeFC*[hgap=0pt, vgap=0pt]
\end{document}
%</ejemplo>
%    \end{macrocode}
%
% \section{Implementation}
%
%    \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{elzcards}[2017/07/09 v1.23 ELZ cards]

\RequirePackage{calc}
\RequirePackage{xparse}
\RequirePackage{keyval}
\RequirePackage[usenames,dvipsnames]{xcolor}

\newif\if@elzc@cruces
\newif\if@elzc@segmentos
\newif\if@elzc@puntos
\newif\if@elzc@lineas
\newif\if@elzc@sinmarcas
\newif\if@elzc@tarjeta
\newif\if@elzc@tarjetaconreverso
\newif\if@elzc@fichaconreverso
\newif\if@elzc@conreverso
\newif\if@elzc@reverso

\newlength{\elzc@TarjXdim}
\newlength{\elzc@TarjYdim}
\newlength{\elzc@SeparaX}
\newlength{\elzc@SeparaY}
\newlength{\elzc@TempLen}
\newlength{\elzc@TempUnitLength}
\newlength{\elzc@DefTPXdim}
\newlength{\elzc@DefTPYdim}
\newlength{\elzc@DefFichaXdim}
\newlength{\elzc@DefFichaYdim}
\newlength{\elzc@DefSeparaX}
\newlength{\elzc@DefSeparaY}
\newlength{\elzc@DefArista}
\newlength{\elzc@DefPunto}
\newlength{\elzc@DefLinea}

\newcounter{elzc@TarjXdim}
\newcounter{elzc@TarjYdim}
\newcounter{elzc@PapelX}
\newcounter{elzc@PapelY}
\newcounter{elzc@NumX}
\newcounter{elzc@NumY}
\newcounter{elzc@NumXY}
\newcounter{elzc@ContX}
\newcounter{elzc@ContY}
\newcounter{elzc@PosX}
\newcounter{elzc@PosY}
\newcounter{elzc@SeparaX}
\newcounter{elzc@SeparaY}
\newcounter{elzc@XInicial}
\newcounter{elzc@RestoX}
\newcounter{elzc@Punto}
\newcounter{elzc@Arista}
\newcounter{elzc@Fichas}
\newcounter{elzc@FichaActual}
\newcounter{elzc@TempNumX}
\newcounter{elzc@TempNumY}
\newcounter{elzc@TempMarcaX}
\newcounter{elzc@TempMarcaY}
\newcounter{elzc@TempFichaActualRev}
\newcounter{elzc@TempInfo}

\def\elzc@aux@cruces{%
 \@elzc@crucestrue\@elzc@segmentostrue\@elzc@puntosfalse\@elzc@lineasfalse\@elzc@sinmarcasfalse}
\def\elzc@aux@segmentos{%
 \@elzc@crucesfalse\@elzc@segmentostrue\@elzc@puntosfalse\@elzc@lineasfalse\@elzc@sinmarcasfalse}
\def\elzc@aux@puntos{%
 \@elzc@crucesfalse\@elzc@segmentosfalse\@elzc@puntostrue\@elzc@lineasfalse\@elzc@sinmarcasfalse}
\def\elzc@aux@lineas{%
 \@elzc@crucesfalse\@elzc@segmentosfalse\@elzc@puntosfalse\@elzc@lineastrue\@elzc@sinmarcasfalse}
\def\elzc@aux@sinmarcas{%
 \@elzc@crucesfalse\@elzc@segmentosfalse\@elzc@puntosfalse\@elzc@lineasfalse\@elzc@sinmarcastrue}

\define@key{ELZc}{hsize}{\setlength{\elzc@TarjXdim}{#1}}
\define@key{ELZc}{vsize}{\setlength{\elzc@TarjYdim}{#1}}
\define@key{ELZc}{hgap}{\setlength{\elzc@SeparaX}{#1}}
\define@key{ELZc}{vgap}{\setlength{\elzc@SeparaY}{#1}}
\define@key{ELZc}{segment length}{%
 \setlength{\elzc@TempLen}{#1}\setcounter{elzc@Arista}{\elzc@TempLen}}
\define@key{ELZc}{dot size}{\setlength{\elzc@TempLen}{#1}\setcounter{elzc@Punto}{\elzc@TempLen}}
\define@key{ELZc}{line thickness}{\linethickness{#1}}
\define@key{ELZc}{crosses}[true]{\elzc@aux@cruces}
\define@key{ELZc}{segments}[true]{\elzc@aux@segmentos}
\define@key{ELZc}{dots}[true]{\elzc@aux@puntos}
\define@key{ELZc}{lines}[true]{\elzc@aux@lineas}
\define@key{ELZc}{crop color}{\def\elzc@ColorMarcas{#1}}
\define@key{ELZc}{no marks}[true]{\elzc@aux@sinmarcas}

\newcommand*{\CurrentIC}{\arabic{elzc@FichaActual}}
\newcommand*{\TotalIC}{\arabic{elzc@Fichas}}
\let\CurrentFC\CurrentIC
\let\TotalFC\TotalIC

\newcommand*{\BCdim}[2]{\setlength{\elzc@DefTPXdim}{#1}\setlength{\elzc@DefTPYdim}{#2}}
\newcommand*{\ICdim}[2]{\setlength{\elzc@DefFichaXdim}{#1}\setlength{\elzc@DefFichaYdim}{#2}}
\let\FCdim\ICdim

\NewDocumentCommand{\CardGap}{m g}{%
 \setlength{\elzc@DefSeparaX}{#1}%
 \IfValueTF{#2}{\setlength{\elzc@DefSeparaY}{#2}}{\setlength{\elzc@DefSeparaY}{#1}}}

\newcommand*{\SegmentLength}[1]{\setlength{\elzc@DefArista}{#1}}
\newcommand*{\DotSize}[1]{\setlength{\elzc@DefPunto}{#1}}
\newcommand*{\LineThickness}[1]{\setlength{\elzc@DefLinea}{#1}}

\newcommand*{\CropCrosses}{\def\elzc@DefMarcasCorte{\elzc@aux@cruces}}
\newcommand*{\CropSegments}{\def\elzc@DefMarcasCorte{\elzc@aux@segmentos}}
\newcommand*{\CropDots}{\def\elzc@DefMarcasCorte{\elzc@aux@puntos}}
\newcommand*{\CropLines}{\def\elzc@DefMarcasCorte{\elzc@aux@lineas}}
\newcommand*{\CropColor}[1]{\def\elzc@DefColorMarcas{#1}}
\newcommand*{\NoCropMarks}{\def\elzc@DefMarcasCorte{\elzc@aux@sinmarcas}}

\NewDocumentCommand{\MakeBC}{s o}{%
 \ifx\undefined\@elzc@TarjetaAnverso
  \PackageError{elzcards}{There are no business cards defined}{}%
 \else
  \@elzc@tarjetatrue
  \if@elzc@tarjetaconreverso \@elzc@conreversotrue \else \@elzc@conreversofalse \fi
  \elzc@Predeterminados
  \setlength{\elzc@TarjXdim}{\elzc@DefTPXdim}%
  \setlength{\elzc@TarjYdim}{\elzc@DefTPYdim}%
  \IfValueT{#2}{\setkeys{ELZc}{#2}}%
  \elzc@Tarjetas
  \IfBooleanF{#1}{\elzc@TodoCero}%
 \fi}

\NewDocumentCommand{\MakeIC}{s o}{%
 \ifnum \value{elzc@Fichas} = 0%
  \PackageError{elzcards}{There are no index/flash cards in stack}{}%
 \else
  \@elzc@tarjetafalse
  \if@elzc@fichaconreverso \@elzc@conreversotrue \else \@elzc@conreversofalse \fi
  \elzc@Predeterminados
  \setlength{\elzc@TarjXdim}{\elzc@DefFichaXdim}%
  \setlength{\elzc@TarjYdim}{\elzc@DefFichaYdim}%
  \IfValueT{#2}{\setkeys{ELZc}{#2}}%
  \elzc@Tarjetas
  \IfBooleanF{#1}{\elzc@TodoCero*}%
 \fi}
\let\MakeFC\MakeIC

\NewDocumentCommand{\BusinessCard}{+m +o}{%
 \ifx\undefined\@elzc@TarjetaAnverso
  \def\@elzc@TarjetaAnverso{#1}%
  \IfValueTF{#2}{%
   \@elzc@tarjetaconreversotrue
   \def\@elzc@TarjetaReverso{#2}%
   \immediate\write\@auxout{\string\@twosidetrue\string\@mparswitchtrue}}
  {\def\@elzc@TarjetaReverso{}}
 \else
  \PackageError{elzcards}{There are business cards already defined}{}%
 \fi}

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

\newcommand*{\elzc@Cuadricula}{%
 \setlength{\elzc@TempUnitLength}{\unitlength}%
 \setlength{\unitlength}{1sp}%
 \setlength{\parindent}{0pt}%
 \thispagestyle{empty}%
 \setcounter{elzc@NumX}{0}%
 \setcounter{elzc@NumY}{0}%
 \setcounter{elzc@TempNumX}{0}%
 \setcounter{elzc@TempNumY}{0}%
 \setcounter{elzc@TarjXdim}{\elzc@TarjXdim}%
 \setcounter{elzc@TarjYdim}{\elzc@TarjYdim}%
 \setcounter{elzc@SeparaX}{\elzc@SeparaX}%
 \setcounter{elzc@SeparaY}{\elzc@SeparaY}%
 \setcounter{elzc@PapelX}{\textwidth}%
 \setcounter{elzc@PapelY}{\textheight}%
 \loop \ifnum\value{elzc@TempNumX} < \value{elzc@PapelX}%
  \advance\value{elzc@TempNumX} by \value{elzc@TarjXdim}{%
   \addtocounter{elzc@NumX}{1}%
   \addtocounter{elzc@TempNumX}{\value{elzc@SeparaX}}}%
 \repeat
 \loop \ifnum\value{elzc@TempNumY} < \value{elzc@PapelY}%
  \advance\value{elzc@TempNumY} by \value{elzc@TarjYdim}{%
   \addtocounter{elzc@NumY}{1}%
   \addtocounter{elzc@TempNumY}{\value{elzc@SeparaY}}}%
 \repeat
 \addtocounter{elzc@TempNumX}{-\value{elzc@SeparaX}}%
 \addtocounter{elzc@TempNumY}{-\value{elzc@SeparaY}}%
 \ifnum\value{elzc@TempNumX} > \value{elzc@PapelX}%
  \addtocounter{elzc@NumX}{-1}%
 \fi
 \ifnum\value{elzc@TempNumY} > \value{elzc@PapelY}%
  \addtocounter{elzc@NumY}{-1}%
 \fi
 \setcounter{elzc@NumXY}{\value{elzc@NumX} * \value{elzc@NumY}}%
 \setcounter{elzc@ContX}{-1}%
 \setcounter{elzc@ContY}{-1}%
 \setcounter{elzc@RestoX}{- \value{elzc@PapelX} + \value{elzc@NumX} *%
  (\value{elzc@TarjXdim} + \value{elzc@SeparaX}) - \value{elzc@SeparaX}}%
 \elzc@Informacion
 \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@reverso
     \setcounter{elzc@PosX}{(\value{elzc@NumX} - \value{elzc@ContX} - 1) * \value{elzc@TarjXdim}%
      + (\value{elzc@NumX} - \value{elzc@ContX} - 1) * \value{elzc@SeparaX}}%
    \else
     \setcounter{elzc@PosX}{\value{elzc@ContX} * (\value{elzc@TarjXdim} + \value{elzc@SeparaX})}%
    \fi
    \setcounter{elzc@PosY}{\value{elzc@ContY} * (\value{elzc@TarjYdim} + \value{elzc@SeparaY})}%
    \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}){%
        \setlength{\unitlength}{\elzc@TempUnitLength}%
        \parbox[t][\elzc@TarjYdim]{\elzc@TarjXdim}{%
         \if@elzc@tarjeta
          \if@elzc@reverso \@elzc@TarjetaReverso \else \@elzc@TarjetaAnverso \fi
         \else
          \ifnum\value{elzc@FichaActual} < \value{elzc@Fichas}%
           \addtocounter{elzc@FichaActual}{1}%
           \addtocounter{elzc@TempFichaActualRev}{1}%
           \if@elzc@reverso
            \expandafter\csname @elzc@FichaReverso\romannumeral\value{elzc@FichaActual}\endcsname
           \else
            \expandafter\csname @elzc@FichaAnverso\romannumeral\value{elzc@FichaActual}\endcsname
           \fi
          \fi
         \fi}}}%
     \fi
    \fi
    \if@elzc@reverso \else \elzc@CalculaMarcas \fi
   }\repeat
  }\repeat
 \end{picture}}

\newcommand*{\elzc@Tarjetas}{%
 {\pagestyle{empty}\cleardoublepage}%
 \elzc@Cuadricula
 \if@elzc@conreverso
  \@elzc@reversotrue
  \if@elzc@tarjeta \else \addtocounter{elzc@FichaActual}{-\value{elzc@TempFichaActualRev}}\fi
  \setcounter{elzc@XInicial}{\value{elzc@RestoX}}%
  \clearpage
  \elzc@Cuadricula
  \setcounter{elzc@XInicial}{0}%
  \@elzc@reversofalse
 \fi
 \if@elzc@tarjeta
 \else
  \setcounter{elzc@TempFichaActualRev}{0}%
  \ifnum\value{elzc@FichaActual} < \value{elzc@Fichas}%
   \elzc@Tarjetas
  \fi
  \setcounter{elzc@FichaActual}{0}%
 \fi
 \clearpage}

\NewDocumentCommand{\elzc@TodoCero}{s}{%
 \IfBooleanTF{#1}{%
  \setcounter{elzc@Fichas}{0}%
  \@elzc@fichaconreversofalse}
 {\let\@elzc@TarjetaAnverso\undefined
  \let\@elzc@TarjetaReverso\undefined
  \@elzc@tarjetaconreversofalse}}

\newcommand*{\elzc@Predeterminados}{%
 \elzc@DefMarcasCorte
 \setlength{\elzc@SeparaX}{\elzc@DefSeparaX}%
 \setlength{\elzc@SeparaY}{\elzc@DefSeparaY}%
 \setlength{\elzc@TempLen}{\elzc@DefArista}\setcounter{elzc@Arista}{\elzc@TempLen}%
 \setlength{\elzc@TempLen}{\elzc@DefPunto}\setcounter{elzc@Punto}{\elzc@TempLen}%
 \linethickness{\elzc@DefLinea}%
 \let\elzc@ColorMarcas\elzc@DefColorMarcas}

\newcommand*{\elzc@CalculaMarcas}{%
 \setcounter{elzc@TempMarcaX}{\value{elzc@PosX}}%
 \setcounter{elzc@TempMarcaY}{\value{elzc@PosY}}%
 \ifnum \value{elzc@ContX} = \value{elzc@NumX}%
 \else
  \ifnum \value{elzc@ContY} = \value{elzc@NumY}%
  \else
   \elzc@DibujaMarcas{\value{elzc@TempMarcaX}}{\value{elzc@TempMarcaY}}%
  \fi
 \fi
 \addtocounter{elzc@TempMarcaX}{-\value{elzc@SeparaX}}%
 \ifnum \value{elzc@ContX} = 0%
 \else
  \ifnum \value{elzc@ContY} = \value{elzc@NumY}%
  \else
   \elzc@DibujaMarcas{\value{elzc@TempMarcaX}}{\value{elzc@TempMarcaY}}%
  \fi
 \fi
 \addtocounter{elzc@TempMarcaY}{-\value{elzc@SeparaY}}%
 \ifnum \value{elzc@ContX} = 0%
 \else
  \ifnum \value{elzc@ContY} = 0%
  \else
   \elzc@DibujaMarcas{\value{elzc@TempMarcaX}}{\value{elzc@TempMarcaY}}%
  \fi
 \fi
 \addtocounter{elzc@TempMarcaX}{\value{elzc@SeparaX}}%
 \ifnum \value{elzc@ContY} = 0%
 \else
  \ifnum \value{elzc@ContX} = \value{elzc@NumX}%
  \else
   \elzc@DibujaMarcas{\value{elzc@TempMarcaX}}{\value{elzc@TempMarcaY}}%
  \fi
 \fi}

\newcommand*{\elzc@DibujaMarcas}[2]{%
 \ifnum \value{elzc@ContX} = 0%
  \if@elzc@segmentos\put(#1,#2){\color{\elzc@ColorMarcas}\line(-1,0){\value{elzc@Arista}}}\fi
  \if@elzc@puntos\put(#1,#2){\color{\elzc@ColorMarcas}\circle*{\value{elzc@Punto}}}\fi
 \else
  \ifnum \value{elzc@ContX} = \value{elzc@NumX}%
   \if@elzc@segmentos\put(#1,#2){\color{\elzc@ColorMarcas}\line(2,0){\value{elzc@Arista}}}\fi
   \if@elzc@puntos\put(#1,#2){\color{\elzc@ColorMarcas}\circle*{\value{elzc@Punto}}}\fi
  \else
   \if@elzc@cruces
    \put(#1,#2){\color{\elzc@ColorMarcas}\line(-1,0){\value{elzc@Arista}}}%
    \put(#1,#2){\color{\elzc@ColorMarcas}\line(2,0){\value{elzc@Arista}}}%
   \fi
   \if@elzc@puntos\put(#1,#2){\color{\elzc@ColorMarcas}\circle*{\value{elzc@Punto}}}\fi
   \if@elzc@lineas
    \put(#1,#2){\color{\elzc@ColorMarcas}\line(-1,0){\value{elzc@TarjXdim}}}%
    \put(#1,#2){\color{\elzc@ColorMarcas}\line(2,0){\value{elzc@TarjXdim}}}%
   \fi
  \fi
 \fi
 \ifnum \value{elzc@ContY} = 0%
  \if@elzc@segmentos\put(#1,#2){\color{\elzc@ColorMarcas}\line(0,-1){\value{elzc@Arista}}}\fi
  \if@elzc@puntos\put(#1,#2){\color{\elzc@ColorMarcas}\circle*{\value{elzc@Punto}}}\fi
 \else
  \ifnum \value{elzc@ContY} = \value{elzc@NumY}%
   \if@elzc@segmentos\put(#1,#2){\color{\elzc@ColorMarcas}\line(0,0){\value{elzc@Arista}}}\fi
   \if@elzc@puntos\put(#1,#2){\color{\elzc@ColorMarcas}\circle*{\value{elzc@Punto}}}\fi
  \else
   \if@elzc@cruces
    \put(#1,#2){\color{\elzc@ColorMarcas}\line(0,0){\value{elzc@Arista}}}%
    \put(#1,#2){\color{\elzc@ColorMarcas}\line(0,-1){\value{elzc@Arista}}}%
   \fi
   \if@elzc@puntos\put(#1,#2){\color{\elzc@ColorMarcas}\circle*{\value{elzc@Punto}}}\fi
   \if@elzc@lineas
    \put(#1,#2){\color{\elzc@ColorMarcas}\line(0,0){\value{elzc@TarjYdim}}}%
    \put(#1,#2){\color{\elzc@ColorMarcas}\line(0,-1){\value{elzc@TarjYdim}}}%
   \fi
  \fi
 \fi}

\newcommand*{\elzc@Informacion}{%
 \message{^^JProcessing}%
 \if@elzc@tarjeta
  \message{business cards,}%
 \else
  \message{index/flash cards,}%
  \setcounter{elzc@TempInfo}{\value{elzc@NumXY} + \value{elzc@FichaActual}}%
  \ifnum \value{elzc@TempInfo} > \value{elzc@Fichas}%
   \setcounter{elzc@TempInfo}{\value{elzc@Fichas}}%
  \fi
  \addtocounter{elzc@FichaActual}{1}%
  \message{current=\arabic{elzc@FichaActual}-\arabic{elzc@TempInfo},
   total=\arabic{elzc@Fichas},}%
  \addtocounter{elzc@FichaActual}{-1}%
 \fi
 \if@elzc@reverso\message{back side,^^J}\else\message{front side,^^J}\fi
 \message{ per page: \arabic{elzc@NumXY} (\arabic{elzc@NumX}x\arabic{elzc@NumY}),}%
 \message{ hsize=\the\elzc@TarjXdim, vsize=\the\elzc@TarjYdim,
  hgap=\the\elzc@SeparaX, vgap=\the\elzc@SeparaY,^^J}%
 \if@elzc@cruces
  \message{ with crosses,}%
  \setlength{\elzc@TempLen}{\value{elzc@Arista}sp}%
  \message{segment length=\the\elzc@TempLen, line thickness=\the\@wholewidth.^^J}%
 \fi
 \if@elzc@segmentos
  \message{ with segments,}%
  \setlength{\elzc@TempLen}{\value{elzc@Arista}sp}%
  \message{segment length=\the\elzc@TempLen, line thickness=\the\@wholewidth.^^J}%
 \fi
 \if@elzc@puntos
  \message{ with dots,}%
  \setlength{\elzc@TempLen}{\value{elzc@Punto}sp}%
  \message{dot size=\the\elzc@TempLen.^^J}%
 \fi
 \if@elzc@lineas
  \message{ with lines, line thickness=\the\@wholewidth.^^J}%
 \fi
 \if@elzc@sinmarcas
  \message{ without cropping marks.^^J}%
 \fi}

\setlength{\elzc@DefTPXdim}{3.5in}
\setlength{\elzc@DefTPYdim}{2in}
\setlength{\elzc@DefFichaXdim}{5in}
\setlength{\elzc@DefFichaYdim}{3in}
\setlength{\elzc@DefSeparaX}{0cm}
\setlength{\elzc@DefSeparaY}{0cm}
\setlength{\elzc@DefArista}{1mm}
\setlength{\elzc@DefPunto}{1pt}
\setlength{\elzc@DefLinea}{0.1mm}
\CropColor{Red!90!Black}
\CropCrosses

\InputIfFileExists{\jobname.aux}{}\relax

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