diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/infwarerr.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/infwarerr.dtx | 952 |
1 files changed, 952 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/infwarerr.dtx b/Master/texmf-dist/source/latex/oberdiek/infwarerr.dtx new file mode 100644 index 00000000000..8de246f7b9f --- /dev/null +++ b/Master/texmf-dist/source/latex/oberdiek/infwarerr.dtx @@ -0,0 +1,952 @@ +% \iffalse meta-comment +% +% Copyright (C) 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3 of this license or (at your option) any later +% version. The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of +% LaTeX version 2005/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% This Current Maintainer of this work is Heiko Oberdiek. +% +% This work consists of the main source file infwarerr.dtx +% and the derived files +% infwarerr.sty, infwarerr.pdf, infwarerr.ins, infwarerr.drv, +% infwarerr-test1.tex, infwarerr-test2.tex. +% +% Distribution: +% CTAN:macros/latex/contrib/oberdiek/infwarerr.dtx +% CTAN:macros/latex/contrib/oberdiek/infwarerr.pdf +% +% Unpacking: +% (a) If infwarerr.ins is present: +% tex infwarerr.ins +% (b) Without infwarerr.ins: +% tex infwarerr.dtx +% (c) If you insist on using LaTeX +% latex \let\install=y\input{infwarerr.dtx} +% (quote the arguments according to the demands of your shell) +% +% Documentation: +% (a) If infwarerr.drv is present: +% latex infwarerr.drv +% (b) Without infwarerr.drv: +% latex infwarerr.dtx; ... +% The class ltxdoc loads the configuration file ltxdoc.cfg +% if available. Here you can specify further options, e.g. +% use A4 as paper format: +% \PassOptionsToClass{a4paper}{article} +% +% Programm calls to get the documentation (example): +% pdflatex infwarerr.dtx +% makeindex -s gind.ist infwarerr.idx +% pdflatex infwarerr.dtx +% makeindex -s gind.ist infwarerr.idx +% pdflatex infwarerr.dtx +% +% Installation: +% TDS:tex/generic/oberdiek/infwarerr.sty +% TDS:doc/latex/oberdiek/infwarerr.pdf +% TDS:doc/latex/oberdiek/infwarerr-test1.tex +% TDS:doc/latex/oberdiek/infwarerr-test2.tex +% TDS:source/latex/oberdiek/infwarerr.dtx +% +%<*ignore> +\begingroup + \def\x{LaTeX2e}% +\expandafter\endgroup +\ifcase 0\ifx\install y1\fi\expandafter + \ifx\csname processbatchFile\endcsname\relax\else1\fi + \ifx\fmtname\x\else 1\fi\relax +\else\csname fi\endcsname +%</ignore> +%<*install> +\input docstrip.tex +\Msg{************************************************************************} +\Msg{* Installation} +\Msg{* Package: infwarerr 2007/04/26 v1.0 Providing info/warning/message (HO)} +\Msg{************************************************************************} + +\keepsilent +\askforoverwritefalse + +\preamble + +This is a generated file. + +Copyright (C) 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.de> + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.3 of this license or (at your option) any later +version. The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of +LaTeX version 2005/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +This Current Maintainer of this work is Heiko Oberdiek. + +This work consists of the main source file infwarerr.dtx +and the derived files + infwarerr.sty, infwarerr.pdf, infwarerr.ins, infwarerr.drv, + infwarerr-test1.tex, infwarerr-test2.tex. + +\endpreamble + +\generate{% + \file{infwarerr.ins}{\from{infwarerr.dtx}{install}}% + \file{infwarerr.drv}{\from{infwarerr.dtx}{driver}}% + \usedir{tex/generic/oberdiek}% + \file{infwarerr.sty}{\from{infwarerr.dtx}{package}}% + \usedir{doc/latex/oberdiek}% + \file{infwarerr-test1.tex}{\from{infwarerr.dtx}{test1}}% + \file{infwarerr-test2.tex}{\from{infwarerr.dtx}{test2}}% +} + +\obeyspaces +\Msg{************************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* file into a directory searched by TeX:} +\Msg{*} +\Msg{* infwarerr.sty} +\Msg{*} +\Msg{* To produce the documentation run the file `infwarerr.drv'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing!} +\Msg{*} +\Msg{************************************************************************} + +\endbatchfile +%</install> +%<*ignore> +\fi +%</ignore> +%<*driver> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{infwarerr.drv}% + [2007/04/26 v1.0 Providing info/warning/message (HO)]% +\documentclass{ltxdoc} +\usepackage{holtxdoc} +\begin{document} + \DocInput{infwarerr.dtx}% +\end{document} +%</driver> +% \fi +% +% \CheckSum{640} +% +% \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 \~} +% +% \GetFileInfo{infwarerr.drv} +% +% \title{The \xpackage{infwarerr} package} +% \date{2007/04/26 v1.0} +% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} +% +% \maketitle +% +% \begin{abstract} +% This package provides a complete set of macros for informations, +% warnings and error messages with support for \plainTeX. +% \end{abstract} +% +% \tableofcontents +% +% \section{Documentation} +% +% Package \xpackage{infwarerr} defines the following set of commands, +% given as pseudo regular expression: +% \begin{quote} +% \verb+\@(Package|Class)(Info|InfoNoLine|Warning|WarningNoLine|Error)+^^A +% \kern-\rightmargin +% \end{quote} +% The first argument is the package or class in question. The second +% argument contains the message text. \cs{MessageBreak} is supported. +% In case of error messages, the third argument contains the help +% text. Supported are \LaTeX's message texts \cs{@ehc}: +% \begin{quote} +% |Try typing <return> to proceed|\\ +% |If that doesn't work, type X <return> to quit.| +% \end{quote} +% and \cs{@ehd}: +% \begin{quote} +% |You're in trouble here. Try typing <return> to proceed|\\ +% |If that doesn't work, type X <return> to quit.| +% \end{quote} +% +% The package is intended for macro writers that want to write +% code that works for both \LaTeX\ and \plainTeX. If \LaTeX\ is +% detected, then the macros of this package will only be wrappers +% for \LaTeX's macros. Otherwise \LaTeX's macros will be mimicked +% for use with \plainTeX. +% +% \StopEventually{ +% } +% +% \section{Implementation} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \subsection{Reload check and package identification} +% Reload check, especially if the package is not used with \LaTeX. +% \begin{macrocode} +\begingroup + \catcode44 12 % , + \catcode45 12 % - + \catcode46 12 % . + \catcode58 12 % : + \catcode64 11 % @ + \expandafter\let\expandafter\x\csname ver@infwarerr.sty\endcsname + \ifcase 0% + \ifx\x\relax % plain + \else + \ifx\x\empty % LaTeX + \else + 1% + \fi + \fi + \else + \expandafter\ifx\csname PackageInfo\endcsname\relax + \def\x#1#2{% + \immediate\write-1{Package #1 Info: #2.}% + }% + \else + \def\x#1#2{\PackageInfo{#1}{#2, stopped}}% + \fi + \x{infwarerr}{The package is already loaded}% + \endgroup + \expandafter\endinput + \fi +\endgroup +% \end{macrocode} +% Package identification: +% \begin{macrocode} +\begingroup + \catcode44 12 % , + \catcode45 12 % - + \catcode46 12 % . + \catcode58 12 % : + \catcode64 11 % @ + \expandafter\ifx\csname ProvidesPackage\endcsname\relax + \def\x#1#2#3[#4]{\endgroup + \immediate\write-1{Package: #3 #4}% + \xdef#1{#4}% + }% + \else + \def\x#1#2[#3]{\endgroup + #2[{#3}]% + \ifx#1\relax + \xdef#1{#3}% + \fi + }% + \fi +\expandafter\x\csname ver@infwarerr.sty\endcsname +\ProvidesPackage{infwarerr}% + [2007/04/26 v1.0 Providing info/warning/message (HO)] +% \end{macrocode} +% +% \subsection{Catcodes} +% +% \begin{macrocode} +\expandafter\edef\csname InfWarErr@End\endcsname{% + \catcode39 \the\catcode39\relax % ' + \catcode40 \the\catcode40\relax % ( + \catcode41 \the\catcode41\relax % ) + \catcode44 \the\catcode44\relax % , + \catcode45 \the\catcode45\relax % - + \catcode46 \the\catcode46\relax % . + \catcode58 \the\catcode58\relax % : + \catcode60 \the\catcode60\relax % < + \catcode61 \the\catcode61\relax % = + \catcode62 \the\catcode62\relax % > + \catcode64 \the\catcode64\relax % @ + \catcode94 \the\catcode94\relax % ^ + \noexpand\endinput +} +\catcode39 12 % ' +\catcode40 12 % ( +\catcode41 12 % ) +\catcode44 12 % , +\catcode45 12 % - +\catcode46 12 % . +\catcode58 12 % : +\catcode60 12 % < +\catcode61 12 % = +\catcode62 12 % > +\catcode64 11 % @ +\catcode94 7 % ^ +% \end{macrocode} +% +% \subsection{\LaTeX\ detection} +% +% \begin{macrocode} +\begingroup + \let\x=Y% + \def\check#1{% + \@check{Generic}{#1}% + \@check{Package}{#1}% + \@check{Class}{#1}% + }% + \def\@check#1#2{% + \expandafter\ifx\csname #1#2\endcsname\relax + \let\x=N% + \fi + }% + \check{Info}% + \check{Warning}% + \check{Error}% + \@check{Package}{WarningNoLine}% + \@check{Class}{WarningNoLine}% + \@check{}{@ehc}% + \@check{}{@ehd}% +\expandafter\endgroup +\ifx\x Y% +% \end{macrocode} +% +% \subsection{Version for \LaTeX} +% +% \begin{macro}{\@PackageInfo} +% \begin{macrocode} + \let\@PackageInfo\PackageInfo +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@PackageInfoNoLine} +% \begin{macrocode} + \def\@PackageInfoNoLine#1#2{% + \PackageInfo{#1}{#2\@gobble}% + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@ClassInfo} +% \begin{macrocode} + \let\@ClassInfo\ClassInfo +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@ClassInfoNoLine} +% \begin{macrocode} + \def\@ClassInfoNoLine#1#2{% + \ClassInfo{#1}{#2\@gobble}% + }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@PackageWarning} +% \begin{macrocode} + \let\@PackageWarning\PackageWarning +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@PackageWarningNoLine} +% \begin{macrocode} + \let\@PackageWarningNoLine\PackageWarningNoLine +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@ClassWarning} +% \begin{macrocode} + \let\@ClassWarning\ClassWarning +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@ClassWarningNoLine} +% \begin{macrocode} + \let\@ClassWarningNoLine\ClassWarningNoLine +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@PackageError} +% \begin{macrocode} + \let\@PackageError\PackageError +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@ClassError} +% \begin{macrocode} + \let\@ClassError\ClassError +% \end{macrocode} +% \end{macro} +% \begin{macrocode} + \csname fi\endcsname + \InfWarErr@End +\fi +% \end{macrocode} +% +% \subsection{Version for \plainTeX} +% +% \begin{macro}{\InfWarErr@online} +% \begin{macrocode} +\begingroup\expandafter\endgroup +\ifcase\expandafter\ifx\csname inputlineno\endcsname\relax + 0 % + \else + \ifnum\inputlineno<0 % + 0 % + \else + 1 % + \fi + \fi + \def\InfWarErr@online{}% +\else + \def\InfWarErr@online{ on input line \the\inputlineno}% +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\InfWarErr@protected} +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname protected\endcsname\relax + \def\InfWarErr@protected{}% +\else + \let\InfWarErr@protected\protected +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\InfWarErr@unused} +% \begin{macrocode} +\chardef\InfWarErr@unused=16 % +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\InfWarErr@ehc} +% \begin{macrocode} +\def\InfWarErr@ehc{% + Try typing \space <return> \space to proceed.\MessageBreak + If that doesn't work, type \space X <return> \space to quit.% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\InfWarErr@ehd} +% \begin{macrocode} +\def\InfWarErr@ehd{% + You're in trouble here. \space\@ehc +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\InfWarErr@GenericInfo} +% \begin{macrocode} +\InfWarErr@protected\def\InfWarErr@GenericInfo#1#2{% + \begingroup + \let\on@line\InfWarErr@online + \long\def\@gobble##1{}% + \def\@spaces{\space\space\space\space}% + \def\MessageBreak{^^J#1}% + \newlinechar=10 % + \immediate\write-1{#2\on@line.}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\InfWarErr@GenericWarning} +% \begin{macrocode} +\InfWarErr@protected\def\InfWarErr@GenericWarning#1#2{% + \begingroup + \let\on@line\InfWarErr@online + \long\def\@gobble##1{}% + \def\@spaces{\space\space\space\space}% + \def\MessageBreak{^^J#1}% + \newlinechar=10 % + \immediate\write\InfWarErr@unused{^^J#2\on@line.^^J}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\InfWarErr@GenericError} +% Old \TeX\ versions below 3.141 where |^^J| is not working +% as newline in error message and help texts are not supported. +% \begin{macrocode} +\InfWarErr@protected\def\InfWarErr@GenericError#1#2#3#4{% + \begingroup + \immediate\write\InfWarErr@unused{}% + \newlinechar=10 % + \def\@spaces{\space\space\space\space}% + \let\@ehc\InfWarErr@ehc + \let\@ehd\InfWarErr@ehd + \let\on@line\InfWarErr@online + \def\MessageBreak{^^J}% + \edef\InfWarErr@help{\noexpand\errhelp{#4}}% + \InfWarErr@help + \def\MessageBreak{^^J#1}% + \errmessage{% + #2.^^J^^J% + #3^^J% + Type \space H <return> \space for immediate help% + }% + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@PackageInfo} +% \begin{macrocode} +\def\@PackageInfo#1#2{% + \InfWarErr@GenericInfo{% + (#1) \@spaces\@spaces\@spaces + }{% + Package #1 Info: #2% + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@PackageInfoNoLine} +% \begin{macrocode} +\def\@PackageInfoNoLine#1#2{% + \@PackageInfo{#1}{#2\@gobble}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@ClassInfo} +% \begin{macrocode} +\def\@ClassInfo#1#2{% + \InfWarErr@GenericInfo{% + (#1) \space\space\@spaces\@spaces + }{% + Class #1 Info: #2% + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@ClassInfoNoLine} +% \begin{macrocode} +\def\@ClassInfoNoLine#1#2{% + \@ClassInfo{#1}{#2\@gobble}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@PackageWarning} +% \begin{macrocode} +\def\@PackageWarning#1#2{% + \InfWarErr@GenericWarning{% + (#1)\@spaces\@spaces\@spaces\@spaces + }{% + Package #1 Warning: #2% + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@PackageWarningNoLine} +% \begin{macrocode} +\def\@PackageWarningNoLine#1#2{% + \@PackageWarning{#1}{#2\@gobble}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@ClassWarning} +% \begin{macrocode} +\def\@ClassWarning#1#2{% + \InfWarErr@GenericWarning{% + (#1) \space\@spaces\@spaces\@spaces + }{% + Class #1 Warning: #2% + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@ClassWarningNoLine} +% \begin{macrocode} +\def\@ClassWarningNoLine#1#2{% + \@ClassWarning{#1}{#2\@gobble}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@PackageError} +% \begin{macrocode} +\def\@PackageError#1#2#3{% + \InfWarErr@GenericError{% + (#1)\@spaces\@spaces\@spaces\@spaces + }{% + Package #1 Error: #2% + }{% + See the #1 package documentation for explanation.% + }{#3}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@ClassError} +% \begin{macrocode} +\def\@ClassError#1#2#3{% + \InfWarErr@GenericError{% + (#1) \space\@spaces\@spaces\@spaces + }{% + Class #1 Error: #2% + }{% + See the #1 class documentation for explanation.% + }{#3}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\InfWarErr@End +%</package> +% \end{macrocode} +% +% \section{Test} +% +% \begin{macrocode} +%<*test1> +\let\PackageInfo\relax +\input infwarerr.sty\relax +\let\OrgWrite\write +\chardef\WriteUnused=16 % +\def\msg#{\immediate\OrgWrite\WriteUnused} +\msg{File: infwarerr-test1.tex 2007/04/26 v1.0 Test file for plain-TeX} +\catcode64=11 % +%</test1> +% \end{macrocode} +% +% \begin{macrocode} +%<*test2> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{infwarerr-test2.tex}[2007/04/26 v1.0 Test file for LaTeX] +\RequirePackage{infwarerr} +\makeatletter +\let\OrgWrite\write +\chardef\WriteUnused=\@unused +\def\msg#{\immediate\OrgWrite\WriteUnused} +%</test2> +% \end{macrocode} +% +% \begin{macrocode} +%<*test1|test2> +\def\pkgname{PACKAGE} +\def\clsname{CLASS} +\def\msgtext{MESSAGE\MessageBreak SECOND LINE} +\def\hlptext{HELP\MessageBreak SECOND LINE} + +\let\OrgWrite\write +\let\OrgErrMessage\errmessage + +\def\write#1#{% + \@write{#1}% +} +\def\@write#1#2{% + \OrgWrite#1{#2}% + \xdef\WriteNum{\number#1}% + \xdef\WriteText{#2}% +} +\def\TestFailed#1#2{% + \OrgErrMessage{Test (\string#1) failed: #2}% +} +\def\TestWrite#1#2#3{% + \ifnum\WriteNum=#2\relax + \else + \TestFailed#1{write stream number: \WriteNum <> #2}% + \fi + \begingroup + \let~\space + \edef\TestString{#3}% + \ifx\WriteText\TestString + \else + \msg{}% + \msg{[\WriteText]}% + \msg{<>}% + \msg{[#3]}% + \TestFailed#1{write text}% + \fi + \endgroup +} +\newtoks\ErrHelpToks +\def\errmessage#1{% + \global\ErrHelpToks=\expandafter{\the\errhelp}% + \msg{**************** error message ****************}% + \msg{! #1}% + \msg{**************** help message *****************}% + \msg{\the\errhelp}% + \msg{***********************************************}% + \xdef\ErrMessage{! #1}% +} +\def\TestInfo{% + \@PackageInfo\pkgname\msgtext + \TestWrite\@PackageInfo{-1}{% + Package PACKAGE Info: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.% + }% + \@PackageInfoNoLine\pkgname\msgtext + \TestWrite\@PackageInfoNoLine{-1}{% + Package PACKAGE Info: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~SECOND LINE.% + }% + \@ClassInfo\clsname\msgtext + \TestWrite\@ClassInfo{-1}{% + Class CLASS Info: MESSAGE^^J% + (CLASS)~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.% + }% + \@ClassInfoNoLine\clsname\msgtext + \TestWrite\@ClassInfoNoLine{-1}{% + Class CLASS Info: MESSAGE^^J% + (CLASS)~~~~~~~~~~~SECOND LINE.% + }% +} +\def\TestWarning{% + \@PackageWarning\pkgname\msgtext + \TestWrite\@PackageWarning\WriteUnused{% + ^^J% + Package PACKAGE Warning: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.% + ^^J% + }% + \@PackageWarningNoLine\pkgname\msgtext + \TestWrite\@PackageWarningNoLine\WriteUnused{% + ^^J% + Package PACKAGE Warning: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.% + ^^J% + }% + \@ClassWarning\clsname\msgtext + \TestWrite\@ClassWarning\WriteUnused{% + ^^J% + Class CLASS Warning: MESSAGE^^J% + (CLASS)~~~~~~~~~~~~~~SECOND LINE on input line \the\inputlineno.% + ^^J% + }% + \@ClassWarningNoLine\clsname\msgtext + \TestWrite\@ClassWarningNoLine\WriteUnused{% + ^^J% + Class CLASS Warning: MESSAGE^^J% + (CLASS)~~~~~~~~~~~~~~SECOND LINE.% + ^^J% + }% +} +\def\TestError{% +%<test2> \let\write\OrgWrite + \@PackageError\pkgname\msgtext\hlptext + \@TestError\@PackageError{% + ! Package PACKAGE Error: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.^^J% + ^^J% + See the PACKAGE package documentation for explanation.^^J% + Type~~H <return>~~for immediate help% + }{% + HELP^^J% + SECOND LINE% + }% + \@ClassError\clsname\msgtext\hlptext + \@TestError\@ClassError{% + ! Class CLASS Error: MESSAGE^^J% + (CLASS)~~~~~~~~~~~~~~SECOND LINE.^^J% + ^^J% + See the CLASS class documentation for explanation.^^J% + Type~~H <return>~~for immediate help% + }{% + HELP^^J% + SECOND LINE% + }% + \@PackageError\pkgname\msgtext\@ehc + \@TestError\@PackageError{% + ! Package PACKAGE Error: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.^^J% + ^^J% + See the PACKAGE package documentation for explanation.^^J% + Type~~H <return>~~for immediate help% + }{% + Try typing~~<return>~~to proceed.^^J% + If that doesn't work, type~~X <return>~~to quit.% + }% + \@PackageError\pkgname\msgtext\@ehd + \@TestError\@PackageError{% + ! Package PACKAGE Error: MESSAGE^^J% + (PACKAGE)~~~~~~~~~~~~~~~~SECOND LINE.^^J% + ^^J% + See the PACKAGE package documentation for explanation.^^J% + Type~~H <return>~~for immediate help% + }{% + You're in trouble here.~~Try typing~~<return>~~to proceed.^^J% + If that doesn't work, type~~X <return>~~to quit.% + }% +} +\def\@TestError#1#2#3{% + \begingroup + \let~\space + \edef\x{#2}% +%<test2> \@onelevel@sanitize\x +%<test2> \@onelevel@sanitize\ErrMessage + \ifx\x\ErrMessage + \else + \msg{}% + \msg{[\ErrMessage]}% + \msg{<>}% + \msg{[\x]}% + \TestFailed#1{errmessage text}% + \fi + \edef\x{\the\ErrHelpToks}% + \edef\y{#3}% + \ifx\x\y + \else + \msg{}% + \msg{[\the\ErrHelpToks]}% + \msg{<>}% + \msg{[\y]}% + \TestFailed#1{errhelp text}% + \fi + \endgroup +} +\TestInfo +\TestWarning +\TestError +%</test1|test2> +%<test1>\end +%<test2>\@@end +% \end{macrocode} +% +% \section{Installation} +% +% \subsection{Download} +% +% \paragraph{Package.} This package is available on +% CTAN\footnote{\url{ftp://ftp.ctan.org/tex-archive/}}: +% \begin{description} +% \item[\CTAN{macros/latex/contrib/oberdiek/infwarerr.dtx}] The source file. +% \item[\CTAN{macros/latex/contrib/oberdiek/infwarerr.pdf}] Documentation. +% \end{description} +% +% +% \paragraph{Bundle.} All the packages of the bundle `oberdiek' +% are also available in a TDS compliant ZIP archive. There +% the packages are already unpacked and the documentation files +% are generated. The files and directories obey the TDS standard. +% \begin{description} +% \item[\CTAN{macros/latex/contrib/oberdiek/oberdiek-tds.zip}] +% \end{description} +% +% \subsection{Bundle installation} +% +% \paragraph{Unpacking.} Unpack the \xfile{oberdiek-tds.zip} in the +% TDS tree (also known as \xfile{texmf} tree) of your choice. +% Example (linux): +% \begin{quote} +% |unzip oberdiek-tds.zip -d ~/texmf| +% \end{quote} +% +% \paragraph{Script installation.} +% Check the directory \xfile{TDS:scripts/oberdiek/} for +% scripts that need further installation steps. +% Package \xpackage{attachfile2} comes with the Perl script +% \xfile{pdfatfi.pl} that should be installed in such a way +% that it can be called as \texttt{pdfatfi}. +% Example (linux): +% \begin{quote} +% |chmod +x scripts/oberdiek/pdfatfi.pl|\\ +% |cp scripts/oberdiek/pdfatfi.pl /usr/local/bin/| +% \end{quote} +% +% \subsection{Package installation} +% +% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting +% \docstrip\ archive. The files are extracted by running the +% \xfile{.dtx} through \plainTeX: +% \begin{quote} +% \verb|tex infwarerr.dtx| +% \end{quote} +% +% \paragraph{TDS.} Now the different files must be moved into +% the different directories in your installation TDS tree +% (also known as \xfile{texmf} tree): +% \begin{quote} +% \sbox0{^^A +% \begin{tabular}{@{}>{\ttfamily}l@{$\quad\rightarrow\quad$}>{\ttfamily}l@{}} +% infwarerr.sty & tex/generic/oberdiek/infwarerr.sty\\ +% infwarerr.pdf & doc/latex/oberdiek/infwarerr.pdf\\ +% infwarerr-test1.tex & doc/latex/oberdiek/infwarerr-test1.tex\\ +% infwarerr-test2.tex & doc/latex/oberdiek/infwarerr-test2.tex\\ +% infwarerr.dtx & source/latex/oberdiek/infwarerr.dtx\\ +% \end{tabular}^^A +% }% +% \ifdim\wd0>\linewidth +% \mbox{}\nobreak\hskip0pt minus\leftmargin +% \usebox0 +% \nobreak\hskip0pt minus\rightmargin +% \else +% \usebox0 +% \fi +% \end{quote} +% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's +% TDS installing feature, then some files can already be in the right +% place, see the documentation of \docstrip. +% +% \subsection{Refresh file name databases} +% +% If your \TeX~distribution +% (\teTeX, \mikTeX, \dots) relies on file name databases, you must refresh +% these. For example, \teTeX\ users run \verb|texhash| or +% \verb|mktexlsr|. +% +% \subsection{Some details for the interested} +% +% \paragraph{Attached source.} +% +% The PDF documentation on CTAN also includes the +% \xfile{.dtx} source file. It can be extracted by +% AcrobatReader 6 or higher. Another option is \textsf{pdftk}, +% e.g. unpack the file into the current directory: +% \begin{quote} +% \verb|pdftk infwarerr.pdf unpack_files output .| +% \end{quote} +% +% \paragraph{Unpacking with \LaTeX.} +% The \xfile{.dtx} chooses its action depending on the format: +% \begin{description} +% \item[\plainTeX:] Run \docstrip\ and extract the files. +% \item[\LaTeX:] Generate the documentation. +% \end{description} +% If you insist on using \LaTeX\ for \docstrip\ (really, +% \docstrip\ does not need \LaTeX), then inform the autodetect routine +% about your intention: +% \begin{quote} +% \verb|latex \let\install=y\input{infwarerr.dtx}| +% \end{quote} +% Do not forget to quote the argument according to the demands +% of your shell. +% +% \paragraph{Generating the documentation.} +% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate +% the documentation. The process can be configured by the +% configuration file \xfile{ltxdoc.cfg}. For instance, put this +% line into this file, if you want to have A4 as paper format: +% \begin{quote} +% \verb|\PassOptionsToClass{a4paper}{article}| +% \end{quote} +% An example follows how to generate the +% documentation with pdf\LaTeX: +% \begin{quote} +%\begin{verbatim} +%pdflatex infwarerr.dtx +%makeindex -s gind.ist infwarerr.idx +%pdflatex infwarerr.dtx +%makeindex -s gind.ist infwarerr.idx +%pdflatex infwarerr.dtx +%\end{verbatim} +% \end{quote} +% +% \begin{History} +% \begin{Version}{2007/04/26 v1.0} +% \item +% First version. +% \end{Version} +% \end{History} +% +% \PrintIndex +% +% \Finale +\endinput |