From 52b0e32085cb75500c155e9a18ac2d372e4cc46a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 5 Jun 2008 00:43:53 +0000 Subject: envlab update (2jun08) git-svn-id: svn://tug.org/texlive/trunk@8573 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/envlab/envlab.cfg | 25 +- Master/texmf-dist/tex/latex/envlab/envlab.sty | 485 +++++++++++++++++--------- 2 files changed, 336 insertions(+), 174 deletions(-) (limited to 'Master/texmf-dist/tex/latex/envlab') diff --git a/Master/texmf-dist/tex/latex/envlab/envlab.cfg b/Master/texmf-dist/tex/latex/envlab/envlab.cfg index 581ee89a987..24ebea4675f 100644 --- a/Master/texmf-dist/tex/latex/envlab/envlab.cfg +++ b/Master/texmf-dist/tex/latex/envlab/envlab.cfg @@ -1,21 +1,23 @@ -%% +%% %% This is file `envlab.cfg', %% generated with the docstrip utility. -%% +%% %% The original source files were: -%% +%% %% envlab.dtx (with options: `cfg') %% -%% You are allowed and encouraged to modify THIS file. %% -%% The first part of this file contains default options for your site. -%% The second part (inside AtEndOfPackage declaration) should contain -%% customization commands specific to your site. +%% You are allowed and encouraged to modify THIS file. +%% +%% The first part of this file contains default options for your site. +%% The second part (inside AtEndOfPackage declaration) should contain +%% customization commands specific to your site. %% -%% Good luck +%% Good luck %% %% -%% Copyright Boris Veytsman 1996 +\ProvidesFile{envlab.cfg} +[1997/07/16 v1.2 Envelopes and Labels] %% %% \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 @@ -32,15 +34,16 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} +%% \changes{v1.2}{1996/07/16}{Updated User Guide} %% %% The default options go here %% \ExecuteOptions{businessenvelope,rotateenvelopes,centerenvelopes} \ExecuteOptions{printbarcodes,capaddress} -\ExecuteOptions{nopswait,printreturnaddress} +\ExecuteOptions{nopswait,printreturnaddress,nopsautotray,nore} %% \AtEndOfPackage{\relax % Customization goes here } \endinput -%% +%% %% End of file `envlab.cfg'. diff --git a/Master/texmf-dist/tex/latex/envlab/envlab.sty b/Master/texmf-dist/tex/latex/envlab/envlab.sty index e9a5dc090b5..3d1db1ea4ce 100644 --- a/Master/texmf-dist/tex/latex/envlab/envlab.sty +++ b/Master/texmf-dist/tex/latex/envlab/envlab.sty @@ -1,22 +1,30 @@ -%% +%% %% This is file `envlab.sty', %% generated with the docstrip utility. -%% +%% %% The original source files were: -%% +%% %% envlab.dtx (with options: `package') %% %% IMPORTANT NOTICE: %% %% For the copyright see the source file. %% -%% You are *not* allowed to modify this file. +%% Any modified versions of this file must be renamed +%% with new filenames distinct from envlab.sty. %% -%% You are *not* allowed to distribute this file. -%% For distribution of the original source see -%% the terms for copying and modification in the file envlab.dtx. +%% For distribution of the original source see the terms +%% for copying and modification in the file envlab.dtx. %% -%% Copyright Boris Veytsman 1996 +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +\ProvidesPackage{envlab} +[1997/07/16 v1.2 Envelopes and Labels] +%% +%% Copyright Boris Veytsman 1996, 1997 +%% %% %% \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 @@ -33,8 +41,8 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} +%% \changes{v1.2}{1996/07/16}{Updated User Guide} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{envlab}[1996/07/15 v1.1 Envelopes and Labels] \def\envlab@oops{% \PackageError{envlab}% {Envlab is used outside of \MessageBreak% @@ -47,21 +55,29 @@ \PackageInfo{envlab}% {Envelopes & Labels package: found makelabels...\MessageBreak% Seems everything is OK. Good luck.}} -\expandafter\ifx\csname makelabels\endcsname \relax % - \envlab@oops\else\envlab@ok\fi +\@ifundefined{makelabels}{\envlab@oops}{\envlab@ok} \newif\if@envelope \@envelopetrue +\newif\if@biglabel +\@biglabelfalse \newif\if@rotateenvelopes \@rotateenvelopestrue \newif\if@printreturnaddress \@printreturnaddresstrue -\newcount\@envelopeposition \@envelopeposition=0\relax +\newcount\@envelopeposition +\@envelopeposition=0\relax \newif\if@pswait \@pswaitfalse +\newif\if@psautotray +\@psautotrayfalse +\newtoks\PSEnvelopeTray +\PSEnvelopeTray={/otherenvelopetray } \newif\if@barcodes \newif\if@alwaysbarcodes \@barcodestrue \@alwaysbarcodesfalse +\newif\if@EL@redefine@opening +\@EL@redefine@openingfalse \newif\if@capitalizeaddress \@capitalizeaddresstrue \newlength{\EnvelopeWidth} @@ -85,6 +101,7 @@ \newlength{\ToAddressWidth} \DeclareRobustCommand{\SetEnvelope}[3][0pt]{% \@envelopetrue% + \@biglabelfalse% \setlength{\EnvelopeTopMargin}{#1}% \setlength{\EnvelopeWidth}{#2}% \setlength{\EnvelopeHeight}{#3}% @@ -97,6 +114,7 @@ \setlength{\ToAddressWidth}{3in}} \DeclareRobustCommand{\SetLabel}[7]{% \@envelopefalse% + \@biglabelfalse% \setlength{\LabelWidth}{#1}% \setlength{\LabelHeight}{#2}% \setlength{\LabelTopMargin}{#3}% @@ -109,13 +127,37 @@ \setlength{\ToAddressWidth}{\LabelWidth}% \addtolength{\ToAddressWidth}{-\ToAddressLeftMargin}% \addtolength{\ToAddressWidth}{-\LabelRightMargin}} -\DeclareOption{businessenvelope}{\SetEnvelope{9.5in}{4.125in}} -\DeclareOption{executiveenvelope}{\SetEnvelope{7.5in}{3.875in}} +\DeclareRobustCommand{\SetBigLabel}[7]{% + \@envelopefalse% + \@biglabeltrue% + \setlength{\LabelWidth}{#1}% + \setlength{\LabelHeight}{#2}% + \setlength{\LabelTopMargin}{#3}% + \setlength{\LabelLeftMargin}{#4}% + \setlength{\LabelRightMargin}{#5}% + \setcounter{LabelMaxCol}{#6}% + \setcounter{LabelMaxRow}{#7}% + \setlength{\FromAddressTopMargin}{0.0in}% + \setlength{\FromAddressLeftMargin}{0.5in}% + \setlength{\FromAddressHeight}{0.33\LabelHeight}% + \setlength{\ToAddressTopMargin}{0.1in}% + \setlength{\ToAddressLeftMargin}{0.5in}% + \setlength{\ToAddressWidth}{\LabelWidth}% + \addtolength{\ToAddressWidth}{-\ToAddressLeftMargin}% + \addtolength{\ToAddressWidth}{-\LabelRightMargin}% + \setlength{\FromAddressWidth}{\ToAddressWidth}} +\DeclareOption{businessenvelope}{\SetEnvelope{9.5in}{4.125in}% + \PSEnvelopeTray={/com10envelopetray }} +\DeclareOption{executiveenvelope}{\SetEnvelope{7.5in}{3.875in}% + \PSEnvelopeTray={/monarcenvelopetray }} \DeclareOption{bookletenvelope}{\SetEnvelope{10.5in}{7.5in}} \DeclareOption{personalenvelope}{\SetEnvelope{6.5in}{3.625in}} \DeclareOption{c6envelope}{\SetEnvelope{162mm}{114mm}} \DeclareOption{c65envelope}{\SetEnvelope{224mm}{114mm}} -\DeclareOption{c5envelope}{\SetEnvelope{229mm}{162mm}} +\DeclareOption{c5envelope}{\SetEnvelope{229mm}{162mm}% + \PSEnvelopeTray={/162x229cenvelopetray }} +\DeclareOption{dlenvelope}{\SetEnvelope{220mm}{110mm}% + \PSEnvelopeTray={/dlenvelopetray }} \DeclareOption{avery5160label}{% \SetLabel{2.75in}{1in}{0.5in}{0.19in}{0.12in}{3}{10}} \DeclareOption{avery5161label}{% @@ -126,6 +168,15 @@ \SetLabel{4.19in}{2in}{0.5in}{0.16in}{0.19in}{2}{5}} \DeclareOption{avery5164label}{% \SetLabel{4.19in}{3.33in}{0.5in}{0.16in}{0.19in}{2}{3}} +\DeclareOption{herma4625label}{% + \SetLabel{105mm}{42.3mm}{0mm}{5mm}{5mm}{2}{7}} +\DeclareOption{avery5262label}{% + \SetLabel{110mm}{34mm}{21mm}{4mm}{5mm}{2}{7}} +\DeclareOption{avery5163biglabel}{% + \SetBigLabel{4.19in}{2in}{0.5in}{0.16in}{0.19in}{2}{5}% + \setlength{\ToAddressTopMargin}{0.1in}}% +\DeclareOption{avery5164biglabel}{% + \SetBigLabel{4.19in}{3.33in}{0.5in}{0.16in}{0.19in}{2}{3}}% \DeclareOption{rotateenvelopes}{\@rotateenvelopestrue} \DeclareOption{norotateenvelopes}{\@rotateenvelopesfalse} \DeclareOption{centerenvelopes}{\@envelopeposition=0\relax} @@ -140,19 +191,19 @@ \DeclareOption{nocapaddress}{\@capitalizeaddressfalse} \DeclareOption{printreturnaddress}{\@printreturnaddresstrue} \DeclareOption{noprintreturnaddress}{\@printreturnaddressfalse} -\DeclareOption{pswait}{\@pswaittrue} +\DeclareOption{pswait}{\@pswaittrue\@psautotrayfalse} \DeclareOption{nopswait}{\@pswaitfalse} +\DeclareOption{psautotray}{\@psautotraytrue\@pswaitfalse} +\DeclareOption{nopsautotray}{\@psautotrayfalse} +\DeclareOption{re}{\@EL@redefine@openingtrue} +\DeclareOption{nore}{\@EL@redefine@openingfalse} \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphics}} \ExecuteOptions{businessenvelope,rotateenvelopes,centerenvelopes} \ExecuteOptions{printbarcodes,capaddress} -\ExecuteOptions{nopswait,printreturnaddress} +\ExecuteOptions{nopswait,printreturnaddress,nopsautotray,nore} \InputIfFileExists{envlab.cfg}{% \typeout{Loading configuration file envlab.cfg}}{% \typeout{Configuration file envlab.cfg is not found}} -%% -%% The default options go here -%% -%% \ProcessOptions \IfFileExists{graphics.sty}{% \RequirePackage{graphics}}{% @@ -165,8 +216,17 @@ \def\AtBeginLabels{\g@addto@macro\@beginlabelshook} \def\AtBeginLabelPage{\g@addto@macro\@beginlabelpagehook} \def\PSwait{\special{ps: clear grestore @manualfeed 0 0 bop}} +\edef\PSautotray{% + \special{ps:clear grestore + statusdict begin false setduplexmode + /manualfeed true def + \the\PSEnvelopeTray end 0 0 bop }} \if@pswait \AtBeginLabels{\PSwait}% +\else + \if@psautotray + \AtBeginLabels{\PSautotray}% + \fi \fi \newcounter{LabelCountCol} \newcounter{LabelCountRow} @@ -177,83 +237,89 @@ \DeclareRobustCommand{\FirstLabel}[2]{% \setcounter{LabelOffsetRow}{#1}% \setcounter{LabelOffsetCol}{#2}} -\ifcase\the\@envelopeposition - \setlength{\EnvelopeLeftMargin}{\paperwidth} - \if@rotateenvelopes - \addtolength{\EnvelopeLeftMargin}{-\EnvelopeHeight} - \else - \addtolength{\EnvelopeLeftMargin}{-\EnvelopeWidth} - \fi - \setlength{\EnvelopeLeftMargin}{0.5\EnvelopeLeftMargin} -\or - \setlength{\EnvelopeLeftMargin}{0pt} -\or - \setlength{\EnvelopeLeftMargin}{\paperwidth} - \if@rotateenvelopes - \addtolength{\EnvelopeLeftMargin}{-\EnvelopeHeight} - \else - \addtolength{\EnvelopeLeftMargin}{-\EnvelopeWidth} - \fi -\else - \relax -\fi \def\@toaddressfont{% \ifcase\@ptsize \large\or\normalsize\or\small\fi% \sffamily\selectfont} \def\@fromaddressfont{% \ifcase\@ptsize \normalsize\or\small\or\footnotesize\fi% \normalfont} -\def\returnaddress{\if@envelope \fromaddress\else\relax\fi} +\def\returnaddress{\fromaddress} \def\startlabels{% - \pagestyle{empty} - \setlength{\topmargin}{-1.0in} + \clearpage% + \pagestyle{empty}% + \setlength{\topmargin}{-1.0in}% + \if@envelope% + \addtolength{\topmargin}{\EnvelopeTopMargin}% + \else \addtolength{\topmargin}{\LabelTopMargin}% + \fi% + \setlength{\headheight}{0pt}% + \setlength{\headsep}{0pt}% + \setlength{\footskip}{0pt}% + \setlength{\textheight}{200in}% + \setlength\paperheight{\textheight}% + \global\vsize=200in\relax% + \addtolength{\textheight}{-\topmargin}% + \addtolength{\textheight}{-1.0in}% + \setlength{\oddsidemargin}{-1.0in}% + \if@envelope\relax% + \else% + \addtolength{\oddsidemargin}{\LabelLeftMargin}% + \fi% + \setlength{\evensidemargin}{\oddsidemargin}% + \setlength{\textwidth}{20in}% + \hsize=20in% + \baselineskip=0pt% + \lineskip=0pt% + \parindent=0pt% \if@envelope - \addtolength{\topmargin}{\EnvelopeTopMargin} - \else \addtolength{\topmargin}{\LabelTopMargin} - \fi - \setlength{\headheight}{0pt} - \setlength{\headsep}{0pt} - \setlength{\footskip}{0pt} - \setlength{\textheight}{200in} - \setlength\paperheight{\textheight} - \global\vsize=200in\relax - \addtolength{\textheight}{-\topmargin} - \addtolength{\textheight}{-1.0in} - \setlength{\oddsidemargin}{-1.0in} - \setlength{\evensidemargin}{\oddsidemargin} - \setlength{\textwidth}{20in} - \hsize=20in - \baselineskip=0pt - \lineskip=0pt - \parindent=0pt - \if@envelope \relax \else - \setcounter{LabelCountCol}{\theLabelOffsetCol} - \setcounter{LabelCountRow}{\theLabelOffsetRow} - \ifnum\theLabelOffsetRow>1 - \null - \loop \vspace*{\LabelHeight} - \addtocounter{LabelOffsetRow}{-1} \ifnum\theLabelOffsetRow>1 - \repeat - \fi - \ifnum\theLabelOffsetCol>1 - \loop \hspace*{\LabelWidth}\nolinebreak - \addtocounter{LabelOffsetCol}{-1} \ifnum\theLabelOffsetCol>1 - \repeat - \fi - \nopagebreak - \fi - \spaceskip 0pt\relax - \xspaceskip 0pt\relax - \clubpenalty=0 - \widowpenalty=0 - \raggedbottom - \sloppy - \setlength\hfuzz{5in} - \setlength\vfuzz{5in} - \ignorespaces - \@beginlabelshook - \@beginlabelpagehook - \nopagebreak} + \ifcase\the\@envelopeposition% + \setlength{\EnvelopeLeftMargin}{\paperwidth}% + \if@rotateenvelopes% + \addtolength{\EnvelopeLeftMargin}{-\EnvelopeHeight}% + \else% + \addtolength{\EnvelopeLeftMargin}{-\EnvelopeWidth}% + \fi% + \setlength{\EnvelopeLeftMargin}{0.5\EnvelopeLeftMargin}% + \or% + \setlength{\EnvelopeLeftMargin}{0pt}% + \or% + \setlength{\EnvelopeLeftMargin}{\paperwidth}% + \if@rotateenvelopes% + \addtolength{\EnvelopeLeftMargin}{-\EnvelopeHeight}% + \else% + \addtolength{\EnvelopeLeftMargin}{-\EnvelopeWidth}% + \fi% + \else% + \relax% + \fi% + \else% + \setcounter{LabelCountCol}{\theLabelOffsetCol}% + \setcounter{LabelCountRow}{\theLabelOffsetRow}% + \ifnum\theLabelOffsetRow>1% + \null% + \loop \vspace*{\LabelHeight}% + \addtocounter{LabelOffsetRow}{-1} \ifnum\theLabelOffsetRow>1% + \repeat% + \fi% + \ifnum\theLabelOffsetCol>1% + \loop \hspace*{\LabelWidth}\nolinebreak% + \addtocounter{LabelOffsetCol}{-1} \ifnum\theLabelOffsetCol>1% + \repeat% + \fi% + \nopagebreak% + \fi% + \spaceskip0pt\relax% + \xspaceskip 0pt\relax% + \clubpenalty=0% + \widowpenalty=0% + \raggedbottom% + \sloppy% + \setlength\hfuzz{5in}% + \setlength\vfuzz{5in}% + \ignorespaces% + \@beginlabelshook% + \@beginlabelpagehook% + \nopagebreak}% \newcommand{\PrintReturnAddress}[1]{% \vspace*{\FromAddressTopMargin} \null\hspace{\FromAddressLeftMargin} @@ -272,19 +338,30 @@ \newcommand{\PrintLabel}[1]{% \parbox[t][\LabelHeight]{\LabelWidth}{% \PrintAddress{#1}}} +\newcommand{\PrintBigLabel}[2]{% + \begin{minipage}[t][\LabelHeight]{\LabelWidth}% + \baselineskip=0pt% + \lineskip=0pt% + \parindent=0pt% + \begin{center}% + \PrintReturnAddress{#1}\\% + \rule{\ToAddressWidth}{0.1pt}% + \PrintAddress{#2}% + \end{center}% + \end{minipage}} \newcommand{\PrintEnvelope}[2]{% - \begin{minipage}[t][\EnvelopeHeight]{\EnvelopeWidth} - \baselineskip=0pt - \lineskip=0pt - \parindent=0pt - \PrintReturnAddress{#1}\\ - \begin{center} - \PrintAddress{#2} - \end{center} + \begin{minipage}[t][\EnvelopeHeight]{\EnvelopeWidth}% + \baselineskip=0pt% + \lineskip=0pt% + \parindent=0pt% + \PrintReturnAddress{#1}\\% + \begin{center}% + \PrintAddress{#2}% + \end{center}% \end{minipage}} \newcommand{\@PrintEnvelope}[2]{% - \if@rotateenvelopes\rotatebox{90}{\PrintEnvelope{#1}{#2}} - \else\PrintEnvelope{#1}{#2} + \if@rotateenvelopes\rotatebox{90}{\PrintEnvelope{#1}{#2}}% + \else\PrintEnvelope{#1}{#2}% \fi} \renewcommand{\mlabel}[2]{\ignorespaces% \spaceskip 0pt\relax% @@ -307,9 +384,14 @@ \setcounter{LabelCountRow}{1}% \setcounter{LabelCountCol}{1}% \fi% - \PrintLabel{#2}\ignorespaces\nolinebreak% + \if@biglabel% + \PrintBigLabel{#1}{#2}% + \else% + \PrintLabel{#2}% + \fi% + \ignorespaces\nolinebreak% \stepcounter{LabelCountCol}% - \fi} + \fi}% \newcount\@numreturnlabels \newcommand{\printreturnlabels}[2]{% \@numreturnlabels=#1 @@ -327,60 +409,60 @@ \newif\if@zipcodefound \long\def\@finishzipcode#1{} \long\def\@firstzipcode#1{% - \global\@zipcode{#1} - \global\@zipcodesum=#1\relax - \global\@zipcodefoundtrue + \@zipcode{#1} + \@zipcodesum=#1\relax + \@zipcodefoundtrue \@zipcodeloop} \long\def\@continuezipcode#1{% - \global\@zipcode=\expandafter{\the\@zipcode#1} - \global\advance\@zipcodesum by #1 + \@zipcode=\expandafter{\the\@zipcode#1} + \advance\@zipcodesum by #1 \@zipcodeloop} \long\def\@dashzipcode#1{\@zipcodeloop} \def\@spacezipcode{% - \global\@zipcodefoundfalse - \afterassignment\@zipcodeloop\let\@temp= } + \@zipcodefoundfalse + \afterassignment\@zipcodeloop\let\EL@temp= } \long\def\@abortzipcode#1{% - \global\@zipcodefoundfalse + \@zipcodefoundfalse \@zipcodeloop} -\def\@zipcodeloop{\futurelet\@temp\@zipcodeloop@} +\def\@zipcodeloop{\futurelet\EL@temp\@zipcodeloop@} \def\@zipcodeloop@{% - \ifx \@endaddress\@temp \def\@tempa{\@finishzipcode} \else - \ifx 0\@temp \if@zipcodefound \def\@tempa{\@continuezipcode} - \else \def\@tempa{\@firstzipcode} \fi \else - \ifx 1\@temp \if@zipcodefound \def\@tempa{\@continuezipcode} - \else \def\@tempa{\@firstzipcode} \fi \else - \ifx 2\@temp \if@zipcodefound \def\@tempa{\@continuezipcode} - \else \def\@tempa{\@firstzipcode} \fi \else - \ifx 3\@temp \if@zipcodefound \def\@tempa{\@continuezipcode} - \else \def\@tempa{\@firstzipcode} \fi \else - \ifx 4\@temp \if@zipcodefound \def\@tempa{\@continuezipcode} - \else \def\@tempa{\@firstzipcode} \fi \else - \ifx 5\@temp \if@zipcodefound \def\@tempa{\@continuezipcode} - \else \def\@tempa{\@firstzipcode} \fi \else - \ifx 6\@temp \if@zipcodefound \def\@tempa{\@continuezipcode} - \else \def\@tempa{\@firstzipcode} \fi \else - \ifx 7\@temp \if@zipcodefound \def\@tempa{\@continuezipcode} - \else \def\@tempa{\@firstzipcode} \fi \else - \ifx 8\@temp \if@zipcodefound \def\@tempa{\@continuezipcode} - \else \def\@tempa{\@firstzipcode} \fi \else - \ifx 9\@temp \if@zipcodefound \def\@tempa{\@continuezipcode} - \else \def\@tempa{\@firstzipcode} \fi \else - \ifx -\@temp \if@zipcodefound \def\@tempa{\@dashzipcode} - \else \def\@tempa{\@abortzipcode} \fi \else - \ifx \@sptoken\@temp \def\@tempa{\@spacezipcode} \else - \def\@tempa{\@abortzipcode} + \ifx \@endaddress\EL@temp \def\EL@tempa{\@finishzipcode} \else + \ifx 0\EL@temp \if@zipcodefound \def\EL@tempa{\@continuezipcode} + \else \def\EL@tempa{\@firstzipcode} \fi \else + \ifx 1\EL@temp \if@zipcodefound \def\EL@tempa{\@continuezipcode} + \else \def\EL@tempa{\@firstzipcode} \fi \else + \ifx 2\EL@temp \if@zipcodefound \def\EL@tempa{\@continuezipcode} + \else \def\EL@tempa{\@firstzipcode} \fi \else + \ifx 3\EL@temp \if@zipcodefound \def\EL@tempa{\@continuezipcode} + \else \def\EL@tempa{\@firstzipcode} \fi \else + \ifx 4\EL@temp \if@zipcodefound \def\EL@tempa{\@continuezipcode} + \else \def\EL@tempa{\@firstzipcode} \fi \else + \ifx 5\EL@temp \if@zipcodefound \def\EL@tempa{\@continuezipcode} + \else \def\EL@tempa{\@firstzipcode} \fi \else + \ifx 6\EL@temp \if@zipcodefound \def\EL@tempa{\@continuezipcode} + \else \def\EL@tempa{\@firstzipcode} \fi \else + \ifx 7\EL@temp \if@zipcodefound \def\EL@tempa{\@continuezipcode} + \else \def\EL@tempa{\@firstzipcode} \fi \else + \ifx 8\EL@temp \if@zipcodefound \def\EL@tempa{\@continuezipcode} + \else \def\EL@tempa{\@firstzipcode} \fi \else + \ifx 9\EL@temp \if@zipcodefound \def\EL@tempa{\@continuezipcode} + \else \def\EL@tempa{\@firstzipcode} \fi \else + \ifx -\EL@temp \if@zipcodefound \def\EL@tempa{\@dashzipcode} + \else \def\EL@tempa{\@abortzipcode} \fi \else + \ifx \@sptoken\EL@temp \def\EL@tempa{\@spacezipcode} \else + \def\EL@tempa{\@abortzipcode} \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi - \@tempa} + \EL@tempa} \long\def\@extractbarcode#1{% \@zipcodefoundfalse \@zipcodeloop#1\@endaddress \if@alwaysbarcodes \@zipcodefoundtrue \fi \if@zipcodefound \ifnum\the\@zipcodesum>0 - \loop \global\advance \@zipcodesum by -10 \ifnum\the\@zipcodesum>0 + \loop \advance \@zipcodesum by -10 \ifnum\the\@zipcodesum>0 \repeat \fi - \global\multiply\@zipcodesum by -1 + \multiply\@zipcodesum by -1 \fi} \newlength{\@barcodewidth} \newlength{\@barcodeLheight} @@ -405,17 +487,17 @@ \ifx8#1\@barL\@barS\@barS\@barL\@barS\else \ifx9#1\@barL\@barS\@barL\@barS\@barS\else \ifx0#1\@barL\@barL\@barS\@barS\@barS\else - \ifx S#1\def\@tempa{\relax}% + \ifx S#1\def\EL@tempa{\relax}% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi% - \@tempa} + \EL@tempa} \def\@printbarcode{% \if@zipcodefound \mbox{% \@barL% - \def\@tempa{\@printonezip}% - \expandafter\@tempa\the\@zipcode S% - \def\@tempa{\@printonezip}% - \expandafter\@tempa\the\@zipcodesum S% + \def\EL@tempa{\@printonezip}% + \expandafter\EL@tempa\the\@zipcode S% + \def\EL@tempa{\@printonezip}% + \expandafter\EL@tempa\the\@zipcodesum S% \@barL} \\[1ex] \fi} @@ -424,35 +506,112 @@ \long\def\@dotcommaaddrcap#1{% \@addrcaploop} \long\def\@newlineaddrcap#1{% - \global\@addr@cap=\expandafter{\the\@addr@cap #1} + \@addr@cap=\expandafter{\the\@addr@cap #1} \@addrcaploop} \long\def\@bgroupaddrcap#1{% - \global\@addr@cap=\expandafter{\the\@addr@cap {\MakeUppercase{#1}}} + \@addr@cap=\expandafter{\the\@addr@cap {\MakeUppercase{#1}}} \@addrcaploop} \def\@spaceaddrcap{% - \global\@addr@cap=\expandafter{\the\@addr@cap\hspace{0.6em}} - \afterassignment\@addrcaploop\let\@temp= } + \@addr@cap=\expandafter{\the\@addr@cap\hspace{0.6em}} + \afterassignment\@addrcaploop\let\EL@temp= } \def\@otheraddrcap#1{% - \global\@addr@cap=\expandafter{\the\@addr@cap% + \@addr@cap=\expandafter{\the\@addr@cap% \MakeUppercase{#1}\kern1pt\relax} \@addrcaploop} -\def\@addrcaploop{\futurelet\@temp\@addrcaploop@} +\def\@addrcaploop{\futurelet\EL@temp\@addrcaploop@} \def\@addrcaploop@{% - \ifx \@endaddress\@temp \def\@tempa{\@finishaddrcap} \else - \ifx .\@temp \def\@tempa{\@dotcommaaddrcap} \else - \ifx ,\@temp \def\@tempa{\@dotcommaaddrcap} \else - \ifx \voidb@x\@temp \def\@tempa{\@dotcommaaddrcap} \else - \ifx \unhbox\@temp \def\@tempa{\@dotcommaaddrcap} \else - \ifx \\\@temp \def\@tempa{\@newlineaddrcap} \else - \ifx \bgroup\@temp \def\@tempa{\@bgroupaddrcap} \else - \ifx \@sptoken\@temp \def\@tempa{\@spaceaddrcap} \else - \def\@tempa{\@otheraddrcap} + \ifx \@endaddress\EL@temp \def\EL@tempa{\@finishaddrcap} \else + \ifx .\EL@temp \def\EL@tempa{\@dotcommaaddrcap} \else + \ifx ,\EL@temp \def\EL@tempa{\@dotcommaaddrcap} \else + \ifx \voidb@x\EL@temp \def\EL@tempa{\@dotcommaaddrcap} \else + \ifx \unhbox\EL@temp \def\EL@tempa{\@dotcommaaddrcap} \else + \ifx \\\EL@temp \def\EL@tempa{\@newlineaddrcap} \else + \ifx \bgroup\EL@temp \def\EL@tempa{\@bgroupaddrcap} \else + \ifx \@sptoken\EL@temp \def\EL@tempa{\@spaceaddrcap} \else + \def\EL@tempa{\@otheraddrcap} \fi\fi\fi\fi\fi\fi\fi\fi - \@tempa} + \EL@tempa} \long\def\@make@capitalize#1{% - \global\@addr@cap={\relax} + \@addr@cap={\relax} \@addrcaploop#1\@endaddress \the\@addr@cap} +\let\@@mlabel=\@gobbletwo +\AtEndDocument{\let\@@mlabel=\@mlabel} +\def\suppresslabels{\if@filesw\immediate\write\@auxout{% + \string\@suppresslabels}\fi} +\def\@suppresslabels{\let\@mlabel=\@gobbletwo} +\def\resumelabels{\if@filesw\immediate\write\@auxout{% + \string\@resumelabels}\fi} +\def\@resumelabels{\let\@mlabel=\@@mlabel} +\def\suppressonelabel{\if@filesw\immediate\write\@auxout{% + \string\@suppressonelabel}\fi} +\def\@suppressonelabel{\let\@old@mlabel=\@mlabel% + \def\@mlabel{% + \let\@mlabel=\@old@mlabel% + \@gobbletwo}} +\def\printonelabel{\if@filesw\immediate\write\@auxout{% + \string\@printonelabel}\fi} +\def\@printonelabel{\let\@old@mlabel=\@mlabel% + \def\@mlabel{% + \let\@mlabel=\@old@mlabel% + \@@mlabel}} +\def\ChangeEnvelope{\@ifstar{\@ChangeEnvelopeStar}{\@ChangeEnvelope}} +\newcommand\@ChangeEnvelopeStar[3][0pt]{% + \if@filesw\immediate\write\@auxout{% + \string\@SetEnvelope[#1]{#2}{#3}}% + \fi} +\newcommand\@ChangeEnvelope[3][0pt]{% + \if@filesw\immediate\write\@auxout{% + \string\@SetEnvelope[#1]{#2}{#3}} + \immediate\write\@auxout{\string\@startlabels} + \fi} +\def\@SetEnvelope[#1]#2#3{} +\AtEndDocument{\let\@SetEnvelope=\SetEnvelope} +\def\ChangeLabel{\@ifstar{\@ChangeLabelStar}{\@ChangeLabel}} +\newcommand\@ChangeLabelStar[7]{% + \if@filesw\immediate\write\@auxout{% + \string\@SetLabel{#1}{#2}{#3}{#4}{#5}{#6}{#7}}% + \fi} +\newcommand\@ChangeLabel[7]{% + \if@filesw\immediate\write\@auxout{% + \string\@SetLabel{#1}{#2}{#3}{#4}{#5}{#6}{#7}} + \immediate\write\@auxout{\string\@startlabels} + \fi} +\def\@SetLabel#1#2#3#4#5#6#7{} +\AtEndDocument{\let\@SetLabel=\SetLabel} +\def\ChangeBigLabel{\@ifstar{\@ChangeBigLabelStar}{\@ChangeBigLabel}} +\newcommand\@ChangeBigLabelStar[7]{% + \if@filesw\immediate\write\@auxout{% + \string\@SetBigLabel{#1}{#2}{#3}{#4}{#5}{#6}{#7}}% + \fi} +\newcommand\@ChangeBigLabel[7]{% + \if@filesw\immediate\write\@auxout{% + \string\@SetBigLabel{#1}{#2}{#3}{#4}{#5}{#6}{#7}} + \immediate\write\@auxout{\string\@startlabels} + \fi} +\def\@SetBigLabel#1#2#3#4#5#6#7{} +\AtEndDocument{\let\@SetBigLabel=\SetBigLabel} +\if@EL@redefine@opening + \newcommand*{\re}[1]{\def\recontents{#1}}% + \def\ReName{Re: }% + \renewcommand*{\opening}[1]{\ifx\@empty\fromaddress + \thispagestyle{firstpage}% + {\raggedleft\@date\par}% + \else % home address + \thispagestyle{empty}% + {\raggedleft\begin{tabular}{l}\ignorespaces + \fromaddress \\*[2\parskip]% + \@date \end{tabular}\par}% + \fi + \vspace{2\parskip}% + {\raggedright \toname \\ \toaddress \par}% + \ifx\@empty\recontents\relax + \else + {\raggedright \ReName \recontents \par}% + \fi + \vspace{2\parskip}% + #1\par\nobreak}% +\fi \endinput -%% +%% %% End of file `envlab.sty'. -- cgit v1.2.3