diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/envlab')
-rw-r--r-- | Master/texmf-dist/tex/latex/envlab/envlab.cfg | 46 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/envlab/envlab.sty | 458 |
2 files changed, 504 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/envlab/envlab.cfg b/Master/texmf-dist/tex/latex/envlab/envlab.cfg new file mode 100644 index 00000000000..581ee89a987 --- /dev/null +++ b/Master/texmf-dist/tex/latex/envlab/envlab.cfg @@ -0,0 +1,46 @@ +%% +%% 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. +%% +%% Good luck +%% +%% +%% Copyright Boris Veytsman 1996 +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +%% The default options go here +%% +\ExecuteOptions{businessenvelope,rotateenvelopes,centerenvelopes} +\ExecuteOptions{printbarcodes,capaddress} +\ExecuteOptions{nopswait,printreturnaddress} +%% +\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 new file mode 100644 index 00000000000..e9a5dc090b5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/envlab/envlab.sty @@ -0,0 +1,458 @@ +%% +%% 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. +%% +%% 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. +%% +%% Copyright Boris Veytsman 1996 +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{envlab}[1996/07/15 v1.1 Envelopes and Labels] +\def\envlab@oops{% + \PackageError{envlab}% + {Envlab is used outside of \MessageBreak% + a letter-compatible documentclass}% + {You are trying to use Envelopes & Labels\MessageBreak% + package, but your documentclass does not\MessageBreak% + understand address formatting commands.\MessageBreak% + Try standard document class letter\MessageBreak}} +\def\envlab@ok{% + \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 +\newif\if@envelope +\@envelopetrue +\newif\if@rotateenvelopes +\@rotateenvelopestrue +\newif\if@printreturnaddress +\@printreturnaddresstrue +\newcount\@envelopeposition \@envelopeposition=0\relax +\newif\if@pswait +\@pswaitfalse +\newif\if@barcodes +\newif\if@alwaysbarcodes +\@barcodestrue +\@alwaysbarcodesfalse +\newif\if@capitalizeaddress +\@capitalizeaddresstrue +\newlength{\EnvelopeWidth} +\newlength{\EnvelopeHeight} +\newlength{\EnvelopeTopMargin} +\newlength{\EnvelopeLeftMargin} +\setlength{\EnvelopeLeftMargin}{0pt} +\newlength{\LabelWidth} +\newlength{\LabelHeight} +\newlength{\LabelTopMargin} +\newlength{\LabelLeftMargin} +\newlength{\LabelRightMargin} +\newcounter{LabelMaxCol} +\newcounter{LabelMaxRow} +\newlength{\FromAddressTopMargin} +\newlength{\FromAddressLeftMargin} +\newlength{\FromAddressHeight} +\newlength{\FromAddressWidth} +\newlength{\ToAddressTopMargin} +\newlength{\ToAddressLeftMargin} +\newlength{\ToAddressWidth} +\DeclareRobustCommand{\SetEnvelope}[3][0pt]{% + \@envelopetrue% + \setlength{\EnvelopeTopMargin}{#1}% + \setlength{\EnvelopeWidth}{#2}% + \setlength{\EnvelopeHeight}{#3}% + \setlength{\FromAddressTopMargin}{0.5in}% + \setlength{\FromAddressLeftMargin}{0.5in}% + \setlength{\FromAddressHeight}{0.33\EnvelopeHeight}% + \setlength{\FromAddressWidth}{0.5\EnvelopeWidth}% + \setlength{\ToAddressTopMargin}{0.5in}% + \setlength{\ToAddressLeftMargin}{0.5in}% + \setlength{\ToAddressWidth}{3in}} +\DeclareRobustCommand{\SetLabel}[7]{% + \@envelopefalse% + \setlength{\LabelWidth}{#1}% + \setlength{\LabelHeight}{#2}% + \setlength{\LabelTopMargin}{#3}% + \setlength{\LabelLeftMargin}{#4}% + \setlength{\LabelRightMargin}{#5}% + \setcounter{LabelMaxCol}{#6}% + \setcounter{LabelMaxRow}{#7}% + \setlength{\ToAddressTopMargin}{0.1in}% + \setlength{\ToAddressLeftMargin}{0.2in}% + \setlength{\ToAddressWidth}{\LabelWidth}% + \addtolength{\ToAddressWidth}{-\ToAddressLeftMargin}% + \addtolength{\ToAddressWidth}{-\LabelRightMargin}} +\DeclareOption{businessenvelope}{\SetEnvelope{9.5in}{4.125in}} +\DeclareOption{executiveenvelope}{\SetEnvelope{7.5in}{3.875in}} +\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{avery5160label}{% + \SetLabel{2.75in}{1in}{0.5in}{0.19in}{0.12in}{3}{10}} +\DeclareOption{avery5161label}{% + \SetLabel{4.19in}{1in}{0.5in}{0.16in}{0.19in}{2}{10}} +\DeclareOption{avery5162label}{% + \SetLabel{4.19in}{1.33in}{0.83in}{0.16in}{0.19in}{2}{7}} +\DeclareOption{avery5163label}{% + \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{rotateenvelopes}{\@rotateenvelopestrue} +\DeclareOption{norotateenvelopes}{\@rotateenvelopesfalse} +\DeclareOption{centerenvelopes}{\@envelopeposition=0\relax} +\DeclareOption{leftenvelopes}{\@envelopeposition=1\relax} +\DeclareOption{rightenvelopes}{\@envelopeposition=2\relax} +\DeclareOption{customenvelopes}{\@envelopeposition=3\relax} +\DeclareOption{printbarcodes}{\@barcodestrue} +\DeclareOption{noprintbarcodes}{\@barcodesfalse\@alwaysbarcodesfalse} +\DeclareOption{alwaysbarcodes}{\@alwaysbarcodestrue\@barcodestrue} +\DeclareOption{noalwaysbarcodes}{\@alwaysbarcodesfalse} +\DeclareOption{capaddress}{\@capitalizeaddresstrue} +\DeclareOption{nocapaddress}{\@capitalizeaddressfalse} +\DeclareOption{printreturnaddress}{\@printreturnaddresstrue} +\DeclareOption{noprintreturnaddress}{\@printreturnaddressfalse} +\DeclareOption{pswait}{\@pswaittrue} +\DeclareOption{nopswait}{\@pswaitfalse} +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphics}} +\ExecuteOptions{businessenvelope,rotateenvelopes,centerenvelopes} +\ExecuteOptions{printbarcodes,capaddress} +\ExecuteOptions{nopswait,printreturnaddress} +\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}}{% + \PackageWarning{envlab}{% + You don't have the graphics package!\MessageBreak + Probably you will not be able to print\MessageBreak + envelopes sidewise. \MessageBreak}} +\def\@beginlabelshook{\relax} +\def\@beginlabelpagehook{\relax} +\def\AtBeginLabels{\g@addto@macro\@beginlabelshook} +\def\AtBeginLabelPage{\g@addto@macro\@beginlabelpagehook} +\def\PSwait{\special{ps: clear grestore @manualfeed 0 0 bop}} +\if@pswait + \AtBeginLabels{\PSwait}% +\fi +\newcounter{LabelCountCol} +\newcounter{LabelCountRow} +\newcounter{LabelOffsetCol} +\newcounter{LabelOffsetRow} +\setcounter{LabelOffsetCol}{1} +\setcounter{LabelOffsetRow}{1} +\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\startlabels{% + \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} + \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} +\newcommand{\PrintReturnAddress}[1]{% + \vspace*{\FromAddressTopMargin} + \null\hspace{\FromAddressLeftMargin} + \parbox[t][\FromAddressHeight]{\FromAddressWidth}% + {\@fromaddressfont \lineskip=1pt + \if@printreturnaddress #1\else\relax\fi}} +\newcommand{\PrintAddress}[1]{% + \vspace*{\ToAddressTopMargin} + \leavevmode + \null\hspace*{\ToAddressLeftMargin} + \parbox[t]{\ToAddressWidth}{% + \lineskip=1pt + \if@barcodes \PrintBarCode{#1} \fi + \@toaddressfont + \if@capitalizeaddress \@make@capitalize{#1} \else #1 \fi}} +\newcommand{\PrintLabel}[1]{% + \parbox[t][\LabelHeight]{\LabelWidth}{% + \PrintAddress{#1}}} +\newcommand{\PrintEnvelope}[2]{% + \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} + \fi} +\renewcommand{\mlabel}[2]{\ignorespaces% + \spaceskip 0pt\relax% + \xspaceskip 0pt\relax% + \if@envelope% + \leavevmode% + \hspace*{\EnvelopeLeftMargin}% + \@PrintEnvelope{#1}{#2}% + \clearpage% + \@beginlabelpagehook% + \else% + \ignorespaces% + \ifnum\theLabelCountCol>\theLabelMaxCol% + \\\nopagebreak% + \stepcounter{LabelCountRow}% + \setcounter{LabelCountCol}{1}% + \fi% + \ifnum\theLabelCountRow>\theLabelMaxRow% + \vfill\eject\@beginlabelpagehook% + \setcounter{LabelCountRow}{1}% + \setcounter{LabelCountCol}{1}% + \fi% + \PrintLabel{#2}\ignorespaces\nolinebreak% + \stepcounter{LabelCountCol}% + \fi} +\newcount\@numreturnlabels +\newcommand{\printreturnlabels}[2]{% + \@numreturnlabels=#1 + \def\@toaddressfont{\@fromaddressfont} + \@capitalizeaddressfalse + \@barcodesfalse + \startlabels + \loop \mlabel{\relax}{#2} \advance\@numreturnlabels by -1 + \ifnum\@numreturnlabels>0\repeat} +\newcommand{\PrintBarCode}[1]{% + \@extractbarcode{#1} + \@printbarcode} +\newtoks\@zipcode +\newcount\@zipcodesum +\newif\if@zipcodefound +\long\def\@finishzipcode#1{} +\long\def\@firstzipcode#1{% + \global\@zipcode{#1} + \global\@zipcodesum=#1\relax + \global\@zipcodefoundtrue + \@zipcodeloop} +\long\def\@continuezipcode#1{% + \global\@zipcode=\expandafter{\the\@zipcode#1} + \global\advance\@zipcodesum by #1 + \@zipcodeloop} +\long\def\@dashzipcode#1{\@zipcodeloop} +\def\@spacezipcode{% + \global\@zipcodefoundfalse + \afterassignment\@zipcodeloop\let\@temp= } +\long\def\@abortzipcode#1{% + \global\@zipcodefoundfalse + \@zipcodeloop} +\def\@zipcodeloop{\futurelet\@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} + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \@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 + \repeat + \fi + \global\multiply\@zipcodesum by -1 + \fi} +\newlength{\@barcodewidth} +\newlength{\@barcodeLheight} +\newlength{\@barcodeSheight} +\newlength{\@barcodeskip} +\setlength{\@barcodewidth}{0.020in} +\setlength{\@barcodeLheight}{0.125in} +\setlength{\@barcodeSheight}{0.050in} +\setlength{\@barcodeskip}{0.026in} +\DeclareRobustCommand{\@barL}{% + \rule{\@barcodewidth}{\@barcodeLheight}\hspace{\@barcodeskip}} +\DeclareRobustCommand{\@barS}{% + \rule{\@barcodewidth}{\@barcodeSheight}\hspace{\@barcodeskip}} +\def\@printonezip#1{% + \ifx1#1\@barS\@barS\@barS\@barL\@barL\else + \ifx2#1\@barS\@barS\@barL\@barS\@barL\else + \ifx3#1\@barS\@barS\@barL\@barL\@barS\else + \ifx4#1\@barS\@barL\@barS\@barS\@barL\else + \ifx5#1\@barS\@barL\@barS\@barL\@barS\else + \ifx6#1\@barS\@barL\@barL\@barS\@barS\else + \ifx7#1\@barL\@barS\@barS\@barS\@barL\else + \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}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi% + \@tempa} +\def\@printbarcode{% + \if@zipcodefound + \mbox{% + \@barL% + \def\@tempa{\@printonezip}% + \expandafter\@tempa\the\@zipcode S% + \def\@tempa{\@printonezip}% + \expandafter\@tempa\the\@zipcodesum S% + \@barL} + \\[1ex] + \fi} +\newtoks\@addr@cap +\long\def\@finishaddrcap#1{} +\long\def\@dotcommaaddrcap#1{% + \@addrcaploop} +\long\def\@newlineaddrcap#1{% + \global\@addr@cap=\expandafter{\the\@addr@cap #1} + \@addrcaploop} +\long\def\@bgroupaddrcap#1{% + \global\@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= } +\def\@otheraddrcap#1{% + \global\@addr@cap=\expandafter{\the\@addr@cap% + \MakeUppercase{#1}\kern1pt\relax} + \@addrcaploop} +\def\@addrcaploop{\futurelet\@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} + \fi\fi\fi\fi\fi\fi\fi\fi + \@tempa} +\long\def\@make@capitalize#1{% + \global\@addr@cap={\relax} + \@addrcaploop#1\@endaddress + \the\@addr@cap} +\endinput +%% +%% End of file `envlab.sty'. |