diff options
author | Karl Berry <karl@freefriends.org> | 2017-07-13 23:08:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-07-13 23:08:44 +0000 |
commit | 7a82689ba1c07aced1fac2c02a632b6d0853c5df (patch) | |
tree | 96260a375af9eeb137152ff73cc8dc6744388eb9 | |
parent | 6938e212db9e63d120bed570f29715dd487fa0ff (diff) |
elzcards (10jul17)
git-svn-id: svn://tug.org/texlive/trunk@44785 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/elzcards/elzcards-example.tex | 84 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/elzcards/elzcards-examples.pdf | bin | 0 -> 47554 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/elzcards/elzcards-examples.tex | 109 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/elzcards/elzcards.pdf | bin | 90569 -> 120195 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/elzcards/elzcards.dtx | 391 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/elzcards/elzcards.ins | 12 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/elzcards/elzcards.sty | 135 |
7 files changed, 445 insertions, 286 deletions
diff --git a/Master/texmf-dist/doc/latex/elzcards/elzcards-example.tex b/Master/texmf-dist/doc/latex/elzcards/elzcards-example.tex deleted file mode 100644 index b1fcf0647d5..00000000000 --- a/Master/texmf-dist/doc/latex/elzcards/elzcards-example.tex +++ /dev/null @@ -1,84 +0,0 @@ -%% -%% This is file `elzcards-example.tex', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% elzcards.dtx (with options: `ejemplo') -%% -%% 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.sty and -%% elzcards-example.tex. -%% -\documentclass{article} -\usepackage{elzcards} -\usepackage[landscape,letterpaper,vmargin={0.25in,0.25in},hmargin={0.25in,0.25in}]{geometry} -\newcommand{\mycenter}[1]{% - top left corner\vfill\mbox{}% - \begin{center}\LARGE#1\end{center}% - \mbox{}\vfill \hfill bottom right corner} -\begin{document} - \BusinessCard{\mycenter{Business card \\ only front side \\ default options}} - \MakeBC - \BusinessCard{\mycenter{Business card \\ front side \\ other size: vertical \\ - with thicker and longer crosses}}% - [\mycenter{Business card \\ front side \\ other size: vertical}] - \MakeBC[hsize=2in, vsize=3.5in, line thickness=1pt, segment length=0.5cm] - \BusinessCard{\mycenter{Business card \\ only front side \\ with dots}} - \MakeBC[dots] - \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[lines] - \BusinessCard{\mycenter{Business card \\ only front side \\ with thicker lines}} - \MakeBC[lines, line thickness=2pt] - \BusinessCard{\mycenter{Business card \\ front side \\ other size \\ with gaps}}% - [\mycenter{Business card \\ other size \\ back side}] - %% We can specify size also with \BCdim command, outsize of \MakeBC command: - \BCdim{74mm}{52mm} - \MakeBC[hgap=1.666cm, vgap=0.666cm] - \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 \\ front side \CurrentIC{} of \TotalIC}} - \IndexCard{\mycenter{Index/flash card \\ 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 \\ front side \CurrentIC{} of \TotalIC}} - \IndexCard{\mycenter{Index/flash card \\ front side \CurrentIC{} of \TotalIC}} - \IndexCard{\mycenter{Index/flash card \\ front side \CurrentIC{} of \TotalIC}} - %% Now \MakeIC* instead of \MakeIC, so we can process them again with \MakeIC or \MakeIC*. - \MakeIC* - %% We define some default parameters instead of giving options to \MakeIC: - \ICgap{0.5cm}{0.5cm} - \CrossSegment{10pt} - \LineThickness{1pt} - %% \MakeIC* again because we did use \MakeIC* before: - \MakeIC* - \FCgap{0pt}{0pt}% \FCgap is an alias to \ICgap. - \ICdim{6in}{4in} - \DotSize{1mm} - \CropDots - %% \CropCrosses - %% \CropLines - \MakeFC*% \MakeFC is an alias to \MakeIC. -\end{document} -%% -%% -%% End of file `elzcards-example.tex'. diff --git a/Master/texmf-dist/doc/latex/elzcards/elzcards-examples.pdf b/Master/texmf-dist/doc/latex/elzcards/elzcards-examples.pdf Binary files differnew file mode 100644 index 00000000000..85ee1b7e704 --- /dev/null +++ b/Master/texmf-dist/doc/latex/elzcards/elzcards-examples.pdf diff --git a/Master/texmf-dist/doc/latex/elzcards/elzcards-examples.tex b/Master/texmf-dist/doc/latex/elzcards/elzcards-examples.tex new file mode 100644 index 00000000000..dc13070b7be --- /dev/null +++ b/Master/texmf-dist/doc/latex/elzcards/elzcards-examples.tex @@ -0,0 +1,109 @@ +%% +%% This is file `elzcards-examples.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% elzcards.dtx (with options: `ejemplo') +%% +%% 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. +%% +\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} +%% +%% +%% End of file `elzcards-examples.tex'. diff --git a/Master/texmf-dist/doc/latex/elzcards/elzcards.pdf b/Master/texmf-dist/doc/latex/elzcards/elzcards.pdf Binary files differindex 76c71f29670..9f146da6968 100644 --- a/Master/texmf-dist/doc/latex/elzcards/elzcards.pdf +++ b/Master/texmf-dist/doc/latex/elzcards/elzcards.pdf diff --git a/Master/texmf-dist/source/latex/elzcards/elzcards.dtx b/Master/texmf-dist/source/latex/elzcards/elzcards.dtx index 36910448114..9aed607ee06 100644 --- a/Master/texmf-dist/source/latex/elzcards/elzcards.dtx +++ b/Master/texmf-dist/source/latex/elzcards/elzcards.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % elzcards.dtx -% Copyright 2015 Emilio Lazo Zaia <emiliolazozaia@gmail.com> +% 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 @@ -19,7 +19,7 @@ % % This work consists of the files README and elzcards.dtx with % its derived files elzcards.ins, elzcards.sty and -% elzcards-example.tex. +% elzcards-examples.tex. % %<*internalbatchfile> \def\nameofplainTeX{plain} @@ -32,7 +32,7 @@ \input docstrip.tex \preamble -Copyright 2015 Emilio Lazo Zaia <emiliolazozaia@gmail.com> +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 @@ -50,7 +50,7 @@ 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-example.tex. +elzcards-examples.tex. \endpreamble \keepsilent @@ -74,8 +74,8 @@ elzcards-example.tex. \Msg{\jobname.ins written.} %</internalbatchfile> %<*batchfile> -\generate{\file{\jobname-example.tex}{\from{\jobname.dtx}{ejemplo}}} -\Msg{\jobname-example.tex written.} +\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} @@ -98,22 +98,28 @@ elzcards-example.tex. % %<*driver> \documentclass{ltxdoc} -\usepackage[letterpaper,vmargin={3cm,2cm},hmargin={3cm,2cm}]{geometry} +\usepackage[letterpaper,vmargin={2.5cm,2cm},hmargin={3cm,2cm}]{geometry} \usepackage[usenames,dvipsnames]{color} \usepackage[english]{babel} -\usepackage{paralist,calc,array} +\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{922} +% \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 @@ -142,10 +148,15 @@ elzcards-example.tex. % \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, \CropMarksSize, \csname, \def, \define@key, \documentclass, \else, \@elzc@conreversofalse, \@elzc@conreversotrue, \elzc@DefArista, \elzc@DefFichaXdim, \elzc@DefFichaYdim, \elzc@DefLinea, \elzc@DefPunto, \elzc@DefSeparaX, \elzc@DefSeparaY, \elzc@DefTPXdim, \elzc@DefTPYdim, \@elzc@fichaconreversofalse, \@elzc@fichaconreversotrue, \@elzc@guiasfalse, \@elzc@guiastrue, \@elzc@lineasfalse, \@elzc@lineastrue, \@elzc@puntosfalse, \@elzc@puntostrue, \@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, \if@elzc@conreverso, \if@elzc@fichaconreverso, \if@elzc@guias, \if@elzc@lineas, \if@elzc@puntos, \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, \PackageError, \parbox, \parindent, \ProvidesPackage, \put, \relax, \repeat, \RequirePackage, \romannumeral, \setcounter, \setkeys, \setlength, \string, \textheight, \textwidth, \the, \thispagestyle, \TotalFC, \TotalIC, \@twosidetrue, \undefined, \unitlength, \usepackage, \value, \vfill, \@wholewidth, \write} +% \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.}} @@ -157,15 +168,17 @@ elzcards-example.tex. % % \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 must bother only by setting the paper size, margins and the design of your cards\footnote{No predefined design is given; you must typeset your cards.}. Everything else is done by |elzcards|. +% |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 in a page. +% 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 the cards with one macro the package provides, followed by another macro to write them on paper. Macros used to manage business cards are not the same as for index/flash cards. Business cards are all equal, one design is repeated many times in a page, but 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 cards you have and all them will be stored to be processed when you have finished adding them. However, index cards and flash cards are in essence the same; the package provides macros for ``both'' cases but they behave the same. Macros aliases for flash cards were added for completeness. +% 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 does not have options.} +% Please load your class (i.e. |article|) and load the package ({\itshape it doesn't has options}). % % \noindent {\color{RoyalBlue}|\documentclass{article}|} % @@ -179,7 +192,7 @@ elzcards-example.tex. % \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 would use: +% \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}]| % @@ -187,21 +200,25 @@ elzcards-example.tex. % % After |\begin|ning your |{document}|, you have four principal macros to produce the cards you want. These macros are: % \begin{itemize} -% \item |\BusinessCard| and |\MakeBC| to typeset business cards, and -% \item |\IndexCard| and |\MakeIC| to typeset index cards and flash cards\footnote{Also the package provides the aliases \cs{FlashCard} and \cs{MakeFC} for your convenience when writing flash cards but they are the same as its corresponding index cards macros.}. +% \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 command |\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 the class even if you are writing twosided cards, but you must compile your document twice.}. Everything you put inside |{ }| and inside |[ ]| will be stored in a box and repeated in a grid until the page has been filled. +% 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 produce an index/flash card you have |\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 should execute it many times as cards you have to add all them into the stack. You can add the number of cards you want with many instances of |\IndexCard|. All these cards will be processed when you issue the {\slshape make} command, no matter how many pages are needed to print all them. +% 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|} @@ -209,11 +226,11 @@ elzcards-example.tex. % \noindent \DescribeMacro{\TotalIC}{\color{RoyalBlue}|\TotalIC|} % \noindent \DescribeMacro{\TotalFC}{\color{RoyalBlue}|\TotalFC|} % -% With |\CurrentIC| and |\TotalIC| you can access the counters associated with index/flash cards. |\CurrentIC| prints the number of the current index/flash card and |\TotalIC| print the total of card. For example, you can add something like |Card: \CurrentIC{} of \TotalIC| somewhere on the content of your cards. +% 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 yet on the paper. The commands described on previous section only define contents of the 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 index/flash cards. +% 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}} % @@ -221,90 +238,136 @@ elzcards-example.tex. % % \noindent \DescribeMacro{\MakeFC}{\color{RoyalBlue}|\MakeFC[*]|\oarg{key-val comma separated list of options}} % -% They have a possible star and a key-val list of options, both optional with square brackets. The key-val options are intented to change sizes, gaps and crop options (as described on next section). The star means that the {\slshape make} command won't clear all cards it has processed. Normally, when you execute any of these {\slshape make} commands, a later execution of it will have no cards to process. If you issue a {\slshape make} command with a star |*| you may later use the same {\slshape make} command every time you want without adding again the same set of cards. Otherwise, without |*| all cards are purged. +% 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, crop options} +% \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| in business cards, |5in| on index/flash cards \\ -% vsize= & vertical size of each card & |2in| in business cards, |3in| on index/flash cards \\ -% hgap= & horizontal gap between cards & 0pt \\ +% 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 (arista) of crop crosses & |1mm| \\ +% 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| \\ -% line thickness= & thickness of crop line & |0.1mm| \\ -% crosses & use crosses as crop marks & true \\ -% dots & use dots as crop marks & false \\ -% lines & use lines as crop marks & false \\ +% 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 may change whatever length on this list\footnote{All these key-val options except the latter three are \LaTeX{} length.}. Everything you don't specify will be taken from its default value. As you can see, business cards and index/flash cards have 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 dots or lines you must specify it. Using lines you'll have lines between all 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. {\itshape Back side cards will have no crop marks.} +% 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 options} +% \subsection{Changing default values and default options} % -% You can change all the default behavior and values; it may be convenient instead of issuing {\slshape make} commands with parameters, specially if you typeset more than one set of cards in the same document, which uses the same lengths and are different than default values. Changing default values at some point of the document may 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: +% 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: % -% \newpage -% \noindent \DescribeMacro{\BCdim}{\color{RoyalBlue}|\BCdim|\marg{h-size}\marg{v-size}} +% {\parindent0pt +% \DescribeMacro{\BCdim}{\color{RoyalBlue}|\BCdim|\marg{h-size}\marg{v-size}} % -% This command |\BCdim| takes two arguments, the horizontal and vertical default size of business cards. {\slshape Key-val options: |hsize=| and |vsize=|.} +% This command |\BCdim| takes two arguments, the default horizontal and vertical size of business cards. \\ +% {\slshape Key-val options: |hsize=| and |vsize=|} % -% \noindent \DescribeMacro{\ICdim}{\color{RoyalBlue}|\ICdim|\marg{h-size}\marg{v-size}} +% \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 with |\BCdim|. {\slshape Key-val options: |hsize=| and |vsize=|.} +% With |\ICdim| or |\FCdim| you can change default size of index/flash cards, like as |\BCdim|. \\ +% {\slshape Key-val options: |hsize=| and |vsize=|} % -% \noindent \DescribeMacro{\BCgap}{\color{RoyalBlue}|\BCgap|\marg{h-gap}\marg{v-gap}} -% \DescribeMacro{\ICgap} -% \DescribeMacro{\FCgap} +% \DescribeMacro{\CardGap}{\color{RoyalBlue}|\CardGap|\marg{h-gap}\marg{v-gap}} % -% With |\BCgap|, |\ICgap| or |\FCgap| you can change the gap between cards. |elzcards| doesn't manages gaps differently between business cards and index/flash cards, like in the case of the above commands representing sizes. {\itshape If you specify only one parameter, this will be taken as the gap in both directions.} {\slshape Key-val options: |hgap=| and |vgap=|.} +% 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=|} % -% \noindent \DescribeMacro{\CrossSegment}{\color{RoyalBlue}|\CrossSegment|\marg{segment length}} +% \DescribeMacro{\SegmentLength}{\color{RoyalBlue}|\SegmentLength|\marg{segment length}} % -% This macro can be used to change the length of segments used as crop marks. {\slshape Key-val option: |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=|} % -% {\parindent0pt -% \DescribeMacro{\DotSize}{\color{RoyalBlue}|\DotSize|\marg{dot size}} +% \DescribeMacro{\LineThickness}{\color{RoyalBlue}|\LineThickness|\marg{line thickness}} % -% With |\DotSize| you can change the diameter of the dots. {\slshape Key-val option: |dot size=|} +% |\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{\LineThickness}{\color{RoyalBlue}|\LineThickness|\marg{thickness}} +% \DescribeMacro{\DotSize}{\color{RoyalBlue}|\DotSize|\marg{dot size}} % -% |\LineThickness| changes the default value of the thickness of the line. {\slshape Key-val option: |line thickness=|.} +% 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 may change it with the followind two macros.} {\slshape Key-val option: |crosses|.} +% 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|.} +% This command make default drawing dots as crop marks.\\ +% {\slshape Key-val option: |dots|} +% +% \DescribeMacro{\CropColor}{\color{RoyalBlue}|\CropColor|} % -% \DescribeMacro{\CropCrosses}{\color{RoyalBlue}|\CropLines|} +% 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|} % -% This command make default drawing lines as crop marks. {\slshape Key-val option: |lines|.} +% \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|. +% 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 following page you'll see the first set of business cards of the all-in-one included example: +% 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]{top left corner\vfill\mbox{}% -% \begin{center}\LARGE#1\end{center}\mbox{}\vfill \hfill bottom right corner} +% \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 @@ -312,7 +375,7 @@ elzcards-example.tex. % % \section{Code of the all-in-one example included} % -% The following example is included as |elzcards-example.tex|. +% The following example is included as |elzcards-examples.tex|. % % \StopEventually{\clearpage\PrintIndex\PrintChanges} % @@ -321,55 +384,80 @@ elzcards-example.tex. \documentclass{article} \usepackage{elzcards} \usepackage[landscape,letterpaper,vmargin={0.25in,0.25in},hmargin={0.25in,0.25in}]{geometry} + \newcommand{\mycenter}[1]{% - top left corner\vfill\mbox{}% + \vspace*{2pt}\hspace*{2pt}$\nwarrow$ top left corner\vfill \begin{center}\LARGE#1\end{center}% - \mbox{}\vfill \hfill bottom right corner} + \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 \\ other size: vertical \\ - with thicker and longer crosses}}% - [\mycenter{Business card \\ front side \\ other size: vertical}] - \MakeBC[hsize=2in, vsize=3.5in, line thickness=1pt, segment length=0.5cm] + + \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}} - \MakeBC[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[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 \\ other size \\ back side}] - %% We can specify size also with \BCdim command, outsize of \MakeBC command: + [\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[hgap=1.666cm, vgap=0.666cm] + \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 \\ front side \CurrentIC{} of \TotalIC}} - \IndexCard{\mycenter{Index/flash card \\ 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}} \IndexCard{\mycenter{Index/flash card \\ front side \CurrentIC{} of \TotalIC}}% [\mycenter{Index/flash card \CurrentIC{} of \TotalIC \\ back side}] - \IndexCard{\mycenter{Index/flash card \\ front side \CurrentIC{} of \TotalIC}} - \IndexCard{\mycenter{Index/flash card \\ front side \CurrentIC{} of \TotalIC}} - \IndexCard{\mycenter{Index/flash card \\ front side \CurrentIC{} of \TotalIC}} - %% Now \MakeIC* instead of \MakeIC, so we can process them again with \MakeIC or \MakeIC*. + \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 define some default parameters instead of giving options to \MakeIC: - \ICgap{0.5cm}{0.5cm} - \CrossSegment{10pt} + + %% We redefine some default parameters instead of giving options to \MakeIC: + \CardGap{0.5cm}{0.5cm} + \SegmentLength{10pt} \LineThickness{1pt} - %% \MakeIC* again because we did use \MakeIC* before: - \MakeIC* - \FCgap{0pt}{0pt}% \FCgap is an alias to \ICgap. - \ICdim{6in}{4in} + \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 - %% \CropCrosses - %% \CropLines - \MakeFC*% \MakeFC is an alias to \MakeIC. + %% 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} @@ -379,15 +467,18 @@ elzcards-example.tex. % \begin{macrocode} %<*package> \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{elzcards}[2015/04/26 v1.20 ELZ cards] +\ProvidesPackage{elzcards}[2017/07/09 v1.23 ELZ cards] \RequirePackage{calc} \RequirePackage{xparse} \RequirePackage{keyval} +\RequirePackage[usenames,dvipsnames]{xcolor} -\newif\if@elzc@guias +\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 @@ -436,6 +527,17 @@ elzcards-example.tex. \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}} @@ -444,41 +546,36 @@ elzcards-example.tex. \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@guiastrue\@elzc@puntosfalse\@elzc@lineasfalse} -\define@key{ELZc}{dots}[true]{\@elzc@guiasfalse\@elzc@puntostrue\@elzc@lineasfalse} -\define@key{ELZc}{lines}[true]{\@elzc@guiasfalse\@elzc@puntosfalse\@elzc@lineastrue} +\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}} -\let\CurrentFC\CurrentIC - \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{\BCgap}{m g}{% +\NewDocumentCommand{\CardGap}{m g}{% \setlength{\elzc@DefSeparaX}{#1}% - \IfValueTF{#2}{\setlength{\elzc@DefSeparaY}{#2}}{\setlength{\elzc@DefSeparaY}{#1}}}% -\let\ICgap\BCgap -\let\FCgap\BCgap - -\newcommand*{\CrossSegment}[1]{\setlength{\elzc@DefArista}{#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*{\CropDots}{% - \def\elzc@DefMarcasCorte{\@elzc@guiasfalse\@elzc@puntostrue\@elzc@lineasfalse}} - -\newcommand*{\CropCrosses}{% - \def\elzc@DefMarcasCorte{\@elzc@guiastrue\@elzc@puntosfalse\@elzc@lineasfalse}} - -\newcommand*{\CropLines}{% - \def\elzc@DefMarcasCorte{\@elzc@guiasfalse\@elzc@puntosfalse\@elzc@lineastrue}} +\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 @@ -495,7 +592,7 @@ elzcards-example.tex. \fi} \NewDocumentCommand{\MakeIC}{s o}{% - \ifnum \value{elzc@Fichas} = 0 + \ifnum \value{elzc@Fichas} = 0% \PackageError{elzcards}{There are no index/flash cards in stack}{}% \else \@elzc@tarjetafalse @@ -510,12 +607,16 @@ elzcards-example.tex. \let\MakeFC\MakeIC \NewDocumentCommand{\BusinessCard}{+m +o}{% - \def\@elzc@TarjetaAnverso{#1}% - \IfValueTF{#2}{% - \@elzc@tarjetaconreversotrue - \def\@elzc@TarjetaReverso{#2}% - \immediate\write\@auxout{\string\@twosidetrue\string\@mparswitchtrue}} - {\def\@elzc@TarjetaReverso{}}} + \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}% @@ -563,7 +664,7 @@ elzcards-example.tex. \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} * + \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)% @@ -618,7 +719,7 @@ elzcards-example.tex. \else \setcounter{elzc@TempFichaActualRev}{0}% \ifnum\value{elzc@FichaActual} < \value{elzc@Fichas}% - \elzc@Tarjetas% + \elzc@Tarjetas \fi \setcounter{elzc@FichaActual}{0}% \fi @@ -638,7 +739,8 @@ elzcards-example.tex. \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}} + \linethickness{\elzc@DefLinea}% + \let\elzc@ColorMarcas\elzc@DefColorMarcas} \newcommand*{\elzc@CalculaMarcas}{% \setcounter{elzc@TempMarcaX}{\value{elzc@PosX}}% @@ -677,40 +779,40 @@ elzcards-example.tex. \newcommand*{\elzc@DibujaMarcas}[2]{% \ifnum \value{elzc@ContX} = 0% - \if@elzc@guias\put(#1,#2){\line(-1,0){\value{elzc@Arista}}}\fi - \if@elzc@puntos\put(#1,#2){\circle*{\value{elzc@Punto}}}\fi + \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@guias\put(#1,#2){\line(2,0){\value{elzc@Arista}}}\fi - \if@elzc@puntos\put(#1,#2){\circle*{\value{elzc@Punto}}}\fi + \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@guias - \put(#1,#2){\line(-1,0){\value{elzc@Arista}}}% - \put(#1,#2){\line(2,0){\value{elzc@Arista}}}% + \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){\circle*{\value{elzc@Punto}}}\fi + \if@elzc@puntos\put(#1,#2){\color{\elzc@ColorMarcas}\circle*{\value{elzc@Punto}}}\fi \if@elzc@lineas - \put(#1,#2){\line(-1,0){\value{elzc@TarjXdim}}}% - \put(#1,#2){\line(2,0){\value{elzc@TarjXdim}}}% + \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@guias\put(#1,#2){\line(0,-1){\value{elzc@Arista}}}\fi - \if@elzc@puntos\put(#1,#2){\circle*{\value{elzc@Punto}}}\fi + \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@guias\put(#1,#2){\line(0,0){\value{elzc@Arista}}}\fi - \if@elzc@puntos\put(#1,#2){\circle*{\value{elzc@Punto}}}\fi + \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@guias - \put(#1,#2){\line(0,0){\value{elzc@Arista}}}% - \put(#1,#2){\line(0,-1){\value{elzc@Arista}}}% + \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){\circle*{\value{elzc@Punto}}}\fi + \if@elzc@puntos\put(#1,#2){\color{\elzc@ColorMarcas}\circle*{\value{elzc@Punto}}}\fi \if@elzc@lineas - \put(#1,#2){\line(0,0){\value{elzc@TarjYdim}}}% - \put(#1,#2){\line(0,-1){\value{elzc@TarjYdim}}}% + \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} @@ -734,11 +836,16 @@ elzcards-example.tex. \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@guias + \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}% @@ -746,6 +853,9 @@ elzcards-example.tex. \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} @@ -757,6 +867,7 @@ elzcards-example.tex. \setlength{\elzc@DefArista}{1mm} \setlength{\elzc@DefPunto}{1pt} \setlength{\elzc@DefLinea}{0.1mm} +\CropColor{Red!90!Black} \CropCrosses \InputIfFileExists{\jobname.aux}{}\relax diff --git a/Master/texmf-dist/source/latex/elzcards/elzcards.ins b/Master/texmf-dist/source/latex/elzcards/elzcards.ins index fdf48937156..c7e9110fb4e 100644 --- a/Master/texmf-dist/source/latex/elzcards/elzcards.ins +++ b/Master/texmf-dist/source/latex/elzcards/elzcards.ins @@ -6,7 +6,7 @@ %% %% elzcards.dtx (with options: `batchfile') %% -%% Copyright 2015 Emilio Lazo Zaia <emiliolazozaia@gmail.com> +%% 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 @@ -24,12 +24,12 @@ %% %% This work consists of the files README and elzcards.dtx with %% its derived files elzcards.ins, elzcards.sty and -%% elzcards-example.tex. +%% elzcards-examples.tex. %% \input docstrip.tex \preamble -Copyright 2015 Emilio Lazo Zaia <emiliolazozaia@gmail.com> +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 @@ -47,7 +47,7 @@ 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-example.tex. +elzcards-examples.tex. \endpreamble \keepsilent @@ -65,8 +65,8 @@ elzcards-example.tex. \Msg{Change history and index updated.} \postamble \endpostamble -\generate{\file{\jobname-example.tex}{\from{\jobname.dtx}{ejemplo}}} -\Msg{\jobname-example.tex written.} +\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} diff --git a/Master/texmf-dist/tex/latex/elzcards/elzcards.sty b/Master/texmf-dist/tex/latex/elzcards/elzcards.sty index cd73ddea302..4c44bbb4d28 100644 --- a/Master/texmf-dist/tex/latex/elzcards/elzcards.sty +++ b/Master/texmf-dist/tex/latex/elzcards/elzcards.sty @@ -6,7 +6,7 @@ %% %% elzcards.dtx (with options: `package') %% -%% Copyright 2015 Emilio Lazo Zaia <emiliolazozaia@gmail.com> +%% 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 @@ -24,18 +24,21 @@ %% %% This work consists of the files README and elzcards.dtx with %% its derived files elzcards.ins, elzcards.sty and -%% elzcards-example.tex. +%% elzcards-examples.tex. %% \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{elzcards}[2015/04/26 v1.20 ELZ cards] +\ProvidesPackage{elzcards}[2017/07/09 v1.23 ELZ cards] \RequirePackage{calc} \RequirePackage{xparse} \RequirePackage{keyval} +\RequirePackage[usenames,dvipsnames]{xcolor} -\newif\if@elzc@guias +\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 @@ -84,6 +87,17 @@ \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}} @@ -92,41 +106,36 @@ \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@guiastrue\@elzc@puntosfalse\@elzc@lineasfalse} -\define@key{ELZc}{dots}[true]{\@elzc@guiasfalse\@elzc@puntostrue\@elzc@lineasfalse} -\define@key{ELZc}{lines}[true]{\@elzc@guiasfalse\@elzc@puntosfalse\@elzc@lineastrue} +\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}} -\let\CurrentFC\CurrentIC - \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{\BCgap}{m g}{% +\NewDocumentCommand{\CardGap}{m g}{% \setlength{\elzc@DefSeparaX}{#1}% - \IfValueTF{#2}{\setlength{\elzc@DefSeparaY}{#2}}{\setlength{\elzc@DefSeparaY}{#1}}}% -\let\ICgap\BCgap -\let\FCgap\BCgap - -\newcommand*{\CrossSegment}[1]{\setlength{\elzc@DefArista}{#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*{\CropDots}{% - \def\elzc@DefMarcasCorte{\@elzc@guiasfalse\@elzc@puntostrue\@elzc@lineasfalse}} - -\newcommand*{\CropCrosses}{% - \def\elzc@DefMarcasCorte{\@elzc@guiastrue\@elzc@puntosfalse\@elzc@lineasfalse}} - -\newcommand*{\CropLines}{% - \def\elzc@DefMarcasCorte{\@elzc@guiasfalse\@elzc@puntosfalse\@elzc@lineastrue}} +\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 @@ -143,7 +152,7 @@ \fi} \NewDocumentCommand{\MakeIC}{s o}{% - \ifnum \value{elzc@Fichas} = 0 + \ifnum \value{elzc@Fichas} = 0% \PackageError{elzcards}{There are no index/flash cards in stack}{}% \else \@elzc@tarjetafalse @@ -158,12 +167,16 @@ \let\MakeFC\MakeIC \NewDocumentCommand{\BusinessCard}{+m +o}{% - \def\@elzc@TarjetaAnverso{#1}% - \IfValueTF{#2}{% - \@elzc@tarjetaconreversotrue - \def\@elzc@TarjetaReverso{#2}% - \immediate\write\@auxout{\string\@twosidetrue\string\@mparswitchtrue}} - {\def\@elzc@TarjetaReverso{}}} + \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}% @@ -211,7 +224,7 @@ \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} * + \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)% @@ -266,7 +279,7 @@ \else \setcounter{elzc@TempFichaActualRev}{0}% \ifnum\value{elzc@FichaActual} < \value{elzc@Fichas}% - \elzc@Tarjetas% + \elzc@Tarjetas \fi \setcounter{elzc@FichaActual}{0}% \fi @@ -286,7 +299,8 @@ \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}} + \linethickness{\elzc@DefLinea}% + \let\elzc@ColorMarcas\elzc@DefColorMarcas} \newcommand*{\elzc@CalculaMarcas}{% \setcounter{elzc@TempMarcaX}{\value{elzc@PosX}}% @@ -325,40 +339,40 @@ \newcommand*{\elzc@DibujaMarcas}[2]{% \ifnum \value{elzc@ContX} = 0% - \if@elzc@guias\put(#1,#2){\line(-1,0){\value{elzc@Arista}}}\fi - \if@elzc@puntos\put(#1,#2){\circle*{\value{elzc@Punto}}}\fi + \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@guias\put(#1,#2){\line(2,0){\value{elzc@Arista}}}\fi - \if@elzc@puntos\put(#1,#2){\circle*{\value{elzc@Punto}}}\fi + \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@guias - \put(#1,#2){\line(-1,0){\value{elzc@Arista}}}% - \put(#1,#2){\line(2,0){\value{elzc@Arista}}}% + \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){\circle*{\value{elzc@Punto}}}\fi + \if@elzc@puntos\put(#1,#2){\color{\elzc@ColorMarcas}\circle*{\value{elzc@Punto}}}\fi \if@elzc@lineas - \put(#1,#2){\line(-1,0){\value{elzc@TarjXdim}}}% - \put(#1,#2){\line(2,0){\value{elzc@TarjXdim}}}% + \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@guias\put(#1,#2){\line(0,-1){\value{elzc@Arista}}}\fi - \if@elzc@puntos\put(#1,#2){\circle*{\value{elzc@Punto}}}\fi + \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@guias\put(#1,#2){\line(0,0){\value{elzc@Arista}}}\fi - \if@elzc@puntos\put(#1,#2){\circle*{\value{elzc@Punto}}}\fi + \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@guias - \put(#1,#2){\line(0,0){\value{elzc@Arista}}}% - \put(#1,#2){\line(0,-1){\value{elzc@Arista}}}% + \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){\circle*{\value{elzc@Punto}}}\fi + \if@elzc@puntos\put(#1,#2){\color{\elzc@ColorMarcas}\circle*{\value{elzc@Punto}}}\fi \if@elzc@lineas - \put(#1,#2){\line(0,0){\value{elzc@TarjYdim}}}% - \put(#1,#2){\line(0,-1){\value{elzc@TarjYdim}}}% + \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} @@ -382,11 +396,16 @@ \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@guias + \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}% @@ -394,6 +413,9 @@ \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} @@ -405,6 +427,7 @@ \setlength{\elzc@DefArista}{1mm} \setlength{\elzc@DefPunto}{1pt} \setlength{\elzc@DefLinea}{0.1mm} +\CropColor{Red!90!Black} \CropCrosses \InputIfFileExists{\jobname.aux}{}\relax |