diff options
author | Karl Berry <karl@freefriends.org> | 2011-04-12 22:56:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-04-12 22:56:39 +0000 |
commit | 3c9b5c2960ae2455180bdb3a4e67bf10175b39af (patch) | |
tree | 53ac9731c23e82f60349ec920ed8d816738913dc /Master/texmf-dist/source/latex/oberdiek/setouterhbox.dtx | |
parent | f437333cf5d63d69f5ab9fd1eb553af4175037d0 (diff) |
oberdiek (12apr11)
git-svn-id: svn://tug.org/texlive/trunk@22061 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/setouterhbox.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/setouterhbox.dtx | 141 |
1 files changed, 89 insertions, 52 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/setouterhbox.dtx b/Master/texmf-dist/source/latex/oberdiek/setouterhbox.dtx index d0052cf143c..20ea80485c9 100644 --- a/Master/texmf-dist/source/latex/oberdiek/setouterhbox.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/setouterhbox.dtx @@ -168,7 +168,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{565} +% \CheckSum{639} % % \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 @@ -372,14 +372,18 @@ by/a/very_long_long_long_path.html}% % Prevent reloading more than one, necessary for \plainTeX: % Reload check, especially if the package is not used with \LaTeX. % \begin{macrocode} -\begingroup - \catcode44 12 % , - \catcode45 12 % - - \catcode46 12 % . - \catcode58 12 % : - \catcode64 11 % @ - \catcode123 1 % { - \catcode125 2 % } +\begingroup\catcode61\catcode48\catcode32=10\relax% + \catcode13=5 % ^^M + \endlinechar=13 % + \catcode35=6 % # + \catcode39=12 % ' + \catcode44=12 % , + \catcode45=12 % - + \catcode46=12 % . + \catcode58=12 % : + \catcode64=11 % @ + \catcode123=1 % { + \catcode125=2 % } \expandafter\let\expandafter\x\csname ver@setouterhbox.sty\endcsname \ifx\x\relax % plain-TeX, first loading \else @@ -387,7 +391,6 @@ by/a/very_long_long_long_path.html}% \ifx\x\empty % LaTeX, first loading, % variable is initialized, but \ProvidesPackage not yet seen \else - \catcode35 6 % # \expandafter\ifx\csname PackageInfo\endcsname\relax \def\x#1#2{% \immediate\write-1{Package #1 Info: #2.}% @@ -399,24 +402,27 @@ by/a/very_long_long_long_path.html}% \aftergroup\endinput \fi \fi -\endgroup +\endgroup% % \end{macrocode} % Package identification: % \begin{macrocode} -\begingroup - \catcode35 6 % # - \catcode40 12 % ( - \catcode41 12 % ) - \catcode44 12 % , - \catcode45 12 % - - \catcode46 12 % . - \catcode47 12 % / - \catcode58 12 % : - \catcode64 11 % @ - \catcode91 12 % [ - \catcode93 12 % ] - \catcode123 1 % { - \catcode125 2 % } +\begingroup\catcode61\catcode48\catcode32=10\relax% + \catcode13=5 % ^^M + \endlinechar=13 % + \catcode35=6 % # + \catcode39=12 % ' + \catcode40=12 % ( + \catcode41=12 % ) + \catcode44=12 % , + \catcode45=12 % - + \catcode46=12 % . + \catcode47=12 % / + \catcode58=12 % : + \catcode64=11 % @ + \catcode91=12 % [ + \catcode93=12 % ] + \catcode123=1 % { + \catcode125=2 % } \expandafter\ifx\csname ProvidesPackage\endcsname\relax \def\x#1#2#3[#4]{\endgroup \immediate\write-1{Package: #3 #4}% @@ -435,32 +441,41 @@ by/a/very_long_long_long_path.html}% \fi \expandafter\x\csname ver@setouterhbox.sty\endcsname \ProvidesPackage{setouterhbox}% - [2007/09/09 v1.7 Set hbox in outer horizontal mode (HO)] + [2007/09/09 v1.7 Set hbox in outer horizontal mode (HO)]% % \end{macrocode} % % \begin{macrocode} -\begingroup - \catcode123 1 % { - \catcode125 2 % } +\begingroup\catcode61\catcode48\catcode32=10\relax% + \catcode13=5 % ^^M + \endlinechar=13 % + \catcode123=1 % { + \catcode125=2 % } + \catcode64=11 % @ \def\x{\endgroup \expandafter\edef\csname setouterhboxAtEnd\endcsname{% - \catcode35 \the\catcode35\relax - \catcode64 \the\catcode64\relax - \catcode123 \the\catcode123\relax - \catcode125 \the\catcode125\relax + \endlinechar=\the\endlinechar\relax + \catcode13=\the\catcode13\relax + \catcode32=\the\catcode32\relax + \catcode35=\the\catcode35\relax + \catcode61=\the\catcode61\relax + \catcode64=\the\catcode64\relax + \catcode123=\the\catcode123\relax + \catcode125=\the\catcode125\relax }% }% -\x -\catcode35 6 % # -\catcode64 11 % @ -\catcode123 1 % { -\catcode125 2 % } +\x\catcode61\catcode48\catcode32=10\relax% +\catcode13=5 % ^^M +\endlinechar=13 % +\catcode35=6 % # +\catcode64=11 % @ +\catcode123=1 % { +\catcode125=2 % } \def\TMP@EnsureCode#1#2{% \edef\setouterhboxAtEnd{% \setouterhboxAtEnd - \catcode#1 \the\catcode#1\relax + \catcode#1=\the\catcode#1\relax }% - \catcode#1 #2\relax + \catcode#1=#2\relax } \TMP@EnsureCode{40}{12}% ( \TMP@EnsureCode{41}{12}% ) @@ -470,9 +485,11 @@ by/a/very_long_long_long_path.html}% \TMP@EnsureCode{47}{12}% / \TMP@EnsureCode{58}{12}% : \TMP@EnsureCode{60}{12}% < -\TMP@EnsureCode{61}{12}% = \TMP@EnsureCode{62}{12}% > +\TMP@EnsureCode{91}{12}% [ +\TMP@EnsureCode{93}{12}% ] \TMP@EnsureCode{96}{12}% ` +\edef\setouterhboxAtEnd{\setouterhboxAtEnd\noexpand\endinput} % \end{macrocode} % % \subsection{Interface macros} @@ -733,9 +750,8 @@ E \egroup \expandafter\endgroup \ifx\x\fmtname \else - \setouterhboxAtEnd - \expandafter\endinput -\fi + \expandafter\setouterhboxAtEnd +\fi% % \end{macrocode} % \begin{macro}{\Hy@setouterhbox} % \cs{Hy@setouterhbox} is the internal hook that \xpackage{hyperref} @@ -753,7 +769,7 @@ E \egroup % \end{macrocode} % % \begin{macrocode} -\setouterhboxAtEnd +\setouterhboxAtEnd% %</package> % \end{macrocode} % @@ -817,6 +833,22 @@ E \egroup \advance\count@ 1 % \repeat } +\def\RangeCatcodeCheck#1#2#3{% + \count@=#1\relax + \loop + \ifnum#3=\catcode\count@ + \else + \errmessage{% + Character \the\count@\space + with wrong catcode \the\catcode\count@\space + instead of \number#3% + }% + \fi + \ifnum\count@<#2\relax + \advance\count@ 1 % + \repeat +} +\def\space{ } \expandafter\ifx\csname LoadCommand\endcsname\relax \def\LoadCommand{\input setouterhbox.sty\relax}% \fi @@ -827,15 +859,20 @@ E \egroup \RangeCatcodeInvalid{123}{255}% \catcode`\@=12 % \catcode`\\=0 % - \catcode`\{=1 % - \catcode`\}=2 % - \catcode`\#=6 % - \catcode`\[=12 % - \catcode`\]=12 % \catcode`\%=14 % - \catcode`\ =10 % - \catcode13=5 % \LoadCommand + \RangeCatcodeCheck{0}{36}{15}% + \RangeCatcodeCheck{37}{37}{14}% + \RangeCatcodeCheck{38}{47}{15}% + \RangeCatcodeCheck{48}{57}{12}% + \RangeCatcodeCheck{58}{63}{15}% + \RangeCatcodeCheck{64}{64}{12}% + \RangeCatcodeCheck{65}{90}{11}% + \RangeCatcodeCheck{91}{91}{15}% + \RangeCatcodeCheck{92}{92}{0}% + \RangeCatcodeCheck{93}{96}{15}% + \RangeCatcodeCheck{97}{122}{11}% + \RangeCatcodeCheck{123}{255}{15}% \RestoreCatcodes } \Test |