12.07.2015 Views

Printing Envelopes and Labels in LATEX2ε: EnvLab Package - Mirror

Printing Envelopes and Labels in LATEX2ε: EnvLab Package - Mirror

Printing Envelopes and Labels in LATEX2ε: EnvLab Package - Mirror

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

11 Games with .aux file\@@mlabelThe comm<strong>and</strong>s described <strong>in</strong> this section write someth<strong>in</strong>g to the .aux file, <strong>and</strong> thuschange the way <strong>EnvLab</strong> treats the labels <strong>and</strong> envelopes. S<strong>in</strong>ce the action is delayedtill the .aux file is processed, these comm<strong>and</strong>s affect only the labels automaticallyextracted from the letter environment, <strong>and</strong> do not affect the labels explicitlydef<strong>in</strong>ed by the \mlabel comm<strong>and</strong>s <strong>in</strong> the ma<strong>in</strong> file.The macro \@@mlabel stores the status of the \@mlabel as determ<strong>in</strong>ed by\makelabels. It is a no-op at the start. If \makelabels redef<strong>in</strong>es \@mlabel,we catch it through the \AtEndDocument hook. Note that s<strong>in</strong>ce \makelabel isallowed only <strong>in</strong> the preamble, we are not <strong>in</strong> danger of redef<strong>in</strong><strong>in</strong>g comm<strong>and</strong>s tooearly.508 \let\@@mlabel=\@gobbletwo509 \AtEndDocument{\let\@@mlabel=\@mlabel}The next four comm<strong>and</strong>s redef<strong>in</strong>e \@mlabel to suppress or resume pr<strong>in</strong>t<strong>in</strong>gmail<strong>in</strong>g labels.\suppresslabels This comm<strong>and</strong> suppress pr<strong>in</strong>t<strong>in</strong>g labels <strong>and</strong> envelopes until it is resumed by\resumelabels or similar comm<strong>and</strong>s.510 \def\suppresslabels{\if@filesw\immediate\write\@auxout{%511 \str<strong>in</strong>g\@suppresslabels}\fi}\@suppresslabels This is the <strong>in</strong>ternal comm<strong>and</strong> that performs the actual process<strong>in</strong>g.\resumelabels\@resumelabels512 \def\@suppresslabels{\let\@mlabel=\@gobbletwo}These comm<strong>and</strong>s resume pr<strong>in</strong>t<strong>in</strong>g labels <strong>and</strong> envelopes if it was suppressed by\suppresslabels or similar comm<strong>and</strong>s.513 \def\resumelabels{\if@filesw\immediate\write\@auxout{%514 \str<strong>in</strong>g\@resumelabels}\fi}515 \def\@resumelabels{\let\@mlabel=\@@mlabel}\suppressonelabel\@suppressonelabel\@old@mlabelThese comm<strong>and</strong>s suppress pr<strong>in</strong>t<strong>in</strong>g of one label or envelope.\@old@mlabel is used to store the system state.516 \def\suppressonelabel{\if@filesw\immediate\write\@auxout{%517 \str<strong>in</strong>g\@suppressonelabel}\fi}518 \def\@suppressonelabel{\let\@old@mlabel=\@mlabel%519 \def\@mlabel{%520 \let\@mlabel=\@old@mlabel%521 \@gobbletwo}}The macro\pr<strong>in</strong>tonelabel\@pr<strong>in</strong>tonelabelThese comm<strong>and</strong>s resume pr<strong>in</strong>t<strong>in</strong>g for one label or envelope The macro\@old@mlabelis used to store the system state.522 \def\pr<strong>in</strong>tonelabel{\if@filesw\immediate\write\@auxout{%523 \str<strong>in</strong>g\@pr<strong>in</strong>tonelabel}\fi}524 \def\@pr<strong>in</strong>tonelabel{\let\@old@mlabel=\@mlabel%525 \def\@mlabel{%526 \let\@mlabel=\@old@mlabel%527 \@@mlabel}}20

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!