summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/oberdiek
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek')
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/accsupp.dtx50
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/alphalph.dtx134
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/askinclude.dtx52
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx207
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx1743
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/atveryend.dtx83
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/auxhook.dtx46
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/bigintcalc.dtx161
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/bitset.dtx164
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/bookmark.dtx329
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/catchfile.dtx171
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/embedfile.dtx154
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/engord.dtx135
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/eolgrab.dtx1042
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx246
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/etexcmds.dtx248
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/gettitlestring.dtx153
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/grfext.dtx201
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/grffile.dtx324
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/hobsub.dtx1310
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/hologo.dtx261
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx27
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/hopatch.dtx896
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/hycolor.dtx61
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/hypcap.dtx26
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/hyphsubst.dtx141
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/iflang.dtx136
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/ifluatex.dtx139
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/ifpdf.dtx211
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/ifvtex.dtx139
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/infwarerr.dtx139
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/inputenx.dtx395
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/intcalc.dtx139
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/kvdefinekeys.dtx202
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx357
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx256
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/letltxmacro.dtx265
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/listingsutf8.dtx54
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx1098
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/luacolor.dtx230
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/luatex.dtx236
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/magicnum.dtx261
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/mleftright.dtx946
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/oberdiek.ins8
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/oberdiek.tex137
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/pagegrid.dtx147
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/pdfcol.dtx139
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/pdfescape.dtx441
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/pdfrender.dtx141
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/pdftexcmds.dtx710
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/pmboxdraw.dtx4493
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/protecteddef.dtx1002
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/readme-ctan.txt2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/refcount.dtx963
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/rerunfilecheck.dtx81
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/resizegather.dtx134
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/rotchiffre.dtx1363
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/setouterhbox.dtx141
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/soulutf8.dtx136
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/stringenc.dtx95
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/telprint.dtx136
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/uniquecounter.dtx162
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/zref.dtx668
63 files changed, 20784 insertions, 3883 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/accsupp.dtx b/Master/texmf-dist/source/latex/oberdiek/accsupp.dtx
index aa5950ea5fc..0e08e442ed4 100644
--- a/Master/texmf-dist/source/latex/oberdiek/accsupp.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/accsupp.dtx
@@ -171,7 +171,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{432}
+% \CheckSum{462}
%
% \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
@@ -445,28 +445,37 @@ A\notparallel B
% \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 ACCSUPP@AtEnd\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\ACCSUPP@AtEnd{%
\ACCSUPP@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{10}{12}% ^^J
\TMP@EnsureCode{33}{12}% !
@@ -480,13 +489,12 @@ A\notparallel B
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{94}{7}% ^ (superscript)
\TMP@EnsureCode{96}{12}% `
\TMP@EnsureCode{254}{12}% ^^fe
\TMP@EnsureCode{255}{12}% ^^ff
-\g@addto@macro\ACCSUPP@AtEnd{\endinput}
+\edef\ACCSUPP@AtEnd{\ACCSUPP@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% Package identification.
@@ -594,21 +602,21 @@ A\notparallel B
\let\ACCSUPP@driver\ACCSUPP@temp
\fi
\fi
-\fi
+\fi%
\ifx\ACCSUPP@driver\relax
\PackageError{accsupp}{%
Missing driver option.\MessageBreak
Package loading is aborted%
}\@ehc
\expandafter\ACCSUPP@AtEnd
-\fi
+\fi%
\InputIfFileExists{accsupp-\ACCSUPP@driver.def}{}{%
\PackageError{accsupp}{%
Unsupported driver `\ACCSUPP@driver'.\MessageBreak
Package loading is aborted%
}\@ehc
\ACCSUPP@AtEnd
-}
+}%
% \end{macrocode}
%
% \subsection{Main macro}
@@ -765,7 +773,7 @@ A\notparallel B
% \end{macrocode}
%
% \begin{macrocode}
-\ACCSUPP@AtEnd
+\ACCSUPP@AtEnd%
%</package>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/oberdiek/alphalph.dtx b/Master/texmf-dist/source/latex/oberdiek/alphalph.dtx
index e9ac7289c21..cc22f0f856a 100644
--- a/Master/texmf-dist/source/latex/oberdiek/alphalph.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/alphalph.dtx
@@ -191,7 +191,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1140}
+% \CheckSum{1213}
%
% \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
@@ -569,14 +569,18 @@ and the derived files
% \end{macrocode}
% 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@alphalph.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -584,7 +588,6 @@ and the derived files
\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.}%
@@ -596,24 +599,27 @@ and the derived files
\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}%
@@ -632,34 +638,43 @@ and the derived files
\fi
\expandafter\x\csname ver@alphalph.sty\endcsname
\ProvidesPackage{alphalph}%
- [2010/04/18 v2.3 Converting numbers to letters (HO)]
+ [2010/04/18 v2.3 Converting numbers to letters (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 AlPh@AtEnd\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\AlPh@AtEnd{%
\AlPh@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{33}{12}% !
\TMP@EnsureCode{39}{12}% '
@@ -671,12 +686,12 @@ and the derived files
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{59}{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}% `
\TMP@EnsureCode{124}{12}% |
+\edef\AlPh@AtEnd{\AlPh@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Package loading}
@@ -1269,7 +1284,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\AlPh@AtEnd
+\AlPh@AtEnd%
%</package>
% \end{macrocode}
%
@@ -1333,6 +1348,22 @@ and the derived files
\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 alphalph.sty\relax}%
\fi
@@ -1343,15 +1374,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/askinclude.dtx b/Master/texmf-dist/source/latex/oberdiek/askinclude.dtx
index ce249ccbbb6..96787fc2056 100644
--- a/Master/texmf-dist/source/latex/oberdiek/askinclude.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/askinclude.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1991-1994 by Pablo A. Straub
-% Copyright (C) 2007 by
+% Copyright (C) 2007, 2008 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -124,7 +124,7 @@
This is a generated file.
Copyright (C) 1991-1994 by Pablo A. Straub
-Copyright (C) 2007 by
+Copyright (C) 2007, 2008 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -235,7 +235,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{2044}
+% \CheckSum{2076}
%
% \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
@@ -592,28 +592,37 @@ and the derived files
% \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\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 AskInc@AtEnd\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\AskInc@AtEnd{%
\AskInc@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{33}{12}% !
\TMP@EnsureCode{39}{12}% '
@@ -626,12 +635,12 @@ and the derived files
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{63}{12}% ?
\TMP@EnsureCode{91}{12}% [
\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{96}{12}% `
+\edef\AskInc@AtEnd{\AskInc@AtEnd\noexpand\endinput}
\ProvidesPackage{askinclude}%
[2008/08/11 v2.1 Interactive asking of included files]%
% \end{macrocode}
@@ -857,9 +866,8 @@ and the derived files
}{}%
\fi
}%
- \AskInc@AtEnd
- \expandafter\endinput
-\fi
+ \expandafter\AskInc@AtEnd
+\fi%
% \end{macrocode}
%
% \subsection{\cs{includeonly}}
@@ -1583,7 +1591,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\AskInc@AtEnd
+\AskInc@AtEnd%
%</package>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx b/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx
index de1eb95f87b..f5372369e3d 100644
--- a/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007-2010 by
+% Copyright (C) 2007-2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -81,7 +81,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: atbegshi 2010/03/25 v1.12 At begin shipout hook (HO)}
+\Msg{* Package: atbegshi 2011/01/30 v1.15 At begin shipout hook (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -92,7 +92,7 @@
This is a generated file.
-Copyright (C) 2007-2010 by
+Copyright (C) 2007-2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -163,7 +163,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{atbegshi.drv}%
- [2010/03/25 v1.12 At begin shipout hook (HO)]%
+ [2011/01/30 v1.15 At begin shipout hook (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -172,7 +172,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1434}
+% \CheckSum{1524}
%
% \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
@@ -193,7 +193,7 @@ and the derived files
% \GetFileInfo{atbegshi.drv}
%
% \title{The \xpackage{atbegshi} package}
-% \date{2010/03/25 v1.12}
+% \date{2011/01/30 v1.15}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -806,14 +806,18 @@ The last page.
% \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 % @
- \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@atbegshi.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -821,7 +825,6 @@ The last page.
\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.}%
@@ -833,24 +836,27 @@ The last page.
\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}%
@@ -869,34 +875,43 @@ The last page.
\fi
\expandafter\x\csname ver@atbegshi.sty\endcsname
\ProvidesPackage{atbegshi}%
- [2010/03/25 v1.12 At begin shipout hook (HO)]
+ [2011/01/30 v1.15 At begin shipout hook (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 AtBegShi@AtEnd\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\AtBegShi@AtEnd{%
\AtBegShi@AtEnd
- \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}% )
@@ -905,9 +920,11 @@ The last page.
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{58}{12}% :
-\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{94}{7}% ^(superscript)
\TMP@EnsureCode{96}{12}% `
+\edef\AtBegShi@AtEnd{\AtBegShi@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Preparations}
@@ -915,8 +932,14 @@ The last page.
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input infwarerr.sty\relax
- \input ltxcmds.sty\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+ \TMP@RequirePackage{infwarerr}[2007/09/09]%
+ \TMP@RequirePackage{ltxcmds}[2010/03/01]%
\else
\RequirePackage{infwarerr}[2007/09/09]%
\RequirePackage{ltxcmds}[2010/03/01]%
@@ -937,11 +960,9 @@ The last page.
\ltx@zero
\fi
\fi
- \errmessage{%
- Package atbegshi: \string#1\space
- is already defined%
- }%
- \endgroup
+ \@PackageError{atbegshi}{%
+ \string#1\space is already defined%
+ }\@ehd
\fi
}%
\else
@@ -1149,12 +1170,15 @@ X \endgroup
\ifAtBegShi@Discarded
\else
#1%
- \ifvoid\AtBeginShipoutBox
- \@PackageWarning{atbegshi}{%
- Shipout box was voided by hook,\MessageBreak
- ignoring shipout box%
- }%
- \AtBeginShipoutDiscard
+ \ifAtBegShi@Discarded
+ \else
+ \ifvoid\AtBeginShipoutBox
+ \@PackageWarning{atbegshi}{%
+ Shipout box was voided by hook,\MessageBreak
+ ignoring shipout box%
+ }%
+ \AtBeginShipoutDiscard
+ \fi
\fi
\fi
}
@@ -1304,14 +1328,13 @@ X \endgroup
\def\AtBegShi@AbortIfUndefined#1{%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname#1\endcsname\relax
- \AtBegShi@AtEnd
- \expandafter\endinput
+ \expandafter\AtBegShi@AtEnd
\fi
}
-\AtBegShi@AbortIfUndefined{currentgrouplevel}
-\AtBegShi@AbortIfUndefined{AtBeginDocument}
-\AtBegShi@AbortIfUndefined{@ifpackageloaded}
-\AtBegShi@AbortIfUndefined{@ifclassloaded}
+\AtBegShi@AbortIfUndefined{currentgrouplevel}%
+\AtBegShi@AbortIfUndefined{AtBeginDocument}%
+\AtBegShi@AbortIfUndefined{@ifpackageloaded}%
+\AtBegShi@AbortIfUndefined{@ifclassloaded}%
% \end{macrocode}
%
% \subsubsection{Package \xpackage{crop}}
@@ -1586,7 +1609,7 @@ X \endgroup
% \end{macrocode}
%
% \begin{macrocode}
-\AtBegShi@AtEnd
+\AtBegShi@AtEnd%
%</package>
% \end{macrocode}
%
@@ -1650,6 +1673,22 @@ X \endgroup
\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 atbegshi.sty\relax}%
\fi
@@ -1660,15 +1699,20 @@ X \endgroup
\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
@@ -1683,7 +1727,7 @@ X \endgroup
%<*test2>
\input atbegshi.sty\relax
\def\msg#{\immediate\write16}
-\msg{File: atbegshi-test2.tex 2010/03/25 v1.12 Test file for plain-TeX}
+\msg{File: atbegshi-test2.tex 2011/01/30 v1.15 Test file for plain-TeX}
\def\testmsg#1#2{%
\msg{}%
\msg{*** Test with box (#1), expected page output [#2]}% hash-ok
@@ -1780,7 +1824,7 @@ Hello World
% \begin{macrocode}
%<*test3>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{atbegshi-test3.tex}[2010/03/25 v1.12 Test file for LaTeX]
+\ProvidesFile{atbegshi-test3.tex}[2011/01/30 v1.15 Test file for LaTeX]
\RequirePackage{color}
\pagecolor{yellow}
\documentclass[a5paper,showtrims]{memoir}
@@ -2090,6 +2134,19 @@ Hello World
% \cs{AtBeginShipoutNext} can now be used inside
% \cs{AtBeginShipoutNext}.
% \end{Version}
+% \begin{Version}{2010/08/18 v1.13}
+% \item
+% Fixes for \cs{AtBegShi@CheckDefinable}.
+% \end{Version}
+% \begin{Version}{2010/12/02 v1.14}
+% \item
+% Remove the warning because of void box if the hook
+% calls \AtBeginShipoutDiscard.
+% \end{Version}
+% \begin{Version}{2011/01/30 v1.15}
+% \item
+% Already loaded package files are not input in \hologo{plainTeX}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx b/Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx
index 82632957b4f..d3db746afdb 100644
--- a/Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2005-2009 by
+% Copyright (C) 2005-2010 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -20,7 +20,8 @@
% This work consists of the main source file attachfile2.dtx
% and the derived files
% attachfile2.sty, attachfile2.pdf, attachfile2.ins, attachfile2.drv,
-% atfidvips.def, atfipdftex.def, pdfatfi.pl.
+% atfi-dvips.def, atfi-pdftex.def, atfi-dvipdfmx.def,
+% pdfatfi.pl.
%
% Distribution:
% CTAN:macros/latex/contrib/oberdiek/attachfile2.dtx
@@ -54,8 +55,9 @@
%
% Installation:
% TDS:tex/latex/oberdiek/attachfile2.sty
-% TDS:tex/latex/oberdiek/atfidvips.def
-% TDS:tex/latex/oberdiek/atfipdftex.def
+% TDS:tex/latex/oberdiek/atfi-dvips.def
+% TDS:tex/latex/oberdiek/atfi-pdftex.def
+% TDS:tex/latex/oberdiek/atfi-dvipdfmx.def
% TDS:scripts/oberdiek/pdfatfi.pl (exec flag)
% TDS:doc/latex/oberdiek/attachfile2.pdf
% TDS:source/latex/oberdiek/attachfile2.dtx
@@ -75,7 +77,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: attachfile2 2009/09/25 v2.5 attach files into PDF (HO)}
+\Msg{* Package: attachfile2 2010/09/27 v2.6 attach files into PDF (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -86,7 +88,7 @@
This is a generated file.
-Copyright (C) 2005-2009 by
+Copyright (C) 2005-2010 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -106,7 +108,8 @@ This Current Maintainer of this work is Heiko Oberdiek.
This work consists of the main source file attachfile2.dtx
and the derived files
attachfile2.sty, attachfile2.pdf, attachfile2.ins, attachfile2.drv,
- atfidvips.def, atfipdftex.def, pdfatfi.pl.
+ atfi-dvips.def, atfi-pdftex.def, atfi-dvipdfmx.def,
+ pdfatfi.pl.
\endpreamble
\let\MetaPrefix\DoubleperCent
@@ -116,8 +119,9 @@ and the derived files
\file{attachfile2.drv}{\from{attachfile2.dtx}{driver}}%
\usedir{tex/latex/oberdiek}%
\file{attachfile2.sty}{\from{attachfile2.dtx}{package}}%
- \file{atfidvips.def}{\from{attachfile2.dtx}{dvips}}%
- \file{atfipdftex.def}{\from{attachfile2.dtx}{pdftex}}%
+ \file{atfi-dvips.def}{\from{attachfile2.dtx}{dvips}}%
+ \file{atfi-pdftex.def}{\from{attachfile2.dtx}{pdftex}}%
+ \file{atfi-dvipdfmx.def}{\from{attachfile2.dtx}{dvipdfmx}}%
\nopreamble
\nopostamble
\usedir{scripts/oberdiek}%
@@ -132,7 +136,8 @@ and the derived files
\Msg{* To finish the installation you have to move the following}
\Msg{* files into a directory searched by TeX:}
\Msg{*}
-\Msg{* attachfile2.sty, atfidvips.def, atfipdftex.def}
+\Msg{* attachfile2.sty, atfi-dvips.def, atfi-pdftex.def,}
+\Msg{* atfi-dvipdfmx.def}
\Msg{*}
\Msg{* And install the following script file:}
\Msg{*}
@@ -153,7 +158,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{attachfile2.drv}%
- [2009/09/25 v2.5 attach files into PDF (HO)]%
+ [2010/09/27 v2.6 attach files into PDF (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -162,7 +167,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1405}
+% \CheckSum{1744}
%
% \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
@@ -183,7 +188,7 @@ and the derived files
% \GetFileInfo{attachfile2.drv}
%
% \title{The \xpackage{attachfile2} package}
-% \date{2009/09/25 v2.5}
+% \date{2010/09/27 v2.6}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -284,7 +289,11 @@ and the derived files
%
% \subsubsection{New options}
% \begin{itemize}
-% \item Driver options \xoption{dvips} and \xoption{pdftex}.
+% \item Driver options \xoption{dvips}, \xoption{pdftex},
+% \xoption{dvipdfmx} and \xoption{xetex} that is an
+% alias for \xoption{dvipdfmx}.
+% \item Option \xoption{driverfallback} specifies a DVI driver
+% if the driver cannot be detected automatically.
% \item New options \xoption{final} and \xoption{draft}.
% \item New option \xoption{scale} for scaling the annotation rectangle.
% \item Options \xoption{file} and \xoption{nofile} for controlling
@@ -360,8 +369,10 @@ and the derived files
% such as file size, file date, checksum, \dots.
% As package \xpackage{embedfile} shows the new features
% of \pdfTeX\ 1.30 are very useful for getting this kind of
-% data. However the main development preceded this \pdfTeX\ version.
-% Thus the Perl script \xfile{pdfatfi.pl} is used to provide this data.
+% data. Since version 2.6 these data are used if available.
+%
+% For older versions of \pdfTeX\ and \XeTeX\ the Perl script
+% \xfile{pdfatfi.pl} is provided to get this data.
% The use of the Perl script is not mandatory. This data can be shown
% by PDF viewers, but they are not a requirement of the PDF specification.
%
@@ -384,6 +395,7 @@ and the derived files
% Some of the changes I can remember:
% \begin{itemize}
% \item Support for dvips.
+% \item Support for dvipdfmx/\XeTeX.
% \item Setting and filling the /Param entry for files
% (file date, file size, \dots).
% \item Perl script \xfile{pdfatfi.pl}.
@@ -403,149 +415,215 @@ and the derived files
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{attachfile2}%
- [2009/09/25 v2.5 attach files into PDF (HO)]%
+ [2010/09/27 v2.6 attach files into PDF (HO)]%
% \end{macrocode}
+%
+% \subsubsection{Loading of packages}
+%
% \begin{macrocode}
-\RequirePackage{ifpdf}
+\RequirePackage{ifpdf}[2009/04/10]
+\RequirePackage{ifxetex}
+\RequirePackage{ifluatex}[2009/04/10]
\RequirePackage{keyval}
\RequirePackage{color}
-\RequirePackage{kvoptions}[2006/08/17]
+\RequirePackage{infwarerr}[2010/04/08]
+\RequirePackage{ltxcmds}[2010/04/26]
+\RequirePackage{kvoptions}[2009/07/21]
+\RequirePackage{pdftexcmds}[2010/04/01]
\RequirePackage{pdfescape}[2007/11/11]
-
-% --- hyperref ---
-
+% \end{macrocode}
+% Package \xpackage{hyperref} is needed because of \cs{pdfstringdef}.
+% \begin{macrocode}
\RequirePackage{hyperref}
-% because of \pdfstringdef
\RequirePackage{hycolor}[2008/07/29]
-
-% --- convert to hex ---
-
-\def\atfi@hexdigit#1{%
- \ifcase#1%
- 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or 9\or
- a\or b\or c\or d\or e\or f%
- \fi
-}
-% detour via \dimexpr to avoid eTeX's nasty expression rounding
-\def\atfi@hexchar#1{%
- \atfi@hexdigit{\numexpr\dimexpr.0625\dimexpr`#1sp\relax\relax\relax}%
- \atfi@hexdigit{%
- \numexpr`#1-16*\dimexpr.0625\dimexpr`#1sp\relax\relax\relax
+% \end{macrocode}
+%
+% \subsubsection{Value checking}
+%
+% \begin{macro}{\atfi@Match}
+% \begin{macrocode}
+\ltx@IfUndefined{pdfmatch}{%
+ \def\atfi@Match#1#2#3#4#5{}%
+}{%
+ \def\atfi@Match#1#2#3{%
+ \begingroup
+ \edef\^{\ltx@backslashchar\string^}%
+ \edef\.{\ltx@backslashchar.}%
+ \let\#\ltx@hashchar
+ \edef\[{\ltx@backslashchar[}% ]]
+ \edef\${\ltx@backslashchar$}%
+ \let\%\ltx@percentchar
+ \edef\&{\string&}%
+ \edef\({\ltx@backslashchar(}%
+ \edef\){\ltx@backslashchar)}%
+ \edef\|{\ltx@backslashchar|}%
+ \edef\*{\ltx@backslashchar*}%
+ \edef\+{\ltx@backslashchar+}%
+ \edef\?{\ltx@backslashchar?}%
+ \edef\{{\ltx@backslashchar\ltx@leftbracechar}%
+ \edef\}{\ltx@rightbracechar}%
+ \edef\\{\ltx@backslashchar\ltx@backslashchar}%
+ \edef\~{\string~}%
+ \ifcase\pdfmatch#3{#2}{#1} %
+ \endgroup
+ \expandafter\ltx@secondoftwo
+ \or
+ \endgroup
+ \expandafter\ltx@firstoftwo
+ \else
+ \atfi@Warning{%
+ Internal error: Wrong pattern!\MessageBreak
+ --> #2 <--\MessageBreak
+ Pattern check ignored%
+ }%
+ \endgroup
+ \expandafter\ltx@firstoftwo
+ \fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@PatToken}
+% \begin{macrocode}
+ \def\atfi@PatToken{%
+ [%
+ -% first character
+ !%
+ \#$\%\&'%
+ \*\+\.%
+ 0-9%
+ A-Z%
+ \^_`%
+ a-z%
+ \{\}\|\~%
+ ]+%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@CR}
+% \begin{macrocode}
+ \begingroup
+ \lccode64=13 % @
+ \lowercase{\endgroup
+ \def\atfi@CR{@}%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@PatQuotedString}
+% \begin{macrocode}
+ \def\atfi@PatQuotedString{%
+ "%
+ ([^"\\\atfi@CR]|\\.)*%
+ "%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+ \ltx@ifpackagelater{ltxcmds}{2010/09/11}{}{%
+% \end{macrocode}
+% \begin{macro}{\atfi@ltx@leftbracechar}
+% \begin{macrocode}
+ \begingroup
+ \lccode`0=`\{\relax
+ \lowercase{\endgroup
+ \def\ltx@leftbracechar{0}%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ltx@rightbracechar}
+% \begin{macrocode}
+ \begingroup
+ \lccode`0=`\}\relax
+ \lowercase{\endgroup
+ \def\ltx@rightbracechar{0}%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
}%
}
-\def\atfi@tohex#1{%
- \ifx\relax#1%
- \else
- \atfi@hexchar{#1}%
- \expandafter\atfi@tohex
- \fi
-}
-
-% --- convert to name ---
-
-\def\atfi@converttoname#1#2{%
- \edef#1{#2}%
- \@onelevel@sanitize#1%
- \edef#1{\expandafter\atfi@spacetoother#1 \relax}%
- \edef#1{\expandafter\atfi@converttokens#1\relax}%
+% \end{macrocode}
+%
+% \begin{macro}{\atfi@Warning}
+% \begin{macrocode}
+\def\atfi@Warning{\PackageWarning{attachfile2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Option declarations}
+%
+% \begin{macrocode}
+\SetupKeyvalOptions{%
+ family=AtFi,%
+ prefix=atfi@%
}
-
-\edef\atfi@hash{\string#}%
-\catcode`\ =12\relax%
-\def\atfi@space{ }%
-\catcode`\ =10\relax%
-
-\def\atfi@spacetoother#1 #2\relax{%
- #1%
- \ifx\\#2\\%
+% \end{macrocode}
+% \begin{macro}{\atfi@setup}
+% \begin{macrocode}
+\def\atfi@setup{\setkeys{AtFi}}
+% \end{macrocode}
+% \end{macro}
+%
+% Options \xoption{draft} and \xoption{final}.
+% \begin{macrocode}
+\DeclareBoolOption{draft}
+\DeclareComplementaryOption{final}{draft}
+% \end{macrocode}
+%
+% Option \xoption{mimetype}.
+% \begin{macro}{\atfi@mimetype}
+% \begin{macrocode}
+\def\atfi@mimetype{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\define@key{AtFi}{mimetype}{%
+ \edef\atfi@mimetype{#1}%
+ \ifx\atfi@mimetype\ltx@empty
\else
- \atfi@space
- \@ReturnAfterFi{%
- \atfi@spacetoother #2\relax
+ \atfi@Match\atfi@mimetype{%
+ ^(application|audio|image|model|text|video|x-\atfi@PatToken)%
+ /%
+ ([a-z\-\+_\.0-9]+)%
+ (; ?\atfi@PatToken=(\atfi@PatToken|\atfi@PatQuotedString))*$%
+ }{icase}{}{%
+ \atfi@Warning{%
+ Invalid value `\atfi@mimetype'\MessageBreak
+ of option `mimetype'.\MessageBreak
+ Value is discarded%
+ }%
+ \let\atfi@mimetype\ltx@empty
}%
\fi
-}
-\long\def\@ReturnAfterFi#1\fi{\fi#1}
-
-\def\atfi@converttokens#1{%
- \ifx\relax#1%
+ \ifx\atfi@mimetype\ltx@empty
\else
- \ifnum`#1<33 %
- \ifcase`#1%
- % drop illegal zero
- \else
- \atfi@hash\atfi@hexchar#1%
- \fi
- \else
- \ifnum`#1>126 %
- \atfi@hash\atfi@hexchar#1%
- \else
- \ifnum`#1=40 % (
- \atfi@hash 28%
- \else\ifnum`#1=41 % )
- \atfi@hash 29%
- \else\ifnum`#1=60 % <
- \atfi@hash 3c%
- \else\ifnum`#1=62 % >
- \atfi@hash 3e%
- \else\ifnum`#1=91 % [
- \atfi@hash 5b%
- \else\ifnum`#1=93 % ]
- \atfi@hash 5d%
- \else\ifnum`#1=123 % {
- \atfi@hash 7b%
- \else\ifnum`#1=125 % }
- \atfi@hash 7d%
- \else\ifnum`#1=47 % /
- \atfi@hash 2f%
- \else\ifnum`#1=37 % %
- \atfi@hash 25%
- \else
- #1%
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \fi
- \fi
- \expandafter\atfi@converttokens
+ \EdefEscapeName\atfi@mimetype{\atfi@mimetype}%
+ \edef\atfi@mimetype{/Subtype/\atfi@mimetype}%
\fi
}
-
-
-% --- options ---
-
-% options "draft" and "final"
-\newif\ifatfi@draft
-\let\atfi@finaltrue\atfi@draftfalse
-\let\atfi@finalfalse\atfi@drafttrue
-\define@key{AtFi}{final}[true]{%
- \csname atfi@final#1\endcsname
-}
-\define@key{AtFi}{draft}[true]{%
- \csname atfi@draft#1\endcsname
-}
-
-% option mimetype
-\def\atfi@mimetype{}
-\define@key{AtFi}{mimetype}{%
- \atfi@converttoname\atfi@mimetype{#1}%
- \edef\atfi@mimetype{/Subtype/\atfi@mimetype}%
-}
-
-% option icon
+% \end{macrocode}
+%
+% Option \xoption{icon}
+% \begin{macrocode}
\define@key{AtFi}{icon}{%
\def\atfi@icon{/Name/#1}%
\def\atfi@icon@icon{#1}%
}
-\setkeys{AtFi}{icon=PushPin}
-
-% option color
+\atfi@setup{icon=PushPin}
+% \end{macrocode}
+%
+% Option \xoption{color}
+% \begin{macrocode}
\define@key{AtFi}{color}{%
\HyColor@AttachfileColor{#1}%
\atfi@color@tex\atfi@color@inline\atfi@color@annot
{attachfile2}{color}%
}
-\setkeys{AtFi}{color=1 0.9255 0.7765}
-
-% time options timezone and date
+\atfi@setup{color=1 0.9255 0.7765}
+% \end{macrocode}
+%
+% time options timezone and date
+% \begin{macro}{\atfi@pad@ii}
+% \begin{macrocode}
\def\atfi@pad@ii#1{%
\ifnum#1>9 %
\number#1%
@@ -553,16 +631,42 @@ and the derived files
0\number#1%
\fi%
}
-\let\atfi@timezone\@empty
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{atfi@timezone}
+% \begin{macrocode}
+\let\atfi@timezone\ltx@empty
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\define@key{AtFi}{timezone}{\def\atfi@timezone{#1}}
+% \end{macrocode}
+% \begin{macro}{\atfi@time}
+% \begin{macrocode}
\edef\atfi@time{\the\time}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@hours}
+% \begin{macrocode}
\def\atfi@hours{%
\numexpr\dimexpr0.01667\dimexpr\atfi@time sp\relax\relax\relax
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@minutes}
+% \begin{macrocode}
\def\atfi@minutes{%
\numexpr\atfi@time-60*\atfi@hours\relax
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@seconds}
+% \begin{macrocode}
\def\atfi@seconds{0}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@date}
+% \begin{macrocode}
\def\atfi@date{%
/M(D:\the\year
\atfi@pad@ii\month
@@ -572,124 +676,263 @@ and the derived files
\atfi@pad@ii\atfi@seconds
\atfi@timezone)%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\define@key{AtFi}{date}{%
\EdefEscapeString\atfi@date{#1}%
\edef\atfi@date{/M(\atfi@date)}%
}
-
-% name for annotation to be used in GoToE actions
-\let\atfi@annotname\@empty
-\define@key{AtFi}{annotname}{%
- \atfi@pdfstringdef\atfi@annotname{#1}%
- \edef\atfi@annotname{/NM(\atfi@annotname)}%
-}
-
-% text options author, description, and subject
+% \end{macrocode}
+%
+% Text options author, description, and subject
+% \begin{macro}{\atfi@pdfstringdef}
+% \begin{macrocode}
\DeclareRobustCommand{\atfi@pdfstringdef}[2]{%
\pdfstringdef\atfi@temp@string{#2}%
\edef#1{\atfi@temp@string}%
}
-
-% option author
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\atfi@NoValue}
+% \begin{macrocode}
+\def\atfi@NoValue{\NoValue}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\atfi@DefNoValueName}
+% \begin{macrocode}
+\def\atfi@DefNoValueName#1#2#3{%
+ \def#1{#3}%
+ \ifx#1\atfi@NoValue
+ \let#1\ltx@empty
+ \else
+ \atfi@pdfstringdef#1{#1}%
+ \edef#1{/#2(#1)}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% Name for annotation to be used in GoToE actions
+% \begin{macro}{\atfi@annotname}
+% \begin{macrocode}
+\let\atfi@annotname\ltx@empty
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\define@key{AtFi}{annotname}[\NoValue]{%
+ \atfi@DefNoValueName\atfi@annotname{NM}{#1}%
+}
+% \end{macrocode}
+%
+% Option \xoption{author}.
+% \begin{macro}{\atfi@author}
+% \begin{macrocode}
\def\atfi@author{}
-\define@key{AtFi}{author}{%
- \atfi@pdfstringdef\atfi@author{#1}%
- \edef\atfi@author{/T(\atfi@author)}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\define@key{AtFi}{author}[\NoValue]{%
+ \atfi@DefNoValueName\atfi@author{T}{#1}%
}
-
-% option description
+% \end{macrocode}
+%
+% Option \xoption{description}.
+% \begin{macro}{\atfi@description}
+% \begin{macrocode}
\def\atfi@description{}
-\define@key{AtFi}{description}{%
- \atfi@pdfstringdef\atfi@description{#1}%
- \edef\atfi@description{/Contents(\atfi@description)}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\define@key{AtFi}{description}[\NoValue]{%
+ \atfi@DefNoValueName\atfi@description{Contents}{#1}%
}
-
-% option subject
+% \end{macrocode}
+%
+% Option \xoption{subject}.
+% \begin{macro}{\atfi@subject}
+% \begin{macrocode}
\def\atfi@subject{}
-\define@key{AtFi}{subject}{%
- \atfi@pdfstringdef\atfi@subject{#1}%
- \edef\atfi@subject{/Subj(\atfi@subject)}%
-}
-
-% option print
-\newif\ifatfi@print
-\atfi@printtrue
-\define@key{AtFi}{print}[true]{\csname atfi@print#1\endcsname}
-
-% option zoom
-\newif\ifatfi@zoom
-\atfi@zoomtrue
-\define@key{AtFi}{zoom}[true]{\csname atfi@zoom#1\endcsname}
-
-% option appearance
-\newif\ifatfi@appearance
-\atfi@appearancetrue
-\define@key{AtFi}{appearance}[true]{%
- \csname atfi@appearance#1\endcsname
-}
-
-% option scale
-\def\atfi@scale{1}
-\define@key{AtFi}{scale}[1]{%
- \def\atfi@scale{#1}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\define@key{AtFi}{subject}[\NoValue]{%
+ \atfi@DefNoValueName\atfi@subject{Subj}{#1}%
}
-
-% option ucfilespec
+% \end{macrocode}
+%
+% Option \xoption{print}.
+% \begin{macrocode}
+\DeclareBoolOption[true]{print}
+% \end{macrocode}
+%
+% Option \xoption{zoom}.
+% \begin{macrocode}
+\DeclareBoolOption[true]{zoom}
+% \end{macrocode}
+%
+% Option \xoption{appearance}.
+% \begin{macrocode}
+\DeclareBoolOption[true]{appearance}
+% \end{macrocode}
+%
+% Option \xoption{scale}.
+% \begin{macrocode}
+\DeclareStringOption[1]{scale}
+% \end{macrocode}
+%
+% Option \xoption{ucfilespec}.
+% \begin{macro}{\atfi@ucfilespec}
+% \begin{macrocode}
\def\atfi@ucfilespec{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\define@key{AtFi}{ucfilespec}[1]{%
\def\atfi@ucfilespec{#1}%
- \ifx\atfi@ucfilespec\@empty
+ \ifx\atfi@ucfilespec\ltx@empty
\else
\atfi@pdfstringdef\atfi@ucfilespec{#1}%
\fi
}
-
-% option nofiles
-\newif\ifatfi@nofiles
-\atfi@nofilesfalse
-\define@key{AtFi}{nofiles}[true]{%
- \csname atfi@nofiles#1\endcsname
-}
-
-% driver options
-\let\atfi@driver\@empty
+% \end{macrocode}
+%
+% Option \xoption{nofiles}.
+% \begin{macrocode}
+\DeclareBoolOption{nofiles}
+% \end{macrocode}
+%
+% Driver options.
+% \begin{macrocode}
+\let\atfi@driver\ltx@empty
\def\atfi@driver@pdftex{pdftex}
\def\atfi@driver@dvips{dvips}
-
-\define@key{AtFi}{pdftex}[true]{%
+\def\atfi@driver@dvipdfmx{dvipdfmx}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareVoidOption{pdftex}{%
\let\atfi@driver\atfi@driver@pdftex
}
-\define@key{AtFi}{dvips}[true]{%
+\DeclareVoidOption{dvips}{%
\let\atfi@driver\atfi@driver@dvips
}
-
+\DeclareVoidOption{dvipdfmx}{%
+ \let\atfi@driver\atfi@driver@dvipdfmx
+}
+\DeclareVoidOption{xetex}{%
+ \let\atfi@driver\atfi@driver@dvipdfmx
+}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareStringOption{driverfallback}
+% \end{macrocode}
+%
+% \begin{macro}{\attachfilesetup}
+% \begin{macrocode}
\DeclareRobustCommand{\attachfilesetup}[1]{\setkeys{AtFi}{#1}}
-
-% timezone setting, ...
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\DeclareLocalOptions{%
+ annotname,%
+ appearance,%
+ author,%
+ color,%
+ date,%
+ description,%
+ icon,%
+ mimetype,%
+ nofiles,%
+ print,%
+ scale,%
+ subject,%
+ timezone,%
+ ucfilespec,%
+ zoom,%
+}
+% \end{macrocode}
+%
+% \subsubsection{Option calling}
+%
+% Timezone setting, \dots
+% \begin{macrocode}
\InputIfFileExists{attachfile.cfg}{}{}
-
-\ProcessKeyvalOptions{AtFi}
-
-% --- evaluate driver options ---
-
+% \end{macrocode}
+% \begin{macrocode}
+\ProcessKeyvalOptions*
+% \end{macrocode}
+%
+% \begin{macro}{\atfi@DisableOption}
+% \begin{macrocode}
+\def\atfi@DisableOption{%
+ \DisableKeyvalOption[action=error,package=attachfile2]{AtFi}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Evaluate driver options}
+%
+% \begin{macrocode}
\ifpdf
% ignoring other driver options
\let\atfi@driver\atfi@driver@pdftex
\else
- \ifx\atfi@driver\@empty
- \PackageWarningNoLine{attachfile2}{%
- Driver is not specified,\MessageBreak
- enforce draft settings%
- }%
- \atfi@drafttrue
+ \ifx\atfi@driver\atfi@driver@pdftex
+ \let\atfi@driver\ltx@empty
+ \PackageError{attachfile2}{%
+ Wrong driver option `pdftex',\MessageBreak
+ because pdfTeX in PDF mode is not detected%
+ }\@ehc
+ \fi
+ \ifxetex
+ \let\atfi@driver\atfi@driver@dvipdfmx
+ \else
+ \ifx\atfi@driver\ltx@empty
+ \ifx\atfi@driverfallback\ltx@empty
+ \else
+ \expandafter\let\expandafter\atfi@driver
+ \csname atfi@driver@\atfi@driverfallback\endcsname
+ \ifx\atfi@driver\atfi@driver@dvips
+ \else
+ \ifx\atfi@driver\atfi@driver@dvipdfmx
+ \else
+ \let\atfi@driver\ltx@empty
+ \PackageWarningNoLine{attachfile2}{%
+ Option `driverfallback' with unsupported\MessageBreak
+ DVI driver (\atfi@driverfallback)%
+ }%
+ \fi
+ \fi
+ \fi
+ \ifx\atfi@driver\ltx@empty
+ \PackageWarningNoLine{attachfile2}{%
+ Driver is not specified,\MessageBreak
+ enforce draft settings%
+ }%
+ \atfi@drafttrue
+ \fi
+ \fi
\fi
\fi
-
-% --- evaluate draft/final options ---
-
+% \end{macrocode}
+% \begin{macrocode}
+\atfi@DisableOption{pdftex}
+\atfi@DisableOption{dvips}
+\atfi@DisableOption{dvipdfmx}
+\atfi@DisableOption{xetex}
+\atfi@DisableOption{driverfallback}
+% \end{macrocode}
+%
+% \subsubsection{Evaluate options \xoption{draft}/\xoption{final}}
+%
+% \begin{macro}{\notextattachfile}
+% \begin{macrocode}
\DeclareRobustCommand{\notextattachfile}[2][]{%
\begingroup
- \setkeys{AtFi}{#1}%
+ \atfi@setup{#1}%
\ifatfi@print
\leavevmode
\begingroup
@@ -697,12 +940,16 @@ and the derived files
#2\strut
\endgroup
\else
- \setbox0=\hbox{#2\strut}%
+ \sbox\ltx@zero{#2\strut}%
\makebox[\wd0]{}%
\fi
\endgroup
}
-
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\atfi@DisableOption{draft}%
+\atfi@DisableOption{final}%
\ifatfi@draft
\def\atfi@dummy@pushpin{%
\raisebox{-1.25bp}{\parbox[b][14bp]{24bp}{}}%
@@ -716,15 +963,20 @@ and the derived files
\DeclareRobustCommand{\attachfile}[2][]{%
\noattachfile[{#1}]%
}%
- \expandafter\endinput
+ \expandafter\endinput
\fi
-
-% --- load driver file ---
-
-\input{atfi\atfi@driver.def}
-
-% --- graphics ---
-
+% \end{macrocode}
+%
+% \subsubsection{Load driver file}
+%
+% \begin{macrocode}
+\input{atfi-\atfi@driver.def}
+% \end{macrocode}
+%
+% \subsubsection{Graphics}
+%
+% \begin{macro}{\atfi@acroGraph@data}
+% \begin{macrocode}
\def\atfi@acroGraph@data{%
\atfi@GSAVE
0.5 \atfi@SETGRAYFILL
@@ -749,11 +1001,19 @@ and the derived files
13.7041 3.0938 3.9571 11.8867 \atfi@RECTFILL
\atfi@GRESTORE
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@acroGraph}
+% \begin{macrocode}
\def\atfi@acroGraph{%
\raisebox{-1.5bp}{\parbox[b][20bp]{22bp}{%
\rule{0pt}{0pt}\atfi@literal{\atfi@acroGraph@data}}%
}%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@acroPaperclip@data}
+% \begin{macrocode}
\newcommand{\atfi@acroPaperclip@data}{%
\atfi@GSAVE
0.75 \atfi@SETGRAYSTROKE
@@ -811,11 +1071,19 @@ and the derived files
\atfi@STROKE
\atfi@GRESTORE
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@acroPaperclip}
+% \begin{macrocode}
\def\atfi@acroPaperclip{%
\raisebox{-1.25bp}{\parbox[b][21bp]{12bp}{%
\rule{0pt}{0pt}\atfi@literal{\atfi@acroPaperclip@data}}%
}%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@acroPushPin@data}
+% \begin{macrocode}
\def\atfi@acroPushPin@data{%
\atfi@GSAVE
1 \atfi@SETLINEWIDTH
@@ -853,11 +1121,19 @@ and the derived files
\atfi@STROKE
\atfi@GRESTORE
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@acroPushPin}
+% \begin{macrocode}
\def\atfi@acroPushPin{%
\raisebox{-1.25bp}{\parbox[b][14bp]{24bp}{%
\rule{0pt}{0pt}\atfi@literal{\atfi@acroPushPin@data}}%
}%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@acroTag@data}
+% \begin{macrocode}
\def\atfi@acroTag@data{%
\atfi@GSAVE
0.5 \atfi@SETGRAYFILL
@@ -923,23 +1199,37 @@ and the derived files
\atfi@STROKE
\atfi@GRESTORE
}
-\DeclareRobustCommand{\atfi@acroTag}{%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@acroTag}
+% \begin{macrocode}
+\def\atfi@acroTag{%
\raisebox{-1.6bp}{\parbox[b][17bp]{25bp}{%
\rule{0pt}{0pt}\atfi@literal{\atfi@acroTag@data}}%
}%
}
-
-% --- .atfi file reading support ---
-
-% commands used in \jobname.atfi:
-% * \attachfile@timezone{<timezone in PDF format>}
-% * \attachfile@file[
-% Size=<size>,
-% CreationDate=<date>, % <date> local time without "D:" and timezone
-% ModDate=<date>,
-% CheckSum=<checksum>
-% ]{<filename as hex string>}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Reading the \xext{atfi} file}
%
+% Commands used in \cs{jobname}\xext{atfi}:
+% \begin{itemize}
+% \item |attachfile@timezone{<timezone in PDF format>}|
+% \item
+%\begin{verbatim}
+%\attachfile@file[
+% Size=<size>,
+% CreationDate=<date>, % <date> local time without "D:" and timezone
+% ModDateTZ=<date+TZ>,
+% ModDate=<date>,
+% CheckSum=<checksum>
+%]{<filename as hex string>}
+%\end{verbatim}
+% \end{itemize}
+%
+% \begin{macro}{\attachfile@timezone}
+% \begin{macrocode}
\def\attachfile@timezone#1{%
\ifx\\#1\\%
% no timezone information given
@@ -947,63 +1237,124 @@ and the derived files
\def\atfi@timezone{#1}%
\fi
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\attachfile@file}
+% \begin{macrocode}
\newcommand*{\attachfile@file}[2][]{%
- \ifx\\#2\\%
+ \EdefUnescapeHex\atfi@filename{#2}%
+ \ifx\atfi@filename\ltx@empty
\PackageError{attachfile2}{Empty file name}\@ehc
\else
- \edef\atfi@restore{\uccode0=\the\uccode0 \relax}%
- \let\atfi@filename\@empty
- \atfi@getfilename#2\relax\relax
- \atfi@restore
\@namedef{atfi@file@\atfi@filename}{#1}%
\fi
}
-% convert file name from hex string
-\begingroup
- \catcode0=12 %
- \gdef\atfi@getfilename#1#2{%
- \ifx\relax#1%
- \else
- \uccode0=\numexpr 16*\atfi@hexnum{#1} + \atfi@hexnum{#2}\relax
- \uppercase{%
- \edef\atfi@filename{%
- \atfi@filename^^@%
- }%
- }%
- \expandafter\atfi@getfilename
- \fi
- }%
-\endgroup
-\def\atfi@hexnum#1{%
- \ifnum`#1<58 %
- \numexpr `#1-48\relax
- \else
- \numexpr `#1-87\relax
- \fi
-}
-
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
\InputIfFileExists{\jobname.atfi}{}{}%
-
+% \end{macrocode}
+%
+% \begin{macrocode}
\newif\ifatfi@checksum
\define@key{AtFi@file}{CheckSum}{%
\atfi@checksumtrue
\edef\atfi@params{\atfi@params/CheckSum<#1>}%
}
+% \end{macrocode}
+% \begin{macrocode}
\newif\ifatfi@creationdate
+\define@key{AtFi@file}{CreationDateTZ}{%
+ \ifatfi@creationdate
+ \else
+ \atfi@creationdatetrue
+ \edef\atfi@params{%
+ \atfi@params
+ /CreationDate(#1)%
+ }%
+ \fi
+}
+% \end{macrocode}
+% \begin{macrocode}
\define@key{AtFi@file}{CreationDate}{%
- \atfi@creationdatetrue
- \edef\atfi@params{\atfi@params/CreationDate(D:#1\atfi@timezone)}%
+ \ifatfi@creationdate
+ \else
+ \atfi@creationdatetrue
+ \edef\atfi@params{%
+ \atfi@params
+ /CreationDate(#1\atfi@timezone)%
+ }%
+ \fi
}
+% \end{macrocode}
+% \begin{macrocode}
\newif\ifatfi@moddate
+\define@key{AtFi@file}{ModDateTZ}{%
+ \ifatfi@moddate
+ \else
+ \atfi@moddatetrue
+ \edef\atfi@params{%
+ \atfi@params
+ /ModDate(#1)%
+ }%
+ \fi
+}
+% \end{macrocode}
+% \begin{macrocode}
\define@key{AtFi@file}{ModDate}{%
- \atfi@moddatetrue
- \edef\atfi@params{\atfi@params/ModDate(D:#1\atfi@timezone)}%
+ \ifatfi@moddate
+ \else
+ \atfi@moddatetrue
+ \edef\atfi@params{%
+ \atfi@params
+ /ModDate(D:#1\atfi@timezone)%
+ }%
+ \fi
}
-
-% --- .atfi file writing support ---
-
-% respect \nofiles and option nofiles
-% \nofiles has more weight than option nofiles
+% \end{macrocode}
+%
+% \begin{macro}{\atfi@pdftexdata}
+% \begin{macrocode}
+\let\atfi@temp\ltx@one
+\ltx@IfUndefined{pdf@filesize}{%
+ \let\atfi@temp\ltx@zero
+}{}
+\ltx@IfUndefined{pdf@filemoddate}{%
+ \let\atfi@temp\ltx@zero
+}{}
+\ltx@IfUndefined{pdf@filemdfivesum}{%
+ \let\atfi@temp\ltx@zero
+}{}
+\ifcase\atfi@temp
+ \let\atfi@pdftexdata\ltx@gobble
+\or
+ \def\atfi@pdftexdata#1{%
+ \edef\atfi@temp{\pdf@filesize{#1}}%
+ \ifx\atfi@temp\ltx@empty
+ \else
+ \setkeys{AtFi@file}{Size=\atfi@temp}%
+ \edef\atfi@temp{\pdf@filemoddate{#1}}%
+ \ifx\atfi@temp\ltx@empty
+ \else
+ \setkeys{AtFi@file}{ModDateTZ=\atfi@temp}%
+ \fi
+ \edef\atfi@temp{\pdf@filemdfivesum{#1}}%
+ \ifx\atfi@temp\ltx@empty
+ \else
+ \setkeys{AtFi@file}{CheckSum=\atfi@temp}%
+ \fi
+ \fi
+ }%
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Writing the \xext{atfi} file}
+%
+% Respect \cs{nofiles} and option \xoption{nofiles}.
+% \cs{nofiles} has more weight than option \xoption{nofiles}.
+% \begin{macrocode}
\if@filesw
\else
\atfi@nofilestrue
@@ -1013,89 +1364,126 @@ and the derived files
File `\jobname.atfi' will not be written because of\MessageBreak
\string\nofiles\space or option `nofiles'%
}%
- \let\atfi@writefile\@gobble
+% \end{macrocode}
+% \begin{macro}{\atfi@writefile}
+% \begin{macrocode}
+ \let\atfi@writefile\ltx@gobble
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\else
+% \end{macrocode}
+% \begin{macro}{\atfi@stream}
+% \begin{macrocode}
\newwrite\atfi@stream
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\immediate\openout\atfi@stream=\jobname.atfi\relax
\immediate\write\atfi@stream{%
\string\attachfile@timezone{\atfi@timezone}%
}%
+% \end{macrocode}
+% \begin{macro}{\atfi@writefile}
+% \begin{macrocode}
\def\atfi@writefile#1{%
\begingroup
- \def\file{#1}%
- \@onelevel@sanitize\file
- \edef\file{\@firstofone{\expandafter\atfi@replace\file} \@nil}%
- \edef\file{\expandafter\atfi@tohex\file\relax}%
+ \EdefEscapeHex\atfi@temp{#1}%
\immediate\write\atfi@stream{%
\string\attachfile@file[%
- \@ifundefined{atfi@file@#1}{}{\@nameuse{atfi@file@#1}}%
- ]{\file}%
+ \ltx@ifundefined{atfi@file@#1}{}{\@nameuse{atfi@file@#1}}%
+ ]{\atfi@temp}%
}%
\endgroup
}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\fi
-
+\atfi@DisableOption{nofiles}
+% \end{macrocode}
+%
+% \begin{macro}{\atfi@attachfile}
+% \begin{macrocode}
\def\atfi@attachfile#1#2{%
- \@ifundefined{atfi@fileobj@#2}{%
+ \ltx@IfUndefined{atfi@fileobj@#2}{%
\atfi@writefile{#2}%
}{%
% don't need duplicates
}%
- \setkeys{AtFi}{#1}%
+ \atfi@setup{#1}%
\atfi@embedfile{#2}%
\atfi@set@appearance@icon
\atfi@flags@to@int
\atfi@insert@file@annot{#2}%
\endgroup
}
-
-% convert to hex string
-
-\def\atfi@replace#1 #2\@nil{%
- #1%
- \ifx\\#2\\%
- \else
- \atfi@space
- \@ReturnAfterFi{%
- \atfi@replace#2\@nil
- }%
- \fi
-}%
-
-\long\def\@ReturnAfterFi#1\fi{\fi#1}
-
-% ---
-
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Annotation appearance}
+%
+% \begin{macro}{\atfi@appearancewidth}
+% \begin{macrocode}
\newlength{\atfi@appearancewidth}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@appearanceheight}
+% \begin{macrocode}
\newlength{\atfi@appearanceheight}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@appearancedepth}
+% \begin{macrocode}
\newlength{\atfi@appearancedepth}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@appearancebox}
+% \begin{macrocode}
\newsavebox{\atfi@appearancebox}
-
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\atfi@set@appearance@icon}
+% \begin{macrocode}
\def\atfi@set@appearance@icon{%
- \@ifundefined{atfi@appobj@\atfi@icon@icon}{%
- \savebox{\atfi@appearancebox}{\@nameuse{atfi@acro\atfi@icon@icon}}%
- \expandafter\xdef\csname atfi@appwidth@\atfi@icon@icon\endcsname{%
+ \ltx@IfUndefined{atfi@appobj@\atfi@icon@icon}{%
+ \savebox{\atfi@appearancebox}{%
+ \@nameuse{atfi@acro\atfi@icon@icon}%
+ }%
+ \expandafter
+ \xdef\csname atfi@appwidth@\atfi@icon@icon\endcsname{%
\the\wd\atfi@appearancebox
}%
- \expandafter\xdef\csname atfi@appheight@\atfi@icon@icon\endcsname{%
+ \expandafter
+ \xdef\csname atfi@appheight@\atfi@icon@icon\endcsname{%
\the\ht\atfi@appearancebox
}%
- \expandafter\xdef\csname atfi@appdepth@\atfi@icon@icon\endcsname{%
+ \expandafter
+ \xdef\csname atfi@appdepth@\atfi@icon@icon\endcsname{%
\the\dp\atfi@appearancebox
}%
\atfi@xform@icon
- \global\expandafter\let\csname atfi@appobj@\atfi@icon@icon\endcsname
+ \global\expandafter\let
+ \csname atfi@appobj@\atfi@icon@icon\endcsname
\atfi@appearanceobj
}{%
}%
% optimization: \setlength dropped
- \atfi@appearancewidth=\@nameuse{atfi@appwidth@\atfi@icon@icon}\relax
- \atfi@appearanceheight=\@nameuse{atfi@appheight@\atfi@icon@icon}\relax
- \atfi@appearancedepth=\@nameuse{atfi@appdepth@\atfi@icon@icon}\relax
+ \atfi@appearancewidth=%
+ \@nameuse{atfi@appwidth@\atfi@icon@icon}\relax
+ \atfi@appearanceheight=%
+ \@nameuse{atfi@appheight@\atfi@icon@icon}\relax
+ \atfi@appearancedepth=%
+ \@nameuse{atfi@appdepth@\atfi@icon@icon}\relax
\expandafter\let\expandafter\atfi@appearanceobj
\csname atfi@appobj@\atfi@icon@icon\endcsname
}
-
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\atfi@set@appearance}
+% \begin{macrocode}
\def\atfi@set@appearance#1{%
\savebox{\atfi@appearancebox}{#1}%
\atfi@appearancewidth=\wd\atfi@appearancebox
@@ -1103,8 +1491,14 @@ and the derived files
\atfi@appearancedepth=\dp\atfi@appearancebox
\atfi@xform
}
-
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
\newcounter{atfi@flags}
+% \end{macrocode}
+% \begin{macro}{\atfi@flags@to@int}
+% \begin{macrocode}
\DeclareRobustCommand{\atfi@flags@to@int}{%
\setcounter{atfi@flags}{0}%
\ifatfi@print
@@ -1115,13 +1509,26 @@ and the derived files
\addtocounter{atfi@flags}{8}%
\fi%
}
-
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\atfi@textattachfile}
+% \begin{macrocode}
\def\atfi@textattachfile#1#2{%
\endgroup
\atfi@textattachfile@i{#1}{#2}%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@textattachfile@i}
+% \begin{macrocode}
\def\atfi@textattachfile@i#1#2#3{%
- \setkeys{AtFi}{#1}%
+ \ltx@IfUndefined{atfi@fileobj@#2}{%
+ \atfi@writefile{#2}%
+ }{%
+ % don't need duplicates
+ }%
+ \atfi@setup{#1}%
\atfi@embedfile{#2}%
\atfi@set@appearance{%
\leavevmode
@@ -1134,7 +1541,11 @@ and the derived files
\atfi@insert@file@annot{#2}%
\endgroup
}
-
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\attachfile}
+% \begin{macrocode}
\DeclareRobustCommand{\attachfile}[1][]{%
\begingroup
\let\do\@makeother
@@ -1143,6 +1554,10 @@ and the derived files
\catcode`\}=2\relax
\atfi@attachfile{#1}%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\textattachfile}
+% \begin{macrocode}
\DeclareRobustCommand{\textattachfile}[1][]{%
\begingroup
\begingroup
@@ -1152,18 +1567,25 @@ and the derived files
\catcode`\}=2\relax
\atfi@textattachfile{#1}%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\noattachfile}
+% \begin{macrocode}
\DeclareRobustCommand{\noattachfile}[1][]{%
\begingroup
- \setkeys{AtFi}{#1}%
+ \atfi@setup{#1}%
\atfi@set@appearance@icon
\ifatfi@print
- \expandafter\atfi@refxform\csname atfi@appobj@\atfi@icon@icon\endcsname
+ \expandafter
+ \atfi@refxform\csname atfi@appobj@\atfi@icon@icon\endcsname
\else
\makebox[\atfi@appearancewidth]{}%
\fi
\endgroup
}
% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
@@ -1175,14 +1597,56 @@ and the derived files
% \begin{macrocode}
%<*pdftex>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{atfipdftex.def}%
- [2009/09/25 v2.5 attachfile2 driver for pdfTeX (HO)]%
+\ProvidesFile{atfi-pdftex.def}%
+ [2010/09/27 v2.6 attachfile2 driver for pdfTeX (HO)]%
% \end{macrocode}
+%
+% \paragraph{\LuaTeX}
+%
+% \begin{macrocode}
+\ifluatex
+ \ifnum\luatexversion<39 %
+ \else
+ \begingroup
+ \escapechar=-1 %
+ \def\atfi@temp#1{%
+ \ltx@IfUndefined{\string#1}{%
+ \let#1\ltx@undefined
+ \directlua{%
+ if tex.enableprimitives then %
+ tex.enableprimitives('', {'\string#1'})%
+ end%
+ }%
+ \ltx@ifundefined{\string#1}{%
+ }{%
+ \global#1=#1%
+ \@PackageInfoNoLine{attachfile2}{%
+ \string#1 enabled%
+ }%
+ }%
+ }{}%
+ }%
+ \atfi@temp\pdfliteral
+ \atfi@temp\pdfobj
+ \atfi@temp\pdflastobj
+ \atfi@temp\pdfxform
+ \atfi@temp\pdflastxform
+ \atfi@temp\pdfrefxform
+ \atfi@temp\pdfannot
+ \endgroup
+ \fi
+\fi
+% \end{macrocode}
+%
+% \paragraph{Macros for graphics data}
+%
+% \begin{macro}{\atfi@literal}
% \begin{macrocode}
\let\atfi@literal\pdfliteral
-
-% --- macros for graphics data ---
-
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
\def\atfi@GSAVE{q }
\def\atfi@GRESTORE{Q }
\def\atfi@SETLINEWIDTH{w }
@@ -1192,8 +1656,10 @@ and the derived files
\def\atfi@FILL{f }
% \atfi@FILLSTROKE{<fill color>}{<stroke color>}
\def\atfi@FILLSTROKE#1#2{#1#2B }
+% \end{macrocode}
% color: uppercase are stroke colors, lowercase non-stroke (fill) colors
% PS, however, does not different between stroke and not-stroke colors
+% \begin{macrocode}
\def\atfi@SETRGBCOLORSTROKE{RG }
\def\atfi@SETRGBCOLORFILL{rg }
\def\atfi@SETGRAYSTROKE{G }
@@ -1210,22 +1676,35 @@ and the derived files
\def\atfi@CURVETOY{y }
\def\atfi@CLOSEPATH{h }
\def\atfi@SETLINEJOIN{j }
-
-% ---
-
+% \end{macrocode}
+%
+% \paragraph{File embedding}
+%
+% \begin{macrocode}
\define@key{AtFi@file}{Size}{%
\edef\atfi@params{\atfi@params/Size #1}%
}
-
+% \end{macrocode}
+% \begin{macro}{\atfi@embedfile}
+% \begin{macrocode}
\def\atfi@embedfile#1{%
- \@ifundefined{atfi@fileobj@#1}{%
+ \ltx@IfUndefined{atfi@fileobj@#1}{%
\begingroup
- \let\atfi@params\@empty
- \@ifundefined{atfi@file@#1}{}{%
- \edef\x{\noexpand\setkeys{AtFi@file}{\@nameuse{atfi@file@#1}}}%
+ \let\atfi@params\ltx@empty
+ \expandafter\let\expandafter\atfi@temp
+ \csname atfi@file@#1\endcsname
+ \ifx\atfi@temp\ltx@empty
+ \let\atfi@temp\relax
+ \fi
+ \ifx\atfi@temp\relax
+ \atfi@pdftexdata{#1}%
+ \else
+ \edef\x{%
+ \noexpand\setkeys{AtFi@file}{\@nameuse{atfi@file@#1}}%
+ }%
\x
- }%
- \ifx\atfi@params\@empty
+ \fi
+ \ifx\atfi@params\ltx@empty
\else
\edef\atfi@params{/Params<<\atfi@params>>}%
\fi
@@ -1234,28 +1713,45 @@ and the derived files
\atfi@mimetype
\atfi@params
} file {#1}%
- \expandafter\xdef\csname atfi@fileobj@#1\endcsname{\the\pdflastobj}%
+ \expandafter
+ \xdef\csname atfi@fileobj@#1\endcsname{\the\pdflastobj}%
\endgroup
}{%
% file already embedded
}%
}
-
-% ---
-
-% input: \atfi@appearancebox, output: \atfi@appearanceobj
+% \end{macrocode}
+% \end{macro}
+%
+% \paragraph{Annotation appearance}
+%
+% \begin{macro}{\atfi@xform}
+% input: \cs{atfi@appearancebox}, output: \cs{atfi@appearanceobj}
+% \begin{macrocode}
\def\atfi@xform{%
\immediate\pdfxform\atfi@appearancebox
\edef\atfi@appearanceobj{\the\pdflastxform}%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@xform@icon}
+% \begin{macrocode}
\let\atfi@xform@icon\atfi@xform
-
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\atfi@refxform}
+% \begin{macrocode}
\def\atfi@refxform#1{%
\pdfrefxform#1\relax
}
-
-% ---
-
+% \end{macrocode}
+% \end{macro}
+%
+% \paragraph{File attachment annotation}
+%
+% \begin{macro}{\atfi@insert@file@annot}
+% \begin{macrocode}
\def\atfi@insert@file@annot#1{%
\rule{0pt}{0pt}%
\ifatfi@appearance
@@ -1267,9 +1763,9 @@ and the derived files
>>%
}%
\else
- \let\atfi@appearance@dict\@empty
+ \let\atfi@appearance@dict\ltx@empty
\fi
- \@ifundefined{atfi@fsobj@#1}{%
+ \ltx@IfUndefined{atfi@fsobj@#1}{%
\begingroup
\hypersetup{unicode=false}%
\atfi@pdfstringdef\atfi@file{#1}%
@@ -1277,7 +1773,7 @@ and the derived files
<<%
/Type/Filespec%
/F(\atfi@file)%
- \ifx\atfi@ucfilespec\@empty
+ \ifx\atfi@ucfilespec\ltx@empty
\else
/UF(\atfi@ucfilespec)%
\fi
@@ -1312,6 +1808,8 @@ and the derived files
\rule{\atfi@appearancewidth}{0pt}%
}
% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</pdftex>
% \end{macrocode}
@@ -1321,20 +1819,28 @@ and the derived files
% \begin{macrocode}
%<*dvips>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{atfipdftex.def}%
- [2009/09/25 v2.5 attachfile2 driver for dvips (HO)]%
+\ProvidesFile{atfi-dvips.def}%
+ [2010/09/27 v2.6 attachfile2 driver for dvips (HO)]%
% \end{macrocode}
+%
+% \paragraph{Macros for graphics data}
+%
+% \begin{macro}{\atfi@literal}
% \begin{macrocode}
\def\atfi@literal#1{%
\special{ps:atfi_dict begin{#1}atfi_?pdfmark end}%
}
-
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@header}
+% \begin{macrocode}
\def\atfi@header#1{%
\special{! #1}%
}
-
-% --- macros for graphics data ---
-
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
\atfi@header{%
userdict begin 20 dict dup /atfi_dict exch def end begin%
/atfi_?pdfmark systemdict %
@@ -1525,7 +2031,8 @@ and the derived files
} atfi_?pdfmark %
end%
}
-
+% \end{macrocode}
+% \begin{macrocode}
\def\atfi@GSAVE{gsave }
\def\atfi@GRESTORE{grestore }
\def\atfi@SETLINEWIDTH{setlinewidth }
@@ -1558,62 +2065,83 @@ and the derived files
\def\atfi@CURVETOY{atfi_curveto_y }
\def\atfi@CLOSEPATH{closepath }
\def\atfi@SETLINEJOIN{setlinejoin }
-
-% ---
-
+% \end{macrocode}
+%
+% \begin{macrocode}
\newcounter{atfi@obj}
\renewcommand*{\theatfi@obj}{%
{atfi_obj_\number\c@atfi@obj}%
}
-
-
-% most values for Params dictionary found in the .atfi file have
-% priority:
-% * Recalculation (md5sum, ...) is avoided.
-% * An external script has more possibilities than programming
-% at PostScript level (operating system, getting the date and
-% time values of the file with correct interpretation.
-% * Exception: status is called to test file existence, thus
-% we get the value of size for free
-
+% \end{macrocode}
+%
+% \paragraph{File embedding}
+%
+% Most values for Params dictionary found in the \xext{atfi} file
+% have priority:
+% \begin{itemize}
+% \item Recalculation (md5sum, \dots) is avoided.
+% \item An external script has more possibilities than programming
+% at PostScript level (operating system, getting the date and
+% time values of the file with correct interpretation.
+% \item Exception: status is called to test file existence, thus
+% we get the value of size for free.
+% \end{itemize}
+% \begin{macrocode}
\define@key{AtFi@file}{Size}{}
-
+% \end{macrocode}
+% \begin{macro}{\atfi@embedfile}
+% \begin{macrocode}
\def\atfi@embedfile#1{%
- \@ifundefined{atfi@fileobj@#1}{%
+ \ltx@IfUndefined{atfi@fileobj@#1}{%
\atfi@pdfstringdef\atfi@psfilename{#1}%
\stepcounter{atfi@obj}%
\expandafter\xdef\csname atfi@fileobj@#1\endcsname{\theatfi@obj}%
\begingroup
- \let\atfi@params\@empty
- \@ifundefined{atfi@file@#1}{}{%
- \edef\x{\noexpand\setkeys{AtFi@file}{\@nameuse{atfi@file@#1}}}%
+ \let\atfi@params\ltx@empty
+ \expandafter\let\expandafter\atfi@temp
+ \csname atfi@file@#1\endcsname
+ \ifx\atfi@temp\ltx@empty
+ \let\atfi@temp\relax
+ \fi
+ \ifx\atfi@temp\relax
+ \atfi@pdftexdata{#1}%
+ \else
+ \edef\x{%
+ \noexpand\setkeys{AtFi@file}{\@nameuse{atfi@file@#1}}%
+ }%
\x
- }%
+ \fi
\atfi@literal{%
/atfi_filename(\atfi@psfilename)def %
atfi_filename status%
{%
- % ok: file found
- % save parameters of status command
+% \end{macrocode}
+% ok: file found\\
+% save parameters of status command
+% \begin{macrocode}
/atfi_created exch def%
/atfi_referenced exch def%
/atfi_size exch def %
- pop % drop parameter "pages" (storage space), never needed
- % ghostscript:
- % created: stat.st_ctime
- % referenced: stat.st_mtime
- % stat.st_ctime: interpretion depends on operating system:
- % * unix: inode change time (not interesting)
- % * win32: probably creation time
- % --> /CreationDate
- % stat.st_mtime: modification time --> /ModDate
- % time values are seconds since 1970-01-01, GMT
- % TODO: ghostscript offers "getenv" for getting the value
- % of an environment variable. That could be used to
- % to detect windows and settingthe /CreationDate entry.
- % TODO: how are these values interpreted by other distiller
- % programs?
- %
+ pop %
+% \end{macrocode}
+%\begin{verbatim}
+%drop parameter "pages" (storage space), never needed
+%ghostscript:
+% created: stat.st_ctime
+% referenced: stat.st_mtime
+% stat.st_ctime: interpretion depends on operating system:
+% * unix: inode change time (not interesting)
+% * win32: probably creation time
+% --> /CreationDate
+% stat.st_mtime: modification time --> /ModDate
+% time values are seconds since 1970-01-01, GMT
+%TODO: ghostscript offers "getenv" for getting the value
+% of an environment variable. That could be used to
+% to detect windows and settingthe /CreationDate entry.
+%TODO: how are these values interpreted by other distiller
+% programs?
+%\end{verbatim}
+% \begin{macrocode}
[%
/_objdef \theatfi@obj
/type/stream%
@@ -1632,12 +2160,15 @@ and the derived files
/product where%
{%
pop %
- % check for ghostscript
+% \end{macrocode}
+% check for ghostscript
+% \begin{macrocode}
product (Ghostscript) search%
{%
pop pop pop %
- % ghostscript is running
- %
+% \end{macrocode}
+% ghostscript is running
+% \begin{macrocode}
\ifatfi@creationdate
\else
false % TODO: test for windows
@@ -1650,8 +2181,9 @@ and the derived files
/ModDate atfi_referenced atfi_convert_date%
\fi
} if%
- %
- % look for MD5Encode filter and calculate CheckSum
+% \end{macrocode}
+% look for MD5Encode filter and calculate CheckSum
+% \begin{macrocode}
} if %
\ifatfi@checksum
\else
@@ -1668,20 +2200,29 @@ and the derived files
\theatfi@obj
/CLOSE pdfmark%
}{%
- % error: file not found
- % currently nothing is done
+% \end{macrocode}
+% error: file not found\\
+% currently nothing is done
+% \begin{macrocode}
} ifelse%
}%
\endgroup
}{%
- % file already embedded
+% \end{macrocode}
+% file already embedded
+% \begin{macrocode}
}%
}
-
-% ---
-
-% output: \atfi@appearanceobj
-% input: \atfi@appearancebox, \atfi@icon@icon
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \paragraph{Annotation appearance}
+%
+% output: \cs{atfi@appearanceobj}\\
+% input: \cs{atfi@appearancebox}, \cs{atfi@icon@icon}
+% \begin{macro}{atfi@xfrom@icon}
+% \begin{macrocode}
\def\atfi@xform@icon{%
\stepcounter{atfi@obj}%
\edef\atfi@appearanceobj{\theatfi@obj}%
@@ -1701,13 +2242,17 @@ and the derived files
/EP pdfmark%
}%
}
-% output: \atfi@appearanceobj
-% input: \atfi@appearancebox
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@xform}
+% output: \cs{atfi@appearanceobj},
+% input: \cs{atfi@appearancebox}
+% \begin{macrocode}
\def\atfi@xform{%
\stepcounter{atfi@obj}%
\edef\atfi@appearanceobj{\theatfi@obj}%
\begingroup
- \setbox0=\hbox{%
+ \setbox\ltx@zero=\hbox{%
\atfi@literal{%
[%
/_objdef \atfi@appearanceobj
@@ -1733,13 +2278,16 @@ and the derived files
}%
}%
% do not allocate any space for xobject definition
- \dp0=\z@
- \ht0=\z@
- \wd0=\z@
- \mbox{\usebox0}%
+ \dp\ltx@zero=\z@
+ \ht\ltx@zero=\z@
+ \wd\ltx@zero=\z@
+ \mbox{\usebox\ltx@zero}%
\endgroup
}
-
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@refxform}
+% \begin{macrocode}
\def\atfi@refxform#1{%
\raisebox{-\atfi@appearancedepth}{%
\atfi@literal{%
@@ -1753,9 +2301,13 @@ and the derived files
}%
\rule{0pt}{\atfi@appearanceheight}%
}
-
-% ---
-
+% \end{macrocode}
+% \end{macro}
+%
+% \paragraph{File attachment annotation}
+%
+% \begin{macro}{\atfi@insert@file@annot}
+% \begin{macrocode}
\def\atfi@insert@file@annot#1{%
\rule{0pt}{0pt}%
\ifatfi@appearance
@@ -1767,11 +2319,12 @@ and the derived files
>>%
}%
\else
- \let\atfi@appearance@dict\@empty
+ \let\atfi@appearance@dict\ltx@empty
\fi
- \@ifundefined{atfi@fsobj@#1}{%
+ \ltx@IfUndefined{atfi@fsobj@#1}{%
\stepcounter{atfi@obj}%
- \expandafter\xdef\csname atfi@fsobj@#1\endcsname{\theatfi@obj}%
+ \expandafter
+ \xdef\csname atfi@fsobj@#1\endcsname{\theatfi@obj}%
\begingroup
\hypersetup{unicode=false}%
\atfi@pdfstringdef\atfi@file{#1}%
@@ -1785,7 +2338,7 @@ and the derived files
<<%
/Type/Filespec%
/F(\atfi@file)%
- \ifx\atfi@ucfilespec\@empty
+ \ifx\atfi@ucfilespec\ltx@empty
\else
/UF(\atfi@ucfilespec)%
\fi
@@ -1816,9 +2369,11 @@ and the derived files
\strip@pt\dimexpr\atfi@scale\atfi@appearancedepth\relax
\space atfi_pdftodvipsy add %
currentpoint %
- exch \strip@pt\dimexpr\atfi@scale\atfi@appearancewidth\relax
+ exch %
+ \strip@pt\dimexpr\atfi@scale\atfi@appearancewidth\relax
\space atfi_pdftodvipsx add %
- exch \strip@pt\dimexpr\atfi@scale\atfi@appearanceheight\relax
+ exch %
+ \strip@pt\dimexpr\atfi@scale\atfi@appearanceheight\relax
\space atfi_pdftodvipsy sub %
]%
/ANN pdfmark%
@@ -1828,52 +2383,295 @@ and the derived files
\rule{\atfi@appearancewidth}{0pt}%
}
% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</dvips>
% \end{macrocode}
%
+% \subsubsection{dvipdfmx}
+%
+% \begin{macrocode}
+%<*dvipdfmx>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{atfi-dvipdfmx.def}%
+ [2010/09/27 v2.6 attachfile2 driver for dvipdfmx/XeTeX (HO)]%
+% \end{macrocode}
+%
+% \paragraph{Macros for graphics data}
+%
+% \begin{macro}{\atfi@special}
+% \begin{macrocode}
+\def\atfi@special#1{%
+ \special{pdf:#1}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@literal}
+% \begin{macrocode}
+\def\atfi@literal#1{%
+ \atfi@special{content #1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\def\atfi@GSAVE{q }
+\def\atfi@GRESTORE{Q }
+\def\atfi@SETLINEWIDTH{w }
+\def\atfi@LINETO{l }
+\def\atfi@MOVETO{m }
+\def\atfi@STROKE{S }
+\def\atfi@FILL{f }
+\def\atfi@FILLSTROKE#1#2{#1#2B }
+\def\atfi@SETRGBCOLORSTROKE{RG }
+\def\atfi@SETRGBCOLORFILL{rg }
+\def\atfi@SETGRAYSTROKE{G }
+\def\atfi@SETGRAYFILL{g }
+\def\atfi@SETCMYKCOLORSTROKE{K }
+\def\atfi@SETCMYKCOLORFILL{k }
+\def\atfi@RECTFILL{re f }
+\def\atfi@RECTSTROKEFILL#1#2#3{#1#2#3re B }
+\def\atfi@SETMITERLIMIT{M }
+\def\atfi@SETFLAT{i }
+\def\atfi@SETLINECAP{J }
+\def\atfi@CURVETO{c }
+\def\atfi@CURVETOV{v }
+\def\atfi@CURVETOY{y }
+\def\atfi@CLOSEPATH{h }
+\def\atfi@SETLINEJOIN{j }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcounter{atfi@obj}
+\renewcommand*{\theatfi@obj}{%
+ @atfi_obj_\number\c@atfi@obj
+}
+% \end{macrocode}
+%
+% \paragraph{File embedding}
+%
+% \begin{macrocode}
+\define@key{AtFi@file}{Size}{%
+ \edef\atfi@params{\atfi@params/Size #1}%
+}
+% \end{macrocode}
+% \begin{macro}{\atfi@embedfile}
+% \begin{macrocode}
+\def\atfi@embedfile#1{%
+ \ltx@IfUndefined{atfi@fileobj@#1}{%
+ \stepcounter{atfi@obj}%
+ \begingroup
+ \let\atfi@params\ltx@empty
+ \expandafter\let\expandafter\atfi@temp
+ \csname atfi@file@#1\endcsname
+ \ifx\atfi@temp\ltx@empty
+ \let\atfi@temp\relax
+ \fi
+ \ifx\atfi@temp\relax
+ \atfi@pdftexdata{#1}%
+ \else
+ \edef\x{%
+ \noexpand\setkeys{AtFi@file}{\@nameuse{atfi@file@#1}}%
+ }%
+ \x
+ \fi
+ \ifx\atfi@params\ltx@empty
+ \else
+ \edef\atfi@params{/Params<<\atfi@params>>}%
+ \fi
+ \edef\atfi@FILE{#1}%
+ \filename@parse\atfi@FILE
+ \ifx\filename@area\ltx@empty
+ \edef\atfi@FILE{./\atfi@FILE}%
+ \fi
+ \EdefEscapeString\atfi@FILE{\atfi@FILE}%
+ \atfi@special{fstream %
+ \theatfi@obj
+ (\atfi@FILE)%
+ <<%
+ /Type/EmbeddedFile%
+ \atfi@mimetype
+ \atfi@params
+ >>%
+ }%
+ \atfi@special{close \theatfi@obj}%
+ \expandafter
+ \xdef\csname atfi@fileobj@#1\endcsname{\theatfi@obj}%
+ \endgroup
+ }{%
+ % file already embedded
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \paragraph{Annotation appearance}
+%
+% \begin{macro}{\atfi@xform}
+% input: \cs{atfi@appearancebox}, output: \cs{atfi@appearanceobj}
+% \begin{macrocode}
+\def\atfi@xform{%
+ \stepcounter{atfi@obj}%
+ \smash{%
+ \rlap{%
+ \atfi@special{bxobj \theatfi@obj\space
+ width \the\wd\atfi@appearancebox\space
+ height \the\ht\atfi@appearancebox\space
+ depth \the\dp\atfi@appearancebox
+ }%
+ \usebox\atfi@appearancebox
+ \atfi@special{exobj}%
+ }%
+ }%
+ \edef\atfi@appearanceobj{\theatfi@obj}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\atfi@xform@icon}
+% \begin{macrocode}
+\let\atfi@xform@icon\atfi@xform
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\atfi@refxform}
+% \begin{macrocode}
+\def\atfi@refxform#1{%
+ \leavevmode
+ \atfi@special{uxobj #1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \paragraph{File attachment annotation}
+%
+% \begin{macro}{\atfi@insert@file@annot}
+% \begin{macrocode}
+\def\atfi@insert@file@annot#1{%
+ \rule{0pt}{0pt}%
+ \ifatfi@appearance
+ \def\atfi@appearance@dict{%
+ /AP<<%
+ /N \atfi@appearanceobj
+ /R \atfi@appearanceobj
+ /D \atfi@appearanceobj
+ >>%
+ }%
+ \else
+ \let\atfi@appearance@dict\ltx@empty
+ \fi
+ \ltx@IfUndefined{atfi@fsobj@#1}{%
+ \begingroup
+ \ifxetex
+ \let\atfi@temp\Hy@Warning
+ \let\Hy@Warning\ltx@gobble
+ \fi
+ \hypersetup{unicode=false}%
+ \ifxetex
+ \let\Hy@Warning\atfi@temp
+ \fi
+ \atfi@pdfstringdef\atfi@file{#1}%
+ \stepcounter{atfi@obj}%
+ \atfi@special{obj \theatfi@obj <<%
+ /Type/Filespec%
+ /F(\atfi@file)%
+ \ifx\atfi@ucfilespec\ltx@empty
+ \else
+ /UF(\atfi@ucfilespec)%
+ \fi
+ /EF<<%
+ /F \@nameuse{atfi@fileobj@#1}%
+ >>%
+ >>%
+ }%
+ \expandafter\xdef\csname atfi@fsobj@#1\endcsname{%
+ \theatfi@obj
+ }%
+ \endgroup
+ }{%
+ }%
+ \begingroup
+ \dimen@=\atfi@scale\atfi@appearancewidth
+ \edef\atfi@rule{width \the\dimen@}%
+ \dimen@=\atfi@scale\atfi@appearanceheight
+ \edef\atfi@rule{\atfi@rule\space height \the\dimen@}%
+ \dimen@=\atfi@scale\atfi@appearancedepth
+ \edef\atfi@rule{\atfi@rule\space depth \the\dimen@}%
+ \atfi@special{ann \atfi@rule
+ <<%
+ /Subtype/FileAttachment%
+ \atfi@icon
+ \atfi@color@annot
+ \atfi@author
+ \atfi@date
+ \atfi@annotname
+ \atfi@description
+ \atfi@subject
+ \atfi@appearance@dict
+ /F \theatfi@flags
+ /FS \@nameuse{atfi@fsobj@#1}%
+ >>%
+ }%
+ \endgroup
+ \rule{0pt}{\atfi@appearanceheight}%
+ \rule[-\atfi@appearancedepth]{0pt}{\atfi@appearancedepth}%
+ \rule{\atfi@appearancewidth}{0pt}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%</dvipdfmx>
+% \end{macrocode}
+%
% \subsection{Perl script \xfile{pdfatfi.pl}}
%
% \begin{macrocode}
%<*pdfatfi>
% \end{macrocode}
+% \begingroup\small
+% \SpecialEscapechar\|
% \begin{macrocode}
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q'
- if 0;
+#!/usr/bin/env perl
use strict;
$^W=1; # turn warning on
#
# pdfatfi.pl
#
-# Copyright (C) 2005, 2006 Heiko Oberdiek.
+# Copyright (C) 2005-2010 Heiko Oberdiek.
#
# 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.
+# conditions of the LaTeX Project Public License, either
+# version 1.3c of this license or (at your option) any later
+# version. This version of this license is in
+# http://www.latex-project.org/lppl/lppl-1-3c.txt
+# and 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.
#
-# See file "attachfile2.pdf" for a list of files that belong to this project.
+# See file "attachfile2.pdf" for a list of files that belong to
+# this project.
#
# This file "pdfatfi.pl" may be renamed to "pdfatfi"
# for installation purposes.
#
my $file = "pdfatfi.pl";
my $program = uc($&) if $file =~ /^\w+/;
-my $version = "2.5";
-my $date = "2009/09/25";
+my $version = "2.6";
+my $date = "2010/09/27";
my $author = "Heiko Oberdiek";
-my $copyright = "Copyright (c) 2005, 2006 by $author.";
+my $copyright = "Copyright (c) 2005-2010 by $author.";
#
# History:
# 2005/05/21 v1.0: First release.
# 2006/08/16 v2.2: Included in DTX file of attachfile2.dtx.
+# 2010/09/27 v2.6: Keys ModDateTZ and CreationDateTZ added.
#
use POSIX qw(strftime); # %z is used (GNU)
@@ -1898,11 +2696,11 @@ $::opt_verbose = 0;
my $usage = <<"END_OF_USAGE";
${title}Syntax: \L$program\E [options] <file[.atfi]>
Function: Help program for LaTeX package "attachfile2".
-Options: (defaults:)
+Options: (defaults:)
--help print usage
- --(no)quiet suppress messages ($bool[$::opt_quiet])
- --(no)verbose verbose printing ($bool[$::opt_verbose])
- --(no)debug debug informations ($bool[$::opt_debug])
+ --(no)quiet suppress messages ($bool[$::opt_quiet])
+ --(no)verbose verbose printing ($bool[$::opt_verbose])
+ --(no)debug debug informations ($bool[$::opt_debug])
END_OF_USAGE
### process options
@@ -1941,7 +2739,15 @@ END_DEB
my $tmpfile = $atfifile . ".tmp";
my $timezone = strftime "%z", localtime;
-$timezone =~ s/^([+\-]\d\d)(\d\d)$/$1'$2'/;
+
+sub gettz ($) {
+ my $time = shift;
+ my $tz = strftime "%z", localtime($time);
+ return '' unless $tz;
+ return 'Z' if $tz eq '+0000';
+ $tz =~ s/^([+\-]\d\d)(\d\d)$/$1'$2'/;
+ return $tz;
+}
open(IN, $atfifile) or die "$Error Cannot open `$atfifile'!\n";
open(OUT, ">$tmpfile") or die "$Error Cannot write `$tmpfile'!\n";
@@ -1965,20 +2771,26 @@ while(<IN>) {
my $mtime = @s[9];
my $ctime = @s[10]; # inode change time
- my ($sec, $min, $hour, $mday, $mon, $year) = localtime($mtime);
+ my ($sec, $min, $hour, $mday, $mon, $year) =
+ localtime($mtime);
my $moddate = sprintf("%04d%02d%02d%02d%02d%02d",
$year + 1900, $mon + 1, $mday,
$hour, $min, $sec);
+ my $moddatetz = 'D:' . $moddate . gettz($mtime);
# Manual page "perlport" says that "ctime" is creation
# time instead of inode change time for "Win32" and
# "Mac OS", but it is unsupported for "Mac OS X".
my $creationdate = "";
+ my $creationdatetz = "";
if ($^O eq 'MSWin32') { # cygwin?
- ($sec, $min, $hour, $mday, $mon, $year) = localtime($ctime);
+ ($sec, $min, $hour, $mday, $mon, $year) =
+ localtime($ctime);
$creationdate = sprintf("%04d%02d%02d%02d%02d%02d",
$year + 1900, $mon + 1, $mday,
$hour, $min, $sec);
+ $creationdatetz =
+ 'D:' . $creationdate . gettz($ctime);
}
# md5 checksum
@@ -1995,15 +2807,20 @@ while(<IN>) {
}
$_ = "\\attachfile\@file["
- . "ModDate=$moddate,Size=$size"
- . (($checksum) ? ",CheckSum=$checksum" : "")
- . (($creationdate) ? ",CreationDate=$creationdate" : "")
+ . "ModDateTZ=$moddatetz"
+ . ",Size=$size"
+ . ($checksum ? ",CheckSum=$checksum" : "")
+ . ($creationdatetz ?
+ ",CreationDateTZ=$creationdatetz" :
+ ($creationdate ?
+ ",CreationDate=$creationdate" : ""))
. "]{$hexfile}\n";
if ($::opt_verbose) {
print "* file entry = $file\n";
print " size = $size\n";
print " moddate = $moddate\n";
- print " creationdate = $creationdate\n" if $creationdate;
+ print " creationdate = $creationdate\n"
+ if $creationdate;
print " checksum = $checksum\n" if $checksum;
}
}
@@ -2023,6 +2840,7 @@ print "*** ready. ***\n" unless $::opt_quiet;
__END__
% \end{macrocode}
+% \endgroup
% \begin{macrocode}
%</pdfatfi>
% \end{macrocode}
@@ -2088,8 +2906,9 @@ __END__
% \def\t{^^A
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
% attachfile2.sty & tex/latex/oberdiek/attachfile2.sty\\
-% atfidvips.def & tex/latex/oberdiek/atfidvips.def\\
-% atfipdftex.def & tex/latex/oberdiek/atfipdftex.def\\
+% atfi-dvips.def & tex/latex/oberdiek/atfi-dvips.def\\
+% atfi-pdftex.def & tex/latex/oberdiek/atfi-pdftex.def\\
+% atfi-dvipdfmx.def & tex/latex/oberdiek/atfi-dvipdfmx.def\\
% pdfatfi.pl & scripts/oberdiek/pdfatfi.pl\\
% attachfile2.pdf & doc/latex/oberdiek/attachfile2.pdf\\
% attachfile2.dtx & source/latex/oberdiek/attachfile2.dtx\\
@@ -2305,6 +3124,30 @@ __END__
% Fix: \xpackage{hyperref}'s option \xoption{unicode} is disabled
% for file names except for \xoption{ucfilespec}.
% \end{Version}
+% \begin{Version}{2010/09/27 v2.6}
+% \item
+% Support for dvipdfmx added, new option \xoption{dvipdfmx}
+% and alias option \xoption{xetex}.
+% (Thanks Will Robertson for pointing to |\special{pdf:fstream ...}|).
+% \item
+% New option \xoption{driverfallback}.
+% \item
+% All options except driver options are local options,
+% that means they are ignored as global options.
+% \item
+% Some options are disabled after they are used
+% (driver options, \xoption{draft}, \xoption{final}, \xoption{nofiles}).
+% \item
+% Driver files renamed from \texttt{atfi<driver>.def} to
+% \texttt{atfi-<driver>.def}.
+% \item
+% Bug fix: \cs{textattachfile} now adds an entry into
+% the \xext{atfi} file.
+% \item
+% Program pdfatfi.pl sets modification and creation time with
+% time zone, because the time zone offset might differ with
+% the file date.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/atveryend.dtx b/Master/texmf-dist/source/latex/oberdiek/atveryend.dtx
index bf12ff3b168..e6ff157c424 100644
--- a/Master/texmf-dist/source/latex/oberdiek/atveryend.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/atveryend.dtx
@@ -155,7 +155,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{879}
+% \CheckSum{937}
%
% \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
@@ -271,28 +271,37 @@ and the derived files
% \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 AtVeryEnd@AtEnd\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\AtVeryEnd@AtEnd{%
\AtVeryEnd@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{9}{10}% (tab)
\TMP@EnsureCode{39}{12}% '
@@ -302,10 +311,11 @@ and the derived files
\TMP@EnsureCode{45}{12}% -
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{96}{12}% `
-\g@addto@macro{\AtVeryEnd@AtEnd}{\endinput}%
+\edef\AtVeryEnd@AtEnd{\AtVeryEnd@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% Package identification.
@@ -828,7 +838,7 @@ and the derived files
\ifx\makelabels\AtVeryEnd@temp
\else
\expandafter\AtVeryEnd@AtEnd
-\fi
+\fi%
\let\AtVeryEnd@PatchLetter=N%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname endletter\endcsname\relax
@@ -912,7 +922,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\AtVeryEnd@AtEnd
+\AtVeryEnd@AtEnd%
%</package>
% \end{macrocode}
%
@@ -976,6 +986,22 @@ and the derived files
\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 atveryend.sty\relax}%
\fi
@@ -986,15 +1012,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/auxhook.dtx b/Master/texmf-dist/source/latex/oberdiek/auxhook.dtx
index b5dadd8973d..be56a03798b 100644
--- a/Master/texmf-dist/source/latex/oberdiek/auxhook.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/auxhook.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2006, 2007, 2009 by
+% Copyright (C) 2006, 2007, 2009, 2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -71,7 +71,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: auxhook 2009/12/14 v1.2 Hooks for auxiliary files (HO)}
+\Msg{* Package: auxhook 2011/03/04 v1.3 Hooks for auxiliary files (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -82,7 +82,7 @@
This is a generated file.
-Copyright (C) 2006, 2007, 2009 by
+Copyright (C) 2006, 2007, 2009, 2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -141,7 +141,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{auxhook.drv}%
- [2009/12/14 v1.2 Hooks for auxiliary files (HO)]%
+ [2011/03/04 v1.3 Hooks for auxiliary files (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -150,7 +150,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{150}
+% \CheckSum{178}
%
% \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
@@ -171,7 +171,7 @@ and the derived files
% \GetFileInfo{auxhook.drv}
%
% \title{The \xpackage{auxhook} package}
-% \date{2009/12/14 v1.2}
+% \date{2011/03/04 v1.3}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -252,7 +252,7 @@ and the derived files
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{auxhook}%
- [2009/12/14 v1.2 Hooks for auxiliary files (HO)]%
+ [2011/03/04 v1.3 Hooks for auxiliary files (HO)]%
% \end{macrocode}
%
% \subsection{Hook setup}
@@ -270,14 +270,35 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \begin{macrocode}
+\ifx\AtBeginDocument\@firstofone
+ \global\let\@beginmainauxhook\relax
+\else
+ \g@addto@macro{\@beginmainauxhook}{%
+ \global\let\@beginmainauxhook\relax
+ }%
+\fi
+% \end{macrocode}
+%
% \subsection{User macros}
%
% \begin{macro}{\AddLineBeginMainAux}
% \begin{macrocode}
\newcommand{\AddLineBeginMainAux}[1]{%
- \g@addto@macro\@beginmainauxhook{%
- \immediate\write\@mainaux{#1}%
- }%
+ \ifx\@beginmainauxhook\relax
+ \if@filesw
+ \PackageInfo{auxhook}{%
+ \@backslashchar AddLineBeginMainAux comes a little late,%
+ \MessageBreak
+ because the main .aux file is already opened%
+ }%
+ \immediate\write\@mainaux{#1}%
+ \fi
+ \else
+ \g@addto@macro\@beginmainauxhook{%
+ \immediate\write\@mainaux{#1}%
+ }%
+ \fi
}
% \end{macrocode}
% \end{macro}
@@ -595,6 +616,11 @@ and the derived files
% \item
% Support for package \xpackage{rerunfilecheck} added (\cs{@include}).
% \end{Version}
+% \begin{Version}{2011/03/04 v1.3}
+% \item
+% \cs{AddLineBeginMainAux} also supports write requests after
+% the main \xext{aux} file is opened.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/bigintcalc.dtx b/Master/texmf-dist/source/latex/oberdiek/bigintcalc.dtx
index c7b88da869b..b4376afd8f1 100644
--- a/Master/texmf-dist/source/latex/oberdiek/bigintcalc.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/bigintcalc.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007 by
+% Copyright (C) 2007, 2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -79,7 +79,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: bigintcalc 2007/11/11 v1.1 Expandable big integer calculations (HO)}
+\Msg{* Package: bigintcalc 2011/01/30 v1.2 Expandable big integer calculations (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -90,7 +90,7 @@
This is a generated file.
-Copyright (C) 2007 by
+Copyright (C) 2007, 2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -158,7 +158,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bigintcalc.drv}%
- [2007/11/11 v1.1 Expandable big integer calculations (HO)]%
+ [2011/01/30 v1.2 Expandable big integer calculations (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\usepackage{wasysym}
@@ -202,7 +202,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{3634}
+% \CheckSum{3722}
%
% \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
@@ -223,7 +223,7 @@ and the derived files
% \GetFileInfo{bigintcalc.drv}
%
% \title{The \xpackage{bigintcalc} package}
-% \date{2007/11/11 v1.1}
+% \date{2011/01/30 v1.2}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -633,14 +633,18 @@ and the derived files
% \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 % @
- \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@bigintcalc.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -648,7 +652,6 @@ and the derived files
\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.}%
@@ -660,24 +663,27 @@ and the derived files
\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}%
@@ -696,34 +702,43 @@ and the derived files
\fi
\expandafter\x\csname ver@bigintcalc.sty\endcsname
\ProvidesPackage{bigintcalc}%
- [2007/11/11 v1.1 Expandable big integer calculations (HO)]
+ [2011/01/30 v1.2 Expandable big integer calculations (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 BIC@AtEnd\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\BIC@AtEnd{%
\BIC@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{33}{12}% !
\TMP@EnsureCode{36}{14}% $ (comment!)
@@ -737,9 +752,11 @@ and the derived files
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{11}% : (letter!)
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{63}{14}% ? (comment!)
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\edef\BIC@AtEnd{\BIC@AtEnd\noexpand\endinput}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname BIC@TestMode\endcsname\relax
\else
@@ -797,9 +814,14 @@ and the derived files
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input pdftexcmds.sty\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+ \TMP@RequirePackage{pdftexcmds}[2007/11/11]%
\else
- \RequirePackage{pdftexcmds}[2007/11/11]%
\fi
% \end{macrocode}
%
@@ -3352,7 +3374,7 @@ $ \BIC@Temp 9{18\or27\or36\or45\or54\or63\or72\or81}%
% \end{macro}
%
% \begin{macrocode}
-\BIC@AtEnd
+\BIC@AtEnd%
% \end{macrocode}
%
% \begin{macrocode}
@@ -3419,6 +3441,22 @@ $ \BIC@Temp 9{18\or27\or36\or45\or54\or63\or72\or81}%
\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 bigintcalc.sty\relax}%
\fi
@@ -3429,15 +3467,20 @@ $ \BIC@Temp 9{18\or27\or36\or45\or54\or63\or72\or81}%
\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
@@ -3462,7 +3505,7 @@ $ \BIC@Temp 9{18\or27\or36\or45\or54\or63\or72\or81}%
\makeatletter
\chardef\BIC@TestMode=1 %
\makeatother
-\usepackage{bigintcalc}[2007/11/11]
+\usepackage{bigintcalc}[2011/01/30]
%<noetex>\let\numexpr\SavedNumexpr
\usepackage{qstest}
\IncludeTests{*}
@@ -4455,6 +4498,10 @@ $ \BIC@Temp 9{18\or27\or36\or45\or54\or63\or72\or81}%
% \item
% Use of package \xpackage{pdftexcmds} for \LuaTeX\ support.
% \end{Version}
+% \begin{Version}{2011/01/30 v1.2}
+% \item
+% Already loaded package files are not input in \hologo{plainTeX}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/bitset.dtx b/Master/texmf-dist/source/latex/oberdiek/bitset.dtx
index 4ff1f5e73f4..e0300659379 100644
--- a/Master/texmf-dist/source/latex/oberdiek/bitset.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/bitset.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007 by
+% Copyright (C) 2007, 2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -78,7 +78,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: bitset 2007/09/28 v1.0 Data type bit set (HO)}
+\Msg{* Package: bitset 2011/01/30 v1.1 Data type bit set (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -89,7 +89,7 @@
This is a generated file.
-Copyright (C) 2007 by
+Copyright (C) 2007, 2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -156,7 +156,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bitset.drv}%
- [2007/09/28 v1.0 Data type bit set (HO)]%
+ [2011/01/30 v1.1 Data type bit set (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\usepackage{amstext}
@@ -168,7 +168,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{3423}
+% \CheckSum{3510}
%
% \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
@@ -189,7 +189,7 @@ and the derived files
% \GetFileInfo{bitset.drv}
%
% \title{The \xpackage{bitset} package}
-% \date{2007/09/28 v1.0}
+% \date{2011/01/30 v1.1}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -669,14 +669,18 @@ and the derived files
% \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 % @
- \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@bitset.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -684,7 +688,6 @@ and the derived files
\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.}%
@@ -696,24 +699,27 @@ and the derived files
\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}%
@@ -732,34 +738,43 @@ and the derived files
\fi
\expandafter\x\csname ver@bitset.sty\endcsname
\ProvidesPackage{bitset}%
- [2007/09/28 v1.0 Data type bit set (HO)]
+ [2011/01/30 v1.1 Data type bit set (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 BitSet@AtEnd\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\BitSet@AtEnd{%
\BitSet@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{33}{12}% !
\TMP@EnsureCode{39}{12}% '
@@ -773,10 +788,12 @@ and the derived files
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{11}% : (letter!)
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{63}{14}% ? (comment!)
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{96}{12}% `
+\edef\BitSet@AtEnd{\BitSet@AtEnd\noexpand\endinput}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname BitSet@TestMode\endcsname\relax
\else
@@ -790,9 +807,15 @@ and the derived files
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input infwarerr.sty\relax
- \input intcalc.sty\relax
- \input bigintcalc.sty\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+ \TMP@RequirePackage{infwarerr}[2007/09/09]%
+ \TMP@RequirePackage{intcalc}[2007/09/27]%
+ \TMP@RequirePackage{bigintcalc}[2007/09/27]%
\else
\RequirePackage{infwarerr}[2007/09/09]%
\RequirePackage{intcalc}[2007/09/27]%
@@ -2754,7 +2777,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\BitSet@AtEnd
+\BitSet@AtEnd%
%</package>
% \end{macrocode}
%
@@ -2818,6 +2841,22 @@ and the derived files
\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 bitset.sty\relax}%
\fi
@@ -2828,15 +2867,20 @@ and the derived files
\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
@@ -2871,7 +2915,7 @@ and the derived files
\makeatletter
\chardef\BitSet@TestMode=1 %
\makeatother
-\usepackage{bitset}[2007/09/28]
+\usepackage{bitset}[2011/01/30]
%<*noetex>
\def\ETeXEnable{%
\let\numexpr\SavedNumexpr
@@ -4141,6 +4185,10 @@ and the derived files
% \item
% First version.
% \end{Version}
+% \begin{Version}{2011/01/30 v1.1}
+% \item
+% Already loaded package files are not input in \hologo{plainTeX}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx b/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx
index be438c3d170..67a4273d82e 100644
--- a/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007-2010 by
+% Copyright (C) 2007-2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -81,7 +81,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: bookmark 2010/04/08 v1.12 PDF bookmarks (HO)}
+\Msg{* Package: bookmark 2011/03/20 v1.19 PDF bookmarks (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -92,7 +92,7 @@
This is a generated file.
-Copyright (C) 2007-2010 by
+Copyright (C) 2007-2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -164,7 +164,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bookmark.drv}%
- [2010/04/08 v1.12 PDF bookmarks (HO)]%
+ [2011/03/20 v1.19 PDF bookmarks (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -173,7 +173,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{2067}
+% \CheckSum{2225}
%
% \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
@@ -194,7 +194,7 @@ and the derived files
% \GetFileInfo{bookmark.drv}
%
% \title{The \xpackage{bookmark} package}
-% \date{2010/04/08 v1.12}
+% \date{2011/03/20 v1.19}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -242,17 +242,51 @@ and the derived files
%
% \subsection{Options}
%
-% Options can be given at three places:
+% Options can be given at four places:
% \begin{enumerate}
% \item \cs{usepackage}|[|\meta{options}|]{bookmark}|\\
% This is the only place for driver options
% and option \xoption{atend}.
% \item \cs{bookmarksetup}|{|\meta{options}|}|\\
% This command is just for setting options.
+% \item \cs{bookmarksetupnext}|{|\meta{options}|}|\\
+% The options are stored and called after the
+% options of the next \cs{bookmark} command.
% \item \cs{bookmark}|[|\meta{options}|]{|\meta{title}|}|\\
% This command sets the bookmark. The option settings remain
% limited to this bookmark.
% \end{enumerate}
+% Exception: Driver options, option \xoption{atend} and
+% options \xoption{draft}\slash\xoption{final}
+% cannot be changed after the package is loaded.
+%
+% \subsubsection{Options \xoption{draft} and \xoption{final}}
+%
+% If a \LaTeX\ file is compiled several times, then a little
+% time can be saved, if option \xoption{draft} is used to
+% disable the bookmark stuff of this package. Default is
+% \xoption{final}. If \cs{pdfdraftmode} is available, then
+% the default is {draft} if draft mode is enabled.
+% Both options are boolean options, without
+% value the value |true| is used. |draft=true| is the same
+% as |final=false|.
+%
+% Options of package \xpackage{bookmark} are local options
+% with the exception of driver options. Therefore \xoption{draft}
+% or \xoption{final} given as class option is not seen by this
+% package. If you want to optimize first \LaTeX\ runs depending
+% on a global \xoption{draft}, then package \xpackage{ifdraft}
+% and \LaTeX's \cs{PassOptionsToPackage}
+% might help in the organization of the preamble, for example:
+%\begin{quote}
+%\begin{verbatim}
+%\documentclass[draft]{article}
+%\usepackage{ifdraft}
+%\ifdraft{%
+% \PassOptionsToPackage{draft}{bookmark}%
+%}{}
+%\end{verbatim}
+%\end{quote}
%
% \subsubsection{Driver options}
%
@@ -292,9 +326,6 @@ and the derived files
% Both \xoption{bold} and \xoption{italic} can be used together.
% Using value |false| disables the font option.
%
-% These options are ignored with a warning if \hologo{eTeX} is not
-% detected.
-%
% \paragraph{Color option.}
%
% Colored bookmarks are a feature of PDF 1.4, they are not supported
@@ -378,6 +409,11 @@ and the derived files
% Sets the level, see the description above. If option \xoption{level}
% is given without value, then the default behaviour is restored,
% that the `current level' is used as level value.
+% Since version 2010/10/19 v1.16 package \xpackage{bookmark}
+% also supports names |part|, |section| and other,
+% if the macros \cs{toclevel@part}, \cs{toclevel@section}
+% are defined (done by package \xpackage{hyperref}, see
+% option \xoption{bookmarkdepth}).
% \item[\xoption{rellevel}:]
% Sets the level relative to the previous level.
% A positive value means that the bookmark entry become
@@ -438,10 +474,15 @@ and the derived files
%
% \begin{declcs}{bookmarkget} \M{option}
% \end{declcs}
-% Macro \cs{bookmarkget} extract the value of the latest option
+% Macro \cs{bookmarkget} extracts the value of the latest option
% setting of option \meta{option}. In case of boolean options number
% one is returned, if the boolean option is enabled, otherwise the
-% result is zero. Macro \cs{bookmarkget} is expandable. In case of
+% result is zero.
+% The resulting numbers can directly be used in \cs{ifnum} or \cs{ifcase}.
+% If you want to have the digits \texttt{0} and \texttt{1}, then
+% prefix \cs{bookmarkget} with \cs{number}.
+% Macro \cs{bookmarkget} is expandable.
+% In case of
% unsupported options an empty string is returned.
% Supported boolean options are
% \begin{quote}
@@ -525,6 +566,20 @@ and the derived files
%\end{verbatim}
% \end{quote}
%
+% Alternatively, option \xoption{startatroot} can be given
+% in \cs{bookmark}:
+% \begin{quote}
+%\begin{verbatim}
+%\BookmarkAtEnd{%
+% \bookmark[
+% startatroot,
+% named=LastPage,
+% level=0,
+% ]{Last page}%
+%}
+%\end{verbatim}
+% \end{quote}
+%
% \paragraph{Remarks.}
% \begin{itemize}
% \item
@@ -536,7 +591,7 @@ and the derived files
% (\xoption{pdftex}, \xoption{dvips}, \xoption{dvipsone},
% \xoption{textures}) use package \xpackage{atveryend}'s
% for this purpose. \cs{AtEndDocument} is too early,
-% the last page might not been shipped out. Because the \xext{.aux}
+% the last page might not been shipped out. Because the \xext{aux}
% file is needed, these drivers use \cs{AfterLastShipout}.
%
% The implementation of the other drivers
@@ -574,7 +629,7 @@ and the derived files
open,
openlevel=2,
atend
-]{bookmark}[2010/04/08]
+]{bookmark}[2011/03/20]
\bookmarksetup{color=blue}
@@ -677,7 +732,7 @@ and the derived files
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bookmark}%
- [2010/04/08 v1.12 PDF bookmarks (HO)]%
+ [2011/03/20 v1.19 PDF bookmarks (HO)]%
% \end{macrocode}
%
% \subsubsection{Requirements}
@@ -756,8 +811,10 @@ and the derived files
\RequirePackage{ifpdf}[2009/04/10]
\RequirePackage{ifxetex}
\RequirePackage{ifvtex}[2008/11/04]
-\RequirePackage{hyperref}
+\RequirePackage{pdftexcmds}[2010/11/04]
+\RequirePackage{hyperref}[2010/06/18]
\RequirePackage{auxhook}[2007/04/06]
+\RequirePackage{kvsetkeys}[2010/03/01]
\RequirePackage{kvoptions}[2009/08/13]
\RequirePackage{hycolor}[2008/09/08]
\RequirePackage{bitset}
@@ -774,6 +831,8 @@ and the derived files
color,%
depth,%
dest,%
+ draft,%
+ final,%
gotor,%
italic,%
keeplevel,%
@@ -792,13 +851,18 @@ and the derived files
% \end{macrocode}
% \begin{macro}{\bookmarksetup}
% \begin{macrocode}
-\newcommand*{\bookmarksetup}{\setkeys{BKM}}
+\newcommand*{\bookmarksetup}{\kvsetkeys{BKM}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\BKM@setup}
% \begin{macrocode}
\def\BKM@setup#1{%
\bookmarksetup{#1}%
+ \ifx\BKM@HookNext\ltx@empty
+ \else
+ \expandafter\bookmarksetup\expandafter{\BKM@HookNext}%
+ \BKM@HookNextClear
+ \fi
\BKM@hook
\ifBKM@keeplevel
\else
@@ -807,6 +871,46 @@ and the derived files
}
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{\bookmarksetupnext}
+% \begin{macrocode}
+\newcommand*{\bookmarksetupnext}[1]{%
+ \ltx@GlobalAppendToMacro\BKM@HookNext{,#1}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\BKM@setupnext}
+% \begin{macrocode}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\BKM@HookNextClear}
+% \begin{macrocode}
+\def\BKM@HookNextClear{%
+ \global\let\BKM@HookNext\ltx@empty
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\BKM@HookNext}
+% \begin{macrocode}
+\BKM@HookNextClear
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\DeclareBoolOption{draft}
+\DeclareComplementaryOption{final}{draft}
+\pdf@ifdraftmode\BKM@drafttrue{}
+% \end{macrocode}
+% \begin{macro}{\BKM@DisableOptions}
+% \begin{macrocode}
+\def\BKM@DisableOptions{%
+ \DisableKeyvalOption[action=warning,package=bookmark]%
+ {BKM}{draft}%
+ \DisableKeyvalOption[action=warning,package=bookmark]%
+ {BKM}{final}%
+}
+% \end{macrocode}
+% \end{macro}
% \begin{macrocode}
\DeclareBoolOption[\ifHy@bookmarksopen true\else false\fi]{open}
% \end{macrocode}
@@ -837,7 +941,7 @@ and the derived files
\ifx\BKM@param\@empty
\def\BKM@depth{\c@tocdepth}%
\else
- \@ifundefined{toclevel@\BKM@param}{%
+ \ltx@IfUndefined{toclevel@\BKM@param}{%
\@onelevel@sanitize\BKM@param
\edef\BKM@temp{\expandafter\@car\BKM@param\@nil}%
\ifcase 0\expandafter\ifx\BKM@temp-1\fi
@@ -848,13 +952,16 @@ and the derived files
\fi
\relax
\PackageWarning{bookmark}{%
- Unknown document division name (\BKM@param)%
+ Unknown document division name (\BKM@param)\MessageBreak
+ for option `depth'%
}%
\else
- \BKM@SetDepth\BKM@param
+ \BKM@SetDepth\BKM@depth\BKM@param
\fi
}{%
- \BKM@SetDepth{\csname toclevel@\BKM@param\endcsname}%
+ \BKM@SetDepth\BKM@depth{%
+ \csname toclevel@\BKM@param\endcsname
+ }%
}%
\fi
}
@@ -864,23 +971,75 @@ and the derived files
\def\bookmark@depth{\BKM@depth}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\BKM@SetDepth}
+% \begin{macro}{\BKM@SetDepthOrLevel}
% \begin{macrocode}
-\def\BKM@SetDepth#1{%
+\def\BKM@SetDepthOrLevel#1#2{%
\begingroup
\setbox\z@=\hbox{%
- \count@=#1\relax
+ \count@=#2\relax
\expandafter
}%
\expandafter\endgroup
- \expandafter\def\expandafter\BKM@depth\expandafter{\the\count@}%
+ \expandafter\def\expandafter#1\expandafter{\the\count@}%
}
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
\DeclareStringOption[\BKM@currentlevel]{level}[\BKM@currentlevel]
+\define@key{BKM}{level}{%
+ \edef\BKM@param{#1}%
+ \ifx\BKM@param\BKM@MacroCurrentLevel
+ \let\BKM@level\BKM@param
+ \else
+ \ltx@IfUndefined{toclevel@\BKM@param}{%
+ \@onelevel@sanitize\BKM@param
+ \edef\BKM@temp{\expandafter\@car\BKM@param\@nil}%
+ \ifcase 0\expandafter\ifx\BKM@temp-1\fi
+ \expandafter\ifnum\expandafter`\BKM@temp>47 %
+ \expandafter\ifnum\expandafter`\BKM@temp<58 %
+ 1%
+ \fi
+ \fi
+ \relax
+ \PackageWarning{bookmark}{%
+ Unknown document division name (\BKM@param)\MessageBreak
+ for option `level'%
+ }%
+ \else
+ \BKM@SetDepthOrLevel\BKM@level\BKM@param
+ \fi
+ }{%
+ \BKM@SetDepthOrLevel\BKM@level{%
+ \csname toclevel@\BKM@param\endcsname
+ }%
+ }%
+ \fi
+}
+% \end{macrocode}
+% \begin{macro}{\BKM@MacroCurrentLevel}
+% \begin{macrocode}
+\def\BKM@MacroCurrentLevel{\BKM@currentlevel}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\DeclareBoolOption{keeplevel}
\DeclareBoolOption{startatroot}
+% \end{macrocode}
+% \begin{macro}{\BKM@startatrootfalse}
+% \begin{macrocode}
+\def\BKM@startatrootfalse{%
+ \global\let\ifBKM@startatroot\iffalse
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\BKM@startatroottrue}
+% \begin{macrocode}
+\def\BKM@startatroottrue{%
+ \global\let\ifBKM@startatroot\iftrue
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\define@key{BKM}{rellevel}{%
\BKM@CalcExpr\BKM@level{#1}+\BKM@currentlevel
}
@@ -1277,7 +1436,11 @@ and the derived files
\def\BKM@@CalcParam#1#2#3\@nil{%
\ifx\calc#1%
\@ifundefined{calc@assign@dimen}{%
- \setlength{\dimen@}{\dimexpr#2\relax}%
+ \@ifundefined{dimexpr}{%
+ \setlength{\dimen@}{#2}%
+ }{%
+ \setlength{\dimen@}{\dimexpr#2\relax}%
+ }%
}{%
\setlength{\dimen@}{#2}%
}%
@@ -1296,14 +1459,11 @@ and the derived files
%
% \begin{macrocode}
\DeclareBoolOption{atend}
-% \end{macrocode}
-% \begin{macro}{\BKM@DisableOptions}
-% \begin{macrocode}
-\def\BKM@DisableOptions{%
- \DisableKeyvalOption{BKM}{atend}%
+\g@addto@macro\BKM@DisableOptions{%
+ \DisableKeyvalOption[action=warning,package=bookmark]%
+ {BKM}{atend}%
}
% \end{macrocode}
-% \end{macro}
%
% \subsubsection{Option \xoption{style}}
%
@@ -1437,7 +1597,8 @@ and the derived files
\def\BKM@driver{#1}%
}%
\g@addto@macro\BKM@DisableOptions{%
- \DisableKeyvalOption{BKM}{#1}%
+ \DisableKeyvalOption[action=warning,package=bookmark]%
+ {BKM}{#1}%
}%
}
% \end{macrocode}
@@ -1501,11 +1662,39 @@ and the derived files
\BKM@DisableOptions
% \end{macrocode}
%
+% \paragraph{Option \xoption{draft}}
+%
+% \begin{macrocode}
+\ifBKM@draft
+ \PackageWarningNoLine{bookmark}{Draft mode on}%
+ \let\bookmarksetup\ltx@gobble
+ \let\BookmarkAtEnd\ltx@gobble
+ \let\bookmarkdefinestyle\ltx@gobbletwo
+ \let\bookmarkget\ltx@gobble
+ \renewcommand*{\pdfbookmark}[3][]{}%
+ \let\currentpdfbookmark\ltx@gobbletwo
+ \let\subpdfbookmark\ltx@gobbletwo
+ \let\belowpdfbookmark\ltx@gobbletwo
+ \newcommand*{\bookmark}[2][]{}%
+ \renewcommand*{\Hy@writebookmark}[5]{}%
+ \let\ReadBookmarks\relax
+ \let\BKM@DefGotoNameAction\ltx@gobbletwo % package `hypdestopt'
+ \expandafter\endinput
+\fi
+% \end{macrocode}
+%
% \paragraph{Driver validation and loading.}
%
% \begin{macrocode}
\newif\ifBKM@DvipdfmxOutlineOpen
\ltx@IfUndefined{SpecialDvipdfmxOutlineOpen}{%
+ \ifxetex
+ \ifdim\number\XeTeXversion\XeTeXrevision in<0.9995in %
+ \else
+ \chardef\SpecialDvipdfmxOutlineOpen\ltx@one
+ \BKM@DvipdfmxOutlineOpentrue
+ \fi
+ \fi
}{%
\ifnum\SpecialDvipdfmxOutlineOpen>\z@
\BKM@DvipdfmxOutlineOpentrue
@@ -1621,10 +1810,12 @@ and the derived files
\begingroup
\ifBKM@numbered
\let\numberline\Hy@numberline
+ \let\booknumberline\Hy@numberline
\let\partnumberline\Hy@numberline
\let\chapternumberline\Hy@numberline
\else
\let\numberline\@gobble
+ \let\booknumberline\@gobble
\let\partnumberline\@gobble
\let\chapternumberline\@gobble
\fi
@@ -1652,7 +1843,7 @@ and the derived files
%<*dvipdfm>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bkm-dvipdfm.def}%
- [2010/04/08 v1.12 bookmark driver for dvipdfm (HO)]%
+ [2011/03/20 v1.19 bookmark driver for dvipdfm (HO)]%
% \end{macrocode}
%
% \begin{macro}{\BKM@id}
@@ -1686,7 +1877,7 @@ and the derived files
\@whilesw\ifBKM@sw\fi{%
\def\BKM@abslevel{1}%
\ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@
- \global\BKM@startatrootfalse
+ \BKM@startatrootfalse
\expandafter\xdef\csname BKM@\the\BKM@id\endcsname{%
0{\BKM@level}\BKM@abslevel
}%
@@ -1778,7 +1969,9 @@ and the derived files
out \ifBKM@DvipdfmxOutlineOpen
[%
\ifBKM@open
- \ifnum\BKM@level<\BKM@openlevel
+ \ifnum\BKM@level<%
+ \expandafter\ltx@firstofone\expandafter
+ {\number\BKM@openlevel} %
\else
-%
\fi
@@ -1825,7 +2018,7 @@ and the derived files
%<*vtex>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bkm-vtex.def}%
- [2010/04/08 v1.12 bookmark driver for VTeX (HO)]%
+ [2011/03/20 v1.19 bookmark driver for VTeX (HO)]%
% \end{macrocode}
%
% \begin{macrocode}
@@ -1867,7 +2060,7 @@ and the derived files
\BKM@swtrue
\@whilesw\ifBKM@sw\fi{%
\ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@
- \global\BKM@startatrootfalse
+ \BKM@startatrootfalse
\def\BKM@parent{0}%
\expandafter\xdef\csname BKM@\the\BKM@id\endcsname{%
0{\BKM@level}%
@@ -2156,14 +2349,14 @@ and the derived files
%<*pdftex>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bkm-pdftex.def}%
- [2010/04/08 v1.12 bookmark driver for pdfTeX (HO)]%
+ [2011/03/20 v1.19 bookmark driver for pdfTeX (HO)]%
% \end{macrocode}
%
% \begin{macro}{\BKM@DO@entry}
% \begin{macrocode}
\def\BKM@DO@entry#1#2{%
\begingroup
- \setkeys{BKM@DO}{#1}%
+ \kvsetkeys{BKM@DO}{#1}%
\def\BKM@DO@title{#2}%
\BKM@UnescapeHex\BKM@DO@title
\expandafter\expandafter\expandafter\BKM@getx
@@ -2279,7 +2472,7 @@ and the derived files
%<*dvips>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bkm-dvips.def}%
- [2010/04/08 v1.12 bookmark driver for dvips (HO)]%
+ [2011/03/20 v1.19 bookmark driver for dvips (HO)]%
% \end{macrocode}
% \begin{macro}{\BKM@PSHeaderFile}
% \begin{macrocode}
@@ -2298,7 +2491,7 @@ and the derived files
%<*dvipsone>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bkm-dvipsone.def}%
- [2010/04/08 v1.12 bookmark driver for dvipsone (HO)]%
+ [2011/03/20 v1.19 bookmark driver for dvipsone (HO)]%
% \end{macrocode}
% \begin{macro}{\BKM@PSHeaderFile}
% \begin{macrocode}
@@ -2317,7 +2510,7 @@ and the derived files
%<*textures>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bkm-textures.def}%
- [2010/04/08 v1.12 bookmark driver for textures (HO)]%
+ [2011/03/20 v1.19 bookmark driver for textures (HO)]%
% \end{macrocode}
% \begin{macro}{\BKM@PSHeaderFile}
% \begin{macrocode}
@@ -2388,7 +2581,7 @@ and the derived files
% \begin{macrocode}
\def\BKM@DO@entry#1#2{%
\begingroup
- \setkeys{BKM@DO}{#1}%
+ \kvsetkeys{BKM@DO}{#1}%
\def\BKM@DO@title{#2}%
\BKM@UnescapeHex\BKM@DO@title
\expandafter\expandafter\expandafter\BKM@getx
@@ -2553,7 +2746,7 @@ and the derived files
\BKM@swtrue
\@whilesw\ifBKM@sw\fi{%
\ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@
- \global\BKM@startatrootfalse
+ \BKM@startatrootfalse
\expandafter\xdef\csname BKM@\the\BKM@id\endcsname{%
0{\BKM@level}0%
}%
@@ -2702,7 +2895,7 @@ and the derived files
%
% The following drivers use package \xpackage{atveryend}'s
% \cs{AfterLastShipout}, because they still need the
-% \xext{.aux} file.
+% \xext{aux} file.
% \begin{itemize}
% \item
% Driver \xoption{pdftex} uses \cs{pdfoutline} that can
@@ -2711,7 +2904,7 @@ and the derived files
% PostScript drivers such as
% \xoption{dvips} use an external PostScript header file
% for the bookmarks. File writing can be done after
-% the last shipout page, but before the \xext{.aux} file is closed.
+% the last shipout page, but before the \xext{aux} file is closed.
% \end{itemize}
% \begin{macrocode}
%<*pdftex|pdfmark>
@@ -3054,6 +3247,48 @@ and the derived files
% \item
% Requires \xpackage{ltxcmds} 2010/04/08.
% \end{Version}
+% \begin{Version}{2010/07/23 v1.13}
+% \item
+% Support for \xclass{memoir}'s \cs{booknumberline} added.
+% \end{Version}
+% \begin{Version}{2010/09/02 v1.14}
+% \item
+% (Local) options \xoption{draft} and \xoption{final} added.
+% \end{Version}
+% \begin{Version}{2010/09/25 v1.15}
+% \item
+% Fix for option \xoption{dvipdfmx-outline-open}.
+% \item
+% Option \xoption{dvipdfmx-outline-open} is set automatically,
+% if XeTeX >= 0.9995 is detected.
+% \end{Version}
+% \begin{Version}{2010/10/19 v1.16}
+% \item
+% Option `startatroot' now acts globally.
+% \item
+% Option `level' also accepts names the same way as option `depth'.
+% \end{Version}
+% \begin{Version}{2010/10/25 v1.17}
+% \item
+% \cs{bookmarksetupnext} added.
+% \item
+% Using \cs{kvsetkeys} of package \xpackage{kvsetkeys}, because
+% \cs{setkeys} of package \xpackage{keyval} is not reentrant.
+% This can cause problems (unknown keys) with older versions of
+% hyperref that also uses \cs{setkeys} (found by GL).
+% \end{Version}
+% \begin{Version}{2010/11/05 v1.18}
+% \item
+% Use of \cs{pdf@ifdraftmode} of package \xpackage{pdftexcmds} for
+% the default of option \xoption{draft}.
+% \end{Version}
+% \begin{Version}{2011/03/20 v1.19}
+% \item
+% Use of \cs{dimexpr} fixed, if \hologo{eTeX} is not used.
+% (Bug found by Martin M\"unch.)
+% \item
+% Fix in documentation. Also layout options work without \hologo{eTeX}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/catchfile.dtx b/Master/texmf-dist/source/latex/oberdiek/catchfile.dtx
index 5e50a738477..7c5efdb0b08 100644
--- a/Master/texmf-dist/source/latex/oberdiek/catchfile.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/catchfile.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007, 2010 by
+% Copyright (C) 2007, 2010, 2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -79,7 +79,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: catchfile 2010/04/28 v1.5 Catches the contents of a file (HO)}
+\Msg{* Package: catchfile 2011/03/01 v1.6 Catches the contents of a file (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -90,7 +90,7 @@
This is a generated file.
-Copyright (C) 2007, 2010 by
+Copyright (C) 2007, 2010, 2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -158,7 +158,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{catchfile.drv}%
- [2010/04/28 v1.5 Catches the contents of a file (HO)]%
+ [2011/03/01 v1.6 Catches the contents of a file (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -167,7 +167,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{833}
+% \CheckSum{907}
%
% \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
@@ -188,7 +188,7 @@ and the derived files
% \GetFileInfo{catchfile.drv}
%
% \title{The \xpackage{catchfile} package}
-% \date{2010/04/28 v1.5}
+% \date{2011/03/01 v1.6}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -228,14 +228,18 @@ and the derived files
% \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 % @
- \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@catchfile.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -243,7 +247,6 @@ and the derived files
\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.}%
@@ -255,24 +258,27 @@ and the derived files
\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}%
@@ -291,42 +297,53 @@ and the derived files
\fi
\expandafter\x\csname ver@catchfile.sty\endcsname
\ProvidesPackage{catchfile}%
- [2010/04/28 v1.5 Catches the contents of a file (HO)]
+ [2011/03/01 v1.6 Catches the contents of a file (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 CatchFile@AtEnd\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\CatchFile@AtEnd{%
\CatchFile@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{39}{12}% '
\TMP@EnsureCode{44}{12}% ,
\TMP@EnsureCode{45}{12}% -
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
-\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{96}{12}% `
+\edef\CatchFile@AtEnd{\CatchFile@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Preparations}
@@ -355,9 +372,8 @@ and the derived files
package loading is aborted%
}\@ehd
\endgroup
- \CatchFile@AtEnd
- \expandafter\endinput
- \fi
+ \expandafter\CatchFile@AtEnd
+ \fi%
\endgroup
% \end{macrocode}
%
@@ -394,8 +410,7 @@ and the derived files
package loading is aborted%
}\@ehd
\csname endgroup\endcsname
- \CatchFile@AtEnd
- \endinput
+ \CatchFile@AtEnd%
\endgroup
% \end{macrocode}
% \end{macro}
@@ -525,12 +540,19 @@ and the derived files
}%
}%
}%
- #3%
+ #3\relax
\expandafter\expandafter\expandafter\CatchFile@Do
\CatchFile@Input\CatchFile@File\relax
\fi
}
% \end{macrocode}
+% \cs{relax} after |#3| was added to make it more robust in
+% case the user uses something like
+%\begin{verbatim}
+%\CatchFileDef{\content}{\jobname.tt}{\endlinechar=-1}
+%\end{verbatim}
+% that expands the following \cs{expandafter} after |#3| prematurely
+% (contribution of Martin Scharrer).
% \end{macro}
% \begin{macro}{\CatchFile@EOF}
% If the file is read the catcode mappings are fixed.
@@ -551,7 +573,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\CatchFile@AtEnd
+\CatchFile@AtEnd%
%</package>
% \end{macrocode}
%
@@ -615,6 +637,22 @@ and the derived files
\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 catchfile.sty\relax}%
\fi
@@ -625,15 +663,20 @@ and the derived files
\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
@@ -653,7 +696,7 @@ and the derived files
\listfiles
\tracingnesting=2 %
\documentclass{minimal}
-\usepackage{catchfile}[2010/04/28]
+\usepackage{catchfile}[2011/03/01]
\makeatletter
\def\mysetup{%
\let\do\@makeother
@@ -1047,6 +1090,12 @@ and the derived files
% definition of \dots' (HO) including improvement that uses
% \cs{unexpanded} if available (Florent Chervet).
% \end{Version}
+% \begin{Version}{2011/03/01 v1.6}
+% \item
+% \cs{relax} added after the setup argument of
+% \cs{CatchFileDef} to prevent premature file reading
+% (Martin Scharrer).
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/embedfile.dtx b/Master/texmf-dist/source/latex/oberdiek/embedfile.dtx
index ad862f3df98..51ce9278cd3 100644
--- a/Master/texmf-dist/source/latex/oberdiek/embedfile.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/embedfile.dtx
@@ -22,9 +22,8 @@
%
% This work consists of the main source file embedfile.dtx
% and the derived files
-% embedfile.sty, embedfile.pdf, embedfile.ins, embedfile.drv,
-% \usedir{tex/latex/oberdiek}, dtx-attach.sty,
-% embedfile-example-plain.tex,
+% embedfile.sty, embedfile.pdf, embedfile.ins, embedfile.drv, \usedir,
+% dtx-attach.sty, embedfile-example-plain.tex,
% embedfile-example-collection.tex, embedfile-test1.tex,
% embedfile-test2.tex, embedfile-test3.tex,
% embedfile-test4.tex.
@@ -119,9 +118,8 @@ because some files are installed in TDS:tex/generic//.
This work consists of the main source file embedfile.dtx
and the derived files
- embedfile.sty, embedfile.pdf, embedfile.ins, embedfile.drv,
- \usedir{tex/latex/oberdiek}, dtx-attach.sty,
- embedfile-example-plain.tex,
+ embedfile.sty, embedfile.pdf, embedfile.ins, embedfile.drv, \usedir,
+ dtx-attach.sty, embedfile-example-plain.tex,
embedfile-example-collection.tex, embedfile-test1.tex,
embedfile-test2.tex, embedfile-test3.tex,
embedfile-test4.tex.
@@ -183,7 +181,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1292}
+% \CheckSum{1363}
%
% \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
@@ -648,14 +646,18 @@ You need Acrobat Reader 8 or higher.
% \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 % @
- \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@embedfile.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -663,7 +665,6 @@ You need Acrobat Reader 8 or higher.
\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.}%
@@ -675,24 +676,27 @@ You need Acrobat Reader 8 or higher.
\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}%
@@ -711,34 +715,43 @@ You need Acrobat Reader 8 or higher.
\fi
\expandafter\x\csname ver@embedfile.sty\endcsname
\ProvidesPackage{embedfile}%
- [2010/03/01 v2.5 embed files into PDF (HO)]
+ [2010/03/01 v2.5 embed files into PDF (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 EmFi@AtEnd\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\EmFi@AtEnd{%
\EmFi@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{39}{12}% '
\TMP@EnsureCode{40}{12}% (
@@ -748,11 +761,11 @@ You need Acrobat Reader 8 or higher.
\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\EmFi@AtEnd{\EmFi@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Tools}
@@ -792,9 +805,8 @@ You need Acrobat Reader 8 or higher.
Currently other drivers are not supported. %
Package loading is aborted.%
}%
- \EmFi@AtEnd
- \expandafter\endinput
-\fi
+ \expandafter\EmFi@AtEnd
+\fi%
% \end{macrocode}
% \begin{macrocode}
\EmFi@RequirePackage{pdftexcmds}[2007/11/11]
@@ -811,9 +823,8 @@ You need Acrobat Reader 8 or higher.
}{%
At least version 1.30 is necessary. Package loading is aborted.%
}%
- \EmFi@AtEnd
- \expandafter\endinput
-\fi
+ \expandafter\EmFi@AtEnd
+\fi%
% \end{macrocode}
%
% \subsection{Strings}
@@ -1637,7 +1648,7 @@ You need Acrobat Reader 8 or higher.
% \end{macrocode}
%
% \begin{macrocode}
-\EmFi@AtEnd
+\EmFi@AtEnd%
%</package>
% \end{macrocode}
%
@@ -1701,6 +1712,22 @@ You need Acrobat Reader 8 or higher.
\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 embedfile.sty\relax}%
\fi
@@ -1711,15 +1738,20 @@ You need Acrobat Reader 8 or higher.
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/engord.dtx b/Master/texmf-dist/source/latex/oberdiek/engord.dtx
index 9ebf0a02541..4e23c6bab40 100644
--- a/Master/texmf-dist/source/latex/oberdiek/engord.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/engord.dtx
@@ -159,7 +159,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{476}
+% \CheckSum{552}
%
% \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
@@ -285,14 +285,18 @@ and the derived files
% \end{macrocode}
% 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@engord.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -300,7 +304,6 @@ and the derived files
\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.}%
@@ -312,24 +315,27 @@ and the derived files
\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}%
@@ -348,34 +354,43 @@ and the derived files
\fi
\expandafter\x\csname ver@engord.sty\endcsname
\ProvidesPackage{engord}%
- [2010/03/01 v1.8 Provides English ordinal numbers (HO)]
+ [2010/03/01 v1.8 Provides English ordinal numbers (HO)]%
% \end{macrocode}
%
% \subsection{Help commands for plain compatibility}
%
% \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 EO@AtEnd\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\EO@AtEnd{%
\EO@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{33}{12}% !
\TMP@EnsureCode{36}{3}% $
@@ -384,8 +399,11 @@ and the derived files
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{60}{12}% <
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{94}{7}% ^(superscript)
\TMP@EnsureCode{96}{12}% `
+\edef\EO@AtEnd{\EO@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \begin{macro}{\EO@def}
@@ -616,7 +634,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\EO@AtEnd
+\EO@AtEnd%
% \end{macrocode}
%
% \begin{macrocode}
@@ -683,6 +701,22 @@ and the derived files
\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 engord.sty\relax}%
\fi
@@ -693,15 +727,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/eolgrab.dtx b/Master/texmf-dist/source/latex/oberdiek/eolgrab.dtx
new file mode 100644
index 00000000000..e5e6f52f2c9
--- /dev/null
+++ b/Master/texmf-dist/source/latex/oberdiek/eolgrab.dtx
@@ -0,0 +1,1042 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2011 by
+% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any later
+% version. This version of this license is in
+% http://www.latex-project.org/lppl/lppl-1-3c.txt
+% and 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.
+%
+% The Base Interpreter refers to any `TeX-Format',
+% because some files are installed in TDS:tex/generic//.
+%
+% This work consists of the main source file eolgrab.dtx
+% and the derived files
+% eolgrab.sty, eolgrab.pdf, eolgrab.ins, eolgrab.drv,
+% eolgrab-example-ltx.tex, eolgrab-example-env.tex,
+% eolgrab-example-sec.tex, eolgrab-test1.tex,
+% eolgrab-test2.tex.
+%
+% Distribution:
+% CTAN:macros/latex/contrib/oberdiek/eolgrab.dtx
+% CTAN:macros/latex/contrib/oberdiek/eolgrab.pdf
+%
+% Unpacking:
+% (a) If eolgrab.ins is present:
+% tex eolgrab.ins
+% (b) Without eolgrab.ins:
+% tex eolgrab.dtx
+% (c) If you insist on using LaTeX
+% latex \let\install=y\input{eolgrab.dtx}
+% (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+% (a) If eolgrab.drv is present:
+% latex eolgrab.drv
+% (b) Without eolgrab.drv:
+% latex eolgrab.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 eolgrab.dtx
+% makeindex -s gind.ist eolgrab.idx
+% pdflatex eolgrab.dtx
+% makeindex -s gind.ist eolgrab.idx
+% pdflatex eolgrab.dtx
+%
+% Installation:
+% TDS:tex/generic/oberdiek/eolgrab.sty
+% TDS:doc/latex/oberdiek/eolgrab.pdf
+% TDS:doc/latex/oberdiek/example/eolgrab-example-ltx.tex
+% TDS:doc/latex/oberdiek/example/eolgrab-example-env.tex
+% TDS:doc/latex/oberdiek/example/eolgrab-example-sec.tex
+% TDS:doc/latex/oberdiek/test/eolgrab-test1.tex
+% TDS:doc/latex/oberdiek/test/eolgrab-test2.tex
+% TDS:source/latex/oberdiek/eolgrab.dtx
+%
+%<*ignore>
+\begingroup
+ \catcode123=1 %
+ \catcode125=2 %
+ \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: eolgrab 2011/01/12 v1.0 Grab line end delimited argument (HO)}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2011 by
+ Heiko Oberdiek <heiko.oberdiek at googlemail.com>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3c of this license or (at your option) any later
+version. This version of this license is in
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+and 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.
+
+The Base Interpreter refers to any `TeX-Format',
+because some files are installed in TDS:tex/generic//.
+
+This work consists of the main source file eolgrab.dtx
+and the derived files
+ eolgrab.sty, eolgrab.pdf, eolgrab.ins, eolgrab.drv,
+ eolgrab-example-ltx.tex, eolgrab-example-env.tex,
+ eolgrab-example-sec.tex, eolgrab-test1.tex,
+ eolgrab-test2.tex.
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+ \file{eolgrab.ins}{\from{eolgrab.dtx}{install}}%
+ \file{eolgrab.drv}{\from{eolgrab.dtx}{driver}}%
+ \usedir{tex/generic/oberdiek}%
+ \file{eolgrab.sty}{\from{eolgrab.dtx}{package}}%
+ \usedir{doc/latex/oberdiek/example}%
+ \file{eolgrab-example-ltx.tex}{\from{eolgrab.dtx}{example-ltx}}%
+ \file{eolgrab-example-env.tex}{\from{eolgrab.dtx}{example-env}}%
+ \file{eolgrab-example-sec.tex}{\from{eolgrab.dtx}{example-sec}}%
+ \usedir{doc/latex/oberdiek/test}%
+ \file{eolgrab-test1.tex}{\from{eolgrab.dtx}{test1}}%
+ \file{eolgrab-test2.tex}{\from{eolgrab.dtx}{test2}}%
+}
+
+\catcode32=13\relax% active space
+\let =\space%
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* eolgrab.sty}
+\Msg{*}
+\Msg{* And install the following script file:}
+\Msg{*}
+\Msg{* }
+\Msg{*}
+\Msg{* To produce the documentation run the file `eolgrab.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{eolgrab.drv}%
+ [2011/01/12 v1.0 Grab line end delimited argument (HO)]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2008/08/11]
+\begin{document}
+ \DocInput{eolgrab.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{472}
+%
+% \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{eolgrab.drv}
+%
+% \title{The \xpackage{eolgrab} package}
+% \date{2011/01/12 v1.0}
+% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% This package implements a generic argument grabber
+% to catch an argument that is delimited by the line end.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \urldef\urltexhax\url{http://tug.org/mailman/listinfo/texhax}
+% \def\eol/{^^A
+% \meta{\texttt{EOL}}^^A
+% }
+%
+% \section{Documentation}
+%
+% The starting point for this package was a feature
+% request of Arno Trautmann in the mailing list
+% \texttt{texhax}\footnote{Info page for mailing list
+% \texttt{texhax}: \urltexhax} \cite{trautmann-request}.
+% A macro \cs{eolsection} should behave like \cs{section},
+% but the argument should be delimited by the line end
+% instead of given in curly braces:
+% \begin{quote}
+% |\eolsection My Title|
+% \end{quote}
+% Phil Taylor answered this with an implementation for \cs{eolsection}.
+% Because this feature could be useful for other macros as well,
+% I answered with an implementation of \cs{eolgrab} as general solution
+% \cite{oberdiek-eolgrab}.
+%
+% Both formats \hologo{plainTeX} and \hologo{LaTeX} are supported
+% by the package, see the example for \cs{eolsection} below.
+%
+% \begin{declcs}{eolgrab} \M{code} \meta{argument} \eol/
+% \end{declcs}
+% Macro \cs{eolgrab} takes two arguments. The first argument
+% is \meta{code}, a classical undelimited \hologo{TeX} macro argument.
+% The second argument is delimited by the line end \eol/.
+% The macro calls \meta{code} with \meta{argument} as argument
+% in curly braces. Because the catcode of the line end is changed,
+% \cs{eolgrab} will not work in the argument of other macros.
+% Macro \cs{eolgrab} is made robust if either \hologo{eTeX}'s
+% \cs{protected} or \hologo{LaTeX}'s \cs{DeclareRobustCommand}
+% is available.
+%
+% \begin{declcs}{eolgrabopt} \M{code} \meta{argument} \eol/
+% \end{declcs}
+% Macro \cs{eolgrabopt} passes \meta{argument} as optional
+% argument to \meta{code} if \meta{argument} is not empty.
+% \begin{quote}
+% |\eolgrabopt\item foo|
+% \end{quote}
+% becomes to
+% \begin{quote}
+% |\item[{foo}]|
+% \end{quote}
+% The curly argument braces are added to support square brackets
+% inside \meta{argument}.
+% If the \meta{argument} is empty:
+% \begin{quote}
+% |\eolgrabopt\item|
+% \end{quote}
+% then
+% \begin{quote}
+% |\item|
+% \end{quote}
+% is called without optional argument.
+%
+% \subsection{Examples}
+%
+% \begin{itemize}
+% \item
+% The line
+% \begin{quote}
+% |\eolgrab\section My Title|
+% \end{quote}
+% is equivalent to
+% \begin{quote}
+% |\section{My Title}|
+% \end{quote}
+% \item
+% The next example uses the star form of \cs{section}. Then the
+% command to be called consists of two tokens. Therefore the
+% first argument of \cs{eolgrab} needs curly braces:
+% \begin{quote}
+% |\eolgrab{\section*}My Title|
+% \end{quote}
+% becomes
+% \begin{quote}
+% |\section*{My Title}|
+% \end{quote}
+% \item
+% Now \hologo{LaTeX}'s \cs{PackageError} is used. This macro
+% has three arguments, the package or class name, the message
+% text and the help text. A standard help text of \hologo{LaTeX}
+% is used as given in macro \cs{@ehc}. The second argument,
+% the message text is used as argument, delimited by line end:
+% \begin{quote}
+% |\eolgrab{\PackageError{foobar}}%|\\
+% |Some error message text\MessageBreak%|\\
+% |with several lines|\\
+% |\@ehc|
+% \end{quote}
+% In the first two lines of the example, the line end is suppressed
+% by the comment character (percent), thus the argument is delimited
+% by the line end of the third line. The result is:
+% \begin{quote}
+% |\PackageError{foobar}{Some error message text\MessageBreak|\\
+% |with several lines}\@ehc|
+% \end{quote}
+% \item
+% The original request for macro \cs{eolsection}, see above,
+% can be implemented easily with the help of \cs{eolgrab}.
+% Example for \hologo{LaTeX}:
+% \begin{quote}
+% |\usepackage{eolgrab}|\\
+% |\newcommand*{\eolsection}{\eolgrab\section}|
+% \end{quote}
+% Example for \hologo{plainTeX}:
+% \begin{quote}
+% |\input eolgrab.sty\relax|\\
+% |\def\eolsection{\eolgrab\section}|
+% \end{quote}
+% And a sophisticated variant for \hologo{LaTeX} that also supports
+% the star syntax and the optional argument:
+% \begin{macrocode}
+%<*example-sec>
+\documentclass{article}
+\usepackage{eolgrab}
+\makeatletter
+\newcommand*{\eolsection}{%
+ \@ifstar{%
+ \eolgrab{\section*}%
+ }{%
+ \@ifnextchar[{%
+ \eoloptsection
+ }{%
+ \eolgrab\section
+ }%
+ }%
+}
+\newcommand*{\eoloptsection}[1][]{%
+ \eolgrab{\section[{#1}]}%
+}
+\makeatother
+\begin{document}
+\tableofcontents
+\eolsection Section without star and optional argument
+\eolsection*Section with star
+\eolsection[Short section title]Long section title
+\end{document}
+%</example-sec>
+% \end{macrocode}
+% \end{itemize}
+%
+% \subsubsection{Small \hologo{LaTeX} document as example}
+%
+% \begin{macrocode}
+%<*example-ltx>
+\RequirePackage{eolgrab}
+\eolgrab\documentclass article
+\eolgrab\begin document
+\eolgrab\section Hello World
+\eolgrab\emph Some text
+\eolgrab\end document
+%</example-ltx>
+% \end{macrocode}
+%
+% \subsubsection{\hologo{LaTeX} document with environments}
+%
+% \begin{macrocode}
+%<*example-env>
+\documentclass{article}
+\usepackage{eolgrab}
+\newcommand*{\Begin}{\eolgrab \begin}
+\newcommand*{\End }{\eolgrab \end }
+\newcommand*{\Item }{\eolgrabopt\item }
+\Begin document
+ \Begin itemize
+ \Item
+ first item
+ \Item
+ second item
+ \End itemize
+ \Begin description
+ \Item foo
+ is the first syllable of foobar.
+ \Item bar
+ is the second syllable of foobar.
+ \End description
+\End document
+%</example-env>
+% \end{macrocode}
+%
+% \subsection{Limitations}
+%
+% Macro \cs{eolgrab} needs to catch the line end.
+% If \hologo{TeX} reads a line, then it throws away the line end
+% characters (carriage return, line feed) and removes spaces at the
+% end of the line. Then it adds the character with the character code
+% that is given by \cs{endlinechar} at the end of the line. The category
+% code of the inserted character is given by the current value of
+% its \cs{catcode}. If \cs{endlinechar} is not a valid character code
+% (especially if it is negative), then no character is added.
+%
+% In \hologo{plainTeX} and \hologo{LaTeX} the standard settings
+% of the inserted endline character is the character with code 13
+% (or |^||^||M| in \hologo{TeX} notation) with catcode 5 (end of line).
+% That means the inserted end of line character behaves like a space
+% token. For example, it is removed after macro names. Therefore
+% \cs{eolgrab} changes the catcode.
+%
+% Therefore \cs{eolgrab} has some limitations:
+% \begin{itemize}
+% \item
+% Like other verbatim stuff, the macro \cs{eolgrab} cannot be
+% used in the argument of other macros. \cs{eolgrab} want to
+% change the catcode of the end of line character. If this
+% character is read before, because it is processed as argument
+% of another macro, the catcode is already set and is not reassigned
+% later if \cs{eolgrab} changes the category code for this character
+% code.
+% \item
+% The argument must not contain the end of line character.
+% Otherwise the first end of line character is already taken
+% as delimiter, leaving the rest of the line outside the argument.
+% \item
+% Because \cs{eolgrab} is probably mostly used in the line with
+% the delimited argument. Therefore changes of \cs{endlinechar}
+% will not affect the current line.
+% \end{itemize}
+%
+% \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\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@eolgrab.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \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{eolgrab}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup%
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\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}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@eolgrab.sty\endcsname
+\ProvidesPackage{eolgrab}%
+ [2011/01/12 v1.0 Grab line end delimited argument (HO)]%
+% \end{macrocode}
+%
+% \subsection{Catcodes}
+%
+% \begin{macrocode}
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode123=1 % {
+ \catcode125=2 % }
+ \catcode64=11 % @
+ \def\x{\endgroup
+ \expandafter\edef\csname eolgrab@AtEnd\endcsname{%
+ \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\catcode61\catcode48\catcode32=10\relax%
+\catcode13=5 % ^^M
+\endlinechar=13 %
+\catcode35=6 % #
+\catcode64=11 % @
+\catcode123=1 % {
+\catcode125=2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\eolgrab@AtEnd{%
+ \eolgrab@AtEnd
+ \catcode#1=\the\catcode#1\relax
+ }%
+ \catcode#1=#2\relax
+}
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
+\TMP@EnsureCode{42}{12}% *
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\TMP@EnsureCode{94}{7}% ^
+\edef\eolgrab@AtEnd{\eolgrab@AtEnd\noexpand\endinput}
+% \end{macrocode}
+%
+% \subsection{Resources}
+%
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input ltxcmds.sty\relax
+ \input infwarerr.sty\relax
+\else
+ \RequirePackage{ltxcmds}[2010/12/04]%
+ \RequirePackage{infwarerr}[2010/04/08]%
+\fi
+% \end{macrocode}
+%
+% \begin{macro}{\eolgrab@ifdefinable}
+% \begin{macrocode}
+\ltx@IfUndefined{@ifdefinable}{%
+ \def\eolgrab@ifdefinable#1#2{%
+ \ltx@ifundefined{#1}{#2}{%
+ \@PackageError{eolgrab}{%
+ Command \ltx@backslashchar#1 already defined%
+ }\@ehc
+ }%
+ }%
+}{%
+ \def\eolgrab@ifdefinable#1{%
+ \expandafter\@ifdefinable\csname#1\endcsname
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Macro \cs{eolgrab}}
+%
+% \begin{macro}{\eolgrab}
+% \begin{macrocode}
+\eolgrab@ifdefinable{eolgrab}{%
+ \ltx@IfUndefined{protected}{%
+ \ltx@IfUndefined{DeclareRobustCommand}{%
+ \def\eolgrab#1%
+ }{%
+ \newcommand\eolgrab{}%
+ \DeclareRobustCommand*\eolgrab
+ }%
+ }{%
+ \protected\def\eolgrab#1%
+ }{%
+ \begingroup
+ \endlinechar=13 %
+ \catcode13=\ltx@active
+ \eolgrab@{#1}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\eolgrabopt}
+% \begin{macrocode}
+\eolgrab@ifdefinable{eolgrabopt}{%
+ \ltx@IfUndefined{protected}{%
+ \ltx@IfUndefined{DeclareRobustCommand}{%
+ \def\eolgrabopt#1%
+ }{%
+ \newcommand\eolgrabopt{}%
+ \DeclareRobustCommand*\eolgrabopt
+ }%
+ }{%
+ \protected\def\eolgrabopt#1%
+ }{%
+ \begingroup
+ \endlinechar=13 %
+ \catcode13=\ltx@active
+ \eolgrab@opt{#1}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\begingroup
+ \catcode13=\ltx@active %
+\ltx@firstofone{\endgroup %
+% \end{macrocode}
+% \begin{macro}{\eolgrab@}
+% \begin{macrocode}
+ \def\eolgrab@#1#2^^M{%
+ \endgroup %
+ #1{#2}%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\eolgrab@opt}
+% \begin{macrocode}
+ \def\eolgrab@opt#1#2^^M{%
+ \endgroup %
+ \ltx@ifempty{#2}{%
+ #1%
+ }{%
+ #1[{#2}]%
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\eolgrab@AtEnd%
+% \end{macrocode}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \section{Test}
+%
+% \subsection{Catcode checks for loading}
+%
+% \begin{macrocode}
+%<*test1>
+% \end{macrocode}
+% \begin{macrocode}
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\expandafter\ifx\csname count@\endcsname\relax
+ \countdef\count@=255 %
+\fi
+\expandafter\ifx\csname @gobble\endcsname\relax
+ \long\def\@gobble#1{}%
+\fi
+\expandafter\ifx\csname @firstofone\endcsname\relax
+ \long\def\@firstofone#1{#1}%
+\fi
+\expandafter\ifx\csname loop\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+{%
+ \def\loop#1\repeat{%
+ \def\body{#1}%
+ \iterate
+ }%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \let\repeat=\fi
+}%
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@ 1 %
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \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 eolgrab.sty\relax}%
+\fi
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\%=14 %
+ \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
+\csname @@end\endcsname
+\end
+% \end{macrocode}
+% \begin{macrocode}
+%</test1>
+% \end{macrocode}
+%
+% \subsection{Tests for \hologo{plainTeX}}
+%
+% \begin{macrocode}
+%<*test2>
+\input eolgrab.sty\relax
+\catcode`\{=1 %
+\catcode`\}=2 %
+\eolgrab{\immediate\write16}Hello World
+\def\TestExpected{foo bar}
+\eolgrab{\def\TestResult}foo bar
+
+\ifx\TestExpected\TestResult
+ \immediate\write16{* Ok (foo bar)}%
+\else
+ \errmessage{Test failed (foo bar)}%
+\fi
+
+\begingroup
+ \def\TestExpected{foobar}%
+ \endlinechar=-1 %
+ \eolgrab{\def\TestResult}foo
+ bar
+ ^^M
+ \ifx\TestExpected\TestResult
+ \immediate\write16{* Ok (foobar)}%
+ \else
+ \errmessage{Test failed (foobar)}%
+ \fi
+\endgroup
+
+\csname @@end\endcsname\end
+%</test2>
+% \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/eolgrab.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/oberdiek/eolgrab.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{install/macros/latex/contrib/oberdiek.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTAN{tds/tds.pdf}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \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 eolgrab.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}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+% eolgrab.sty & tex/generic/oberdiek/eolgrab.sty\\
+% eolgrab.pdf & doc/latex/oberdiek/eolgrab.pdf\\
+% example/eolgrab-example-ltx.tex & doc/latex/oberdiek/example/eolgrab-example-ltx.tex\\
+% example/eolgrab-example-env.tex & doc/latex/oberdiek/example/eolgrab-example-env.tex\\
+% example/eolgrab-example-sec.tex & doc/latex/oberdiek/example/eolgrab-example-sec.tex\\
+% test/eolgrab-test1.tex & doc/latex/oberdiek/test/eolgrab-test1.tex\\
+% test/eolgrab-test2.tex & doc/latex/oberdiek/test/eolgrab-test2.tex\\
+% eolgrab.dtx & source/latex/oberdiek/eolgrab.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+% \begingroup
+% \advance\linewidth by\leftmargin
+% \advance\linewidth by\rightmargin
+% \edef\x{\endgroup
+% \def\noexpand\lw{\the\linewidth}^^A
+% }\x
+% \def\lwbox{^^A
+% \leavevmode
+% \hbox to \linewidth{^^A
+% \kern-\leftmargin\relax
+% \hss
+% \usebox0
+% \hss
+% \kern-\rightmargin\relax
+% }^^A
+% }^^A
+% \ifdim\wd0>\lw
+% \sbox0{\small\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\footnotesize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\scriptsize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\tiny\t}^^A
+% \ifdim\wd0>\linewidth
+% \lwbox
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \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 eolgrab.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{eolgrab.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 eolgrab.dtx
+%makeindex -s gind.ist eolgrab.idx
+%pdflatex eolgrab.dtx
+%makeindex -s gind.ist eolgrab.idx
+%pdflatex eolgrab.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \begin{thebibliography}{9}
+% \raggedright
+% \bibitem{trautmann-request}
+% Arno Trautmann,
+% \textit{[texhax] read argument until EOL};
+% mailing list \texttt{texthax@tug.org},
+% 2011-01-06;
+% \url{http://tug.org/pipermail/texhax/2011-January/016517.html}.
+%
+% \bibitem{taylor}
+% Philip Taylor,
+% \textit{Re: [texhax] read argument until EOL};
+% mailing list \texttt{texhax@tug.org},
+% 2011-01-06;
+% \url{http://tug.org/pipermail/texhax/2011-January/016519.html}.
+%
+% \bibitem{oberdiek-eolgrab}
+% Heiko Oberdiek,
+% \textit{Re: [texhax] read argument until EOL};
+% mailing list \texttt{texhax@tug.org},
+% 2011-01-06;
+% \url{http://tug.org/pipermail/texhax/2011-January/016526.html}.
+%
+% \end{thebibliography}
+%
+% \begin{History}
+% \begin{Version}{2011/01/12 v1.0}
+% \item
+% First public version.
+% \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx b/Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx
index 2782aefb6df..535765ce56e 100644
--- a/Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx
@@ -157,7 +157,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{916}
+% \CheckSum{1040}
%
% \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
@@ -510,14 +510,18 @@ and the derived files
%
% 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@epstopdf.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -525,7 +529,6 @@ and the derived files
\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.}%
@@ -537,24 +540,27 @@ and the derived files
\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}%
@@ -573,35 +579,51 @@ and the derived files
\fi
\expandafter\x\csname ver@epstopdf.sty\endcsname
\ProvidesPackage{epstopdf}%
- [2010/02/09 v2.5 Conversion with epstopdf on the fly (HO)]
+ [2010/02/09 v2.5 Conversion with epstopdf on the fly (HO)]%
% \end{macrocode}
+% Larger catcode set because of configuration files needed.
% \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 ETE@AtEnd\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\ETE@AtEnd{%
\ETE@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
+\TMP@EnsureCode{39}{12}% '
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
\TMP@EnsureCode{42}{12}% *
\TMP@EnsureCode{45}{12}% -
\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\edef\ETE@AtEnd{\ETE@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \begin{macrocode}
@@ -620,7 +642,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\ETE@AtEnd
+\ETE@AtEnd%
%</package>
% \end{macrocode}
%
@@ -636,14 +658,18 @@ and the derived files
%
% 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@epstopdf-base.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -651,7 +677,6 @@ and the derived files
\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.}%
@@ -663,24 +688,27 @@ and the derived files
\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}%
@@ -699,34 +727,43 @@ and the derived files
\fi
\expandafter\x\csname ver@epstopdf-base.sty\endcsname
\ProvidesPackage{epstopdf-base}%
- [2010/02/09 v2.5 Base part for package epstopdf]
+ [2010/02/09 v2.5 Base part for package epstopdf]%
% \end{macrocode}
%
% \subsubsection{Catcodes}
%
% \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 ETE@AtEnd\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\ETE@AtEnd{%
\ETE@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{33}{12}% !
\TMP@EnsureCode{39}{12}% '
@@ -737,9 +774,9 @@ and the derived files
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{96}{12}% `
+\edef\ETE@AtEnd{\ETE@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsubsection{Load packages}
@@ -764,9 +801,8 @@ and the derived files
No graphics package \string`graphic{s,x}\string' loaded%
}%
\newcommand*{\epstopdfsetup}[1]{}%
- \ETE@AtEnd
- \expandafter\endinput
-\fi
+ \expandafter\ETE@AtEnd
+\fi%
% \end{macrocode}
%
% Check, whether pdftex.def is loaded. \cs{ver@pdftex.def} is not
@@ -781,9 +817,8 @@ and the derived files
}%
\endgroup
\newcommand*{\epstopdfsetup}[1]{}%
- \ETE@AtEnd
- \expandafter\endinput
- \fi
+ \expandafter\ETE@AtEnd
+ \fi%
\endgroup
% \end{macrocode}
%
@@ -1133,7 +1168,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\ETE@AtEnd
+\ETE@AtEnd%
%</base>
% \end{macrocode}
%
@@ -1208,6 +1243,22 @@ and the derived files
\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 epstopdf.sty\relax}%
\fi
@@ -1218,15 +1269,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/etexcmds.dtx b/Master/texmf-dist/source/latex/oberdiek/etexcmds.dtx
index b00250ce8fe..3d37da7d528 100644
--- a/Master/texmf-dist/source/latex/oberdiek/etexcmds.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/etexcmds.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007, 2010 by
+% Copyright (C) 2007, 2010, 2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -80,7 +80,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: etexcmds 2010/01/28 v1.3 Prefix for e-TeX command names (HO)}
+\Msg{* Package: etexcmds 2011/02/16 v1.5 Prefix for e-TeX command names (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -91,7 +91,7 @@
This is a generated file.
-Copyright (C) 2007, 2010 by
+Copyright (C) 2007, 2010, 2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -160,7 +160,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{etexcmds.drv}%
- [2010/01/28 v1.3 Prefix for e-TeX command names (HO)]%
+ [2011/02/16 v1.5 Prefix for e-TeX command names (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -169,7 +169,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{514}
+% \CheckSum{656}
%
% \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
@@ -190,7 +190,7 @@ and the derived files
% \GetFileInfo{etexcmds.drv}
%
% \title{The \xpackage{etexcmds} package}
-% \date{2010/01/28 v1.3}
+% \date{2011/02/16 v1.5}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -246,14 +246,18 @@ and the derived files
% \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 % @
- \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@etexcmds.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -261,7 +265,6 @@ and the derived files
\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.}%
@@ -273,24 +276,27 @@ and the derived files
\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}%
@@ -309,43 +315,58 @@ and the derived files
\fi
\expandafter\x\csname ver@etexcmds.sty\endcsname
\ProvidesPackage{etexcmds}%
- [2010/01/28 v1.3 Prefix for e-TeX command names (HO)]
+ [2011/02/16 v1.5 Prefix for e-TeX command names (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 etexcmds@AtEnd\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\etexcmds@AtEnd{%
\etexcmds@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
+\TMP@EnsureCode{39}{12}% '
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
\TMP@EnsureCode{44}{12}% ,
\TMP@EnsureCode{45}{12}% -
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
-\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{60}{12}% <
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\edef\etexcmds@AtEnd{%
\etexcmds@AtEnd
\escapechar\the\escapechar\relax
+ \noexpand\endinput
}
\escapechar=92 % backslash
% \end{macrocode}
@@ -375,9 +396,17 @@ and the derived files
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input infwarerr.sty\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+ \TMP@RequirePackage{infwarerr}[2007/09/09]%
+ \TMP@RequirePackage{ifluatex}[2010/03/01]%
\else
\RequirePackage{infwarerr}[2007/09/09]%
+ \RequirePackage{ifluatex}[2010/03/01]%
\fi
% \end{macrocode}
%
@@ -406,19 +435,38 @@ and the derived files
\etex@unexpandedtrue
\else
\edef\y{\meaning\@@unexpanded}%
- \ifx\y
+ \ifx\x\y
\endgroup
\let\etex@unexpanded\@@unexpanded
\etex@unexpandedtrue
\else
- \endgroup
- \@PackageInfoNoLine{etexcmds}{%
- Could not find \string\unexpanded.\MessageBreak
- That can mean that you are not using e-TeX or\MessageBreak
- that some package has redefined \string\unexpanded.\MessageBreak
- In the latter case, load this package earlier%
- }%
- \etex@unexpandedfalse
+ \ifluatex
+ \ifnum\luatexversion<36 %
+ \else
+ \begingroup
+ \directlua{%
+ tex.enableprimitives('etex@',{'unexpanded'})%
+ }%
+ \global\let\etex@unexpanded\etex@unexpanded
+ \endgroup
+ \fi
+ \fi
+ \edef\y{\meaning\etex@unexpanded}%
+ \ifx\x\y
+ \endgroup
+ \etex@unexpandedtrue
+ \else
+ \endgroup
+ \@PackageInfoNoLine{etexcmds}{%
+ Could not find \string\unexpanded.\MessageBreak
+ That can mean that you are not using e-TeX or%
+ \MessageBreak
+ that some package has redefined \string\unexpanded.%
+ \MessageBreak
+ In the latter case, load this package earlier%
+ }%
+ \etex@unexpandedfalse
+ \fi
\fi
\fi
\fi
@@ -450,19 +498,38 @@ and the derived files
\etex@expandedtrue
\else
\edef\y{\meaning\@@expanded}%
- \ifx\y
+ \ifx\x\y
\endgroup
\let\etex@expanded\@@expanded
\etex@expandedtrue
\else
- \endgroup
- \@PackageInfoNoLine{etexcmds}{%
- Could not find \string\expanded.\MessageBreak
- That can mean that you are not using pdfTeX 1.50 or\MessageBreak
- that some package has redefined \string\expanded.\MessageBreak
- In the latter case, load this package earlier%
- }%
- \etex@expandedfalse
+ \ifluatex
+ \ifnum\luatexversion<36 %
+ \else
+ \begingroup
+ \directlua{%
+ tex.enableprimitives('etex@',{'expanded'})%
+ }%
+ \global\let\etex@expanded\etex@expanded
+ \endgroup
+ \fi
+ \fi
+ \edef\y{\meaning\etex@expanded}%
+ \ifx\x\y
+ \endgroup
+ \etex@expandedtrue
+ \else
+ \endgroup
+ \@PackageInfoNoLine{etexcmds}{%
+ Could not find \string\expanded.\MessageBreak
+ That can mean that you are not using pdfTeX 1.50 or%
+ \MessageBreak
+ that some package has redefined \string\expanded.%
+ \MessageBreak
+ In the latter case, load this package earlier%
+ }%
+ \etex@expandedfalse
+ \fi
\fi
\fi
\fi
@@ -470,7 +537,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\etexcmds@AtEnd
+\etexcmds@AtEnd%
%</package>
% \end{macrocode}
%
@@ -534,6 +601,22 @@ and the derived files
\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 etexcmds.sty\relax}%
\fi
@@ -544,15 +627,20 @@ and the derived files
\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
@@ -583,7 +671,7 @@ and the derived files
% \begin{macrocode}
%<*test3>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{etexcmds-test3.tex}[2010/01/28 v1.3 Test file for LaTeX]
+\ProvidesFile{etexcmds-test3.tex}[2011/02/16 v1.5 Test file for LaTeX]
\RequirePackage{etexcmds}
\makeatletter
\edef\x{\string\unexpanded}
@@ -599,7 +687,7 @@ and the derived files
% \begin{macrocode}
%<*test4>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{etexcmds-test4.tex}[2010/01/28 v1.3 Test file for LaTeX]
+\ProvidesFile{etexcmds-test4.tex}[2011/02/16 v1.5 Test file for LaTeX]
\documentclass{article}
\usepackage{m-pictex}
\def\normalwritestatus#1#2{%
@@ -827,7 +915,15 @@ and the derived files
% \end{Version}
% \begin{Version}{2010/01/28 v1.3}
% \item
-% Compatibility to iniTeX\ added.
+% Compatibility to \hologo{iniTeX} added.
+% \end{Version}
+% \begin{Version}{2011/01/30 v1.4}
+% \item
+% Already loaded package files are not input in \hologo{plainTeX}.
+% \end{Version}
+% \begin{Version}{2011/02/16 v1.5}
+% \item
+% Using \hologo{LuaTeX}'s \texttt{tex.enableprimitives} if available.
% \end{Version}
% \end{History}
%
diff --git a/Master/texmf-dist/source/latex/oberdiek/gettitlestring.dtx b/Master/texmf-dist/source/latex/oberdiek/gettitlestring.dtx
index ad7db0155bc..dab2bae798a 100644
--- a/Master/texmf-dist/source/latex/oberdiek/gettitlestring.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/gettitlestring.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2009 by
+% Copyright (C) 2009, 2010 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -78,7 +78,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: gettitlestring 2009/12/18 v1.3 Cleanup title references (HO)}
+\Msg{* Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -89,7 +89,7 @@
This is a generated file.
-Copyright (C) 2009 by
+Copyright (C) 2009, 2010 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -156,7 +156,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{gettitlestring.drv}%
- [2009/12/18 v1.3 Cleanup title references (HO)]%
+ [2010/12/03 v1.4 Cleanup title references (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -165,7 +165,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{641}
+% \CheckSum{720}
%
% \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
@@ -186,7 +186,7 @@ and the derived files
% \GetFileInfo{gettitlestring.drv}
%
% \title{The \xpackage{gettitlestring} package}
-% \date{2009/12/18 v1.3}
+% \date{2010/12/03 v1.4}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -272,14 +272,18 @@ and the derived files
% \end{macrocode}
% 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@gettitlestring.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -287,7 +291,6 @@ and the derived files
\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.}%
@@ -299,24 +302,27 @@ and the derived files
\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}%
@@ -335,41 +341,50 @@ and the derived files
\fi
\expandafter\x\csname ver@gettitlestring.sty\endcsname
\ProvidesPackage{gettitlestring}%
- [2009/12/18 v1.3 Cleanup title references (HO)]
+ [2010/12/03 v1.4 Cleanup title references (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 GTS@AtEnd\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\GTS@AtEnd{%
\GTS@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{42}{12}% *
\TMP@EnsureCode{44}{12}% ,
\TMP@EnsureCode{45}{12}% -
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{91}{12}% [
\TMP@EnsureCode{93}{12}% ]
+\edef\GTS@AtEnd{\GTS@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Options}
@@ -452,6 +467,7 @@ and the derived files
\let\raggedleft\@empty
\let\centering\@empty
\let\protect\@unexpandable@protect
+ \let\enit@format\@empty % package enumitem
}
% \end{macrocode}
% \end{macro}
@@ -536,6 +552,7 @@ and the derived files
\GTS@TestLeft\markboth\GTS@CdrThree
\GTS@TestLeft\@mkboth\GTS@CdrThree
\GTS@TestLeft\addcontentsline\GTS@CdrFour
+ \GTS@TestLeft\enit@format\GTS@Cdr % package enumitem
}
% \end{macrocode}
% \end{macro}
@@ -581,7 +598,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\GTS@AtEnd
+\GTS@AtEnd%
%</package>
% \end{macrocode}
%
@@ -645,6 +662,22 @@ and the derived files
\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 gettitlestring.sty\relax}%
\fi
@@ -655,15 +688,20 @@ and the derived files
\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
@@ -680,7 +718,7 @@ and the derived files
%<*test2>
\NeedsTeXFormat{LaTeX2e}
\documentclass{minimal}
-\usepackage{gettitlestring}[2009/12/18]
+\usepackage{gettitlestring}[2010/12/03]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -937,6 +975,11 @@ and the derived files
% \cs{Hy@SectionAnchorHref} added for filtering
% (hyperref 2009/12/18 v6.79w).
% \end{Version}
+% \begin{Version}{2010/12/03 v1.4}
+% \item
+% Support of package \xpackage{enumitem}: removing
+% \cs{enit@format} from title string (problem report by GL).
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/grfext.dtx b/Master/texmf-dist/source/latex/oberdiek/grfext.dtx
index 570efab6c2b..9e1906c2466 100644
--- a/Master/texmf-dist/source/latex/oberdiek/grfext.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/grfext.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007 by
+% Copyright (C) 2007, 2010 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -74,7 +74,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: grfext 2007/09/30 v1.0 Managing graphics extensions (HO)}
+\Msg{* Package: grfext 2010/08/19 v1.1 Managing graphics extensions (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -85,7 +85,7 @@
This is a generated file.
-Copyright (C) 2007 by
+Copyright (C) 2007, 2010 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -148,7 +148,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{grfext.drv}%
- [2007/09/30 v1.0 Managing graphics extensions (HO)]%
+ [2010/08/19 v1.1 Managing graphics extensions (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -157,7 +157,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{635}
+% \CheckSum{721}
%
% \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
@@ -178,7 +178,7 @@ and the derived files
% \GetFileInfo{grfext.drv}
%
% \title{The \xpackage{grfext} package}
-% \date{2007/09/30 v1.0}
+% \date{2010/08/19 v1.1}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -254,6 +254,30 @@ and the derived files
% The macros described before do this automatically
% after their operation.
%
+% \subsection{Option support for package \xpackage{graphicx}}
+%
+% Package \xpackage{graphicx} uses the interface of package
+% \xpackage{keyval} in order to specify options for
+% \cs{includegraphics}. The options can also be set using
+% \begin{quote}
+% |\setkeys{Gin}{|\meta{options}|}|
+% \end{quote}
+% The four user macros with the two star forms are available
+% as options in family |Gin| as well:
+% \begin{quote}
+% |AppendGraphicsExtensions={|\meta{ext-list}|}|\\
+% |AppendGraphicsExtensions*={|\meta{ext-list}|}|\\
+% |PrependGraphicsExtensions={|\meta{ext-list}|}|\\
+% |PrependGraphicsExtensions*{|\meta{ext-list}|}|\\
+% |RemoveGraphicsExtensions={|\meta{ext-list}|}|\\
+% |PrintGraphicsExtensions|
+% \end{quote}
+% This makes it easier to locally change the extension list
+% for an included graphics, e.g.:
+% \begin{quote}
+% |\includegraphics[RemoveGraphicsExtensions={.pdf,PDF}]{image}|
+% \end{quote}
+%
% \subsection{\plainTeX}
%
% \LaTeX's graphics packages can also be used with \plainTeX.
@@ -282,14 +306,18 @@ and the derived files
% \subsection{Relead check and 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 % @
- \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@grfext.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -297,7 +325,6 @@ and the derived files
\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.}%
@@ -309,24 +336,27 @@ and the derived files
\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}%
@@ -345,44 +375,53 @@ and the derived files
\fi
\expandafter\x\csname ver@grfext.sty\endcsname
\ProvidesPackage{grfext}%
- [2007/09/30 v1.0 Managing graphics extensions (HO)]
+ [2010/08/19 v1.1 Managing graphics extensions (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 grfext@AtEnd\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\grfext@AtEnd{%
\grfext@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{42}{12}% *
\TMP@EnsureCode{44}{12}% ,
\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}% ]
+\edef\grfext@AtEnd{\grfext@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{\plainTeX}
@@ -563,8 +602,32 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \subsection{Defining options for package \xpackage{graphicx}}
+%
% \begin{macrocode}
-\grfext@AtEnd
+\RequirePackage{kvdefinekeys}[2010/03/01]
+\kv@define@key{Gin}{AppendGraphicsExtensions}{%
+ \AppendGraphicsExtensions{#1}%
+}
+\kv@define@key{Gin}{AppendGraphicsExtensions*}{%
+ \AppendGraphicsExtensions*{#1}%
+}
+\kv@define@key{Gin}{PrependGraphicsExtensions}{%
+ \PrependGraphicsExtensions{#1}%
+}
+\kv@define@key{Gin}{PrependGraphicsExtensions*}{%
+ \PrependGraphicsExtensions*{#1}%
+}
+\kv@define@key{Gin}{RemoveGraphicsExtensions}{%
+ \RemoveGraphicsExtensions{#1}%
+}
+\kv@define@key{Gin}{PrintGraphicsExtensions}[]{%
+ \PrintGraphicsExtensions
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\grfext@AtEnd%
%</package>
% \end{macrocode}
%
@@ -636,6 +699,22 @@ and the derived files
\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 grfext.sty\relax}%
\fi
@@ -646,15 +725,20 @@ and the derived files
\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
@@ -675,7 +759,7 @@ and the derived files
\nofiles
\documentclass{article}
\usepackage[pdftex]{graphics}
-\usepackage{grfext}[2007/09/30]
+\usepackage{grfext}[2010/08/19]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -1034,7 +1118,12 @@ and the derived files
% \begin{History}
% \begin{Version}{2007/09/30 v1.0}
% \item
-% First public version,
+% First public version.
+% \end{Version}
+% \begin{Version}{2010/08/19 v1.1}
+% \item
+% User macros are also made available as keyval options for
+% package \xpackage{graphicx}.
% \end{Version}
% \end{History}
%
diff --git a/Master/texmf-dist/source/latex/oberdiek/grffile.dtx b/Master/texmf-dist/source/latex/oberdiek/grffile.dtx
index 5bd691494db..e1562c4e039 100644
--- a/Master/texmf-dist/source/latex/oberdiek/grffile.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/grffile.dtx
@@ -73,7 +73,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: grffile 2010/01/28 v1.11 Extended file name support for graphics (HO)}
+\Msg{* Package: grffile 2010/12/09 v1.13 Extended file name support for graphics (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -146,7 +146,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{grffile.drv}%
- [2010/01/28 v1.11 Extended file name support for graphics (HO)]%
+ [2010/12/09 v1.13 Extended file name support for graphics (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -155,7 +155,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{596}
+% \CheckSum{803}
%
% \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
@@ -176,7 +176,7 @@ and the derived files
% \GetFileInfo{grffile.drv}
%
% \title{The \xpackage{grffile} package}
-% \date{2010/01/28 v1.11}
+% \date{2010/12/09 v1.13}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -328,18 +328,26 @@ and the derived files
% drivers \xoption{dvips} or \xoption{dvipdfm} do not allow
% spaces. However \pdfTeX's primitive \cs{pdfximage}
% uses curly braces to delimit the file name and allows spaces.
+% In case of \hologo{XeTeX} file names can be enclosed in quotes
+% to support spaces (at the cost that quotes no longer work).
% \item \cs{includegraphics} checks the existence of the file.
% Also it looks for the right extension if the extension is
-% not given. If \pdfTeX\ 1.30 is given, the file existence test
+% not given.
+%
+% If \pdfTeX\ 1.30 is given, the file existence test
% can be rewritten using a new primitive that allows spaces.
% This works in both modes DVI and PDF.
+%
+% In case of \hologo{XeTeX} the file existence test is rewritten
+% to automatically add quotes.
% \item Sometimes files are read as \TeX\ input files. For example,
% \verb|.bb| files or MPS files.
% \end{enumerate}
% If \pdfTeX\ 1.30 or greater is used in PDF mode then the
% graphics file names may contain spaces except for MPS files.
% Therefore option \xoption{space} is only enabled by default,
-% if the supported \pdfTeX\ in PDF mode is detected.
+% if the supported \pdfTeX\ in PDF mode is detected or \hologo{XeTeX}
+% is running.
% You can enable the option manually, if you know, your DVI driver
% supports spaces in its \cs{special} syntax and if there is no
% need to read the image file as \TeX\ input file (third context).
@@ -384,7 +392,7 @@ and the derived files
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{grffile}%
- [2010/01/28 v1.11 Extended file name support for graphics (HO)]%
+ [2010/12/09 v1.13 Extended file name support for graphics (HO)]%
% \end{macrocode}
%
% \subsection{Catcode stuff}
@@ -415,12 +423,14 @@ and the derived files
% \subsection{Options}
%
% \begin{macrocode}
-\RequirePackage{ifpdf}
+\RequirePackage{ifpdf}[2010/01/28]
+\RequirePackage{ifxetex}[2010/09/12]
\RequirePackage{kvoptions}[2006/08/17]
\SetupKeyvalOptions{%
family=Gin,%
prefix=grffile@%
}
+\DeclareDefaultOption{\@unknownoptionerror}
\DeclareBoolOption[true]{multidot}
\DeclareBoolOption[true]{babel}
\DeclareBoolOption[false]{extendedchars}
@@ -437,21 +447,25 @@ and the derived files
% Default setting for option \xoption{space}.
% \begin{macrocode}
\RequirePackage{pdftexcmds}[2007/11/11]
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname pdf@filesize\endcsname\relax
- \grffile@spacefalse
- \let\grffile@space@disabled\@empty
- \def\grffile@spacetrue{%
- \PackageWarning{grffile}{%
- Option `space' is not available,\MessageBreak
- because it needs pdfTeX >= 1.30%
- }%
- }%
+\ifxetex
+ \grffile@spacetrue
\else
- \ifpdf
- \grffile@spacetrue
- \else
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname pdf@filesize\endcsname\relax
\grffile@spacefalse
+ \let\grffile@space@disabled\@empty
+ \def\grffile@spacetrue{%
+ \PackageWarning{grffile}{%
+ Option `space' is not available,\MessageBreak
+ because it needs pdfTeX >= 1.30 or XeTeX%
+ }%
+ }%
+ \else
+ \ifpdf
+ \grffile@spacetrue
+ \else
+ \grffile@spacefalse
+ \fi
\fi
\fi
% \end{macrocode}
@@ -473,8 +487,13 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\grffile@org@Ginclude@graphics}
% \begin{macrocode}
\let\grffile@org@Ginclude@graphics\Ginclude@graphics
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Ginclude@graphics}
+% \begin{macrocode}
\renewcommand*{\Ginclude@graphics}{%
\ifx\grffile@filenameencoding\@empty
\else
@@ -520,8 +539,13 @@ and the derived files
\expandafter\grffile@Ginclude@graphics
\fi
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\grffile@extchar@Ginclude@graphics}
+% \begin{macrocode}
\def\grffile@extchar@Ginclude@graphics#1{%
- \def\grffile@filename{#1}%
+ \toks@{#1}%
+ \edef\grffile@filename{\the\toks@}%
\ifx\grffile@inputencoding\@empty
\else
\ifx\grfile@filenameencoding\@empty
@@ -547,11 +571,16 @@ and the derived files
\fi
\fi
\fi
+ \toks@\expandafter{\grffile@filename}%
\edef\x{\endgroup
- \noexpand\grffile@Ginclude@graphics{\grffile@filename}%
+ \noexpand\grffile@Ginclude@graphics{\the\toks@}%
}%
\x
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\grffile@inputenc@loop}
+% \begin{macrocode}
\def\grffile@inputenc@loop#1#2{%
\count@=`#1\relax
\loop
@@ -566,7 +595,9 @@ and the derived files
\repeat
}
% \end{macrocode}
+% \end{macro}
% Support for option \xoption{space}
+% \begin{macro}{\grffile@space@getbase}
% \begin{macrocode}
\def\grffile@space@getbase#1{%
\edef\grffile@tempa{%
@@ -581,26 +612,137 @@ and the derived files
}{%
}%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname pdf@filesize\endcsname\relax
- \begingroup
- \let\on@line\@empty
- \PackageInfo{grffile}{%
- \string\grffile@IfFileExists\space without space support,%
- \MessageBreak
- because pdfTeX's \string\pdffilesize\space is not available%
+ \ifxetex
+% \end{macrocode}
+% \begin{macro}{\grffile@XeTeX@IfFileExists}
+% \begin{macrocode}
+ \long\def\grffile@XeTeX@IfFileExists#1{%
+ \openin\@inputcheck"#1" %
+ \ifeof\@inputcheck
+ \closein\@inputcheck
+ \expandafter\@secondoftwo
+ \else
+ \closein\@inputcheck
+ \expandafter\@firstoftwo
+ \fi
}%
- \endgroup
- \def\grffile@IfFileExists#1{%
- \IfFileExists{#1}{%
- \let\grffile@IFE@next\@firstoftwo
- }{%
- \let\grffile@IFE@next\@secondoftwo
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\grffile@IfFileExists}
+% \begin{macrocode}
+ \long\def\grffile@IfFileExists#1{%
+ \grffile@XeTeX@IfFileExists{#1}{%
+ \edef\grffile@file@found{#1}%
+ \@firstoftwo
+ }{%
+ \let\reserved@a\@secondoftwo
+ \ifx\input@path\@undefined
+ \else
+ \expandafter\@tfor\expandafter\reserved@b\expandafter
+ :\expandafter=\input@path\do{%
+ \grffile@XeTeX@IfFileExists{\reserved@b#1}{%
+ \edef\grffile@file@found{\reserved@b#1}%
+ \let\reserved@a\@firstoftwo
+ \@break@tfor
+ }{}%
+ }%
+ \fi
+ \reserved@a
+ }%
}%
- \grffile@IFE@next
- }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\grffile@org@Gread@QTm}
+% Patch \cs{Gread@QTm} of \xfile{xetex.def}.
+% \begin{macrocode}
+ \def\grffile@org@Gread@QTm#1{%
+ \IfFileExists{\Gin@base.bb}{%
+ \Gread@eps{\Gin@base.bb}%
+ }{%
+ \G@measure@QTm{\Gin@base}{\Gin@ext}%
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+ \ifx\Gread@QTm\grffile@org@Gread@QTm
+% \end{macrocode}
+% \begin{macro}{\Gread@QTm}
+% \begin{macrocode}
+ \def\Gread@QTm#1{%
+ \grffile@IfFileExists{\Gin@base.bb}{%
+ \Gread@eps{\Gin@base.bb}%
+ }{%
+ \G@measure@QTm{\Gin@base}{\Gin@ext}%
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+ \PackageInfo{grffile}{\string\Gread@QTm\space patched}%
+ \else
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname Gread@QTm\endcsname\relax
+ \PackageWarning{grffile}{%
+ \string\Gread@QTm\space of xetex.def not found%
+ }%
+ \else
+% \end{macrocode}
+% \begin{macro}{\grffile@org@Gread@QTm}
+% \begin{macrocode}
+ \let\grffile@org@Gread@QTm\Gread@QTm
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Gread@QTm}
+% \begin{macrocode}
+ \def\Gread@QTm#1{%
+ \let\grffile@saved@IfFileExists\IfFileExists
+ \let\IfFileExists\grffile@IfFileExists
+ \grffile@org@GreadQTm{#1}%
+ \let\IfFileExists\grffile@saved@IfFileExists
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+ \fi
+ \fi
+ \else
+ \begingroup
+ \let\on@line\@empty
+ \PackageInfo{grffile}{%
+ \string\grffile@IfFileExists\space without space support,%
+ \MessageBreak
+ because pdfTeX's \string\pdffilesize\space is not available%
+ \MessageBreak
+ or XeTeX is not running%
+ }%
+ \endgroup
+% \end{macrocode}
+% \begin{macro}{\grffile@IfFileExists}
+% \begin{macrocode}
+ \long\def\grffile@IfFileExists#1{%
+ \IfFileExists{#1}{%
+ \let\grffile@IFE@next\@firstoftwo
+ }{%
+ \let\grffile@file@found\@filef@und
+ \let\grffile@IFE@next\@secondoftwo
+ }%
+ \grffile@IFE@next
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+ \fi
\else
- \def\grffile@IfFileExists#1{%
+% \end{macrocode}
+% \begin{macro}{\grffile@IfFileExists}
+% \begin{macrocode}
+ \long\def\grffile@IfFileExists#1{%
\expandafter\expandafter\expandafter
\ifx\expandafter\expandafter\expandafter\\\pdf@filesize{#1}\\%
\let\reserved@a\@secondoftwo
@@ -624,7 +766,13 @@ and the derived files
\expandafter\@firstoftwo
\fi
}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\fi
+% \end{macrocode}
+% \begin{macro}{\grffile@Ginclude@graphics}
+% \begin{macrocode}
\def\grffile@Ginclude@graphics#1{%
\begingroup
\ifgrffile@space
@@ -637,7 +785,10 @@ and the derived files
\grffile@org@Ginclude@graphics{#1}%
\endgroup
}%
-
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\grffile@filename@simple}
+% \begin{macrocode}
\def\grffile@filename@simple#1.#2\\{%
\ifx\\#2\\%
\def\filename@base{#1}%
@@ -647,7 +798,10 @@ and the derived files
\grffile@analyze@ext{#1}.{#2}\\%
\fi
}
-
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\grffile@analyze@ext}
+% \begin{macrocode}
\def\grffile@analyze@ext#1.#2\\{%
\let\grffile@next\relax
\ifx\\#2\\%
@@ -672,7 +826,10 @@ and the derived files
\fi
\grffile@next
}
-
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\grffile@try@extlist}
+% \begin{macrocode}
\def\grffile@try@extlist{%
\@for\grffile@temp:=\Gin@extensions\do{%
\grffile@IfFileExists{\filename@area\filename@base\grffile@temp}{%
@@ -686,7 +843,10 @@ and the derived files
\expandafter\grffile@use@last@ext\filename@base.\\%
\fi
}
-
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\grffile@use@last@ext}
+% \begin{macrocode}
\def\grffile@use@last@ext#1.#2\\{%
\ifx\\#2\\%
\edef\filename@base{\expandafter\filename@dot\filename@base\\}%
@@ -701,8 +861,10 @@ and the derived files
}%
}
% \end{macrocode}
+% \end{macro}
%
% Print current option setting
+% \begin{macro}{\grffile@option@status}
% \begin{macrocode}
\def\grffile@option@status#1{%
\begingroup
@@ -722,11 +884,80 @@ and the derived files
}%
\endgroup
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\grffile@option@status{multidot}
\grffile@option@status{extendedchars}
\grffile@option@status{space}
% \end{macrocode}
%
+% \subsection{Fix \cs{Gin@ii} of package \xpackage{graphicx}}
+%
+% If the image file name contains the hash character
+% macro \cs{Gin@ii} of package \xpackage{graphicx} breaks.
+% \begin{macro}{\grffile@Gin@ii@graphicx}
+% \begin{macrocode}
+\def\grffile@Gin@ii@graphicx[#1]#2{%
+ \def\@tempa{[}%
+ \def\@tempb{#2}%
+ \ifx\@tempa\@tempb
+ \def\@tempa{\Gin@iii[#1][}% hash-ok
+ \expandafter\@tempa
+ \else
+ \begingroup
+ \@tempswafalse
+ \toks@{\Ginclude@graphics{#2}}%
+ \setkeys{Gin}{#1}%
+ \Gin@esetsize
+ \the\toks@
+ \endgroup
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\grffile@Gin@ii@fixed}
+% \begin{macrocode}
+\def\grffile@Gin@ii@fixed[#1]#2{%
+ \def\@tempa{[}%
+ \begingroup
+ \toks@={#2}%
+ \edef\@tempb{\the\toks@}%
+ \expandafter\endgroup
+ \ifx\@tempa\@tempb
+ \def\@tempa{\Gin@iii[#1][}% hash-ok
+ \expandafter\@tempa
+ \else
+ \begingroup
+ \@tempswafalse
+ \toks@{\Ginclude@graphics{#2}}%
+ \setkeys{Gin}{#1}%
+ \Gin@esetsize
+ \the\toks@
+ \endgroup
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\grffile@Fix@Gin@ii}
+% \begin{macrocode}
+\def\grffile@Fix@Gin@ii{%
+ \let\Gin@ii\grffile@Gin@ii@fixed
+ \begingroup
+ \escapechar=92 %
+ \PackageInfo{grffile}{\string\Gin@ii\space of package `graphicx' fixed}%
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\ifx\Gin@ii\grffile@Gin@ii@graphicx
+ \grffile@Fix@Gin@ii
+\else
+ \AtBeginDocument{\grffile@Fix@Gin@ii}%
+\fi
+% \end{macrocode}
+%
% \begin{macrocode}
\grffile@RestoreCatcodes
% \end{macrocode}
@@ -1041,6 +1272,15 @@ showpage
% \item
% Undefined \cs{pdf@filesize} fixed.
% \end{Version}
+% \begin{Version}{2010/08/26 v1.12}
+% \item
+% Macro \cs{Gin@ii} of package \xpackage{graphicx} fixed
+% for the case that the file name contains a hash.
+% \end{Version}
+% \begin{Version}{2010/12/09 v1.13}
+% \item
+% Option \xoption{space} also supports \hologo{XeTeX}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/hobsub.dtx b/Master/texmf-dist/source/latex/oberdiek/hobsub.dtx
new file mode 100644
index 00000000000..dfee0c4ede6
--- /dev/null
+++ b/Master/texmf-dist/source/latex/oberdiek/hobsub.dtx
@@ -0,0 +1,1310 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2011 by
+% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any later
+% version. This version of this license is in
+% http://www.latex-project.org/lppl/lppl-1-3c.txt
+% and 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.
+%
+% The Base Interpreter refers to any `TeX-Format',
+% because some files are installed in TDS:tex/generic//.
+%
+% This work consists of the main source file hobsub.dtx
+% and the derived files
+% hobsub.sty, hobsub.pdf, hobsub.ins, hobsub.drv, hobsub-generic.sty,
+% hobsub-hyperref.sty, hobsub-test1.tex.
+%
+% Distribution:
+% CTAN:macros/latex/contrib/oberdiek/hobsub.dtx
+% CTAN:macros/latex/contrib/oberdiek/hobsub.pdf
+%
+% Unpacking:
+% (a) If hobsub.ins is present:
+% tex hobsub.ins
+% (b) Without hobsub.ins:
+% tex hobsub.dtx
+% (c) If you insist on using LaTeX
+% latex \let\install=y\input{hobsub.dtx}
+% (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+% (a) If hobsub.drv is present:
+% latex hobsub.drv
+% (b) Without hobsub.drv:
+% latex hobsub.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 hobsub.dtx
+% makeindex -s gind.ist hobsub.idx
+% pdflatex hobsub.dtx
+% makeindex -s gind.ist hobsub.idx
+% pdflatex hobsub.dtx
+%
+% Installation:
+% TDS:tex/generic/oberdiek/hobsub.sty
+% TDS:tex/generic/oberdiek/hobsub-generic.sty
+% TDS:tex/generic/oberdiek/hobsub-hyperref.sty
+% TDS:doc/latex/oberdiek/hobsub.pdf
+% TDS:doc/latex/oberdiek/test/hobsub-test1.tex
+% TDS:source/latex/oberdiek/hobsub.dtx
+%
+%<*ignore>
+\begingroup
+ \catcode123=1 %
+ \catcode125=2 %
+ \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: hobsub 2011/01/30 v1.0 Subsetting bundle oberdiek (HO)}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2011 by
+ Heiko Oberdiek <heiko.oberdiek at googlemail.com>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3c of this license or (at your option) any later
+version. This version of this license is in
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+and 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.
+
+The Base Interpreter refers to any `TeX-Format',
+because some files are installed in TDS:tex/generic//.
+
+This work consists of the main source file hobsub.dtx
+and the derived files
+ hobsub.sty, hobsub.pdf, hobsub.ins, hobsub.drv, hobsub-generic.sty,
+ hobsub-hyperref.sty, hobsub-test1.tex.
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+ \file{hobsub.ins}{\from{hobsub.dtx}{install}}%
+ \file{hobsub.drv}{\from{hobsub.dtx}{driver}}%
+ \usedir{tex/generic/oberdiek}%
+ \file{hobsub.sty}{\from{hobsub.dtx}{package}}%
+ \usedir{doc/latex/oberdiek/test}%
+ \file{hobsub-test1.tex}{\from{hobsub.dtx}{test1}}%
+}
+\generate{%
+ \usedir{tex/generic/oberdiek}%
+ \file{hobsub-generic.sty}{%
+ \from{hobsub.dtx}{generic,preamble,infwarerr}%
+ \from{infwarerr.dtx}{package}%
+ \from{hobsub.dtx}{post,ltxcmds}%
+ \from{ltxcmds.dtx}{package}%
+ \from{hobsub.dtx}{post,ifluatex}%
+ \from{ifluatex.dtx}{package}%
+ \from{hobsub.dtx}{post,ifvtex}%
+ \from{ifvtex.dtx}{package}%
+ \from{hobsub.dtx}{post,intcalc}%
+ \from{intcalc.dtx}{package}%
+ \from{hobsub.dtx}{post,ifpdf}%
+ \from{ifpdf.dtx}{package}%
+ \from{hobsub.dtx}{post,etexcmds}%
+ \from{etexcmds.dtx}{package}%
+ \from{hobsub.dtx}{post,kvsetkeys}%
+ \from{kvsetkeys.dtx}{package}%
+ \from{hobsub.dtx}{post,kvdefinekeys}%
+ \from{kvdefinekeys.dtx}{package}%
+ \from{hobsub.dtx}{post,luatex-loader}%
+ \from{luatex.dtx}{loader}%
+ \from{hobsub.dtx}{post,pdftexcmds}%
+ \from{pdftexcmds.dtx}{package}%
+ \from{hobsub.dtx}{post,pdfescape}%
+ \from{pdfescape.dtx}{package}%
+ \from{hobsub.dtx}{post,bigintcalc}%
+ \from{bigintcalc.dtx}{package}%
+ \from{hobsub.dtx}{post,bitset}%
+ \from{bitset.dtx}{package}%
+ \from{hobsub.dtx}{post,uniquecounter}%
+ \from{uniquecounter.dtx}{package}%
+ \from{hobsub.dtx}{post,atend}%
+ }%
+}
+\generate{%
+ \usedir{tex/generic/oberdiek}%
+ \file{hobsub-hyperref.sty}{%
+ \from{hobsub.dtx}{hyperref,preamble,,letltxmacro}%
+ \from{letltxmacro.dtx}{package}%
+ \from{hobsub.dtx}{post,hopatch}%
+ \from{hopatch.dtx}{package}%
+ \from{hobsub.dtx}{post,xcolor-patch}%
+ \from{hycolor.dtx}{xcolor}%
+ \from{hobsub.dtx}{post,atveryend}%
+ \from{atveryend.dtx}{package}%
+ \from{hobsub.dtx}{post,atbegshi}%
+ \from{atbegshi.dtx}{package}%
+ \from{hobsub.dtx}{post,refcount}%
+ \from{refcount.dtx}{package}%
+ \from{hobsub.dtx}{post,hycolor}%
+ \from{hycolor.dtx}{package}%
+ \from{hobsub.dtx}{post}%
+ }%
+}
+
+\catcode32=13\relax% active space
+\let =\space%
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* hobsub.sty, hobsub-generic.sty, hobsub-hyperref.sty}
+\Msg{*}
+\Msg{* And install the following script file:}
+\Msg{*}
+\Msg{* }
+\Msg{*}
+\Msg{* To produce the documentation run the file `hobsub.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{hobsub.drv}%
+ [2011/01/30 v1.0 Subsetting bundle oberdiek (HO)]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2008/08/11]
+\usepackage{array}
+\usepackage{caption}
+\renewcommand*{\bottomfraction}{.5}
+\renewcommand*{\topfraction}{.5}
+\begin{document}
+ \DocInput{hobsub.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{763}
+%
+% \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{hobsub.drv}
+%
+% \title{The \xpackage{hobsub} package}
+% \date{2011/01/30 v1.0}
+% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% Package \xpackage{hobsub} implements the idea of loading
+% several packages in one big collection package.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \def\TableGeneric{^^A
+% \TableEntry{\xpackage{infwarerr}}{}{2010/04/08 v1.3}^^A
+% \TableEntry{\xpackage{ltxcmds}}{}{2011/03/16 v1.18}^^A
+% \TableEntry{\xpackage{ifluatex}}{}{2010/03/01 v1.3}^^A
+% \TableEntry{\xpackage{ifvtex}}{}{2010/03/01 v1.5}^^A
+% \TableEntry{\xpackage{intcalc}}{}{2007/09/27 v1.1}^^A
+% \TableEntry{\xpackage{ifpdf}}{\xpackage{ifluatex}}{2011/01/30 v2.3}^^A
+% \TableEntry{\xpackage{etexcmds}}{}{2011/02/16 v1.5}^^A
+% \TableEntry{\xpackage{kvsetkeys}}{}{2011/04/07 v1.13}^^A
+% \TableEntry{\xpackage{kvdefinekeys}}{}{2011/04/07 v1.3}^^A
+% \TableEntry{\xpackage{luatex-loader}}{}{2010/03/09 v0.4}^^A
+% \TableEntry{\xpackage{pdftexcmds}}{\xpackage{ifluatex}, \xpackage{ifpdf}, \xpackage{infwarerr}, \xpackage{ltxcmds}, \xpackage{luatex-loader}}{2011/04/10 v0.14}^^A
+% \TableEntry{\xpackage{pdfescape}}{\xpackage{ltxcmds}, \xpackage{pdftexcmds}}{2011/04/04 v1.12}^^A
+% \TableEntry{\xpackage{bigintcalc}}{\xpackage{pdftexcmds}}{2011/01/30 v1.2}^^A
+% \TableEntry{\xpackage{bitset}}{\xpackage{bigintcalc}, \xpackage{infwarerr}, \xpackage{intcalc}}{2011/01/30 v1.1}^^A
+% \TableEntry{\xpackage{uniquecounter}}{\xpackage{bigintcalc}, \xpackage{infwarerr}}{2011/01/30 v1.2}^^A
+% }
+% \def\TableHyperref{^^A
+% \TableEntry{\xpackage{letltxmacro}}{}{2010/09/02 v1.4}^^A
+% \TableEntry{\xpackage{hopatch}}{}{2011/01/30 v1.0}^^A
+% \TableEntry{\xpackage{xcolor-patch}}{}{2011/01/30 v1.7}^^A
+% \TableEntry{\xpackage{atveryend}}{}{2010/03/24 v1.5}^^A
+% \TableEntry{\xpackage{atbegshi}}{\xpackage{ifpdf}, \xpackage{infwarerr}, \xpackage{ltxcmds}}{2011/01/30 v1.15}^^A
+% \TableEntry{\xpackage{refcount}}{\xpackage{infwarerr}, \xpackage{ltxcmds}}{2010/12/01 v3.2}^^A
+% \TableEntry{\xpackage{hycolor}}{\xpackage{xcolor-patch}}{2011/01/30 v1.7}^^A
+% }
+%
+% \newenvironment{TableList}[2][htbp]{^^A
+% \begin{table}[{#1}]^^A
+% \centering
+% \caption{Overview \xpackage{hobsub-#2}}^^A
+% \label{tab:#2}^^A
+% \begin{tabular}{ll>{\raggedright}p{.4\linewidth}}^^A
+% \bfseries Package & \bfseries Release &
+% \bfseries Dependencies\tabularnewline
+% \hline
+% }{^^A
+% \end{tabular}^^A
+% \end{table}^^A
+% }
+% \newcommand*{\TableEntry}[3]{%
+% #1&#3&#2\tabularnewline
+% }
+%
+% \renewcommand*{\arraystretch}{1.1}
+% \setlength{\extrarowheight}{2pt}
+%
+% \section{Documentation}
+%
+% In January 2011 the mailing list lualatex-dev discussed
+% ``quietening lualatex console output'' \cite{lualatex:quiet}.
+% Inspired from this, I implemented this package \xpackage{hobsub}
+% to load several packages in one file. The package is applied for
+% two packages collections that are subsets of my package bundle
+% \xpackage{oberdiek}.
+% \begin{description}
+% \item[\xpackage{hobsub-generic}] is a collection of packages
+% that can also be used with \hologo{plainTeX}.
+% \item[\xpackage{hobsub-hyperref}] is a collection of packages
+% that is used by package \xpackage{hyperref}.
+% \end{description}
+%
+% Package \xpackage{hobsub} provides the macros that
+% are used in the collection packages and might be used
+% in other projects as well. But there are many caveats,
+% some of them are discussed below.
+%
+% The most serious problem is consistency. A package
+% that is available as standalone package and is part
+% of a collection might have different versions.
+% Because my packages are organized in a bundle and should
+% be installed and updated as bundle, the risk seems low
+% to me. However, if a single package is updated manually, for
+% example for testing, then it should be loaded before the
+% collection that contains the package with an older version.
+% In a collection, the package will not be loaded again if it
+% is already loaded.
+%
+% \subsection{Usage}
+%
+% The collection packages \xpackage{hobsub-generic} and
+% \xpackage{hobsub-hyperref} are loaded as usual:
+% \begin{quote}
+% \begin{tabular}{@{}ll@{}}
+% |\usepackage{hobsub-generic}| & \hologo{LaTeX}\\
+% |\input hobsub-generic.sty| & \hologo{plainTeX}
+% \end{tabular}
+% \end{quote}
+% or
+% \begin{quote}|\usepackage{hobsub-hyperref}|\end{quote}
+% Of course, both \cs{usepackage} or \cs{RequirePackage}
+% can be used.
+%
+% If you need requirements on the version date of a package
+% inside a collection, then specify them afterwards, for
+% example:
+% \begin{quote}
+% |\usepackage{hobsub-generic}|\\
+% |\usepackage{ltxcmds}[2010/12/04]% |^^A
+% {\itshape |\ltx@ifblank is needed|}
+% \end{quote}
+%
+% Also it is not garanteed that a package will be always
+% part of a collection. Therefore it does not harm,
+% to make the requirements explicite \emph{after}
+% a collection is loaded, see the previous example.
+% \hologo{LaTeX} knows that a
+% package is already loaded and does not load it again.
+%
+% \subsection{Supported features}
+%
+% \begin{description}
+% \item[No reloads:] If a package is already loaded then it
+% is not reloaded again if it is part of a collection package.
+% \item[\cs{listfiles}:]
+% Each package that is loaded in a collection is also
+% added to the output of \cs{listfiles}.
+% \item[\cs{@currname}, \cs{@currext}]
+% are updated, they are used by \hologo{LaTeX}'s
+% \cs{ProvidesPackage}.
+% \item[\cs{AtEndOfPackage}:]
+% \hologo{LaTeX}'s hook mechanism that is used for
+% \cs{AtEndOfPackage} is supported. However none of the
+% packages in the collections are using \cs{AtEndOfPackage},
+% therefore this feature is completely untested.
+% \end{description}
+%
+% \subsection{Common limitations}
+%
+% \begin{description}
+% \item[\cs{endinput}:]
+% Often a package is using \cs{endinput}, either added by
+% \xpackage{docstrip}, or to stop package loading at an earlier
+% time. Therefore \cs{endinput} must be catched during package
+% loading to prevent that the collection package is closed
+% too early before reading all packages it contains.
+%
+% This redefinition of \cs{endinput} fails if the package loads
+% other files that contain \cs{endinput}. To some degree it could
+% be catched by redefining macros that load files. But this will
+% not work for the primitive \cs{input}.
+% \item[Options:]
+% \hologo{LaTeX}'s package options are not supported.
+% Therefore the packages that are put in a collection must
+% not support options.
+% \item[Hook packages:]
+% Some packages and classes provides hooks for packages, see
+% packages \xpackage{scrlfile}, \xpackage{filehook}
+% or class \xclass{memoir}. These hooks are not supported
+% for embedded packages inside a collection package.
+% Because of the problem with \cs{endinput}, these hooks
+% are not supported. The hooks might contain code that
+% loads other files that execute \cs{endinput}.
+% \end{description}
+%
+% \subsection{Package \xpackage{hobsub-generic}}
+%
+% \begin{TableList}[bp]{generic}\TableGeneric\end{TableList}
+%
+% Collection `generic' contains some of the \hologo{plainTeX} compatible
+% packages of my bundle, see table \ref{tab:generic}.
+% It adds the following restrictions to any package
+% that is part of this collection:
+% \begin{description}
+% \item[Generic formats:] The following formats must be supported:
+% \hologo{LaTeX}, \hologo{plainTeX} and even \hologo{iniTeX}.
+% This applies to the collection package \xpackage{hobsub-generic}
+% the same way.
+% \item[Prefixed macros:]
+% Any package of this collection should only define macros with
+% prefixed names to avoid name clashes. Resources like registers
+% must not be allocated and other global states should not be
+% changed except for added macro definitions.
+% \end{description}
+% Thus the package \xpackage{hobsub-generic} can also preloaded
+% in the format file with \hologo{iniTeX}.
+%
+% \subsection{Package \xpackage{hobsub-hyperref}}
+%
+% \begin{TableList}[tp]{hyperref}\TableHyperref\end{TableList}
+%
+% Collection `hyperref' contains additional packages that are
+% used by package \xpackage{hyperref} and that does not fit
+% in collection `generic', see table{tab:hyperref}.
+% The latter collection package
+% \xpackage{hobsub-generic} is loaded via a conventional
+% \cs{RequirePackage}.
+%
+% Because most of the packages in the collection `hyperref'
+% needs \hologo{LaTeX}, the collection requires \hologo{LaTeX}.
+%
+% \subsection{Package \xpackage{hobsub}}
+%
+% This section is for advanced users that might want to
+% build a collection package. Then it can be done by
+% using \xpackage{hobsub}:
+% \begin{quote}
+% \dots\\
+% |\RequirePackage{hobsub}[2011/01/30]|\\
+% \dots\\
+% |\hobsub@StartPackage{foo1}|\\
+% \textit{\dots\unskip\ package code of \xfile{foo1.sty} \dots}\\
+% |\endinput|\\
+% |<hobsub>|\\
+% |\hobsub@StopPackage|\\
+% |\hobsub@StartPackage{bar2}|\\
+% \textit{\dots\unskip\ package code of \xfile{bar2.sty} \dots}\\
+% |\endinput|\\
+% |<hobsub>|\\
+% |\hobsub@StopPackage|
+% \dots
+% \end{quote}
+% But be aware of the caveats and limitations, see above.
+% Only quite a small portion of the packages can be embedded
+% like this.
+%
+% \clearpage
+%
+% \StopEventually{
+% }
+%
+% \section{Implementation}
+%
+% \subsection{Reload check and package identification}
+%
+% \subsubsection{Package \xpackage{hobsub}}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% Reload check, especially if the package is not used with \LaTeX.
+% \begin{macrocode}
+\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@hobsub.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \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{hobsub}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup%
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\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}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@hobsub.sty\endcsname
+\ProvidesPackage{hobsub}%
+ [2011/01/30 v1.0 Subsetting bundle oberdiek (HO)]%
+% \end{macrocode}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \subsubsection{Package \xpackage{hobsub-generic}}
+%
+% \begin{macrocode}
+%<*generic>
+% \end{macrocode}
+% Reload check, especially if the package is not used with \LaTeX.
+% \begin{macrocode}
+\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@hobsub-generic.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \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{hobsub-generic}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup%
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\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}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@hobsub-generic.sty\endcsname
+\ProvidesPackage{hobsub-generic}%
+ [2011/01/30 v1.0 Bundle oberdiek, subset generic (HO)]%
+% \end{macrocode}
+% \begin{macrocode}
+%</generic>
+% \end{macrocode}
+%
+% \subsubsection{Package \xpackage{hobsub-hyperref}}
+%
+% \begin{macrocode}
+%<*hyperref>
+% \end{macrocode}
+% Reload check, especially if the package is not used with \LaTeX.
+% \begin{macrocode}
+\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@hobsub-hyperref.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \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{hobsub-hyperref}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup%
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\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}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@hobsub-hyperref.sty\endcsname
+\ProvidesPackage{hobsub-hyperref}%
+ [2011/01/30 v1.0 Bundle oberdiek, subset hyperref (HO)]%
+% \end{macrocode}
+% \begin{macrocode}
+%</hyperref>
+% \end{macrocode}
+%
+% \subsection{Catcodes}
+%
+% \begin{macrocode}
+%<*package|generic|hyperref>
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode123=1 % {
+ \catcode125=2 % }
+ \catcode64=11 % @
+ \def\x{\endgroup
+ \expandafter\edef\csname HOBsub@AtEnd\endcsname{%
+ \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\catcode61\catcode48\catcode32=10\relax%
+\catcode13=5 % ^^M
+\endlinechar=13 %
+\catcode35=6 % #
+\catcode64=11 % @
+\catcode123=1 % {
+\catcode125=2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\HOBsub@AtEnd{%
+ \HOBsub@AtEnd
+ \catcode#1=\the\catcode#1\relax
+ }%
+ \catcode#1=#2\relax
+}
+\TMP@EnsureCode{39}{12}% '
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
+\TMP@EnsureCode{45}{12}% -
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{58}{12}% :
+\TMP@EnsureCode{60}{12}% <
+\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{96}{12}% `
+\edef\HOBsub@AtEnd{\HOBsub@AtEnd\noexpand\endinput}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</package|generic|hyperref>
+% \end{macrocode}
+%
+% \subsection{Package \xpackage{hobsub-hyperref} loads \xpackage{hobsub-generic}}
+%
+% \begin{macrocode}
+%<*hyperref>
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{hobsub-generic}[2011/01/30]
+%</hyperref>
+% \end{macrocode}
+%
+% \subsection{Preamble}
+%
+% \begin{macrocode}
+%<*preamble>
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname ver@hobsub.sty\endcsname\relax
+\else
+ \expandafter\hobsub@GobbleRemainingPackage
+\fi
+%</preamble>
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+%<*package|preamble>
+% \end{macrocode}
+%
+% \begin{macro}{\HOBsub@OrgEndinput}
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname HOBsub@OrgEndinput\endcsname\relax
+ \let\HOBsub@OrgEndinput\endinput
+\fi
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\hobsub@GobbleRemainingPackage}
+% \begin{macrocode}
+\def\hobsub@GobbleRemainingPackage{%
+ \begingroup
+ \catcode92=14 % backslash: comment
+ \catcode32=14 % space: comment
+ \catcode123=14 % left brace: comment
+ \catcode125=14 % right brace: comment
+ \catcode60=3 % less: math
+ \catcode62=4 % greater: align
+ \endlinechar=-1 %
+ \HOBsub@GobbleRemainingPackage
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\HOBsub@GobbleRemainingPackage}
+% \begin{macrocode}
+\catcode60=3 % less: dollar
+\catcode62=4 % greater: align
+\long\def\HOBsub@GobbleRemainingPackage#1<hobsub>{%
+ \endgroup
+}
+\catcode60=12 % less: other
+\catcode62=12 % greater: other
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hobsub@StartPackage}
+% \begin{macrocode}
+\def\hobsub@StartPackage#1{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \let\HOBsub@OrgCurrName\@currname
+ \let\HOBsub@OrgCurrExt\@currext
+ \csname @pushfilename\endcsname
+ \def\@currname{#1}%
+ \def\@currext{sty}%
+ \expandafter\def\csname\@currname.\@currext-h@@k\endcsname{}%
+ \let\endinput\hobsub@GobbleRemainingPackage
+ \def\hobsub@StopPackage{%
+ \let\hobsub@StopPackage\relax
+ \HOBsub@StopPackage
+% \hobsub@Info{hobsub}{Package `#1' loaded}%
+ }%
+ \hobsub@AddToFileList{#1.sty}%
+ \else
+ \hobsub@Info{hobsub}{Skipping package `#1' (already loaded)}%
+ \let\hobsub@StopPackage\relax
+ \expandafter\hobsub@GobbleRemainingPackage
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hobsub@StopPackage}
+% \begin{macrocode}
+\let\hobsub@StopPackage\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hobsub@Info}
+% \begin{macrocode}
+\def\hobsub@Info#1#2{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname @PackageInfoNoLine\endcsname\relax
+ \immediate\write-1{Package #1 Info: #2.}%
+ \else
+ \let\hobsub@Info\@PackageInfoNoLine
+ \hobsub@Info{#1}{#2}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\HOBsub@StopPackage}
+% \begin{macrocode}
+\def\HOBsub@StopPackage{%
+ \csname\@currname.\@currext-h@@k\endcsname
+ \let\endinput\HOBsub@OrgEndinput
+ \csname @popfilename\endcsname
+ \let\@currname\HOBsub@OrgCurrName
+ \let\@currext\HOBsub@OrgCurrExt
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hobsub@AddToFileList}
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname @addtofilelist\endcsname\relax
+ \def\hobsub@AddToFileList#1{}%
+\else
+ \def\hobsub@AddToFileList#1{%
+ \@addtofilelist{#1}%
+ }%
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</package|preamble>
+% \end{macrocode}
+%
+% \subsection{End of preamble for subset packages}
+%
+% Add the end marker for possible skipping of previous
+% macros, if package \xpackage{hobsub} was already loaded.
+% \begin{macrocode}
+%<*preamble>
+\hobsub@GobbleRemainingPackage
+<hobsub>
+% \end{macrocode}
+%
+% All macros of package \xpackage{hobsub} are now available.
+% Now we officially load the package \xpackage{hobsub} inline
+% for proper package identification.
+% \begin{macrocode}
+\hobsub@StartPackage{hobsub}%
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname ProvidesPackage\endcsname\relax
+ \immediate\write-1{%
+ Package: hobsub 2011/01/30 v1.0 Subsetting bundle oberdiek (HO)%
+ }%
+\else
+ \ProvidesPackage{hobsub}%
+ [2011/01/30 v1.0 Subsetting bundle oberdiek (HO)]%
+\fi
+%</preamble>
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+%<*post|preamble>
+ \endinput
+<hobsub>
+\hobsub@StopPackage
+%</post|preamble>
+% \end{macrocode}
+%
+% \subsection{Package list}
+%
+% \begin{macrocode}
+%<infwarerr>\hobsub@StartPackage{infwarerr}
+%<ltxcmds>\hobsub@StartPackage{ltxcmds}
+%<ifluatex>\hobsub@StartPackage{ifluatex}
+%<ifvtex>\hobsub@StartPackage{ifvtex}
+%<intcalc>\hobsub@StartPackage{intcalc}
+%<ifpdf>\hobsub@StartPackage{ifpdf}
+%<etexcmds>\hobsub@StartPackage{etexcmds}
+%<kvsetkeys>\hobsub@StartPackage{kvsetkeys}
+%<kvdefinekeys>\hobsub@StartPackage{kvdefinekeys}
+%<*luatex-loader>
+\ifluatex
+\else
+ \expandafter\hobsub@GobbleRemainingPackage
+\fi
+\hobsub@StartPackage{luatex-loader}
+%</luatex-loader>
+%<pdftexcmds>\hobsub@StartPackage{pdftexcmds}
+%<pdfescape>\hobsub@StartPackage{pdfescape}
+%<bigintcalc>\hobsub@StartPackage{bigintcalc}
+%<bitset>\hobsub@StartPackage{bitset}
+%<uniquecounter>\hobsub@StartPackage{uniquecounter}
+%<letltxmacro>\hobsub@StartPackage{letltxmacro}
+%<hopatch>\hobsub@StartPackage{hopatch}
+%<xcolor-patch>\hobsub@StartPackage{xcolor-patch}
+%<atveryend>\hobsub@StartPackage{atveryend}
+%<atbegshi>\hobsub@StartPackage{atbegshi}
+%<refcount>\hobsub@StartPackage{refcount}
+%<hycolor>\hobsub@StartPackage{hycolor}
+% \end{macrocode}
+%
+% \subsection{End of packages}
+%
+% \begin{macrocode}
+%<package|atend>\HOBsub@AtEnd%
+% \end{macrocode}
+%
+% \section{Test}
+%
+% \subsection{Catcode checks for loading}
+%
+% \begin{macrocode}
+%<*test1>
+% \end{macrocode}
+% \begin{macrocode}
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\expandafter\ifx\csname count@\endcsname\relax
+ \countdef\count@=255 %
+\fi
+\expandafter\ifx\csname @gobble\endcsname\relax
+ \long\def\@gobble#1{}%
+\fi
+\expandafter\ifx\csname @firstofone\endcsname\relax
+ \long\def\@firstofone#1{#1}%
+\fi
+\expandafter\ifx\csname loop\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+{%
+ \def\loop#1\repeat{%
+ \def\body{#1}%
+ \iterate
+ }%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \let\repeat=\fi
+}%
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@ 1 %
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \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 hobsub.sty\relax}%
+\fi
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\%=14 %
+ \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
+\csname @@end\endcsname
+\end
+% \end{macrocode}
+% \begin{macrocode}
+%</test1>
+% \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/hobsub.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/oberdiek/hobsub.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{install/macros/latex/contrib/oberdiek.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTAN{tds/tds.pdf}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \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 hobsub.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}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+% hobsub.sty & tex/generic/oberdiek/hobsub.sty\\
+% hobsub-generic.sty & tex/generic/oberdiek/hobsub-generic.sty\\
+% hobsub-hyperref.sty & tex/generic/oberdiek/hobsub-hyperref.sty\\
+% hobsub.pdf & doc/latex/oberdiek/hobsub.pdf\\
+% test/hobsub-test1.tex & doc/latex/oberdiek/test/hobsub-test1.tex\\
+% hobsub.dtx & source/latex/oberdiek/hobsub.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+% \begingroup
+% \advance\linewidth by\leftmargin
+% \advance\linewidth by\rightmargin
+% \edef\x{\endgroup
+% \def\noexpand\lw{\the\linewidth}^^A
+% }\x
+% \def\lwbox{^^A
+% \leavevmode
+% \hbox to \linewidth{^^A
+% \kern-\leftmargin\relax
+% \hss
+% \usebox0
+% \hss
+% \kern-\rightmargin\relax
+% }^^A
+% }^^A
+% \ifdim\wd0>\lw
+% \sbox0{\small\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\footnotesize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\scriptsize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\tiny\t}^^A
+% \ifdim\wd0>\linewidth
+% \lwbox
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \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 hobsub.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{hobsub.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 hobsub.dtx
+%makeindex -s gind.ist hobsub.idx
+%pdflatex hobsub.dtx
+%makeindex -s gind.ist hobsub.idx
+%pdflatex hobsub.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \begin{thebibliography}{9}
+% \raggedright
+% \bibitem{lualatex:quiet}
+% Will Robertson,
+% \textit{[lltx] quietening lualatex console output};
+% mailing list \textsf{lualatex-dev at tug.org},
+% 2011-01-29;
+% \url{http://tug.org/pipermail/lualatex-dev/2011-January/001031.html}.
+%
+% \end{thebibliography}
+%
+% \begin{History}
+% \begin{Version}{2011/01/30 v1.0}
+% \item
+% First public version.
+% \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/oberdiek/hologo.dtx b/Master/texmf-dist/source/latex/oberdiek/hologo.dtx
index 590beb898e7..82eae777be9 100644
--- a/Master/texmf-dist/source/latex/oberdiek/hologo.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/hologo.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2010 by
+% Copyright (C) 2010, 2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -77,7 +77,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: hologo 2010/04/24 v1.2 Logo collection (HO)}
+\Msg{* Package: hologo 2011/03/25 v1.4 Logo collection (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -88,7 +88,7 @@
This is a generated file.
-Copyright (C) 2010 by
+Copyright (C) 2010, 2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -153,10 +153,10 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{hologo.drv}%
- [2010/04/24 v1.2 Logo collection (HO)]%
+ [2011/03/25 v1.4 Logo collection (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
-\usepackage{hologo}[2010/04/24]
+\usepackage{hologo}[2011/03/25]
\usepackage{longtable}
\usepackage{array}
\begin{document}
@@ -165,7 +165,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1200}
+% \CheckSum{1330}
%
% \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
@@ -186,7 +186,7 @@ and the derived files
% \GetFileInfo{hologo.drv}
%
% \title{The \xpackage{hologo} package}
-% \date{2010/04/24 v1.2}
+% \date{2011/03/25 v1.4}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -218,7 +218,11 @@ and the derived files
% \endhead
% \entry{AmSLaTeX}{}[2010/04/16]
% \entry{AmSTeX}{}[2010/04/16]
+% \entry{ConTeXt}{}[2011/03/25]
+% \entry{ConTeXt}{narrow}[2011/03/25]
+% \entry{ConTeXt}{simple}[2011/03/25]
% \entry{eTeX}{}[2010/04/08]
+% \entry{iniTeX}{}[2010/11/21]
% \entry{LaTeX}{}[2010/04/08]
% \entry{LaTeX2e}{}[2010/04/08]
% \entry{LaTeX3}{}[2010/04/24]
@@ -232,6 +236,7 @@ and the derived files
% \entry{plainTeX}{hyphen}[2010/04/16]
% \entry{plainTeX}{runtogether}[2010/04/16]
% \entry{TeX}{}[2010/04/08]
+% \entry{virTeX}{}[2010/11/21]
% \entry{VTeX}{}[2010/04/24]
% \entry{XeLaTeX}{}[2010/04/08]
% \entry{XeTeX}{}[2010/04/08]
@@ -272,12 +277,16 @@ and the derived files
% \def\entry#1{\item[\xoption{#1}:]}
% \entry{break}
% enables or disables line breaks inside the logo. This setting is
-% refined by options \xoption{hyphenbreak} or \xoption{spacebreak}.
+% refined by options \xoption{hyphenbreak}, \xoption{spacebreak}
+% or \xoption{discretionarybreak}.
% Default is |false|.
% \entry{hyphenbreak}
% enables or disables the line break right after the hyphen character.
% \entry{spacebreak}
% enables or disables line breaks at space characters.
+% \entry{discretionarybreak}
+% enables or disables line breaks at hyphenation points
+% (inserted by \cs{-}).
% \end{description}
% Macro \cs{hologoLogoSetup} also knows:
% \begin{description}
@@ -301,14 +310,18 @@ and the derived files
% \end{macrocode}
% 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@hologo.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -316,7 +329,6 @@ and the derived files
\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.}%
@@ -328,24 +340,27 @@ and the derived files
\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}%
@@ -364,32 +379,41 @@ and the derived files
\fi
\expandafter\x\csname ver@hologo.sty\endcsname
\ProvidesPackage{hologo}%
- [2010/04/24 v1.2 Logo collection (HO)]
+ [2011/03/25 v1.4 Logo collection (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 HOLOGO@AtEnd\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\HOLOGO@AtEnd{%
\HOLOGO@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{10}{12}% ^^J
\TMP@EnsureCode{33}{12}% !
@@ -406,7 +430,6 @@ and the derived files
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{59}{12}% ;
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{63}{12}% ?
\TMP@EnsureCode{91}{12}% [
@@ -546,6 +569,7 @@ and the derived files
\ifx\HOLOGO@name\relax
\chardef\HOLOGOOPT@hyphenbreak=\HOLOGOOPT@break
\chardef\HOLOGOOPT@spacebreak=\HOLOGOOPT@break
+ \chardef\HOLOGOOPT@discretionarybreak=\HOLOGOOPT@break
\else
\expandafter\chardef
\csname HoLogoOpt@hyphenbreak@\HOLOGO@name\endcsname=%
@@ -553,6 +577,10 @@ and the derived files
\expandafter\chardef
\csname HoLogoOpt@spacebreak@\HOLOGO@name\endcsname=%
\csname HoLogoOpt@break@\HOLOGO@name\endcsname
+ \expandafter\chardef
+ \csname HoLogoOpt@discretionarybreak@\HOLOGO@name
+ \endcsname=%
+ \csname HoLogoOpt@break@\HOLOGO@name\endcsname
\fi
\fi
}
@@ -579,6 +607,7 @@ and the derived files
\HOLOGO@DeclareBoolOption{break}
\HOLOGO@DeclareBoolOption{hyphenbreak}
\HOLOGO@DeclareBoolOption{spacebreak}
+\HOLOGO@DeclareBoolOption{discretionarybreak}
% \end{macrocode}
%
% \begin{macrocode}
@@ -668,6 +697,28 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\HOLOGO@discretionary}
+% \begin{macrocode}
+\def\HOLOGO@discretionary{%
+ \ltx@ifundefined{HoLogoOpt@discretionarybreak@\HOLOGO@name}{%
+ \ltx@ifundefined{HoLogoOpt@break@\HOLOGO@name}{%
+ \chardef\HOLOGO@temp=\HOLOGOOPT@discretionarybreak
+ }{%
+ \chardef\HOLOGO@temp=%
+ \csname HoLogoOpt@break@\HOLOGO@name\endcsname
+ }%
+ }{%
+ \chardef\HOLOGO@temp=%
+ \csname HoLogoOpt@discretionarybreak@\HOLOGO@name\endcsname
+ }%
+ \ifcase\HOLOGO@temp
+ \else
+ \-%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\HOLOGO@mbox}
% \begin{macrocode}
\def\HOLOGO@mbox#1{%
@@ -695,14 +746,14 @@ and the derived files
Package loading is aborted%
}\@ehc
\HOLOGO@AtEnd
-}
+}%
\HOLOGO@IfExists\hologorobust{%
\@PackageError{hologo}{%
\string\hologorobust\ltx@space is already defined.\MessageBreak
Package loading is aborted%
}\@ehc
\HOLOGO@AtEnd
-}
+}%
% \end{macrocode}
%
% \begin{macro}{\hologorobust}
@@ -1045,6 +1096,31 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+%
+% \subsubsection{\hologo{iniTeX}}
+%
+% \begin{macro}{\HoLogo@iniTeX}
+% \begin{macrocode}
+\def\HoLogo@iniTeX#1{%
+ \HOLOGO@mbox{%
+ ini\hologo{TeX}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{\hologo{virTeX}}
+%
+% \begin{macro}{\HoLogo@virTeX}
+% \begin{macrocode}
+\def\HoLogo@virTeX#1{%
+ \HOLOGO@mbox{%
+ ini\hologo{TeX}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{\hologo{LuaTeX}}
%
% \begin{macro}{\HoLogo@LuaTeX}
@@ -1202,6 +1278,37 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \subsubsection{\hologo{ConTeXt}}
+%
+% \begin{macro}{\HoLogo@ConTeXt@simple}
+% \begin{macrocode}
+\def\HoLogo@ConTeXt@simple#1{%
+ \HOLOGO@mbox{Con}%
+ \HOLOGO@discretionary
+ \HOLOGO@mbox{\hologo{TeX}t}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\HoLogo@ConTeXt@narrow}
+% This definition of logo \hologo{ConTeXt} with variant \xoption{narrow}
+% comes from TUGboat's class \xclass{ltugboat} (version 2010/11/15 v2.8).
+% \begin{macrocode}
+\def\HoLogo@ConTeXt@narrow#1{%
+ \HOLOGO@mbox{C\kern-.0333emon}%
+ \HOLOGO@discretionary
+ \kern-.0667em%
+ \HOLOGO@mbox{\hologo{TeX}\kern-.0333emt}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\HoLogo@ConTeXt}
+% \begin{macrocode}
+\def\HoLogo@ConTeXt{\HoLogo@ConTeXt@narrow}
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Driver detection}
%
% \begin{macrocode}
@@ -1335,7 +1442,7 @@ and the derived files
\reflectbox
}%
\HOLOGO@AtEnd
-}
+}%
\ltx@ifundefined{hologodriver}{%
\def\hologodriver{dvips}%
\@PackageInfoNoLine{hologo}{Using default driver `\hologodriver'}%
@@ -1445,7 +1552,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\HOLOGO@AtEnd
+\HOLOGO@AtEnd%
%</package>
% \end{macrocode}
%
@@ -1509,6 +1616,22 @@ and the derived files
\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 hologo.sty\relax}%
\fi
@@ -1519,15 +1642,20 @@ and the derived files
\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
@@ -1549,7 +1677,7 @@ and the derived files
%<*test-spacefactor>
\NeedsTeXFormat{LaTeX2e}
\documentclass{article}
-\usepackage{hologo}[2010/04/24]
+\usepackage{hologo}[2011/03/25]
\usepackage{kvsetkeys}
\usepackage{qstest}
\IncludeTests{*}
@@ -1567,6 +1695,7 @@ and the derived files
AmSLaTeX,%
AmSTeX,%
eTeX,%
+ iniTeX,%
LaTeX,%
LaTeX2e,%
LaTeX3,%
@@ -1580,6 +1709,7 @@ and the derived files
plainTeX={variant=hyphen},%
plainTeX={variant=runtogether},%
TeX,%
+ virTeX,%
VTeX,%
XeLaTeX,%
XeTeX,%
@@ -1806,6 +1936,17 @@ and the derived files
% \item
% \hologo{VTeX} added.
% \end{Version}
+% \begin{Version}{2010/11/21 v1.3}
+% \item
+% \hologo{iniTeX}, \hologo{virTeX} added.
+% \end{Version}
+% \begin{Version}{2011/03/25 v1.4}
+% \item
+% \hologo{ConTeXt} with variants added.
+% \item
+% Option \xoption{discretionarybreak} added as refinement for
+% option \xoption{break}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx b/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx
index e703aeba8a0..c2c43a17f46 100644
--- a/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1999-2010 by
+% Copyright (C) 1999-2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -71,7 +71,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: holtxdoc 2010/04/24 v0.19 Private additional ltxdoc support (HO)}
+\Msg{* Package: holtxdoc 2011/02/04 v0.21 Private additional ltxdoc support (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -82,7 +82,7 @@
This is a generated file.
-Copyright (C) 1999-2010 by
+Copyright (C) 1999-2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -141,7 +141,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{holtxdoc.drv}%
- [2010/04/24 v0.19 Private additional ltxdoc support (HO)]%
+ [2011/02/04 v0.21 Private additional ltxdoc support (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -150,7 +150,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{346}
+% \CheckSum{347}
%
% \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
@@ -171,7 +171,7 @@ and the derived files
% \GetFileInfo{holtxdoc.drv}
%
% \title{The \xpackage{holtxdoc} package}
-% \date{2010/04/24 v0.19}
+% \date{2011/02/04 v0.21}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -211,7 +211,7 @@ and the derived files
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{holtxdoc}%
- [2010/04/24 v0.19 Private additional ltxdoc support (HO)]
+ [2011/02/04 v0.21 Private additional ltxdoc support (HO)]
% \end{macrocode}
%
% \begin{macrocode}
@@ -286,7 +286,7 @@ and the derived files
\addcontentsline{toc}{subsection}{[#1]}% hash-ok
\def\HistLabel##1{%
\begingroup
- \edef\@currentlabel{[#1]}% hash-ok
+ \protected@edef\@currentlabel{[#1]}% hash-ok
\label{##1}%
\endgroup
}%
@@ -300,7 +300,7 @@ and the derived files
}%
\def\HistLabel##1{%
\begingroup
- \edef\@currentlabel{[#1]}% hash-ok
+ \protected@edef\@currentlabel{[#1]}% hash-ok
\label{##1}%
\endgroup
}%
@@ -313,6 +313,7 @@ and the derived files
\itemize
}%
\let\endVersion\enditemize
+ \raggedright
}{}
% \end{macrocode}
%
@@ -749,6 +750,14 @@ and the derived files
% \item
% Requested date of package \xpackage{hologo} updated.
% \end{Version}
+% \begin{Version}{2010/12/03 v0.20}
+% \item
+% History is now set using \cs{raggedright}.
+% \end{Version}
+% \begin{Version}{2011/02/04 v0.21}
+% \item
+% GL needs \cs{protected@edef} instead of \cs{edef} in \cs{HistLabel}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/hopatch.dtx b/Master/texmf-dist/source/latex/oberdiek/hopatch.dtx
new file mode 100644
index 00000000000..41dcce0e291
--- /dev/null
+++ b/Master/texmf-dist/source/latex/oberdiek/hopatch.dtx
@@ -0,0 +1,896 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2011 by
+% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any later
+% version. This version of this license is in
+% http://www.latex-project.org/lppl/lppl-1-3c.txt
+% and 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 hopatch.dtx
+% and the derived files
+% hopatch.sty, hopatch.pdf, hopatch.ins, hopatch.drv,
+% hopatch-test1.tex, hopatch-test2.tex.
+%
+% Distribution:
+% CTAN:macros/latex/contrib/oberdiek/hopatch.dtx
+% CTAN:macros/latex/contrib/oberdiek/hopatch.pdf
+%
+% Unpacking:
+% (a) If hopatch.ins is present:
+% tex hopatch.ins
+% (b) Without hopatch.ins:
+% tex hopatch.dtx
+% (c) If you insist on using LaTeX
+% latex \let\install=y\input{hopatch.dtx}
+% (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+% (a) If hopatch.drv is present:
+% latex hopatch.drv
+% (b) Without hopatch.drv:
+% latex hopatch.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 hopatch.dtx
+% makeindex -s gind.ist hopatch.idx
+% pdflatex hopatch.dtx
+% makeindex -s gind.ist hopatch.idx
+% pdflatex hopatch.dtx
+%
+% Installation:
+% TDS:tex/latex/oberdiek/hopatch.sty
+% TDS:doc/latex/oberdiek/hopatch.pdf
+% TDS:doc/latex/oberdiek/test/hopatch-test1.tex
+% TDS:doc/latex/oberdiek/test/hopatch-test2.tex
+% TDS:source/latex/oberdiek/hopatch.dtx
+%
+%<*ignore>
+\begingroup
+ \catcode123=1 %
+ \catcode125=2 %
+ \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: hopatch 2011/01/30 v1.0 Wrapper for package hooks (HO)}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2011 by
+ Heiko Oberdiek <heiko.oberdiek at googlemail.com>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3c of this license or (at your option) any later
+version. This version of this license is in
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+and 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 hopatch.dtx
+and the derived files
+ hopatch.sty, hopatch.pdf, hopatch.ins, hopatch.drv,
+ hopatch-test1.tex, hopatch-test2.tex.
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+ \file{hopatch.ins}{\from{hopatch.dtx}{install}}%
+ \file{hopatch.drv}{\from{hopatch.dtx}{driver}}%
+ \usedir{tex/latex/oberdiek}%
+ \file{hopatch.sty}{\from{hopatch.dtx}{package}}%
+ \usedir{doc/latex/oberdiek/test}%
+ \file{hopatch-test1.tex}{\from{hopatch.dtx}{test1}}%
+ \file{hopatch-test2.tex}{\from{hopatch.dtx}{test2}}%
+}
+
+\catcode32=13\relax% active space
+\let =\space%
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* hopatch.sty}
+\Msg{*}
+\Msg{* And install the following script file:}
+\Msg{*}
+\Msg{* }
+\Msg{*}
+\Msg{* To produce the documentation run the file `hopatch.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{hopatch.drv}%
+ [2011/01/30 v1.0 Wrapper for package hooks (HO)]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2008/08/11]
+\usepackage{caption}
+\usepackage{array}
+\setlength{\extrarowheight}{1pt}
+\renewcommand*{\arraystretch}{1.1}
+\begin{document}
+ \DocInput{hopatch.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{463}
+%
+% \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{hopatch.drv}
+%
+% \title{The \xpackage{hopatch} package}
+% \date{2011/01/30 v1.0}
+% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% This packages provides a wrapper to various package hooks
+% provided by other packages or classes, but does not define
+% own hooks.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Documentation}
+%
+% Sometimes I want to add code right after a package
+% has been loaded. Examples are bug fixes, adaptations,
+% or added features as needed by package \xpackage{hyperref},
+% for instance.
+%
+% Unhappily \hologo{LaTeX} does not provide this kind of
+% hook. \cs{AtEndOfPackage} can be used inside the package
+% only, because \hologo{LaTeX} clears the hook right before
+% it loads the package.
+%
+% However, there are already many packages and classes
+% that provide hooks that are executed after the package
+% is loaded, see table~\ref{tab:hooks}.
+%
+% \begin{table}
+% \caption{After package hooking}
+% \begin{tabular}{ll}
+% \bfseries Macro & \bfseries Provider\\
+% \hline
+% \cs{AfterPackage} & package \xpackage{scrlfile} \cite{scrlfile}\\
+% \cs{AtEndOfPackageFile} & package \xpackage{filehook} \cite{filehook}\\
+% \cs{AtEndPackage} & class \xclass{memoir} \cite{memoir}
+% \end{tabular}
+% \end{table}
+%
+% Package \xpackage{hopatch} can be used without the packages
+% of table~\ref{tab:hooks}. But for an early executing right
+% after a package is loaded, one of the following class or
+% packages should be loaded before using \cs{hopatch@AfterPackage}:
+% \begin{itemize}
+% \item package \xpackage{filehook}
+% \item package \xpackage{scrlfile}
+% \item class \xclass{memoir}
+% \end{itemize}
+%
+% \begin{table}
+% \caption{After begin document hooking}
+% \begin{tabular}{ll}
+% \bfseries Macro & \bfseries Provider\\
+% \hline
+% \cs{AtBeginDocument} & \hologo{LaTeX}'s kernel\\
+% \cs{AtEndPreamble} & package \xpackage{etoolbox} \cite{etoolbox}\\
+% \cs{AfterEndPreamble} & package \xpackage{etoolbox}
+% \end{tabular}
+% \end{table}
+%
+% Therefore I skip writing a new package for hooking into
+% \hologo{LaTeX}'s package management and use this package
+% to provide a wrapper to patch a package after it is loaded.
+%
+% \begin{declcs}{hopatch@AfterPackage} \M{package} \M{patch code}
+% \end{declcs}
+% If the package is already loaded, the \meta{patch code} is executed
+% immediately.
+% Otherwise the \meta{patch code} is stored in a command and tried
+% at later locations until the package is available.
+%
+% The patch is tried in the following order:
+% \begin{enumerate}
+% \item If the package is already loaded, the patch is
+% applied immediately. Further locations are not tried.
+% \item \cs{AtEndPackage}, provided by class \xclass{memoir} \cite{memoir},
+% and \cs{AfterPackage}, provided by package \xpackage{scrlfile} \cite{scrlfile},
+% are called right after the package file is input before
+% the hook of \hologo{LaTeX}'s \cs{AtEndOfPackage}.
+% \item \cs{AtEndOfPackageFile}, provided by package \xpackage{filehook} \cite{filehook},
+% is called after the package is loaded and after the hook of
+% \hologo{LaTeX}'s \cs{AtEndOfPackage}.
+% \item \cs{AtEndPreamble}, provided by package \xpackage{etoolbox} \cite{etoolbox},
+% is called at the beginning of |\begin{document}| before the hook
+% of \hologo{LaTeX}'s \cs{AtBeginDocument}.
+% \item \cs{AtBeginDocument}, provided by \hologo{LaTeX}.
+% \item \cs{AfterEndDocument}, provided by package \xpackage{etoolbox} \cite{etoolbox},
+% is called at the very end of |\begin{document}|. Preamble commands are
+% already forbidden there.
+% \end{enumerate}
+% Because of the various locations the patch code is restricted to
+% limitations:
+% \begin{itemize}
+% \item
+% Preamble commands, see \hologo{LaTeX}'s \cs{@onlypreamble}
+% throw an error if used after |\begin{document}|. This is already
+% the case for \cs{AfterEndDocument}. Therefore preamble commands
+% are forbidden in the patching code.
+% There are four exceptions \cs{@ifpackageloaded}, \cs{@ifclassloaded},
+% \cs{@ifpackagelater} and \cs{@ifclasslater}. They are redefined
+% during \cs{AfterEndDocument} using the counterparts of
+% package \xpackage{ltxcmds} \cite{ltxcmds}.
+% \item
+% \cs{AfterPackage} of package \xpackage{scrlfile} and \cs{AtEndPackage}
+% of class \xclass{memoir} call the hook before \hologo{LaTeX}'s
+% \cs{AtEndOfPackage}.
+% \end{itemize}
+%
+% \StopEventually{
+% }
+%
+% \section{Implementation}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \subsection{Catcodes and package identification}
+%
+% \begin{macrocode}
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode123=1 % {
+ \catcode125=2 % }
+ \catcode64=11 % @
+ \def\x{\endgroup
+ \expandafter\edef\csname HOpatch@AtEnd\endcsname{%
+ \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\catcode61\catcode48\catcode32=10\relax%
+\catcode13=5 % ^^M
+\endlinechar=13 %
+\catcode35=6 % #
+\catcode64=11 % @
+\catcode123=1 % {
+\catcode125=2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\HOpatch@AtEnd{%
+ \HOpatch@AtEnd
+ \catcode#1=\the\catcode#1\relax
+ }%
+ \catcode#1=#2\relax
+}
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
+\TMP@EnsureCode{43}{12}% +
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\edef\HOpatch@AtEnd{\HOpatch@AtEnd\noexpand\endinput}
+% \end{macrocode}
+%
+% Package identification.
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{hopatch}%
+ [2011/01/30 v1.0 Wrapper for package hooks (HO)]
+% \end{macrocode}
+%
+% \subsection{Resources}
+%
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+ \TMP@RequirePackage{ltxcmds}[2010/12/12]%
+\else
+ \RequirePackage{ltxcmds}[2010/12/12]%
+\fi
+% \end{macrocode}
+%
+% \begin{macro}{\HOpatch@counter}
+% \begin{macrocode}
+\def\HOpatch@counter{0}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\HOpatch@StepCounter}
+% \begin{macrocode}
+\ltx@ifundefined{numexpr}{%
+ \def\HOpatch@StepCounter{%
+ \begingroup
+ \count@\HOpatch@counter\relax
+ \advance\count@\ltx@one\relax
+ \edef\x{\endgroup
+ \noexpand\def\noexpand\HOpatch@counter{\the\count@}%
+ }%
+ }%
+}{%
+ \def\HOpatch@StepCounter{%
+ \edef\HOpatch@counter{%
+ \the\numexpr\HOpatch@counter+\ltx@one\relax
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\HOpatch@list}
+% \begin{macrocode}
+\def\HOpatch@list{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\HOpatch@Add}
+% \begin{macrocode}
+\def\HOpatch@Add{%
+ \ltx@LocalAppendToMacro\HOpatch@list
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Package patching}
+%
+% \begin{macro}{\hopatch@AfterPackage}
+% \begin{macrocode}
+\def\hopatch@AfterPackage#1{%
+ \ltx@ifpackageloaded{#1}{%
+ \ltx@firstofone
+ }{%
+ \HOpatch@AfterPackage{#1}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\HOpatch@AfterPackage}
+% \begin{macrocode}
+\def\HOpatch@AfterPackage#1{%
+ \edef\HOpatch@temp{#1}%
+ \HOpatch@StepCounter
+ \expandafter\HOpatch@@AfterPackage
+ \csname HOpatch@\HOpatch@counter\expandafter\endcsname{%
+ \HOpatch@temp
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\HOpatch@@AfterPackage}
+% \begin{macrocode}
+\def\HOpatch@@AfterPackage#1#2#3{%
+ \begingroup
+ \toks@{#3}%
+ \xdef\HOpatch@gtemp{%
+ \noexpand\ltx@ifpackageloaded{#2}{%
+ \noexpand\let\noexpand#1\noexpand\relax
+ \the\toks@
+ }{}%
+ }%
+ \endgroup
+ \let#1\HOpatch@gtemp
+ \HOpatch@Add#1%
+ \HOpatch@Try{AfterPackage}{#2}#1%
+ \HOpatch@Try{AtEndPackage}{#2}#1%
+ \HOpatch@Try{AtEndOfPackageFile}{#2}#1%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\HOpatch@Try}
+% \begin{macrocode}
+\def\HOpatch@Try#1#2#3{%
+ \ltx@ifundefined{#1}{}{%
+ \csname #1\endcsname{#2}{#3}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\AtBeginDocument{\HOpatch@list}
+\ltx@ifundefined{AtEndPreamble}{}{%
+ \AtEndPreamble{\HOpatch@list}%
+}
+\ltx@ifundefined{AfterEndPreamble}{}{%
+ \AfterEndPreamble{%
+ \let\HOpatch@OrgIfPackageLoaded\@ifpackageloaded
+ \let\HOpatch@OrgIfPackageLater\@ifpackagelater
+ \let\HOpatch@OrgIfClassLoaded\@ifclassloaded
+ \let\HOpatch@OrgIfClassLater\@ifclasslater
+ \let\@ifpackageloaded\ltx@ifpackageloaded
+ \let\@ifpackagelater\ltx@ifpackagelater
+ \let\@ifclassloaded\ltx@ifclassloaded
+ \let\@ifclasslater\ltx@ifclasslater
+ \HOpatch@list
+ \let\@ifpackageloaded\HOpatch@OrgIfPackageLoaded
+ \let\@ifpackagelater\HOpatch@OrgIfPackageLater
+ \let\@ifclassloaded\HOpatch@OrgIfClassLoaded
+ \let\@ifclasslater\HOpatch@OrgIfClassLater
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\HOpatch@AtEnd%
+% \end{macrocode}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \section{Test}
+%
+% \begin{macrocode}
+%<*test1>
+\def\LoadCommand{\RequirePackage{hopatch}[2011/01/30]}
+%</test1>
+% \end{macrocode}
+% \subsection{Catcode checks for loading}
+%
+% \begin{macrocode}
+%<*test1>
+% \end{macrocode}
+% \begin{macrocode}
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\expandafter\ifx\csname count@\endcsname\relax
+ \countdef\count@=255 %
+\fi
+\expandafter\ifx\csname @gobble\endcsname\relax
+ \long\def\@gobble#1{}%
+\fi
+\expandafter\ifx\csname @firstofone\endcsname\relax
+ \long\def\@firstofone#1{#1}%
+\fi
+\expandafter\ifx\csname loop\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+{%
+ \def\loop#1\repeat{%
+ \def\body{#1}%
+ \iterate
+ }%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \let\repeat=\fi
+}%
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@ 1 %
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \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 hopatch.sty\relax}%
+\fi
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\%=14 %
+ \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
+\csname @@end\endcsname
+\end
+% \end{macrocode}
+% \begin{macrocode}
+%</test1>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*test2>
+\NeedsTeXFormat{LaTeX2e}
+\providecommand\variant{0}
+\RequirePackage{filecontents}
+\begin{filecontents}{foo.sty}
+\ProvidesPackage{foo}
+\def\msg#{\immediate\write16}
+\def\foo#1{%
+ \msg{\fooformat{#1}}%
+}
+\def\fooformat#1{[#1]}% hash-ok
+\foo{* Executing foo at package loading}
+\end{filecontents}
+
+\ifnum\variant=1 %
+ \documentclass{memoir}%
+\else
+ \documentclass{article}%
+\fi
+
+\ifcase\variant\relax
+\or % 1
+\or % 2
+ \usepackage{etoolbox}%
+\or % 3
+ \usepackage{scrlfile}%
+\or % 4
+ \usepackage{filehook}%
+\fi
+
+\AtBeginDocument{\foo{* AtBeginDocument before hopatch}}
+\usepackage{hopatch}
+\AtBeginDocument{\foo{* AtBeginDocument after hopatch}}
+
+\makeatletter
+\hopatch@AfterPackage{foo}{%
+ \def\fooformat#1{<<#1>>}%
+}
+\makeatother
+
+\AtBeginDocument{\foo{* AtBeginDocument before foo}}
+\usepackage{foo}
+\AtBeginDocument{\foo{* AtBeginDocument after foo}}
+
+\foo{* Executing in preamble}
+
+\begin{document}
+\foo{* Executing in document}
+\end{document}
+%</test2>
+% \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/hopatch.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/oberdiek/hopatch.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{install/macros/latex/contrib/oberdiek.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTAN{tds/tds.pdf}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \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 hopatch.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}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+% hopatch.sty & tex/latex/oberdiek/hopatch.sty\\
+% hopatch.pdf & doc/latex/oberdiek/hopatch.pdf\\
+% test/hopatch-test1.tex & doc/latex/oberdiek/test/hopatch-test1.tex\\
+% test/hopatch-test2.tex & doc/latex/oberdiek/test/hopatch-test2.tex\\
+% hopatch.dtx & source/latex/oberdiek/hopatch.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+% \begingroup
+% \advance\linewidth by\leftmargin
+% \advance\linewidth by\rightmargin
+% \edef\x{\endgroup
+% \def\noexpand\lw{\the\linewidth}^^A
+% }\x
+% \def\lwbox{^^A
+% \leavevmode
+% \hbox to \linewidth{^^A
+% \kern-\leftmargin\relax
+% \hss
+% \usebox0
+% \hss
+% \kern-\rightmargin\relax
+% }^^A
+% }^^A
+% \ifdim\wd0>\lw
+% \sbox0{\small\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\footnotesize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\scriptsize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\tiny\t}^^A
+% \ifdim\wd0>\linewidth
+% \lwbox
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \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 hopatch.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{hopatch.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 hopatch.dtx
+%makeindex -s gind.ist hopatch.idx
+%pdflatex hopatch.dtx
+%makeindex -s gind.ist hopatch.idx
+%pdflatex hopatch.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \begin{thebibliography}{9}
+% \raggedright
+%
+% \bibitem{etoolbox}
+% Philipp Lehman:
+% \textit{The etoolbox Package}
+% 2011-01-03.
+% \CTAN{macros/latex/contrib/etoolbox/etoolbox.pdf}
+%
+% \bibitem{filehook}
+% Martin Scharrer:
+% \textit{The filehook Package};
+% 2011-01-09.
+% \CTAN{macros/latex/contrib/filehook/filehook.pdf}
+%
+% \bibitem{ltxcmds}
+% Heiko Oberdiek:
+% \textit{The ltxcmds Package};
+% 2010-12-12.
+% \CTAN{macros/latex/contrib/oberdiek/ltxcmds.pdf}
+%
+% \bibitem{memoir}
+% Peter Wilson, Lars Madsen:
+% \textit{The Memoir Class for Configurable Typesetting, User Guide};
+% 2010.
+% \CTAN{macros/latex/contrib/memoir/memman.pdf}
+%
+% \bibitem{scrlfile}
+% Markus Kohm, Jens-Uwe Morawski:
+% \textit{The Guide KOMA-Script};
+% 2011-01-20.
+% \CTAN{macros/latex/contrib/koma-script/scrguien.pdf}
+%
+% \end{thebibliography}
+%
+% \begin{History}
+% \begin{Version}{2011/01/30 v1.0}
+% \item
+% First public version.
+% \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/oberdiek/hycolor.dtx b/Master/texmf-dist/source/latex/oberdiek/hycolor.dtx
index 122e2ca7ecb..7edfaf4f7de 100644
--- a/Master/texmf-dist/source/latex/oberdiek/hycolor.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/hycolor.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007-2009 by
+% Copyright (C) 2007-2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -83,7 +83,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: hycolor 2009/12/12 v1.6 Color options of hyperref/bookmark (HO)}
+\Msg{* Package: hycolor 2011/01/30 v1.7 Color options of hyperref/bookmark (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -94,7 +94,7 @@
This is a generated file.
-Copyright (C) 2007-2009 by
+Copyright (C) 2007-2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -166,7 +166,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{hycolor.drv}%
- [2009/12/12 v1.6 Color options of hyperref/bookmark (HO)]%
+ [2011/01/30 v1.7 Color options of hyperref/bookmark (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\usepackage[ruled]{algorithm2e}
@@ -210,7 +210,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1744}
+% \CheckSum{1726}
%
% \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
@@ -231,7 +231,7 @@ and the derived files
% \GetFileInfo{hycolor.drv}
%
% \title{The \xpackage{hycolor} package}
-% \date{2009/12/12 v1.6}
+% \date{2011/01/30 v1.7}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -333,11 +333,11 @@ and the derived files
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{hycolor}%
- [2009/12/12 v1.6 Color options of hyperref/bookmark (HO)]%
+ [2011/01/30 v1.7 Color options of hyperref/bookmark (HO)]%
% \end{macrocode}
%
% \begin{macrocode}
-\RequirePackage{xcolor-patch}[2009/12/12]
+\RequirePackage{xcolor-patch}[2011/01/30]
% \end{macrocode}
%
% \subsection{Normalization}
@@ -1243,30 +1243,11 @@ and the derived files
% \begin{macrocode}
%<*xcolor>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{xcolor-patch}[2009/12/12 xcolor patch]
+\ProvidesPackage{xcolor-patch}[2011/01/30 xcolor patch]
% \end{macrocode}
% \begin{macrocode}
-\@ifpackageloaded{xcolor}{%
- \@firstofone
-}{%
- \@ifpackageloaded{scrlfile}{%
- \AfterPackage{xcolor}%
- }{%
- \def\reserved@a{%
- \edef\x{%
- \endgroup
- \noexpand\AtBeginDocument{%
- \noexpand\@ifpackageloaded{xcolor}{\the\toks@}{}%
- }%
- }%
- \x
- }%
- \begingroup
- \afterassignment\reserved@a
- \toks@
- }%
-}%
-{%
+\RequirePackage{hopatch}[2011/01/30]
+\hopatch@AfterPackage{xcolor}{%
% \end{macrocode}
% \begin{macro}{\XC@ifxcase}
% \begin{macrocode}
@@ -1452,19 +1433,19 @@ and the derived files
%
% \begin{macrocode}
%<*test1>
-\ProvidesFile{hycolor-test1.tex}[2009/12/12 test file 1]
+\ProvidesFile{hycolor-test1.tex}[2011/01/30 test file 1]
%</test1>
% \end{macrocode}
%
% \begin{macrocode}
%<*test2>
-\ProvidesFile{hycolor-test2.tex}[2009/12/12 test file 2]
+\ProvidesFile{hycolor-test2.tex}[2011/01/30 test file 2]
\let\pdfmatch\relax
%</test2>
% \end{macrocode}
%
% \begin{macrocode}
-%<test3>\ProvidesFile{hycolor-test3.tex}[2009/12/12 test file 3]
+%<test3>\ProvidesFile{hycolor-test3.tex}[2011/01/30 test file 3]
% \end{macrocode}
%
% \begin{macrocode}
@@ -1510,7 +1491,7 @@ and the derived files
\Expect*{\@ResultErrorMessage}*{\@ExpectErrorMessage}%
}
\usepackage{scrlfile}
-\usepackage{hycolor}[2009/12/12]
+\usepackage{hycolor}[2011/01/30]
%</test>
% \end{macrocode}
%
@@ -1899,15 +1880,15 @@ and the derived files
\documentclass{minimal}
%<*xcol1>
\usepackage{xcolor}
-\usepackage{xcolor-patch}[2009/12/12]
+\usepackage{xcolor-patch}[2011/01/30]
%</xcol1>
%<*xcol2>
\usepackage{scrlfile}
-\usepackage{xcolor-patch}[2009/12/12]
+\usepackage{xcolor-patch}[2011/01/30]
\usepackage{xcolor}
%</xcol2>
%<*xcol3>
-\usepackage{xcolor-patch}[2009/12/12]
+\usepackage{xcolor-patch}[2011/01/30]
\usepackage{xcolor}
\begin{document}
%</xcol3>
@@ -1954,7 +1935,7 @@ and the derived files
\NeedsTeXFormat{LaTeX2e}
\documentclass{article}
\usepackage{xcolor}
-\usepackage{xcolor-patch}[2009/12/12]
+\usepackage{xcolor-patch}[2011/01/30]
\makeatletter
\protected@edef\x{\fbox{abc}}
\let\@tempa\@undefined
@@ -2186,6 +2167,10 @@ and the derived files
% \item
% Short info shortened.
% \end{Version}
+% \begin{Version}{2011/01/30 v1.7}
+% \item
+% Package \xpackage{xcolor-patch} uses package \xpackage{hopatch}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/hypcap.dtx b/Master/texmf-dist/source/latex/oberdiek/hypcap.dtx
index 48c7ad10514..78285591843 100644
--- a/Master/texmf-dist/source/latex/oberdiek/hypcap.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/hypcap.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1999-2001, 2006-2008 by
+% Copyright (C) 1999-2001, 2006-2008, 2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -71,7 +71,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: hypcap 2008/09/08 v1.10 Adjusting anchors of captions (HO)}
+\Msg{* Package: hypcap 2011/02/16 v1.11 Adjusting anchors of captions (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -82,7 +82,7 @@
This is a generated file.
-Copyright (C) 1999-2001, 2006-2008 by
+Copyright (C) 1999-2001, 2006-2008, 2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -141,7 +141,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{hypcap.drv}%
- [2008/09/08 v1.10 Adjusting anchors of captions (HO)]%
+ [2011/02/16 v1.11 Adjusting anchors of captions (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -150,7 +150,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{169}
+% \CheckSum{170}
%
% \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
@@ -171,7 +171,7 @@ and the derived files
% \GetFileInfo{hypcap.drv}
%
% \title{The \xpackage{hypcap} package}
-% \date{2008/09/08 v1.10}
+% \date{2011/02/16 v1.11}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -305,7 +305,7 @@ and the derived files
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{hypcap}%
- [2008/09/08 v1.10 Adjusting anchors of captions (HO)]
+ [2011/02/16 v1.11 Adjusting anchors of captions (HO)]
% \end{macrocode}
%
% For unique command names this package uses |hc@| as prefix
@@ -319,6 +319,10 @@ and the derived files
}{}
% \end{macrocode}
%
+% \begin{macrocode}
+\RequirePackage{letltxmacro}[2008/06/24]
+% \end{macrocode}
+%
% \begin{macro}{\hc@org@caption}
% Save the original meaning of \cmd{\caption}:
% \begin{macrocode}
@@ -450,8 +454,8 @@ and the derived files
% \begin{macrocode}
\def\hc@redef#1#2#3{%
\newcommand#1{}%
- \expandafter\let\expandafter#1\csname#3\endcsname
- \expandafter\let\expandafter#2\csname end#3\endcsname
+ \expandafter\LetLtxMacro\expandafter#1\csname#3\endcsname
+ \expandafter\LetLtxMacro\expandafter#2\csname end#3\endcsname
\renewenvironment*{#3}[1][]{%
\ifx\\##1\\%
#1\relax
@@ -732,6 +736,10 @@ and the derived files
% \item
% \cs{capstartfalse} and \cs{capstarttrue} added.
% \end{Version}
+% \begin{Version}{2011/02/16 v1.11}
+% \item
+% \cs{hc@redef} fixed by using package \xpackage{letltxmacro}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/hyphsubst.dtx b/Master/texmf-dist/source/latex/oberdiek/hyphsubst.dtx
index 55c52adf926..71ae147c864 100644
--- a/Master/texmf-dist/source/latex/oberdiek/hyphsubst.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/hyphsubst.dtx
@@ -163,7 +163,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{518}
+% \CheckSum{592}
%
% \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
@@ -335,14 +335,18 @@ and the derived files
% \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 % @
- \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@hyphsubst.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -350,7 +354,6 @@ and the derived files
\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.}%
@@ -362,24 +365,27 @@ and the derived files
\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}%
@@ -398,39 +404,50 @@ and the derived files
\fi
\expandafter\x\csname ver@hyphsubst.sty\endcsname
\ProvidesPackage{hyphsubst}%
- [2008/06/09 v0.2 Substitute hyphenation patterns (HO)]
+ [2008/06/09 v0.2 Substitute hyphenation patterns (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 HyphSubst@AtEnd\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\HyphSubst@AtEnd{%
\HyphSubst@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{39}{12}% '
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
-\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{96}{12}% `
+\edef\HyphSubst@AtEnd{\HyphSubst@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Package}
@@ -531,9 +548,8 @@ and the derived files
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname documentclass\endcsname\relax
- \HyphSubst@AtEnd
- \expandafter\endinput
-\fi
+ \expandafter\HyphSubst@AtEnd
+\fi%
% \end{macrocode}
%
% \begin{macrocode}
@@ -547,7 +563,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\HyphSubst@AtEnd
+\HyphSubst@AtEnd%
%</package>
% \end{macrocode}
%
@@ -611,6 +627,22 @@ and the derived files
\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 hyphsubst.sty\relax}%
\fi
@@ -621,15 +653,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/iflang.dtx b/Master/texmf-dist/source/latex/oberdiek/iflang.dtx
index 004e1d6adc1..36c4cb549f3 100644
--- a/Master/texmf-dist/source/latex/oberdiek/iflang.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/iflang.dtx
@@ -171,7 +171,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{834}
+% \CheckSum{909}
%
% \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
@@ -288,14 +288,18 @@ and the derived files
% \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 % @
- \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@iflang.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -303,7 +307,6 @@ and the derived files
\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.}%
@@ -315,24 +318,27 @@ and the derived files
\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}%
@@ -351,32 +357,41 @@ and the derived files
\fi
\expandafter\x\csname ver@iflang.sty\endcsname
\ProvidesPackage{iflang}%
- [2007/11/11 v1.5 Language checks (HO)]
+ [2007/11/11 v1.5 Language checks (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 IfLang@AtEnd\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\IfLang@AtEnd{%
\IfLang@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{39}{12}% '
\TMP@EnsureCode{40}{12}% (
@@ -385,7 +400,9 @@ and the derived files
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
-\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\edef\IfLang@AtEnd{\IfLang@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Tools}
@@ -642,7 +659,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\IfLang@AtEnd
+\IfLang@AtEnd%
%</package>
% \end{macrocode}
%
@@ -706,6 +723,22 @@ and the derived files
\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 iflang.sty\relax}%
\fi
@@ -716,15 +749,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/ifluatex.dtx b/Master/texmf-dist/source/latex/oberdiek/ifluatex.dtx
index de8fdc78657..36d183804f8 100644
--- a/Master/texmf-dist/source/latex/oberdiek/ifluatex.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/ifluatex.dtx
@@ -165,7 +165,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{496}
+% \CheckSum{568}
%
% \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
@@ -240,14 +240,18 @@ and the derived files
% \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 % @
- \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@ifluatex.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -255,7 +259,6 @@ and the derived files
\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.}%
@@ -267,24 +270,27 @@ and the derived files
\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}%
@@ -303,34 +309,43 @@ and the derived files
\fi
\expandafter\x\csname ver@ifluatex.sty\endcsname
\ProvidesPackage{ifluatex}%
- [2010/03/01 v1.3 Provides the ifluatex switch (HO)]
+ [2010/03/01 v1.3 Provides the ifluatex switch (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 ifluatex@AtEnd\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\ifluatex@AtEnd{%
\ifluatex@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{10}{12}% ^^J
\TMP@EnsureCode{39}{12}% '
@@ -342,9 +357,9 @@ and the derived files
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{94}{7}% ^
\TMP@EnsureCode{96}{12}% `
+\edef\ifluatex@AtEnd{\ifluatex@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Macro for error messages}
@@ -382,9 +397,8 @@ and the derived files
therefore package loading is aborted.%
}%
\endgroup
- \ifluatex@AtEnd
- \expandafter\endinput
- \fi
+ \expandafter\ifluatex@AtEnd
+ \fi%
\endgroup
% \end{macrocode}
%
@@ -507,7 +521,7 @@ and the derived files
\endgroup
% \end{macrocode}
% \begin{macrocode}
-\ifluatex@AtEnd
+\ifluatex@AtEnd%
% \end{macrocode}
% \begin{macrocode}
%</package>
@@ -573,6 +587,22 @@ and the derived files
\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 ifluatex.sty\relax}%
\fi
@@ -583,15 +613,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/ifpdf.dtx b/Master/texmf-dist/source/latex/oberdiek/ifpdf.dtx
index ae250c534ab..8a62a6079fa 100644
--- a/Master/texmf-dist/source/latex/oberdiek/ifpdf.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/ifpdf.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2001, 2005-2010 by
+% Copyright (C) 2001, 2005-2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -75,7 +75,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: ifpdf 2010/01/28 v2.1 Provides the ifpdf switch (HO)}
+\Msg{* Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -86,7 +86,7 @@
This is a generated file.
-Copyright (C) 2001, 2005-2010 by
+Copyright (C) 2001, 2005-2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -150,7 +150,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ifpdf.drv}%
- [2010/01/28 v2.1 Provides the ifpdf switch (HO)]%
+ [2011/01/30 v2.3 Provides the ifpdf switch (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -159,7 +159,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{511}
+% \CheckSum{593}
%
% \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
@@ -180,7 +180,7 @@ and the derived files
% \GetFileInfo{ifpdf.drv}
%
% \title{The \xpackage{ifpdf} package}
-% \date{2010/01/28 v2.1}
+% \date{2011/01/30 v2.3}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -329,14 +329,18 @@ and the derived files
% \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 % @
- \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@ifpdf.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -344,7 +348,6 @@ and the derived files
\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.}%
@@ -356,24 +359,27 @@ and the derived files
\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}%
@@ -392,34 +398,43 @@ and the derived files
\fi
\expandafter\x\csname ver@ifpdf.sty\endcsname
\ProvidesPackage{ifpdf}%
- [2010/01/28 v2.1 Provides the ifpdf switch (HO)]
+ [2011/01/30 v2.3 Provides the ifpdf switch (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 ifpdf@AtEnd\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\ifpdf@AtEnd{%
\ifpdf@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{10}{12}% ^^J
\TMP@EnsureCode{39}{12}% '
@@ -431,9 +446,11 @@ and the derived files
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{94}{7}% ^
\TMP@EnsureCode{96}{12}% `
+\edef\ifpdf@AtEnd{\ifpdf@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Check for previously defined \cs{ifpdf}}
@@ -462,9 +479,8 @@ and the derived files
therefore package loading is aborted.%
}%
\endgroup
- \ifpdf@AtEnd
- \expandafter\endinput
- \fi
+ \expandafter\ifpdf@AtEnd
+ \fi%
\endgroup
% \end{macrocode}
%
@@ -478,22 +494,29 @@ and the derived files
%
% \begin{macrocode}
\begingroup
+ \def\skip#1\relax\begingroup{}%
\expandafter\ifx\csname pdfoutput\endcsname\relax
\else
- \def\skip#1\relax\endgroup{\csname fi\endcsname\endgroup}%
- \skip
+ \expandafter\skip
\fi
\expandafter\ifx\csname directlua\endcsname\relax
- \def\skip#1\endgroup{\csname fi\endcsname\endgroup}%
- \skip
- \fi
- \expandafter\ifx\csname RequirePackage\endcsname\relax
- \input ifluatex.sty\relax
- \else
- \RequirePackage{ifluatex}[2009/04/10]%
+ \expandafter\skip
\fi
- \ifluatex
- \ifnum\luatexversion<36 %
+\endgroup
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+ \TMP@RequirePackage{ifluatex}[2009/04/10]%
+\else
+ \RequirePackage{ifluatex}[2009/04/10]%
+\fi
+\ifluatex
+ \ifnum\luatexversion<36 %
% \end{macrocode}
% Unhappily \LuaTeX's \cs{primitive} (derived from
% pdfTeX's \cs{pdfprimitive}) cannot be used:
@@ -503,14 +526,17 @@ and the derived files
% Setting a value works, but getting fails,
% because \TeX\ does no longer see it as number. It
% is unexpandable and breaks numerical contexts.
+% This was fixed in \hologo{pdfTeX} 1.40.10
+% (bugfix \#4289: ``|\primitive\pdfoutput| cannot be queried'').
% \begin{macrocode}
- \else
+ \else
+ \begingroup
\directlua{tex.enableprimitives('ifpdf', {'pdfoutput'})}%
\global\let\pdfoutput\ifpdfpdfoutput
- \fi
+ \endgroup
\fi
- \relax
-\endgroup
+\fi
+\relax\begingroup\endgroup
% \end{macrocode}
%
% \subsection{\cs{ifpdf}}
@@ -563,12 +589,9 @@ and the derived files
\begingroup
\expandafter\ifx\csname pdfoutput\endcsname\relax
\else
- \escapechar=-1 %
+ \escapechar=92 %
\edef\m{\meaning\pdfoutput}%
- \edef\p{%
- \string p\string d\string f%
- \string o\string u\string t\string p\string u\string t%
- }%
+ \edef\p{\string\pdfoutput}%
\ifx\m\p
\else
\expandafter\ifx\csname PackageWarningNoLine\endcsname\relax
@@ -579,7 +602,7 @@ and the derived files
}%
\fi
\PackageWarningNoLine{ifpdf}{%
- Someone has redefined \string\\pdfoutput%
+ Someone has redefined \string\pdfoutput%
}%
\fi
\fi
@@ -599,11 +622,11 @@ and the derived files
\let\x\PackageInfo
\expandafter\let\csname on@line\endcsname\empty
\fi
- \x{ifpdf}{pdfTeX in pdf mode \ifpdf\else not \fi detected}%
+ \x{ifpdf}{pdfTeX in PDF mode is \ifpdf\else not \fi detected}%
\endgroup
% \end{macrocode}
% \begin{macrocode}
-\ifpdf@AtEnd
+\ifpdf@AtEnd%
% \end{macrocode}
% \begin{macrocode}
%</package>
@@ -669,6 +692,22 @@ and the derived files
\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 ifpdf.sty\relax}%
\fi
@@ -679,15 +718,20 @@ and the derived files
\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
@@ -940,6 +984,15 @@ and the derived files
% \item
% Compatibility to ini\TeX\ added.
% \end{Version}
+% \begin{Version}{2010/09/13 v2.2}
+% \item
+% Code with \cs{escapechar} rewritten because of
+% LuaTeX bug: \cs{escapechar} does not work.
+% \end{Version}
+% \begin{Version}{2011/01/30 v2.3}
+% \item
+% Already loaded package files are not input in \hologo{plainTeX}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/ifvtex.dtx b/Master/texmf-dist/source/latex/oberdiek/ifvtex.dtx
index a0b63af589b..d8a9ff46079 100644
--- a/Master/texmf-dist/source/latex/oberdiek/ifvtex.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/ifvtex.dtx
@@ -159,7 +159,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{503}
+% \CheckSum{575}
%
% \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
@@ -244,14 +244,18 @@ and the derived files
% \end{macrocode}
% 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@ifvtex.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -259,7 +263,6 @@ and the derived files
\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.}%
@@ -271,24 +274,27 @@ and the derived files
\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}%
@@ -307,34 +313,43 @@ and the derived files
\fi
\expandafter\x\csname ver@ifvtex.sty\endcsname
\ProvidesPackage{ifvtex}%
- [2010/03/01 v1.5 Switches for detecting VTeX and its modes (HO)]
+ [2010/03/01 v1.5 Switches for detecting VTeX and its modes (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 ifvtex@AtEnd\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\ifvtex@AtEnd{%
\ifvtex@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{10}{12}% ^^J
\TMP@EnsureCode{39}{12}% '
@@ -344,10 +359,10 @@ and the derived files
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{94}{7}% ^
\TMP@EnsureCode{96}{12}% `
+\edef\ifvtex@AtEnd{\ifvtex@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Check for previously defined \cs{ifvtex}}
@@ -376,9 +391,8 @@ and the derived files
therefore package loading is aborted.%
}%
\endgroup
- \ifvtex@AtEnd
- \expandafter\endinput
- \fi
+ \expandafter\ifvtex@AtEnd
+ \fi%
\endgroup
% \end{macrocode}
%
@@ -507,7 +521,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\ifvtex@AtEnd
+\ifvtex@AtEnd%
%</package>
% \end{macrocode}
%
@@ -571,6 +585,22 @@ and the derived files
\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 ifvtex.sty\relax}%
\fi
@@ -581,15 +611,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/infwarerr.dtx b/Master/texmf-dist/source/latex/oberdiek/infwarerr.dtx
index 97338751b90..81b821745b6 100644
--- a/Master/texmf-dist/source/latex/oberdiek/infwarerr.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/infwarerr.dtx
@@ -167,7 +167,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{799}
+% \CheckSum{871}
%
% \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
@@ -240,14 +240,18 @@ and the derived files
% \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 % @
- \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@infwarerr.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -255,7 +259,6 @@ and the derived files
\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.}%
@@ -267,24 +270,27 @@ and the derived files
\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}%
@@ -303,34 +309,43 @@ and the derived files
\fi
\expandafter\x\csname ver@infwarerr.sty\endcsname
\ProvidesPackage{infwarerr}%
- [2010/04/08 v1.3 Providing info/warning/message (HO)]
+ [2010/04/08 v1.3 Providing info/warning/message (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 InfWarErr@AtEnd\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\InfWarErr@AtEnd{%
\InfWarErr@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{10}{12}% ^^J
\TMP@EnsureCode{39}{12}% '
@@ -341,9 +356,9 @@ and the derived files
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{94}{7}% ^
+\edef\InfWarErr@AtEnd{\InfWarErr@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{\LaTeX\ detection}
@@ -429,9 +444,8 @@ and the derived files
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
- \InfWarErr@AtEnd
- \expandafter\endinput
-\fi
+ \expandafter\InfWarErr@AtEnd
+\fi%
% \end{macrocode}
%
% \subsection{Version for \plainTeX}
@@ -648,7 +662,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\InfWarErr@AtEnd
+\InfWarErr@AtEnd%
%</package>
% \end{macrocode}
%
@@ -712,6 +726,22 @@ and the derived files
\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 infwarerr.sty\relax}%
\fi
@@ -722,15 +752,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/inputenx.dtx b/Master/texmf-dist/source/latex/oberdiek/inputenx.dtx
index 43ca46e8573..0fbe234449b 100644
--- a/Master/texmf-dist/source/latex/oberdiek/inputenx.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/inputenx.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2006-2010 by
+% Copyright (C) 2006-2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -21,7 +21,7 @@
% and the derived files
% inputenx.sty, inputenx.pdf, inputenx.ins, inputenx.drv, ix-alias.def,
% ix-math.def, ix-name.def, ix-slot.def, ix-uc.def,
-% ix-utf8enc.dfu, x-ascii.def, x-atarist.def,
+% ix-utf8enc.dfu, x-ascii.def, x-verbatim.def, x-atarist.def,
% x-iso-8859-1.def, x-iso-8859-2.def, x-iso-8859-3.def,
% x-iso-8859-4.def, x-iso-8859-5.def, x-iso-8859-8.def,
% x-iso-8859-9.def, x-iso-8859-10.def, x-iso-8859-13.def,
@@ -72,6 +72,7 @@
% TDS:tex/latex/oberdiek/ix-uc.def
% TDS:tex/latex/oberdiek/ix-utf8enc.dfu
% TDS:tex/latex/oberdiek/x-ascii.def
+% TDS:tex/latex/oberdiek/x-verbatim.def
% TDS:tex/latex/oberdiek/x-atarist.def
% TDS:tex/latex/oberdiek/x-iso-8859-1.def
% TDS:tex/latex/oberdiek/x-iso-8859-2.def
@@ -122,7 +123,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: inputenx 2010/01/11 v1.6 Enhanced input encoding handling (HO)}
+\Msg{* Package: inputenx 2011/04/10 v1.8 Enhanced input encoding handling (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -133,7 +134,7 @@
This is a generated file.
-Copyright (C) 2006-2010 by
+Copyright (C) 2006-2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -154,7 +155,7 @@ This work consists of the main source file inputenx.dtx
and the derived files
inputenx.sty, inputenx.pdf, inputenx.ins, inputenx.drv, ix-alias.def,
ix-math.def, ix-name.def, ix-slot.def, ix-uc.def,
- ix-utf8enc.dfu, x-ascii.def, x-atarist.def,
+ ix-utf8enc.dfu, x-ascii.def, x-verbatim.def, x-atarist.def,
x-iso-8859-1.def, x-iso-8859-2.def, x-iso-8859-3.def,
x-iso-8859-4.def, x-iso-8859-5.def, x-iso-8859-8.def,
x-iso-8859-9.def, x-iso-8859-10.def, x-iso-8859-13.def,
@@ -181,6 +182,7 @@ and the derived files
\file{ix-uc.def}{\from{inputenx.dtx}{uc}}%
\file{ix-utf8enc.dfu}{\from{inputenx.dtx}{dfu}}%
\file{x-ascii.def}{\from{inputenx.dtx}{ascii}}%
+ \file{x-verbatim.def}{\from{inputenx.dtx}{verbatim}}%
\file{x-atarist.def}{\from{inputenx.dtx}{atarist}}%
\file{x-iso-8859-1.def}{\from{inputenx.dtx}{iso-8859-1}}%
\file{x-iso-8859-2.def}{\from{inputenx.dtx}{iso-8859-2}}%
@@ -225,15 +227,16 @@ and the derived files
\Msg{*}
\Msg{* inputenx.sty, ix-alias.def, ix-math.def, ix-name.def,}
\Msg{* ix-slot.def, ix-uc.def, ix-utf8enc.dfu, x-ascii.def,}
-\Msg{* x-atarist.def, x-iso-8859-1.def, x-iso-8859-2.def,}
-\Msg{* x-iso-8859-3.def, x-iso-8859-4.def, x-iso-8859-5.def,}
-\Msg{* x-iso-8859-8.def, x-iso-8859-9.def, x-iso-8859-10.def,}
-\Msg{* x-iso-8859-13.def, x-iso-8859-14.def, x-iso-8859-15.def,}
-\Msg{* x-iso-8859-16.def, x-cp437.def, x-cp850.def, x-cp852.def,}
-\Msg{* x-cp855.def, x-cp858.def, x-cp865.def, x-cp866.def,}
-\Msg{* x-cp1250.def, x-cp1251.def, x-cp1252.def, x-cp1257.def,}
-\Msg{* x-dec-mcs.def, x-koi8-r.def, x-mac-centeuro.def,}
-\Msg{* x-mac-cyrillic.def, x-mac-roman.def, x-nextstep.def}
+\Msg{* x-verbatim.def, x-atarist.def, x-iso-8859-1.def,}
+\Msg{* x-iso-8859-2.def, x-iso-8859-3.def, x-iso-8859-4.def,}
+\Msg{* x-iso-8859-5.def, x-iso-8859-8.def, x-iso-8859-9.def,}
+\Msg{* x-iso-8859-10.def, x-iso-8859-13.def, x-iso-8859-14.def,}
+\Msg{* x-iso-8859-15.def, x-iso-8859-16.def, x-cp437.def,}
+\Msg{* x-cp850.def, x-cp852.def, x-cp855.def, x-cp858.def,}
+\Msg{* x-cp865.def, x-cp866.def, x-cp1250.def, x-cp1251.def,}
+\Msg{* x-cp1252.def, x-cp1257.def, x-dec-mcs.def, x-koi8-r.def,}
+\Msg{* x-mac-centeuro.def, x-mac-cyrillic.def, x-mac-roman.def,}
+\Msg{* x-nextstep.def}
\Msg{*}
\Msg{* And install the following script file:}
\Msg{*}
@@ -254,7 +257,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{inputenx.drv}%
- [2010/01/11 v1.6 Enhanced input encoding handling (HO)]%
+ [2011/04/10 v1.8 Enhanced input encoding handling (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\usepackage{longtable}
@@ -264,7 +267,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{10027}
+% \CheckSum{0}
%
% \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
@@ -285,7 +288,7 @@ and the derived files
% \GetFileInfo{inputenx.drv}
%
% \title{The \xpackage{inputenx} package}
-% \date{2010/01/11 v1.6}
+% \date{2011/04/10 v1.8}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -374,6 +377,7 @@ and the derived files
% & \xoption{mac-ukrainian}, \xoption{macukr} &\\
% \xfile{x-mac-roman.def} & \xoption{mac-roman}, \xoption{applemac} & MAC OS Roman\\
% \xfile{x-nextstep} & \xoption{nextstep}, \xoption{next} & NextStep Encoding\\
+% \xfile{x-verbatim} & \xoption{verbatim} & Characters with verbatim catcodes\\
% \end{longtable}
%
% Some characters need extra packages:
@@ -421,6 +425,22 @@ and the derived files
% File \xfile{ix-utf8enc.dfu} provides additions to \xpackage{inputenc}'s
% file \xfile{utf8enc.dfu}.
%
+% \subsection{Verbatim}
+%
+% Encoding \xoption{verbatim} or file \xfile{x-verbatim.def} is a
+% special input encoding file. All characters supported by package
+% inputenc are made inactive with catcode 12 (other) suitable
+% for verbatim stuff. Example:
+%\begin{quote}
+%\begin{verbatim}
+%\usepackage{inputenx}[2011/02/08]
+%\usepackage{fancyvrb}
+%...
+%\begin{VerbatimOut}[codes={\InputEncoding{verbatim}}]{\jobname.tmp}
+% Text with 8 bit characters.
+%\end{VerbatimOut}
+%\end{quote}
+%
% \subsection{Math}
%
% The current philosophy of \LaTeX/package \xpackage{inputenc} is not to
@@ -504,7 +524,7 @@ and the derived files
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{inputenx}%
- [2010/01/11 v1.6 Enhanced input encoding handling (HO)]%
+ [2011/04/10 v1.8 Enhanced input encoding handling (HO)]%
% \end{macrocode}
%
% \subsection{Encoding names}
@@ -522,6 +542,45 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \subsubsection{Catcode settings for file reading}
+%
+% \begin{macro}{\IEX@SetFileCatcodes}
+% \begin{macrocode}
+\def\IEX@SetFileCatcodes{%
+ \catcode`\\=0 %
+ \catcode`\{=1 %
+ \catcode`\}=2 %
+ \catcode`\#=6 %
+ \catcode`\^=7 %
+ \catcode`\@=11 %
+ \catcode`\~=\active
+ \catcode`\%=14 %
+ \catcode`\`=12 %
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\IEX@SaveFileCatcodes}
+% \begin{macro}{\IEX@RestoreFileCatcodes}
+% \begin{macrocode}
+\def\IEX@SaveFileCatcodes{%
+ \edef\IEX@RestoreFileCatcodes{%
+ \catcode`\noexpand\\=\the\catcode`\\\relax
+ \catcode`\noexpand\{=\the\catcode`\{\relax
+ \catcode`\noexpand\}=\the\catcode`\}\relax
+ \catcode`\noexpand\#=\the\catcode`\#\relax
+ \catcode`\noexpand\^=\the\catcode`\^\relax
+ \catcode`\noexpand\@=\the\catcode`\@\relax
+ \catcode`\noexpand\~=\the\catcode`\~\relax
+ \catcode`\noexpand\%=\the\catcode`\%\relax
+ \catcode`\noexpand\`=\the\catcode`\`\relax
+ \catcode`\noexpand\<=\the\catcode`\<\relax
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \subsubsection{Aliases for encoding names}
%
% \begin{macrocode}
@@ -570,6 +629,7 @@ and the derived files
% \begin{macrocode}
\def\IEX@DoLookup{%
\begingroup
+ \IEX@SetFileCatcodes
\advance\endlinechar\@M
\IfFileExists{ix-alias.cfg}{%
\input{ix-alias.cfg}%
@@ -683,7 +743,10 @@ and the derived files
\IEX@LookupEncoding\InputEncodingNew
\ifx\CurrentInputEncodingOption\@empty
\else
+ \IEX@SaveFileCatcodes
+ \IEX@SetFileCatcodes
\inputencoding{\CurrentInputEncodingOption}%
+ \IEX@RestoreFileCatcodes
% \ifx\PassOptionsToPackage\@notprerr
% \else
% \expandafter\PassOptionsToPackage\expandafter{%
@@ -723,7 +786,7 @@ and the derived files
%
% \begin{macrocode}
%<*alias>
-\ProvidesFile{ix-alias.def}[2010/01/11 v1.6 Alias list (inputenx)]
+\ProvidesFile{ix-alias.def}[2011/04/10 v1.8 Alias list (inputenx)]
% \end{macrocode}
% The alias mechanism is also used to hide the prefix |x-|:
% \begin{macrocode}
@@ -788,6 +851,9 @@ and the derived files
\InputenxAlias{next}{x-nextstep}
\InputenxAlias{us-ascii}{x-ascii}
% \end{macrocode}
+% \begin{macrocode}
+\InputenxAlias{verbatim}{x-verbatim}
+% \end{macrocode}
%
% \begin{macrocode}
%</alias>
@@ -803,17 +869,47 @@ and the derived files
% \begin{macrocode}
%<*ascii>
\ProvidesFile{x-ascii.def}%
- [2010/01/11 v1.6 Input encoding ascii (inputenx)]%
+ [2011/04/10 v1.8 Input encoding ascii (inputenx)]%
\csname @inpenc@test\endcsname
%</ascii>
% \end{macrocode}
+% \subsubsection{Encoding \xoption{verbatim}}
+%
+% \begin{macrocode}
+%<*verbatim>
+\ProvidesFile{x-verbatim.def}%
+ [2011/04/10 v1.8 Input encoding verbatim (inputenx)]%
+\csname @inpenc@test\endcsname
+\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
+\makeatletter
+\def\IPX@VerbatimLoop#1#2{%
+ \@tempcnta#1\relax
+ \loop
+ \catcode\@tempcnta=12 %
+% \catcode\@tempcnta\active
+% \begingroup
+% \uccode`\~\@tempcnta
+% \uppercase{\endgroup
+% \edef~{\string~}%
+% }%
+ \ifnum\@tempcnta<#2\relax
+ \advance\@tempcnta\@ne
+ \repeat
+}
+\IPX@VerbatimLoop{1}{8}
+\IPX@VerbatimLoop{11}{11}
+\IPX@VerbatimLoop{14}{31}
+\IPX@VerbatimLoop{127}{255}
+\RestoreAtCatcode
+%</verbatim>
+% \end{macrocode}
%
% \subsubsection{Encoding atarist}
%
% \begin{macrocode}
%<*atarist>
\ProvidesFile{x-atarist.def}%
- [2010/01/11 v1.6 Input encoding atarist (inputenx)]%
+ [2011/04/10 v1.8 Input encoding atarist (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textGamma}{%
@@ -1077,7 +1173,7 @@ and the derived files
% \begin{macrocode}
%<*iso-8859-1>
\ProvidesFile{x-iso-8859-1.def}%
- [2010/01/11 v1.6 Input encoding iso-8859-1 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding iso-8859-1 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textasciiacute}{%
@@ -1242,7 +1338,7 @@ and the derived files
% \begin{macrocode}
%<*iso-8859-2>
\ProvidesFile{x-iso-8859-2.def}%
- [2010/01/11 v1.6 Input encoding iso-8859-2 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding iso-8859-2 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textacutedbl}{%
@@ -1377,7 +1473,7 @@ and the derived files
% \begin{macrocode}
%<*iso-8859-3>
\ProvidesFile{x-iso-8859-3.def}%
- [2010/01/11 v1.6 Input encoding iso-8859-3 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding iso-8859-3 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textasciiacute}{%
@@ -1517,7 +1613,7 @@ and the derived files
% \begin{macrocode}
%<*iso-8859-4>
\ProvidesFile{x-iso-8859-4.def}%
- [2010/01/11 v1.6 Input encoding iso-8859-4 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding iso-8859-4 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textTstroke}{%
@@ -1580,7 +1676,7 @@ and the derived files
\DeclareInputText{184}{\c\ }
\DeclareInputText{185}{\v s}
\DeclareInputText{186}{\@tabacckludge=e}
-\DeclareInputText{187}{\v g}
+\DeclareInputText{187}{\c g}
\DeclareInputText{188}{\texttstroke}
\DeclareInputText{189}{\NG}
\DeclareInputText{190}{\v z}
@@ -1658,7 +1754,7 @@ and the derived files
% \begin{macrocode}
%<*iso-8859-5>
\ProvidesFile{x-iso-8859-5.def}%
- [2010/01/11 v1.6 Input encoding iso-8859-5 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding iso-8859-5 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textnumero}{%
@@ -1780,7 +1876,7 @@ and the derived files
% \begin{macrocode}
%<*iso-8859-8>
\ProvidesFile{x-iso-8859-8.def}%
- [2010/01/11 v1.6 Input encoding iso-8859-8 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding iso-8859-8 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textasciiacute}{%
@@ -1919,7 +2015,7 @@ and the derived files
% \begin{macrocode}
%<*iso-8859-9>
\ProvidesFile{x-iso-8859-9.def}%
- [2010/01/11 v1.6 Input encoding iso-8859-9 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding iso-8859-9 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textasciiacute}{%
@@ -2084,7 +2180,7 @@ and the derived files
% \begin{macrocode}
%<*iso-8859-10>
\ProvidesFile{x-iso-8859-10.def}%
- [2010/01/11 v1.6 Input encoding iso-8859-10 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding iso-8859-10 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textTstroke}{%
@@ -2121,7 +2217,7 @@ and the derived files
\DeclareInputText{176}{\textdegree}
\DeclareInputText{177}{\k a}
\DeclareInputText{178}{\@tabacckludge=e}
-\DeclareInputText{179}{\v g}
+\DeclareInputText{179}{\c g}
\DeclareInputText{180}{\@tabacckludge=\i}
\DeclareInputText{181}{\~\i}
\DeclareInputText{182}{\c k}
@@ -2207,7 +2303,7 @@ and the derived files
% \begin{macrocode}
%<*iso-8859-13>
\ProvidesFile{x-iso-8859-13.def}%
- [2010/01/11 v1.6 Input encoding iso-8859-13 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding iso-8859-13 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textbrokenbar}{%
@@ -2331,7 +2427,7 @@ and the derived files
\DeclareInputText{233}{\@tabacckludge'e}
\DeclareInputText{234}{\@tabacckludge'z}
\DeclareInputText{235}{\.e}
-\DeclareInputText{236}{\v g}
+\DeclareInputText{236}{\c g}
\DeclareInputText{237}{\c k}
\DeclareInputText{238}{\@tabacckludge=\i}
\DeclareInputText{239}{\c l}
@@ -2360,7 +2456,7 @@ and the derived files
% \begin{macrocode}
%<*iso-8859-14>
\ProvidesFile{x-iso-8859-14.def}%
- [2010/01/11 v1.6 Input encoding iso-8859-14 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding iso-8859-14 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\DeclareInputText{160}{\nobreakspace}
@@ -2468,7 +2564,7 @@ and the derived files
% \begin{macrocode}
%<*iso-8859-15>
\ProvidesFile{x-iso-8859-15.def}%
- [2010/01/11 v1.6 Input encoding iso-8859-15 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding iso-8859-15 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textasciimacron}{%
@@ -2615,7 +2711,7 @@ and the derived files
% \begin{macrocode}
%<*iso-8859-16>
\ProvidesFile{x-iso-8859-16.def}%
- [2010/01/11 v1.6 Input encoding iso-8859-16 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding iso-8859-16 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textcommabelow}[1]{%
@@ -2746,7 +2842,7 @@ and the derived files
% \begin{macrocode}
%<*cp437>
\ProvidesFile{x-cp437.def}%
- [2010/01/11 v1.6 Input encoding cp437 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding cp437 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textGamma}{%
@@ -2995,7 +3091,7 @@ and the derived files
% \begin{macrocode}
%<*cp850>
\ProvidesFile{x-cp850.def}%
- [2010/01/11 v1.6 Input encoding cp850 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding cp850 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textasciiacute}{%
@@ -3210,7 +3306,7 @@ and the derived files
% \begin{macrocode}
%<*cp852>
\ProvidesFile{x-cp852.def}%
- [2010/01/11 v1.6 Input encoding cp852 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding cp852 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textacutedbl}{%
@@ -3383,7 +3479,7 @@ and the derived files
% \begin{macrocode}
%<*cp855>
\ProvidesFile{x-cp855.def}%
- [2010/01/11 v1.6 Input encoding cp855 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding cp855 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textblacksquare}{%
@@ -3543,7 +3639,7 @@ and the derived files
% \begin{macrocode}
%<*cp858>
\ProvidesFile{x-cp858.def}%
- [2010/01/11 v1.6 Input encoding cp858 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding cp858 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textasciiacute}{%
@@ -3761,7 +3857,7 @@ and the derived files
% \begin{macrocode}
%<*cp865>
\ProvidesFile{x-cp865.def}%
- [2010/01/11 v1.6 Input encoding cp865 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding cp865 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textGamma}{%
@@ -4007,7 +4103,7 @@ and the derived files
% \begin{macrocode}
%<*cp866>
\ProvidesFile{x-cp866.def}%
- [2010/01/11 v1.6 Input encoding cp866 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding cp866 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textblacksquare}{%
@@ -4173,7 +4269,7 @@ and the derived files
% \begin{macrocode}
%<*cp1250>
\ProvidesFile{x-cp1250.def}%
- [2010/01/11 v1.6 Input encoding cp1250 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding cp1250 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textacutedbl}{%
@@ -4350,7 +4446,7 @@ and the derived files
% \begin{macrocode}
%<*cp1251>
\ProvidesFile{x-cp1251.def}%
- [2010/01/11 v1.6 Input encoding cp1251 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding cp1251 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textbrokenbar}{%
@@ -4524,7 +4620,7 @@ and the derived files
% \begin{macrocode}
%<*cp1252>
\ProvidesFile{x-cp1252.def}%
- [2010/01/11 v1.6 Input encoding cp1252 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding cp1252 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textasciiacute}{%
@@ -4722,7 +4818,7 @@ and the derived files
% \begin{macrocode}
%<*cp1257>
\ProvidesFile{x-cp1257.def}%
- [2010/01/11 v1.6 Input encoding cp1257 (inputenx)]%
+ [2011/04/10 v1.8 Input encoding cp1257 (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textasciiacute}{%
@@ -4881,7 +4977,7 @@ and the derived files
\DeclareInputText{233}{\@tabacckludge'e}
\DeclareInputText{234}{\@tabacckludge'z}
\DeclareInputText{235}{\.e}
-\DeclareInputText{236}{\v g}
+\DeclareInputText{236}{\c g}
\DeclareInputText{237}{\c k}
\DeclareInputText{238}{\@tabacckludge=\i}
\DeclareInputText{239}{\c l}
@@ -4910,7 +5006,7 @@ and the derived files
% \begin{macrocode}
%<*dec-mcs>
\ProvidesFile{x-dec-mcs.def}%
- [2010/01/11 v1.6 Input encoding dec-mcs (inputenx)]%
+ [2011/04/10 v1.8 Input encoding dec-mcs (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textcent}{%
@@ -5036,7 +5132,7 @@ and the derived files
% \begin{macrocode}
%<*koi8-r>
\ProvidesFile{x-koi8-r.def}%
- [2010/01/11 v1.6 Input encoding koi8-r (inputenx)]%
+ [2011/04/10 v1.8 Input encoding koi8-r (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textapproxequal}{%
@@ -5198,7 +5294,7 @@ and the derived files
% \begin{macrocode}
%<*mac-centeuro>
\ProvidesFile{x-mac-centeuro.def}%
- [2010/01/11 v1.6 Input encoding mac-centeuro (inputenx)]%
+ [2011/04/10 v1.8 Input encoding mac-centeuro (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textasciicaron}{%
@@ -5286,7 +5382,7 @@ and the derived files
\DeclareInputText{171}{\k e}
\DeclareInputText{172}{\textasciidieresis}
\DeclareInputText{173}{\textnotequal}
-\DeclareInputText{174}{\v g}
+\DeclareInputText{174}{\c g}
\DeclareInputText{175}{\k I}
\DeclareInputText{176}{\k i}
\DeclareInputText{177}{\@tabacckludge=I}
@@ -5377,7 +5473,7 @@ and the derived files
% \begin{macrocode}
%<*mac-cyrillic>
\ProvidesFile{x-mac-cyrillic.def}%
- [2010/01/11 v1.6 Input encoding mac-cyrillic (inputenx)]%
+ [2011/04/10 v1.8 Input encoding mac-cyrillic (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textapproxequal}{%
@@ -5573,7 +5669,7 @@ and the derived files
% \begin{macrocode}
%<*mac-roman>
\ProvidesFile{x-mac-roman.def}%
- [2010/01/11 v1.6 Input encoding mac-roman (inputenx)]%
+ [2011/04/10 v1.8 Input encoding mac-roman (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textOmega}{%
@@ -5802,7 +5898,7 @@ and the derived files
% \begin{macrocode}
%<*nextstep>
\ProvidesFile{x-nextstep.def}%
- [2010/01/11 v1.6 Input encoding nextstep (inputenx)]%
+ [2011/04/10 v1.8 Input encoding nextstep (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
\ProvideTextCommandDefault{\textacutedbl}{%
@@ -6023,7 +6119,7 @@ and the derived files
% \begin{macrocode}
%<*dfu>
\ProvidesFile{ix-utf8enc.dfu}%
- [2010/01/11 v1.6 Additions of inputenx for utf8enc.dfu]%
+ [2011/04/10 v1.8 Additions of inputenx for utf8enc.dfu]%
\DeclareUnicodeCharacter{00A0}{\nobreakspace}
\DeclareUnicodeCharacter{00AD}{\-}
\DeclareUnicodeCharacter{0100}{\@tabacckludge=A}
@@ -6041,7 +6137,7 @@ and the derived files
\DeclareUnicodeCharacter{0120}{\.G}
\DeclareUnicodeCharacter{0121}{\.g}
\DeclareUnicodeCharacter{0122}{\c G}
-\DeclareUnicodeCharacter{0123}{\v g}
+\DeclareUnicodeCharacter{0123}{\c g}
\DeclareUnicodeCharacter{0124}{\^H}
\DeclareUnicodeCharacter{0125}{\^h}
\DeclareUnicodeCharacter{0126}{\textmalteseH}
@@ -6081,6 +6177,37 @@ and the derived files
\DeclareUnicodeCharacter{0175}{\^w}
\DeclareUnicodeCharacter{0176}{\^Y}
\DeclareUnicodeCharacter{0177}{\^y}
+\DeclareUnicodeCharacter{01CD}{\v A}
+\DeclareUnicodeCharacter{01CE}{\v a}
+\DeclareUnicodeCharacter{01CF}{\v I}
+\DeclareUnicodeCharacter{01D0}{\v\i}
+\DeclareUnicodeCharacter{01D1}{\v O}
+\DeclareUnicodeCharacter{01D2}{\v o}
+\DeclareUnicodeCharacter{01D3}{\v U}
+\DeclareUnicodeCharacter{01D4}{\v u}
+\DeclareUnicodeCharacter{01E2}{\@tabacckludge=\AE}
+\DeclareUnicodeCharacter{01E3}{\@tabacckludge=\ae}
+\DeclareUnicodeCharacter{01E6}{\v G}
+\DeclareUnicodeCharacter{01E7}{\v g}
+\DeclareUnicodeCharacter{01E8}{\v K}
+\DeclareUnicodeCharacter{01E9}{\v k}
+\DeclareUnicodeCharacter{01F0}{\v\j}
+\DeclareUnicodeCharacter{01F4}{\@tabacckludge'G}
+\DeclareUnicodeCharacter{01F5}{\@tabacckludge'g}
+\DeclareUnicodeCharacter{01F8}{\@tabacckludge`N}
+\DeclareUnicodeCharacter{01F9}{\@tabacckludge`n}
+\DeclareUnicodeCharacter{01FC}{\@tabacckludge'\AE}
+\DeclareUnicodeCharacter{01FD}{\@tabacckludge'\ae}
+\DeclareUnicodeCharacter{0226}{\.A}
+\DeclareUnicodeCharacter{0227}{\.a}
+\DeclareUnicodeCharacter{0228}{\c E}
+\DeclareUnicodeCharacter{0229}{\c e}
+\DeclareUnicodeCharacter{022E}{\.O}
+\DeclareUnicodeCharacter{022F}{\.o}
+\DeclareUnicodeCharacter{0232}{\@tabacckludge=Y}
+\DeclareUnicodeCharacter{0232}{\@tabacckludge=y}
+\DeclareUnicodeCharacter{0232}{\@tabacckludge=y}
+\DeclareUnicodeCharacter{0237}{\j}
\DeclareUnicodeCharacter{1E02}{\.B}
\DeclareUnicodeCharacter{1E03}{\.b}
\DeclareUnicodeCharacter{1E0A}{\.D}
@@ -6237,7 +6364,7 @@ and the derived files
% \begin{macrocode}
%<*name>
\ProvidesFile{ix-name.def}%
- [2010/01/11 v1.6 Name list (inputenx)]%
+ [2011/04/10 v1.8 Name list (inputenx)]%
% \end{macrocode}
%
% \textit{List omitted here, see \xfile{ix-name.def}.}
@@ -6947,7 +7074,7 @@ and the derived files
% \begin{macrocode}
%<*slot>
\ProvidesFile{ix-slot.def}%
- [2010/01/11 v1.6 SLOT and UC to Encodings (inputenx)]%
+ [2011/04/10 v1.8 SLOT and UC to Encodings (inputenx)]%
% \end{macrocode}
%
% \textit{List omitted here, see \xfile{ix-slot.def}.}
@@ -9092,7 +9219,7 @@ and the derived files
% \begin{macrocode}
%<*uc>
\ProvidesFile{ix-uc.def}%
- [2010/01/11 v1.6 UC to LICR (inputenx)]%
+ [2011/04/10 v1.8 UC to LICR (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
% \end{macrocode}
@@ -9305,7 +9432,7 @@ and the derived files
\InputenxUC{0120}{\.G}{}
\InputenxUC{0121}{\.g}{}
\InputenxUC{0122}{\c G}{}
-\InputenxUC{0123}{\v g}{}
+\InputenxUC{0123}{\c g}{}
\InputenxUC{0124}{\^H}{}
\InputenxUC{0125}{\^h}{}
\InputenxUC{0126}{\textmalteseH}{%
@@ -9415,6 +9542,27 @@ and the derived files
\textit{f}%
}%
}
+\InputenxUC{01CD}{\v A}{}
+\InputenxUC{01CE}{\v a}{}
+\InputenxUC{01CF}{\v I}{}
+\InputenxUC{01D0}{\v\i}{}
+\InputenxUC{01D1}{\v O}{}
+\InputenxUC{01D2}{\v o}{}
+\InputenxUC{01D3}{\v U}{}
+\InputenxUC{01D4}{\v u}{}
+\InputenxUC{01E2}{\@tabacckludge=\AE}{}
+\InputenxUC{01E3}{\@tabacckludge=\ae}{}
+\InputenxUC{01E6}{\v G}{}
+\InputenxUC{01E7}{\v g}{}
+\InputenxUC{01E8}{\v K}{}
+\InputenxUC{01E9}{\v k}{}
+\InputenxUC{01F0}{\v\j}{}
+\InputenxUC{01F4}{\@tabacckludge'G}{}
+\InputenxUC{01F5}{\@tabacckludge'g}{}
+\InputenxUC{01F8}{\@tabacckludge`N}{}
+\InputenxUC{01F9}{\@tabacckludge`n}{}
+\InputenxUC{01FC}{\@tabacckludge'\AE}{}
+\InputenxUC{01FD}{\@tabacckludge'\ae}{}
\InputenxUC{0218}{\textcommabelow S}{%
\ProvideTextCommandDefault{\textcommabelow}[1]{%
\hmode@bgroup
@@ -9479,6 +9627,14 @@ and the derived files
\egroup
}%
}
+\InputenxUC{0226}{\.A}{}
+\InputenxUC{0227}{\.a}{}
+\InputenxUC{0228}{\c E}{}
+\InputenxUC{0229}{\c e}{}
+\InputenxUC{022E}{\.O}{}
+\InputenxUC{022F}{\.o}{}
+\InputenxUC{0232}{\@tabacckludge=y}{}
+\InputenxUC{0237}{\j}{}
\InputenxUC{02C6}{\textasciicircum}{}
\InputenxUC{02C7}{\textasciicaron}{%
\ProvideTextCommandDefault{\textasciicaron}{%
@@ -10136,7 +10292,7 @@ and the derived files
% \begin{macrocode}
%<*math>
\ProvidesFile{ix-math.def}%
- [2010/01/11 v1.6 Math list (inputenx)]%
+ [2011/04/10 v1.8 Math list (inputenx)]%
\edef\RestoreAtCatcode{\catcode64=\the\catcode64\relax}
\makeatletter
% \end{macrocode}
@@ -10228,7 +10384,7 @@ and the derived files
% defined by standard \LaTeX\ without extra packages.
% \begin{macrocode}
%<*licrcmds>
- % List of known LICR commdands of inputenx 2010/01/11 v1.6
+ % List of known LICR commdands of inputenx 2011/04/10 v1.8
%
% Format: \LICRcmd{<command>}{<type>}
% Types:
@@ -10337,7 +10493,7 @@ and the derived files
%
% \begin{macrocode}
%<*dfudoc>
- % inputenx-utf8enc.txt 2010/01/11 v1.6
+ % inputenx-utf8enc.txt 2011/04/10 v1.8
% Commented additions for utf8enc.dfu
% \end{macrocode}
@@ -10396,7 +10552,7 @@ and the derived files
\DeclareUnicodeCharacter{0122}{\c G}
% LATIN CAPITAL LETTER G WITH CEDILLA
-\DeclareUnicodeCharacter{0123}{\v g}
+\DeclareUnicodeCharacter{0123}{\c g}
% LATIN SMALL LETTER G WITH CEDILLA
\DeclareUnicodeCharacter{0124}{\^H}
@@ -10524,6 +10680,99 @@ and the derived files
\DeclareUnicodeCharacter{0177}{\^y}
% LATIN SMALL LETTER Y WITH CIRCUMFLEX
+\DeclareUnicodeCharacter{01CD}{\v A}
+ % LATIN CAPITAL LETTER A WITH CARON
+
+\DeclareUnicodeCharacter{01CE}{\v a}
+ % LATIN SMALL LETTER A WITH CARON
+
+\DeclareUnicodeCharacter{01CF}{\v I}
+ % LATIN CAPITAL LETTER I WITH CARON
+
+\DeclareUnicodeCharacter{01D0}{\v\i}
+ % LATIN SMALL LETTER I WITH CARON
+
+\DeclareUnicodeCharacter{01D1}{\v O}
+ % LATIN CAPITAL LETTER O WITH CARON
+
+\DeclareUnicodeCharacter{01D2}{\v o}
+ % LATIN SMALL LETTER O WITH CARON
+
+\DeclareUnicodeCharacter{01D3}{\v U}
+ % LATIN CAPITAL LETTER U WITH CARON
+
+\DeclareUnicodeCharacter{01D4}{\v u}
+ % LATIN SMALL LETTER U WITH CARON
+
+\DeclareUnicodeCharacter{01E2}{\@tabacckludge=\AE}
+ % LATIN CAPITAL LETTER AE WITH MACRON
+
+\DeclareUnicodeCharacter{01E3}{\@tabacckludge=\ae}
+ % LATIN SMALL LETTER AE WITH MACRON
+
+\DeclareUnicodeCharacter{01E6}{\v G}
+ % LATIN CAPITAL LETTER G WITH CARON
+
+\DeclareUnicodeCharacter{01E7}{\v g}
+ % LATIN SMALL LETTER G WITH CARON
+
+\DeclareUnicodeCharacter{01E8}{\v K}
+ % LATIN CAPITAL LETTER K WITH CARON
+
+\DeclareUnicodeCharacter{01E9}{\v k}
+ % LATIN SMALL LETTER K WITH CARON
+
+\DeclareUnicodeCharacter{01F0}{\v\j}
+ % LATIN SMALL LETTER J WITH CARON
+
+\DeclareUnicodeCharacter{01F4}{\@tabacckludge'G}
+ % LATIN CAPITAL LETTER G WITH ACUTE
+
+\DeclareUnicodeCharacter{01F5}{\@tabacckludge'g}
+ % LATIN SMALL LETTER G WITH ACUTE
+
+\DeclareUnicodeCharacter{01F8}{\@tabacckludge`N}
+ % LATIN CAPITAL LETTER N WITH GRAVE
+
+\DeclareUnicodeCharacter{01F9}{\@tabacckludge`n}
+ % LATIN SMALL LETTER N WITH GRAVE
+
+\DeclareUnicodeCharacter{01FC}{\@tabacckludge'\AE}
+ % LATIN CAPITAL LETTER AE WITH ACUTE
+
+\DeclareUnicodeCharacter{01FD}{\@tabacckludge'\ae}
+ % LATIN SMALL LETTER AE WITH ACUTE
+
+\DeclareUnicodeCharacter{0226}{\.A}
+ % LATIN CAPITAL LETTER A WITH DOT ABOVE
+
+\DeclareUnicodeCharacter{0227}{\.a}
+ % LATIN SMALL LETTER A WITH DOT ABOVE
+
+\DeclareUnicodeCharacter{0228}{\c E}
+ % LATIN CAPITAL LETTER E WITH CEDILLA
+
+\DeclareUnicodeCharacter{0229}{\c e}
+ % LATIN SMALL LETTER E WITH CEDILLA
+
+\DeclareUnicodeCharacter{022E}{\.O}
+ % LATIN CAPITAL LETTER O WITH DOT ABOVE
+
+\DeclareUnicodeCharacter{022F}{\.o}
+ % LATIN SMALL LETTER O WITH DOT ABOVE
+
+\DeclareUnicodeCharacter{0232}{\@tabacckludge=Y}
+ % LATIN CAPITAL LETTER Y WITH MACRON
+
+\DeclareUnicodeCharacter{0232}{\@tabacckludge=y}
+ % LATIN SMALL LETTER Y WITH MACRON
+
+\DeclareUnicodeCharacter{0232}{\@tabacckludge=y}
+ % LATIN SMALL LETTER Y WITH MACRON
+
+\DeclareUnicodeCharacter{0237}{\j}
+ % LATIN SMALL LETTER DOTLESS J
+
\DeclareUnicodeCharacter{1E02}{\.B}
% LATIN CAPITAL LETTER B WITH DOT ABOVE
@@ -11387,6 +11636,7 @@ and the derived files
% ix-uc.def & tex/latex/oberdiek/ix-uc.def\\
% ix-utf8enc.dfu & tex/latex/oberdiek/ix-utf8enc.dfu\\
% x-ascii.def & tex/latex/oberdiek/x-ascii.def\\
+% x-verbatim.def & tex/latex/oberdiek/x-verbatim.def\\
% x-atarist.def & tex/latex/oberdiek/x-atarist.def\\
% x-iso-8859-1.def & tex/latex/oberdiek/x-iso-8859-1.def\\
% x-iso-8859-2.def & tex/latex/oberdiek/x-iso-8859-2.def\\
@@ -11690,6 +11940,21 @@ and the derived files
% \item
% Documentation added.
% \end{Version}
+% \begin{Version}{2011/02/08 v1.7}
+% \item
+% Encoding \xoption{x-verbatim} added.
+% \item
+% \cs{InputEncoding} saves and restores some catcodes for
+% reading the \xext{def} files.
+% \end{Version}
+% \begin{Version}{2011/04/10 v1.8}
+% \item
+% Fix for Unicode character U+0123 (g with cedilla)
+% (Thanks Zvi Gilboa).
+% \item
+% Some accented characters from set ``Latin Extended-B'' added to
+% \xfile{if-utf8enc.dfu}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/intcalc.dtx b/Master/texmf-dist/source/latex/oberdiek/intcalc.dtx
index 64bb14156b6..2e71d02103c 100644
--- a/Master/texmf-dist/source/latex/oberdiek/intcalc.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/intcalc.dtx
@@ -203,7 +203,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{3149}
+% \CheckSum{3221}
%
% \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
@@ -624,14 +624,18 @@ and the derived files
% \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 % @
- \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@intcalc.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -639,7 +643,6 @@ and the derived files
\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.}%
@@ -651,24 +654,27 @@ and the derived files
\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}%
@@ -687,34 +693,43 @@ and the derived files
\fi
\expandafter\x\csname ver@intcalc.sty\endcsname
\ProvidesPackage{intcalc}%
- [2007/09/27 v1.1 Expandable integer calculations (HO)]
+ [2007/09/27 v1.1 Expandable integer calculations (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 InCa@AtEnd\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\InCa@AtEnd{%
\InCa@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{33}{12}% !
\TMP@EnsureCode{40}{12}% (
@@ -725,9 +740,9 @@ and the derived files
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{11}% : (letter!)
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{63}{14}% ? (comment!)
+\edef\InCa@AtEnd{\InCa@AtEnd\noexpand\endinput}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname InCa@TestMode\endcsname\relax
\else
@@ -1335,9 +1350,8 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
- \InCa@AtEnd
- \expandafter\endinput
-\fi
+ \expandafter\InCa@AtEnd
+\fi%
% \end{macrocode}
%
% \subsection{Implementation without \eTeX}
@@ -3084,7 +3098,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\InCa@AtEnd
+\InCa@AtEnd%
% \end{macrocode}
%
% \begin{macrocode}
@@ -3151,6 +3165,22 @@ and the derived files
\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 intcalc.sty\relax}%
\fi
@@ -3161,15 +3191,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/kvdefinekeys.dtx b/Master/texmf-dist/source/latex/oberdiek/kvdefinekeys.dtx
index c63ca028a9d..53a9e5a7aac 100644
--- a/Master/texmf-dist/source/latex/oberdiek/kvdefinekeys.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/kvdefinekeys.dtx
@@ -76,7 +76,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: kvdefinekeys 2010/03/01 v1.0 Defining keys (HO)}
+\Msg{* Package: kvdefinekeys 2011/04/07 v1.3 Defining keys (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -152,7 +152,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{kvdefinekeys.drv}%
- [2010/03/01 v1.0 Defining keys (HO)]%
+ [2011/04/07 v1.3 Defining keys (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -161,7 +161,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{314}
+% \CheckSum{426}
%
% \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
@@ -182,7 +182,7 @@ and the derived files
% \GetFileInfo{kvdefinekeys.drv}
%
% \title{The \xpackage{kvdefinekeys} package}
-% \date{2010/03/01 v1.0}
+% \date{2011/04/07 v1.3}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -205,11 +205,19 @@ and the derived files
% \cs{setkeys}. This package adds macros to define keys, closing
% the gap \cs{kvsetkeys} leaves.
%
-% \begin{declcs}{kv@define@key}\,\M{family}\,\M{key},[\meta{default}]
+% \begin{declcs}{kv@define@key}\,\M{family}\,\M{key}\,[\meta{default}]\,^^A
+% \M{definition}
% \end{declcs}
% Macro \cs{kv@define@key} reimplements \xpackage{keyval}'s
-% \cs{define@key}. As difference to the original the defined keys
-% also allow \cs{par} inside values.
+% \cs{define@key}. Differences to the original:
+% \begin{itemize}
+% \item The defined keys also allow \cs{par} inside values.
+% \item Shorthands of package \xpackage{babel} are supported in
+% family and key names.
+% \item Macro \cs{kv@define@key} is made robust if
+% \hologo{eTeX}'s \cs{protected} or \hologo{LaTeX}'s
+% \cs{DeclareRobustCommand} are found.
+% \end{itemize}
%
% \StopEventually{
% }
@@ -223,14 +231,18 @@ and the derived files
% \end{macrocode}
% 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@kvdefinekeys.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -238,7 +250,6 @@ and the derived files
\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.}%
@@ -250,24 +261,27 @@ and the derived files
\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}%
@@ -286,35 +300,48 @@ and the derived files
\fi
\expandafter\x\csname ver@kvdefinekeys.sty\endcsname
\ProvidesPackage{kvdefinekeys}%
- [2010/03/01 v1.0 Defining keys (HO)]
+ [2011/04/07 v1.3 Defining keys (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 KVD@AtEnd\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\KVD@AtEnd{%
\KVD@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
+\TMP@EnsureCode{42}{12}% *
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\edef\KVD@AtEnd{\KVD@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Package loading}
@@ -322,7 +349,13 @@ and the derived files
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input ltxcmds.sty\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+ \TMP@RequirePackage{ltxcmds}[2010/03/01]%
\else
\RequirePackage{ltxcmds}[2010/03/01]%
\fi
@@ -333,7 +366,29 @@ and the derived files
%
% \begin{macro}{\kv@define@key}
% \begin{macrocode}
-\def\kv@define@key#1#2{%
+\ltx@IfUndefined{protected}{%
+ \ltx@IfUndefined{DeclareRobustCommand}{%
+ \def\kv@define@key#1#2%
+ }{%
+ \DeclareRobustCommand*{\kv@define@key}[2]%
+ }%
+}{%
+ \protected\def\kv@define@key#1#2%
+}%
+{%
+ \begingroup
+ \csname @safe@activestrue\endcsname
+ \let\ifincsname\iftrue
+ \edef\KVD@temp{\endgroup
+ \noexpand\KVD@DefineKey{#1}{#2}%
+ }%
+ \KVD@temp
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\KVD@DefineKey}
+% \begin{macrocode}
+\def\KVD@DefineKey#1#2{%
\ltx@ifnextchar[{%
\KVD@DefineKeyWithDefault{#1}{#2}%
}{%
@@ -355,7 +410,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\KVD@AtEnd
+\KVD@AtEnd%
%</package>
% \end{macrocode}
%
@@ -419,6 +474,22 @@ and the derived files
\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 kvdefinekeys.sty\relax}%
\fi
@@ -429,15 +500,20 @@ and the derived files
\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
@@ -644,6 +720,20 @@ and the derived files
% \item
% First version.
% \end{Version}
+% \begin{Version}{2010/08/19 v1.1}
+% \item
+% Documentation fix, no code change.
+% \end{Version}
+% \begin{Version}{2011/01/30 v1.2}
+% \item
+% Already loaded package files are not input in \hologo{plainTeX}.
+% \end{Version}
+% \begin{Version}{2011/04/07 v1.3}
+% \item
+% Support for package \xpackage{babel}'s shorthands added.
+% \item
+% \cs{kv@define@key} is made robust if available.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx b/Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx
index 2db04c9b7b1..29dc5f98fd3 100644
--- a/Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx
@@ -22,7 +22,8 @@
% kvoptions.sty, kvoptions.pdf, kvoptions.ins, kvoptions.drv,
% kvoptions-patch.sty, example-mycolorsetup.sty,
% kvoptions-test1.tex, kvoptions-test2.tex,
-% kvoptions-test3.tex.
+% kvoptions-test3.tex, kvoptions-test4.tex,
+% kvoptions-test4.sty.
%
% Distribution:
% CTAN:macros/latex/contrib/oberdiek/kvoptions.dtx
@@ -62,6 +63,8 @@
% TDS:doc/latex/oberdiek/test/kvoptions-test1.tex
% TDS:doc/latex/oberdiek/test/kvoptions-test2.tex
% TDS:doc/latex/oberdiek/test/kvoptions-test3.tex
+% TDS:doc/latex/oberdiek/test/kvoptions-test4.tex
+% TDS:doc/latex/oberdiek/test/kvoptions-test4.sty
% TDS:source/latex/oberdiek/kvoptions.dtx
%
%<*ignore>
@@ -79,7 +82,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: kvoptions 2010/02/22 v3.7 Keyval support for LaTeX options (HO)}
+\Msg{* Package: kvoptions 2010/12/23 v3.10 Keyval support for LaTeX options (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -112,7 +115,8 @@ and the derived files
kvoptions.sty, kvoptions.pdf, kvoptions.ins, kvoptions.drv,
kvoptions-patch.sty, example-mycolorsetup.sty,
kvoptions-test1.tex, kvoptions-test2.tex,
- kvoptions-test3.tex.
+ kvoptions-test3.tex, kvoptions-test4.tex,
+ kvoptions-test4.sty.
\endpreamble
\let\MetaPrefix\DoubleperCent
@@ -129,6 +133,8 @@ and the derived files
\file{kvoptions-test1.tex}{\from{kvoptions.dtx}{test1}}%
\file{kvoptions-test2.tex}{\from{kvoptions.dtx}{test2}}%
\file{kvoptions-test3.tex}{\from{kvoptions.dtx}{test3}}%
+ \file{kvoptions-test4.tex}{\from{kvoptions.dtx}{test4}}%
+ \file{kvoptions-test4.sty}{\from{kvoptions.dtx}{test4pkg}}%
}
\catcode32=13\relax% active space
@@ -159,7 +165,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{kvoptions.drv}%
- [2010/02/22 v3.7 Keyval support for LaTeX options (HO)]%
+ [2010/12/23 v3.10 Keyval support for LaTeX options (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -168,7 +174,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{2208}
+% \CheckSum{2361}
%
% \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
@@ -189,7 +195,7 @@ and the derived files
% \GetFileInfo{kvoptions.drv}
%
% \title{The \xpackage{kvoptions} package}
-% \date{2010/02/22 v3.7}
+% \date{2010/12/23 v3.10}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -330,6 +336,7 @@ and the derived files
% \begin{declcs}{SetupKeyvalOptions}\,\texttt{\{}\\
% \hspace{1.5em}|family|\,|=|\,\meta{family}|,|\\
% \hspace{1.5em}|prefix|\,|=|\,\meta{prefix}\\
+% \hspace{1.5em}|setkeys|\,|=|\,\meta{setkeys command}\\
% \texttt{\}}
% \end{declcs}
% This command allows to configure the default assumptions
@@ -351,9 +358,28 @@ and the derived files
% |prefix| & \meta{\cs{@currname}}|@| & (|foobar@|)
% & \cs{DeclareBoolOption} \\
% &&& \cs{DeclareStringOption} \\
-% &&& \cs{DeclareVoidOption}
+% &&& \cs{DeclareVoidOption} \\
+% \hline
+% \rule{0pt}{1.2\ht\csname @arstrutbox\endcsname}^^A
+% |setkeys| & \cs{setkeys} & (\cs{kvsetkeys})
+% & \cs{ProcessKeyvalOptions} \\
+% &&& \cs{ProcessLocalKeyvalOptions}
% \end{tabular}
% \end{quote}
+% Key |setkeys| was added in version 3.9. The original
+% \cs{setkeys} of package \xpackage{keyval} is not reentrant.
+% If an option is processed by this \cs{setkeys}, then
+% the option should not call \cs{setkeys} again with a
+% different family. Otherwise the next options of the
+% first \cs{setkeys} call are processed with the wrong
+% family. With key |setkeys| the macro \cs{kvsetkeys}
+% can be set that does not have the problem of the
+% original \cs{setkeys} of package {keyval}.
+%
+% Probably \cs{setkeys} of package \xpackage{xkeyval}
+% is safe in this respect. But I haven't made a full
+% analysis. At least it does not have the problem
+% of the original \cs{setkeys}.
%
% \subsection{Option declarations}
%
@@ -735,7 +761,7 @@ and the derived files
% Package identification
% -----------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{example-mycolorsetup}[2010/02/22 Managing my colors]
+\ProvidesPackage{example-mycolorsetup}[2010/12/23 Managing my colors]
\RequirePackage{ifpdf}
\RequirePackage{kvoptions}
@@ -898,19 +924,19 @@ and the derived files
% because of the cedilla |\c c|, it is not robust enough.
% \end{itemize}
% For users that do not want with this limitations the package
-% offers option \xoption{patch}. It patches \LaTeX's option system
+% offers package \xoption{kvoptions-patch}. It patches \LaTeX's option system
% and tries to teach it also to handle options that are given
% as pairs of key and value and to prevent expansion.
% It can already be used at the very beginning, before \cs{documentclass}:
% \begin{quote}
-% |\RequirePackage[patch]{kvoptions}|\\
+% |\RequirePackage{kvoptions-patch}|\\
% |\documentclass[pdfauthor=Fran\c coise M\"uller]{article}|\\
% |\usepackage{hyperref}|
% \end{quote}
% The latest time is before the package where you want to use
% problematic values:
% \begin{quote}
-% |\usepackage[patch]{kvoptions}|\\
+% |\usepackage{kvoptions-patch}|\\
% |\usepackage[Fran\c coise M\"uller]{hyperref}|
% \end{quote}
% Some remarks:
@@ -922,6 +948,10 @@ and the derived files
% works and will work without \eTeX.
% \item The code for the patch is quite long, there are many test
% cases. Thus the probability for bugs is probably not too small.
+% \item Since 2008/10/18 v3.0 package \xpackage{kvoptions-patch} is
+% available. Before option \xoption{patch} of package \xpackage{kvoptions}
+% must be used instead. I think, the solution as standalone package
+% \xpackage{kvoptions-patch} is cleaner and avoids option clashes.
% \end{itemize}
%
% \subsection{Option \xoption{debugshow}}
@@ -1045,14 +1075,18 @@ and the derived files
% \paragraph{Reload check and 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 % @
- \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@kvoptions.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -1060,7 +1094,6 @@ and the derived files
\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.}%
@@ -1072,24 +1105,27 @@ and the derived files
\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}%
@@ -1108,34 +1144,43 @@ and the derived files
\fi
\expandafter\x\csname ver@kvoptions.sty\endcsname
\ProvidesPackage{kvoptions}%
- [2010/02/22 v3.7 Keyval support for LaTeX options (HO)]
+ [2010/12/23 v3.10 Keyval support for LaTeX options (HO)]%
% \end{macrocode}
%
% \paragraph{Catcodes}
%
% \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 KVO@AtEnd\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\KVO@AtEnd{%
\KVO@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{1}{14}% ^^A (comment)
\TMP@EnsureCode{2}{14}% ^^A (comment)
@@ -1149,10 +1194,12 @@ and the derived files
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{94}{7}% ^ (superscript)
\TMP@EnsureCode{96}{12}% `
+\edef\KVO@AtEnd{\KVO@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \paragraph{External resources.}
@@ -1171,19 +1218,12 @@ and the derived files
% and uses \cs{comma@parse} of package \xpackage{kvsetkeys},
% version 1.3.
% \begin{macrocode}
+\RequirePackage{ltxcmds}[2010/12/02]
\RequirePackage{kvsetkeys}[2007/09/29]
% \end{macrocode}
%
% \paragraph{Provide macros for \plainTeX.}
% \begin{macrocode}
-\@ifundefined{@onelevel@sanitize}{%
- \def\@onelevel@sanitize#1{%
- \edef#1{\expandafter\strip@prefix\meaning#1}%
- }%
-}{}
-\@ifundefined{strip@prefix}{%
- \def\strip@prefix#1>{}%
-}{}
\@ifundefined{@x@protect}{%
\def\@x@protect#1\fi#2#3{%
\fi\protect#1%
@@ -1209,7 +1249,7 @@ and the derived files
% \begin{macrocode}
\DeclareOption{patch}{%
\AtEndOfPackage{%
- \RequirePackage{kvoptions-patch}[2010/02/22]%
+ \RequirePackage{kvoptions-patch}[2010/12/23]%
}%
}
% \end{macrocode}
@@ -1263,7 +1303,7 @@ and the derived files
\@currname.\@currext\endcsname{#1}%
}
\def\KVO@prefix{%
- \@ifundefined{KVO@prefix@\@currname.\@currext}{%
+ \ltx@ifundefined{KVO@prefix@\@currname.\@currext}{%
\@currname @%
}{%
\csname KVO@prefix@\@currname.\@currext\endcsname
@@ -1272,12 +1312,30 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \begin{macrocode}
+\define@key{KVO}{setkeys}{%
+ \expandafter\def\csname KVO@setkeys@%
+ \@currname.\@currext\endcsname{#1}%
+}
+% \end{macrocode}
+% \begin{macro}{\KVO@setkeys}
+% \begin{macrocode}
+\def\KVO@setkeys{%
+ \ltx@IfUndefined{KVO@setkeys@\@currname.\@currext}{%
+ \setkeys
+ }{%
+ \csname KVO@setkeys@\@currname.\@currext\endcsname
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\SetupKeyvalOptions}
% The argument of \cs{SetupKeyvalOptions} expects a key value
% list, known keys are \xoption{family} and \xoption{prefix}.
% \begin{macrocode}
\newcommand*{\SetupKeyvalOptions}{%
- \setkeys{KVO}%
+ \kvsetkeys{KVO}%
}
% \end{macrocode}
% \end{macro}
@@ -1413,7 +1471,7 @@ and the derived files
% \begin{macrocode}
\def\KVO@boolkey#1#2#3#4#5{%
\edef\KVO@param{#5}%
- \@onelevel@sanitize\KVO@param
+ \ltx@onelevel@sanitize\KVO@param
\ifx\KVO@param\KVO@true
\expandafter\@firstofone
\else
@@ -1447,13 +1505,13 @@ and the derived files
% \begin{macro}{\KVO@true}
% \begin{macro}{\KVO@false}
% The macros \cs{KVO@true} and \cs{KVO@false} are used
-% for string comparisons. After \cs{@onelevel@sanitize}
+% for string comparisons. After \cs{ltx@onelevel@sanitize}
% we have only tokens with catcode 12 (other).
% \begin{macrocode}
\def\KVO@true{true}
\def\KVO@false{false}
-\@onelevel@sanitize\KVO@true
-\@onelevel@sanitize\KVO@false
+\ltx@onelevel@sanitize\KVO@true
+\ltx@onelevel@sanitize\KVO@false
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1509,7 +1567,7 @@ and the derived files
%
% \begin{macro}{\DeclareVoidOption}
% \begin{macrocode}
-\newcommand*{\DeclareVoidOption}[1]{%
+\newcommand*{\DeclareVoidOption}[2]{%
\begingroup
\let\next\@gobbletwo
\KVO@ifdefinable{\KVO@prefix#1}{%
@@ -1532,7 +1590,12 @@ and the derived files
}%
}%
\x
- \@namedef{\KVO@prefix#1}%
+ \begingroup
+ \toks@{#2}%
+ \expandafter\endgroup
+ \expandafter\def
+ \csname\KVO@prefix#1\expandafter\endcsname
+ \expandafter{\the\toks@}%
}%
}
\def\KVO@VOID@{@VOID@}
@@ -1625,7 +1688,7 @@ and the derived files
}
\newcommand*{\DisableKeyvalOption}[3][]{%
\begingroup
- \setkeys{KVOdyn}{#1}%
+ \kvsetkeys{KVOdyn}{#1}%
\def\x{\endgroup}%
\@ifundefined{KVO@action@\KVOdyn@action}{%
\PackageError{kvoptions}{%
@@ -1842,7 +1905,7 @@ and the derived files
}%
,%
}%
- \@onelevel@sanitize\KVO@CurrentOption
+ \ltx@onelevel@sanitize\KVO@CurrentOption
\else
\edef\KVO@temp{%
\KVO@temp
@@ -1885,7 +1948,7 @@ and the derived files
% \begin{macrocode}
\@ifundefined{KVO@default@\@currname.\@currext}{%
\ifx\KVO@Patch Y%
- \@onelevel@sanitize\CurrentOption
+ \ltx@onelevel@sanitize\CurrentOption
\fi
\ifx\@unusedoptionlist\@empty
\global\let\@unusedoptionlist\CurrentOption
@@ -1940,7 +2003,7 @@ and the derived files
}%
\edef\KVO@temp{\endgroup
\noexpand\KVO@calldefault{\the\toks\tw@}%
- \noexpand\setkeys{#1}{\the\toks@}%
+ \noexpand\KVO@setkeys{#1}{\the\toks@}%
}%
\KVO@temp
% \end{macrocode}
@@ -2025,7 +2088,7 @@ and the derived files
}%
\edef\KVO@temp{\endgroup
\noexpand\KVO@calldefault{\the\toks\tw@}%
- \noexpand\setkeys{#1}{\the\toks@}%
+ \noexpand\KVO@setkeys{#1}{\the\toks@}%
}%
\KVO@temp
% \end{macrocode}
@@ -2103,7 +2166,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\KVO@AtEnd
+\KVO@AtEnd%
%</package>
% \end{macrocode}
%
@@ -2112,28 +2175,37 @@ and the derived files
% \begin{macrocode}
%<*patch>
\NeedsTeXFormat{LaTeX2e}
-\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 KVO@AtEnd\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\KVO@AtEnd{%
\KVO@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{39}{12}% '
\TMP@EnsureCode{40}{12}% (
@@ -2145,18 +2217,14 @@ and the derived files
\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}% `
\TMP@EnsureCode{124}{12}% |
-\edef\KVO@AtEnd{%
- \KVO@AtEnd
- \noexpand\endinput
-}
+\edef\KVO@AtEnd{\KVO@AtEnd\noexpand\endinput}
\ProvidesPackage{kvoptions-patch}%
- [2010/02/22 v3.7 LaTeX patch for keyval options (HO)]%
+ [2010/12/23 v3.10 LaTeX patch for keyval options (HO)]%
% \end{macrocode}
%
% Check for \eTeX.
@@ -2167,7 +2235,7 @@ and the derived files
Package loading is aborted, because e-TeX is missing%
}%
\expandafter\KVO@AtEnd
-\fi
+\fi%
% \end{macrocode}
%
% Package \xpackage{etexcmds} for \cs{etex@unexpanded}.
@@ -2181,7 +2249,7 @@ and the derived files
before \string\documentclass%
}\@ehd
\expandafter\KVO@AtEnd
-\fi
+\fi%
% \end{macrocode}
%
% Check for package \xpackage{xkvltxp}.
@@ -2193,7 +2261,7 @@ and the derived files
Therefore package loading is aborted%
}%
\KVO@AtEnd
-}{}
+}{}%
% \end{macrocode}
%
% \begin{macrocode}
@@ -2652,7 +2720,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\KVO@AtEnd
+\KVO@AtEnd%
%</patch>
% \end{macrocode}
%
@@ -2724,6 +2792,22 @@ and the derived files
\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 kvoptions.sty\relax}%
\fi
@@ -2734,15 +2818,20 @@ and the derived files
\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
@@ -2805,7 +2894,7 @@ and the derived files
%<*test3>
\NeedsTeXFormat{LaTeX2e}
\makeatletter
-\RequirePackage{kvoptions}[2010/02/22]
+\RequirePackage{kvoptions}[2010/12/23]
\def\msg#{\immediate\write16}
\define@key{testfamily}{testkey}{%
\msg{[testfamily/testkey/#1]}%
@@ -2842,6 +2931,45 @@ and the derived files
%</test3>
% \end{macrocode}
%
+% \begin{macrocode}
+%<*test4pkg>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{kvoptions-test4}[2010/12/23 package for testing]
+\RequirePackage{kvoptions}[2010/12/23]
+\SetupKeyvalOptions{%
+ family=FOO,%
+ prefix=foo,%
+ setkeys=\kvsetkeys,%
+}
+\DeclareStringOption{str}
+\define@key{FOO}{set}{%
+ \setkeys{BAR}{strbar={#1}}%
+}
+\define@key{BAR}{strbar}{%
+ \def\foostr{[BAR:#1]}%
+}
+\ProcessKeyvalOptions*
+%</test4pkg>
+% \end{macrocode}
+% \begin{macrocode}
+%<*test4>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{kvoptions-test4.tex}[2010/12/23 test file]
+\RequirePackage[%
+ str=A,set=B,str=C,%
+]{kvoptions-test4}[2010/12/23]
+\def\TestExpected{C}
+\ifx\foostr\TestExpected
+ \typeout{* Test ok.}%
+\else
+ \typeout{* Result: [\foostr]}%
+ \typeout{* Expected: [\TestExpected]}%
+ \errmessage{Test failed!}%
+\fi
+\csname @@end\endcsname\end
+%</test4>
+% \end{macrocode}
+%
% \section{Installation}
%
% \subsection{Download}
@@ -2908,6 +3036,8 @@ and the derived files
% test/kvoptions-test1.tex & doc/latex/oberdiek/test/kvoptions-test1.tex\\
% test/kvoptions-test2.tex & doc/latex/oberdiek/test/kvoptions-test2.tex\\
% test/kvoptions-test3.tex & doc/latex/oberdiek/test/kvoptions-test3.tex\\
+% test/kvoptions-test4.tex & doc/latex/oberdiek/test/kvoptions-test4.tex\\
+% test/kvoptions-test4.sty & doc/latex/oberdiek/test/kvoptions-test4.sty\\
% kvoptions.dtx & source/latex/oberdiek/kvoptions.dtx\\
% \end{tabular}^^A
% }^^A
@@ -3177,6 +3307,21 @@ and the derived files
% \item
% Missing space in error message added.
% \end{Version}
+% \begin{Version}{2010/07/23 v3.8}
+% \item
+% Documenation for package \xpackage{kvoptions-patch} improved.
+% No code changes.
+% \end{Version}
+% \begin{Version}{2010/12/02 v3.9}
+% \item
+% Key \texttt{setkeys} added for \cs{SetupKeyvalOptions}.
+% \end{Version}
+% \begin{Version}{2010/12/23 v3.10}
+% \item
+% \cs{DeclareVoidOption} also parses the second parameter as
+% \hologo{TeX} argument to improve compatibility with
+% \cs{DeclareOption}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx b/Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx
index 24852f67ff1..93b11f8ea17 100644
--- a/Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/kvsetkeys.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2006, 2007, 2009, 2010 by
+% Copyright (C) 2006, 2007, 2009-2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -80,7 +80,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: kvsetkeys 2010/03/01 v1.9 Key value parser (HO)}
+\Msg{* Package: kvsetkeys 2011/04/07 v1.13 Key value parser (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -91,7 +91,7 @@
This is a generated file.
-Copyright (C) 2006, 2007, 2009, 2010 by
+Copyright (C) 2006, 2007, 2009-2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -161,7 +161,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{kvsetkeys.drv}%
- [2010/03/01 v1.9 Key value parser (HO)]%
+ [2011/04/07 v1.13 Key value parser (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -170,7 +170,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1135}
+% \CheckSum{1265}
%
% \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
@@ -191,7 +191,7 @@ and the derived files
% \GetFileInfo{kvsetkeys.drv}
%
% \title{The \xpackage{kvsetkeys} package}
-% \date{2010/03/01 v1.9}
+% \date{2011/04/07 v1.13}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -334,6 +334,13 @@ and the derived files
% \hspace*{1.5em}\meta{processor}\,\M{key}\,\M{value}
% \end{quote}
%
+% \begin{declcs}{kv@break}
+% \end{declcs}
+% Since version 2011/03/03 v1.11 \cs{kv@break} can be
+% called inside the \meta{processor}
+% of \cs{kv@parse} or \cs{kv@parse@normalized}, then
+% the processing is stopped and the following entries discarded.
+%
% \subsection{Processing key value pairs}
%
% \begin{declcs}{kv@processor@default}\,\M{family}\,\M{key}\,\M{value}
@@ -344,7 +351,9 @@ and the derived files
% \xpackage{keyval}'s \cs{setkeys}.
% In case of unknown keys \cs{setkeys} raise an error.
% This processer, however, calls a handler instead, if it
-% is provided by the family.
+% is provided by the family. Both \meta{family} and \meta{key}
+% may contain package \xpackage{babel}'s shorthands
+% (since 2011/04/07 v1.13).
%
% The behaviour in pseudo code:
% \begin{quote}
@@ -418,6 +427,13 @@ and the derived files
% \end{quote}
% Also the entry is stored in the macro \cs{comma@entry}.
%
+% \begin{declcs}{comma@break}
+% \end{declcs}
+% Since version 2011/03/03 v1.11 \cs{comma@break} can be
+% called inside the \meta{processor}
+% of \cs{comma@parse} or \cs{comma@parse@normalized}, then
+% the processing is stopped and the following entries discarded.
+%
% \section{Example}
%
% The following example prints a short piece of HTML code using
@@ -486,14 +502,18 @@ and the derived files
% \end{macrocode}
% 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@kvsetkeys.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -501,7 +521,6 @@ and the derived files
\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.}%
@@ -513,24 +532,27 @@ and the derived files
\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}%
@@ -549,32 +571,41 @@ and the derived files
\fi
\expandafter\x\csname ver@kvsetkeys.sty\endcsname
\ProvidesPackage{kvsetkeys}%
- [2010/03/01 v1.9 Key value parser (HO)]
+ [2011/04/07 v1.13 Key value parser (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 KVS@AtEnd\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\KVS@AtEnd{%
\KVS@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{36}{3}% $
\TMP@EnsureCode{38}{4}% &
@@ -582,10 +613,12 @@ and the derived files
\TMP@EnsureCode{44}{12}% ,
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
-\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{94}{7}% ^ (superscript)
\TMP@EnsureCode{96}{12}% `
\TMP@EnsureCode{126}{13}% ~ (active)
+\edef\KVS@AtEnd{\KVS@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Package loading}
@@ -593,8 +626,14 @@ and the derived files
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input infwarerr.sty\relax
- \input etexcmds.sty\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+ \TMP@RequirePackage{infwarerr}[2007/09/09]%
+ \TMP@RequirePackage{etexcmds}[2010/01/28]%
\else
\RequirePackage{infwarerr}[2007/09/09]%
\RequirePackage{etexcmds}[2010/01/28]%
@@ -883,6 +922,7 @@ $ \expandafter\endgroup
}{%
\KVS@Process#1=\KVS@Nil{#3}%
}%
+ \KVS@MaybeBreak
\KVS@IfEmpty{#2}{%
}{%
\KVS@Parse#2\KVS@Nil{#3}%
@@ -896,6 +936,7 @@ $ \expandafter\endgroup
% |#3|: processor
% \begin{macrocode}
\long\def\KVS@Process#1=#2\KVS@Nil#3{%
+ \let\KVS@MaybeBreak\relax
\def\kv@key{#1}%
\KVS@IfEmpty{#2}{%
\let\kv@value\relax
@@ -922,6 +963,25 @@ $ \let\kv@value\KVS@Global
}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\KVS@MaybeBreak}
+% \begin{macrocode}
+\let\KVS@MaybeBreak\relax
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\KVS@break}
+% \begin{macrocode}
+\def\KVS@break#1#2#3#4{%
+ \let\KVS@MaybeBreak\relax
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\kv@break}
+% \begin{macrocode}
+\def\kv@break{%
+ \let\KVS@MaybeBreak\KVS@break
+}
+% \end{macrocode}
+% \end{macro}
%
% \subsection{Parsing comma lists}
%
@@ -954,6 +1014,7 @@ $ \let\kv@value\KVS@Global
\def\comma@entry{#1}%
#3{#1}%
}%
+ \KVS@MaybeBreak
\KVS@IfEmpty{#2}{%
}{%
\KVS@CommaParse#2\KVS@Nil{#3}%
@@ -961,12 +1022,32 @@ $ \let\kv@value\KVS@Global
}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\comma@break}
+% \begin{macrocode}
+\def\comma@break{%
+ \let\KVS@MaybeBreak\KVS@break
+}
+% \end{macrocode}
+% \end{macro}
%
% \subsection{Processing key value pairs}
%
% \begin{macro}{\kv@processor@default}
% \begin{macrocode}
-\long\def\kv@processor@default#1#2#3{%
+\def\kv@processor@default#1#2{%
+ \begingroup
+ \csname @safe@activestrue\endcsname
+ \let\ifincsname\iftrue
+ \edef\KVS@temp{\endgroup
+ \noexpand\KVS@ProcessorDefault{#1}{#2}%
+ }%
+ \KVS@temp
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\KVS@ProcessorDefault}
+% \begin{macrocode}
+\long\def\KVS@ProcessorDefault#1#2#3{%
& \unless\ifcsname KV@#1@#2\endcsname
$ \begingroup\expandafter\expandafter\expandafter\endgroup
$ \expandafter\ifx\csname KV@#1@#2\endcsname\relax
@@ -998,15 +1079,12 @@ $ \expandafter\ifx\csname KV@#1@#2@default\endcsname\relax
%
% \begin{macro}{\kv@set@family@handler}
% \begin{macrocode}
-\def\kv@set@family@handler#1{%
- \KVS@SetFamilyHandler{#1}\@nil
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\KVS@SetFamilyHandler}
-% \begin{macrocode}
-\def\KVS@SetFamilyHandler#1\@nil#{%
- \expandafter\def\csname KVS@#1@handler\endcsname##1##2%
+\long\def\kv@set@family@handler#1#2{%
+ \begingroup
+ \csname @safe@activestrue\endcsname
+ \let\ifincsname\iftrue
+ \expandafter\endgroup
+ \expandafter\def\csname KVS@#1@handler\endcsname##1##2{#2}%
}
% \end{macrocode}
% \end{macro}
@@ -1034,6 +1112,7 @@ $ \expandafter\ifx\csname KV@#1@#2@default\endcsname\relax
#1 key `#3'%
}{%
The keyval family of the key `#3' is `#2'.\MessageBreak
+ The setting of the key is ignored because of the error.\MessageBreak
\MessageBreak
\@ehc
}%
@@ -1052,7 +1131,7 @@ $ \expandafter\ifx\csname KV@#1@#2@default\endcsname\relax
% \end{macro}
%
% \begin{macrocode}
-\KVS@AtEnd
+\KVS@AtEnd%
%</package>
% \end{macrocode}
%
@@ -1116,6 +1195,22 @@ $ \expandafter\ifx\csname KV@#1@#2@default\endcsname\relax
\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 kvsetkeys.sty\relax}%
\fi
@@ -1126,15 +1221,20 @@ $ \expandafter\ifx\csname KV@#1@#2@default\endcsname\relax
\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
@@ -1159,7 +1259,7 @@ $ \expandafter\ifx\csname KV@#1@#2@default\endcsname\relax
\makeatletter
\chardef\KVS@TestMode=1 %
\makeatother
-\usepackage{kvsetkeys}[2010/03/01]
+\usepackage{kvsetkeys}[2011/04/07]
%<noetex>\let\unexpanded\SavedUnexpanded
\usepackage{qstest}
\IncludeTests{*}
@@ -1659,6 +1759,26 @@ $ \expandafter\ifx\csname KV@#1@#2@default\endcsname\relax
% \item
% Support of \cs{par} inside values.
% \end{Version}
+% \begin{Version}{2011/01/30 v1.10}
+% \item
+% Already loaded package files are not input in \hologo{plainTeX}.
+% \end{Version}
+% \begin{Version}{2011/03/03 v1.11}
+% \item
+% \cs{kv@break} and \cs{comma@break} added.
+% \end{Version}
+% \begin{Version}{2011/04/05 v1.12}
+% \item
+% Error message with recovery action in help message
+% (request by GL).
+% \end{Version}
+% \begin{Version}{2011/04/07 v1.13}
+% \item
+% \cs{kv@processor@default} supports package \xpackage{babel}'s
+% shorthands.
+% \item
+% \cs{kv@set@family@handler} with shorthand support.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/letltxmacro.dtx b/Master/texmf-dist/source/latex/oberdiek/letltxmacro.dtx
index 794a76990ec..235a400ff57 100644
--- a/Master/texmf-dist/source/latex/oberdiek/letltxmacro.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/letltxmacro.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2008 by
+% Copyright (C) 2008, 2010 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -76,7 +76,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: letltxmacro 2008/06/24 v1.3 Let assignment for LaTeX macros (HO)}
+\Msg{* Package: letltxmacro 2010/09/02 v1.4 Let assignment for LaTeX macros (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -87,7 +87,7 @@
This is a generated file.
-Copyright (C) 2008 by
+Copyright (C) 2008, 2010 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -153,7 +153,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{letltxmacro.drv}%
- [2008/06/24 v1.3 Let assignment for LaTeX macros (HO)]%
+ [2010/09/02 v1.4 Let assignment for LaTeX macros (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -162,7 +162,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{844}
+% \CheckSum{987}
%
% \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
@@ -183,7 +183,7 @@ and the derived files
% \GetFileInfo{letltxmacro.drv}
%
% \title{The \xpackage{letltxmacro} package}
-% \date{2008/06/24 v1.3}
+% \date{2010/09/02 v1.4}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -235,6 +235,11 @@ and the derived files
% that are derived from \cs{SavedMacro}'s macro name. Macro \cs{Macro}
% can now be redefined without affecting \cs{SavedMacro}.
%
+% \begin{declcs}{GlobalLetLtxMacro} \M{new macro} \M{old macro}
+% \end{declcs}
+% Like \cs{LetLtxMacro}, but the \meta{new macro} is defined globally.
+% Since version 2010/09/02~v1.4.
+%
% \subsection{Supported macro definition commands}
%
% \begin{quote}
@@ -407,28 +412,37 @@ and the derived files
% \subsubsection{Catcodes and identification}
%
% \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 llm@AtEnd\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\llm@AtEnd{%
\llm@AtEnd
- \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}% )
@@ -437,11 +451,13 @@ and the derived files
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\edef\llm@AtEnd{%
\llm@AtEnd
\escapechar\the\escapechar\relax
+ \noexpand\endinput
}
\escapechar=92 % `\\
% \end{macrocode}
@@ -450,40 +466,59 @@ and the derived files
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{letltxmacro}%
- [2008/06/24 v1.3 Let assignment for LaTeX macros (HO)]
+ [2010/09/02 v1.4 Let assignment for LaTeX macros (HO)]
% \end{macrocode}
%
% \subsubsection{Main macros}
%
% \begin{macro}{\LetLtxMacro}
% \begin{macrocode}
-\newcommand*{\LetLtxMacro}[2]{%
+\newcommand*{\LetLtxMacro}{%
+ \llm@ModeLetLtxMacro{}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\GlobalLetLtxMacro}
+% \begin{macrocode}
+\newcommand*{\GlobalLetLtxMacro}{%
+ \llm@ModeLetLtxMacro\global
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\llm@ModeLetLtxMacro}
+% \begin{macrocode}
+\newcommand*{\llm@ModeLetLtxMacro}[3]{%
+ \edef\llm@escapechar{\the\escapechar}%
+ \escapechar=-1 %
\edef\reserved@a{%
\noexpand\protect
\expandafter\noexpand
- \csname\expandafter\@gobble\string#2 \endcsname
+ \csname\string#3 \endcsname
}%
- \ifx\reserved@a#2\relax
- \edef#1{%
+ \ifx\reserved@a#3\relax
+ #1\edef#2{%
\noexpand\protect
\expandafter\noexpand
- \csname\expandafter\@gobble\string#1 \endcsname
+ \csname\string#2 \endcsname
}%
- \expandafter\let
- \csname\expandafter\@gobble\string#1 \expandafter\endcsname
- \csname\expandafter\@gobble\string#2 \endcsname
+ #1\expandafter\let
+ \csname\string#2 \expandafter\endcsname
+ \csname\string#3 \endcsname
\expandafter\llm@LetLtxMacro
- \csname\expandafter\@gobble\string#1 \expandafter\endcsname
- \csname\expandafter\@gobble\string#2 \endcsname
+ \csname\string#2 \expandafter\endcsname
+ \csname\string#3 \endcsname{#1}%
\else
- \llm@LetLtxMacro{#1}{#2}%
+ \llm@LetLtxMacro{#2}{#3}{#1}%
\fi
+ \escapechar=\llm@escapechar\relax
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\llm@LetLtxMacro}
% \begin{macrocode}
-\def\llm@LetLtxMacro#1#2{%
+\def\llm@LetLtxMacro#1#2#3{%
+ \escapechar=92 %
\expandafter\llm@CheckParams\meaning#2:->\@nil{%
\begingroup
\def\@protected@testopt{%
@@ -512,7 +547,8 @@ and the derived files
\else
\edef\x{%
\noexpand\@testopt
- \expandafter\noexpand\csname\string#2\endcsname
+ \expandafter\noexpand
+ \csname\string#2\endcsname
}%
\expandafter\expandafter\expandafter\def
\expandafter\expandafter\expandafter\y
@@ -530,19 +566,21 @@ and the derived files
\else
\llm@protected\xdef\llm@GlobalTemp{%
\llm@testopt
- \expandafter\noexpand\csname\string#1\endcsname
+ \expandafter\noexpand
+ \csname\string#1\endcsname
{\the\toks@}%
}%
\fi
\expandafter\endgroup\ifx\llm@testopt\@empty
- \let#1=#2\relax
+ #3\let#1=#2\relax
\else
- \let#1=\llm@GlobalTemp
- \expandafter\let\csname\string#1\expandafter\endcsname
- \csname\string#2\endcsname
+ #3\let#1=\llm@GlobalTemp
+ #3\expandafter\let
+ \csname\string#1\expandafter\endcsname
+ \csname\string#2\endcsname
\fi
}{%
- \let#1=#2\relax
+ #3\let#1=#2\relax
}%
}
% \end{macrocode}
@@ -593,7 +631,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\llm@AtEnd
+\llm@AtEnd%
%</package>
% \end{macrocode}
%
@@ -642,7 +680,7 @@ and the derived files
\catcode`\%=14 %
\catcode`\ =10 %
\catcode13=5 %
- \RequirePackage{letltxmacro}[2008/06/24]\relax
+ \RequirePackage{letltxmacro}[2010/09/02]\relax
\RestoreCatcodes
}
\Test
@@ -663,7 +701,7 @@ and the derived files
\nofiles
\documentclass{minimal}
-\usepackage{letltxmacro}[2008/06/24]
+\usepackage{letltxmacro}[2010/09/02]
\usepackage{qstest}
\IncludeTests{*}
@@ -712,37 +750,59 @@ and the derived files
}
\begin{qstest}{robust}{robust}
- \DeclareRobustCommand*{\TestA}{Test}%
- \SaveA
- \TestDef{TestA}{\protect \TestA }%
- \CheckA
+ \begingroup
+ \DeclareRobustCommand*{\TestA}{Test}%
+ \SaveA
+ \TestDef{TestA}{\protect \TestA }%
+ \CheckA
+ \DeclareRobustCommand{\TestA}{Test}%
+ \SaveA
+ \TestDef{TestA}{\protect \TestA }%
+ \LetLtxMacro\TestB\TestA
+ \TestDef{TestB}{\protect \TestB }%
+ \TestEquals{TestB }{TestA }%
+ \CheckA
+ \GlobalLetLtxMacro\TestC\TestA
+ \CheckA
+ \endgroup
+ \TestDef{TestC}{\protect \TestC }%
\DeclareRobustCommand{\TestA}{Test}%
- \SaveA
- \TestDef{TestA}{\protect \TestA }%
- \LetLtxMacro\TestB\TestA
- \TestDef{TestB}{\protect \TestB }%
- \TestEquals{TestB }{TestA }%
- \CheckA
+ \TestEquals{TestC }{TestA }%
\end{qstest}
\begin{qstest}{default}{default}
- \newcommand{\TestA}[1][\relax default \empty]{TestA #1}%
- \SaveA
- \TestDef
- {TestA}{\@protected@testopt \TestA \\TestA {\relax default \empty }}%
- \LetLtxMacro\TestB\TestA
+ \begingroup
+ \newcommand{\TestA}[1][\relax default \empty]{TestA #1}%
+ \SaveA
+ \TestDef
+ {TestA}{\@protected@testopt \TestA \\TestA {\relax default \empty }}%
+ \LetLtxMacro\TestB\TestA
+ \TestDef
+ {TestB}{\@protected@testopt \TestB \\TestB {\relax default \empty }}%
+ \CheckA
+ \TestEquals{\string\TestB}{\string\TestA}%
+ \GlobalLetLtxMacro\TestC\TestA
+ \CheckA
+ \endgroup
\TestDef
- {TestB}{\@protected@testopt \TestB \\TestB {\relax default \empty }}%
- \CheckA
+ {TestC}{\@protected@testopt \TestC \\TestC {\relax default \empty }}%
+ \newcommand{\TestA}[1][\relax default \empty]{TestA #1}%
+ \TestEquals{\string\TestC}{\string\TestA}%
\end{qstest}
\begin{qstest}{robustdefault}{robustdefault}
- \DeclareRobustCommand{\TestA}[1][\default]{TestA}%
- \SaveA
- \LetLtxMacro\TestB\TestA
- \TestDef{TestB}{\protect \TestB }%
- \TestDef{TestB }{\@protected@testopt \TestB \\TestB {\default }}%
- \CheckA
+ \begingroup
+ \DeclareRobustCommand{\TestA}[1][\default]{TestA}%
+ \SaveA
+ \LetLtxMacro\TestB\TestA
+ \TestDef{TestB}{\protect \TestB }%
+ \TestDef{TestB }{\@protected@testopt \TestB \\TestB {\default }}%
+ \CheckA
+ \GlobalLetLtxMacro\TestC\TestA
+ \CheckA
+ \endgroup
+ \TestDef{TestC}{\protect \TestC }%
+ \TestDef{TestC }{\@protected@testopt \TestC \\TestC {\default }}%
\end{qstest}
\begin{qstest}{plain}{plain}
@@ -766,39 +826,62 @@ and the derived files
\usepackage{etoolbox}[2008/06/22]
\begin{qstest}{oldnewrobustcmd}{oldnewrobustcmd}
- \protected\edef\TestA{%
- \noexpand\@protected@testopt
- \noexpand\TestA
- \expandafter\noexpand\csname\string\TestA\endcsname
- {\noexpand\default}%
- }%
- \expandafter\protected\expandafter
- \def\csname\string\TestA\endcsname{TestA}%
- \SaveA
- \LetLtxMacro\TestB\TestA
- \TestDef{TestB}{\@protected@testopt \TestB \\TestB {\default }}%
+ \begingroup
+ \protected\edef\TestA{%
+ \noexpand\@protected@testopt
+ \noexpand\TestA
+ \expandafter\noexpand\csname\string\TestA\endcsname
+ {\noexpand\default}%
+ }%
+ \expandafter\protected\expandafter
+ \def\csname\string\TestA\endcsname{TestA}%
+ \SaveA
+ \LetLtxMacro\TestB\TestA
+ \TestDef{TestB}{\@protected@testopt \TestB \\TestB {\default }}%
+ \protected\edef\TestC{%
+ \noexpand\@protected@testopt
+ \noexpand\TestB
+ \expandafter\noexpand\csname\string\TestB\endcsname
+ {\noexpand\default}%
+ }%
+ \TestEquals{TestB}{TestC}%
+ \CheckA
+ \GlobalLetLtxMacro\TestD\TestA
+ \CheckA
+ \endgroup
+ \TestDef{TestD}{\@protected@testopt \TestD \\TestD {\default }}%
\protected\edef\TestC{%
\noexpand\@protected@testopt
- \noexpand\TestB
- \expandafter\noexpand\csname\string\TestB\endcsname
+ \noexpand\TestD
+ \expandafter\noexpand\csname\string\TestD\endcsname
{\noexpand\default}%
}%
- \TestEquals{TestB}{TestC}%
- \CheckA
+ \TestEquals{TestD}{TestC}%
\end{qstest}
\begin{qstest}{newrobustcmd}{newrobustcmd}
- \newrobustcmd{\TestA}[1][\default]{TestA}%
- \SaveA
- \LetLtxMacro\TestB\TestA
- \TestDef{TestB}{\@testopt \\TestB {\default }}%
+ \begingroup
+ \newrobustcmd{\TestA}[1][\default]{TestA}%
+ \SaveA
+ \LetLtxMacro\TestB\TestA
+ \TestDef{TestB}{\@testopt \\TestB {\default }}%
+ \protected\edef\TestC{%
+ \noexpand\@testopt
+ \expandafter\noexpand\csname\string\TestB\endcsname
+ {\noexpand\default}%
+ }%
+ \TestEquals{TestB}{TestC}%
+ \CheckA
+ \GlobalLetLtxMacro\TestD\TestA
+ \CheckA
+ \endgroup
+ \TestDef{TestD}{\@testopt \\TestD {\default }}%
\protected\edef\TestC{%
\noexpand\@testopt
- \expandafter\noexpand\csname\string\TestB\endcsname
+ \expandafter\noexpand\csname\string\TestD\endcsname
{\noexpand\default}%
}%
- \TestEquals{TestB}{TestC}%
- \CheckA
+ \TestEquals{TestD}{TestC}%
\end{qstest}
\begin{qstest}{robustifyopt}{robustifyopt}
@@ -1061,6 +1144,10 @@ and the derived files
% \item
% Test file adapted for etoolbox 2008/06/22 v1.6.
% \end{Version}
+% \begin{Version}{2010/09/02 v1.4}
+% \item
+% \cs{GlobalLetLtxMacro} added.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/listingsutf8.dtx b/Master/texmf-dist/source/latex/oberdiek/listingsutf8.dtx
index 1a0b0c944f1..d18433749aa 100644
--- a/Master/texmf-dist/source/latex/oberdiek/listingsutf8.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/listingsutf8.dtx
@@ -167,7 +167,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{253}
+% \CheckSum{285}
%
% \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
@@ -258,28 +258,37 @@ and the derived files
% \subsection{Catcodes and identification}
%
% \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 lstU@AtEnd\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\lstU@AtEnd{%
\lstU@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{10}{12}% ^^J
\TMP@EnsureCode{33}{12}% !
@@ -296,14 +305,15 @@ and the derived files
\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{94}{7}% ^ (superscript)
\TMP@EnsureCode{95}{8}% _ (subscript)
\TMP@EnsureCode{96}{12}% `
\TMP@EnsureCode{124}{12}% |
\TMP@EnsureCode{126}{13}% ~ (active)
-\g@addto@macro\lstU@AtEnd{\endinput}
+\edef\lstU@AtEnd{\lstU@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% Package identification.
@@ -355,10 +365,10 @@ and the derived files
\expandafter\lstU@AtEnd
\fi
}
-\lstU@temp{scantokens}{It is provided by e-TeX}
-\lstU@temp{pdf@unescapehex}{It is provided by pdfTeX >= 1.30}
-\lstU@temp{pdf@filedump}{It is provided by pdfTeX >= 1.30}
-\lstU@temp{pdf@filesize}{It is provided by pdfTeX >= 1.30}
+\lstU@temp{scantokens}{It is provided by e-TeX}%
+\lstU@temp{pdf@unescapehex}{It is provided by pdfTeX >= 1.30}%
+\lstU@temp{pdf@filedump}{It is provided by pdfTeX >= 1.30}%
+\lstU@temp{pdf@filesize}{It is provided by pdfTeX >= 1.30}%
% \end{macrocode}
%
% \begin{macrocode}
@@ -439,7 +449,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\lstU@AtEnd
+\lstU@AtEnd%
%</package>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx b/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx
index e5cfd20f7fb..6883c07be4a 100644
--- a/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2009, 2010 by
+% Copyright (C) 2009-2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -23,7 +23,9 @@
% This work consists of the main source file ltxcmds.dtx
% and the derived files
% ltxcmds.sty, ltxcmds.pdf, ltxcmds.ins, ltxcmds.drv,
-% ltxcmds-test1.tex, ltxcmds-test-gobble.tex.
+% ltxcmds-test1.tex, ltxcmds-test-gobble.tex,
+% ltxcmds-test-ifempty.tex, ltxcmds-test-zapspace.tex,
+% ltxcmds-test-ifboxempty.tex.
%
% Distribution:
% CTAN:macros/latex/contrib/oberdiek/ltxcmds.dtx
@@ -60,6 +62,9 @@
% TDS:doc/latex/oberdiek/ltxcmds.pdf
% TDS:doc/latex/oberdiek/test/ltxcmds-test1.tex
% TDS:doc/latex/oberdiek/test/ltxcmds-test-gobble.tex
+% TDS:doc/latex/oberdiek/test/ltxcmds-test-ifempty.tex
+% TDS:doc/latex/oberdiek/test/ltxcmds-test-zapspace.tex
+% TDS:doc/latex/oberdiek/test/ltxcmds-test-ifboxempty.tex
% TDS:source/latex/oberdiek/ltxcmds.dtx
%
%<*ignore>
@@ -77,7 +82,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: ltxcmds 2010/04/26 v1.7 LaTeX kernel commands for general use (HO)}
+\Msg{* Package: ltxcmds 2011/03/16 v1.18 LaTeX kernel commands for general use (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -88,7 +93,7 @@
This is a generated file.
-Copyright (C) 2009, 2010 by
+Copyright (C) 2009-2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -111,7 +116,9 @@ because some files are installed in TDS:tex/generic//.
This work consists of the main source file ltxcmds.dtx
and the derived files
ltxcmds.sty, ltxcmds.pdf, ltxcmds.ins, ltxcmds.drv,
- ltxcmds-test1.tex, ltxcmds-test-gobble.tex.
+ ltxcmds-test1.tex, ltxcmds-test-gobble.tex,
+ ltxcmds-test-ifempty.tex, ltxcmds-test-zapspace.tex,
+ ltxcmds-test-ifboxempty.tex.
\endpreamble
\let\MetaPrefix\DoubleperCent
@@ -124,6 +131,9 @@ and the derived files
\usedir{doc/latex/oberdiek/test}%
\file{ltxcmds-test1.tex}{\from{ltxcmds.dtx}{test1}}%
\file{ltxcmds-test-gobble.tex}{\from{ltxcmds.dtx}{test-gobble}}%
+ \file{ltxcmds-test-ifempty.tex}{\from{ltxcmds.dtx}{test-ifempty}}%
+ \file{ltxcmds-test-zapspace.tex}{\from{ltxcmds.dtx}{test-zapspace}}%
+ \file{ltxcmds-test-ifboxempty.tex}{\from{ltxcmds.dtx}{test-ifboxempty}}%
}
\catcode32=13\relax% active space
@@ -154,17 +164,19 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltxcmds.drv}%
- [2010/04/26 v1.7 LaTeX kernel commands for general use (HO)]%
+ [2011/03/16 v1.18 LaTeX kernel commands for general use (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\usepackage{zref-savepos}
+\usepackage{paralist}
+\hfuzz=1pt
\begin{document}
\DocInput{ltxcmds.dtx}%
\end{document}
%</driver>
% \fi
%
-% \CheckSum{1158}
+% \CheckSum{2029}
%
% \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
@@ -185,7 +197,7 @@ and the derived files
% \GetFileInfo{ltxcmds.drv}
%
% \title{The \xpackage{ltxcmds} package}
-% \date{2010/04/26 v1.7}
+% \date{2011/03/16 v1.18}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -235,10 +247,12 @@ and the derived files
% \begin{declcs}{ltx@zero} \TO 0\\
% \cs{ltx@one} \TO 1\\
% \cs{ltx@two} \TO 2\\
-% \cs{ltx@cclv} \TO 255
+% \cs{ltx@cclv} \TO 255\\
+% \cs{ltx@minusone} \TO -1
% \end{declcs}
-% These commands are numbers 0, 1, 2 and 255. They are not digits
-% and a space is not gobbled afterwards.
+% These commands are numbers 0, 1, 2, 255 and -1. They are not digits
+% and a space is not gobbled afterwards. Macro \cs{ltx@minusone}
+% is available since version 2010/12/12 v1.15.
%
% \subsection{Argument killers}
%
@@ -257,10 +271,22 @@ and the derived files
%
% \subsection{Argument grabbers}
%
-% \begin{declcs}{ltx@firstofone} \M{1} \TO \meta{1}\\
+% \begin{declcs}{ltx@firstofone} \M{1} \TO \meta{1}\\[1ex]
% \cs{ltx@firstoftwo} \M{1} \M{2} \TO \meta{1}\\
-% \cs{ltx@secondoftwo} \M{1} \M{2} \TO \meta{2}
+% \cs{ltx@secondoftwo} \M{1} \M{2} \TO \meta{2}\\[1ex]
+% \cs{ltx@firstofthree} \M{1} \M{2} \M{3} \TO \meta{1}\\
+% \cs{ltx@secondofthree} \M{1} \M{2} \M{3} \TO \meta{2}\\
+% \cs{ltx@thirdofthree} \M{1} \M{2} \M{3} \TO \meta{3}\\
+% \cs{ltx@firstoffour} \M{1} \M{2} \M{3} \M{4} \TO \meta{1}\\
+% \cs{ltx@secondoffour} \M{1} \M{2} \M{3} \M{4} \TO \meta{2}\\
+% \cs{ltx@thirdoffour} \M{1} \M{2} \M{3} \M{4} \TO \meta{3}\\
+% \cs{ltx@fourthoffour} \M{1} \M{2} \M{3} \M{4} \TO \meta{4}
% \end{declcs}
+% Macros \cs{ltx@firstofthree}, \cs{ltx@secondofthree}
+% and \cs{ltx@thirdofthree} were added in version
+% 2010/11/12 v1.11.
+% Macros \cs{ltx@firstoffour}, \dots, \cs{ltx@forthoffour}
+% were added in version 2011/02/04 v1.16.
%
% \subsection{List helpers}
%
@@ -315,7 +341,9 @@ and the derived files
% \cs{ltx@percentchar} \TO \texttt{\%}\\
% \cs{ltx@backslashchar} \TO
% \makeatletter\texttt{\@backslashchar}\\
-% \cs{ltx@hashchar} \TO \texttt{\#}
+% \cs{ltx@hashchar} \TO \texttt{\#}\qquad(since v1.7)\\
+% \cs{ltx@leftbracechar} \TO \texttt{\textbraceleft}\qquad(since v1.8)\\
+% \cs{ltx@rightbracechar} \TO \texttt{\textbraceright}\qquad(since v1.8)
% \end{declcs}
%
% \subsection{Boolean switch}
@@ -326,6 +354,13 @@ and the derived files
% Unlike \plainTeX's \cs{newif}, \cs{ltx@newif} is not \cs{outer}.
% The command \meta{cmd} must start with the two characters |if|.
%
+% \begin{declcs}{ltx@newglobalif} \M{cmd}
+% \end{declcs}
+% \cs{ltx@newglobalif} defines a new boolean switch \meta{cmd}
+% like \cs{ltx@newif}. However the switch setting commands,
+% \meta{cmd} without the prefix |if| and followed by |true| or |false|
+% are acting globally.
+%
% \subsection{Command definitions}
%
% \begin{declcs}{ltx@ifundefined} \M{cmd} \M{yes} \M{no}
@@ -364,6 +399,14 @@ and the derived files
% macro \cs{ltx@StripPrefix} expands the next token
% once before stripping the prefix.
%
+% \begin{declcs}{ltx@onelevel@sanitize} \M{macro}
+% \end{declcs}
+% Macro \cs{ltx@onelevel@sanitize} provides \hologo{LaTeX}'s
+% \cs{@onelevel@sanitize}. The macro is expanded once and
+% the contents is converted to characters with catcode 12 (other)
+% and space tokens with catcode 10 (space). Then then sanitized
+% contents is stored into the macro again. Since version 1.12.
+%
% \subsection{File management}
%
% All macros in this section are expandable like
@@ -375,20 +418,21 @@ and the derived files
% \begin{declcs}{ltx@clsextension}\\
% \cs{ltx@pkgextension}
% \end{declcs}
-% If \cs{@clsextension}\slash\cs{@pkgextension} exists then
-% \cs{ltx@clsextension}\slash\cs{ltx@pkgextension}
-% returns this macro, otherwise the result is |cls|\slash|sty|.
+% Macros \cs{ltx@clsextension} and \cs{ltx@styextension}
+% stores the strings |cls| and |sty|. In opposite to \hologo{LaTeX}'s
+% \cs{@clsextension} and \cs{@styextension} they can also be
+% used after |\begin{document}|.
%
% \subsubsection{Load check}
%
% \begin{declcs}{ltx@ifclassloaded} \M{class} \M{yes} \M{no}\\
% \cs{ltx@ifpackageloaded} \M{package} \M{yes} \M{no}
% \end{declcs}
-% If the \meta{class}\slash\meta{package} are loaded the
-% macros \cs{ltx@ifclassloaded}\slash\cs{ltx@ifpackageloaded}
-% call the \meta{yes} argument. Otherwise \meta{no} is executed.
+% Macros \cs{ltx@ifclassloaded}\slash\cs{ltx@ifpackageloaded}
+% execute \meta{yes}, if the \meta{class} or \meta{package} is loaded,
+% otherwise \meta{no} is called.
% Both \meta{class} and \meta{package} are specified without
-% extension.
+% extension. The macros can also be used after |\begin{document}|.
%
% \begin{declcs}{ltx@iffileloaded} \M{file} \M{yes} \M{no}
% \end{declcs}
@@ -434,7 +478,8 @@ and the derived files
% \end{declcs}
% The \meta{addition} is appended to the parameterless macro \meta{cmd}.
% If \meta{cmd} is undefined or has the meaning \cs{relax}, then
-% it will be initialized as empty macro before.
+% it will be initialized as empty macro before. Due to a bug \meta{addition}
+% must not contain \cs{par} before version 2010/10/25 v1.9.
%
% \subsection{Macro \cs{ltx@ifnextchar}}
%
@@ -448,15 +493,83 @@ and the derived files
% \begin{declcs}{ltx@leavevmode}
% \end{declcs}
% Macro \cs{ltx@leavevmode} calls \hologo{pdfTeX}'s \cs{quitvmode}.
-% Otherwise it uses \cs{leavevmode} and defines it if necessary.
+% Otherwise \cs{leavevmode} is used and defined if it is necessary.
%
% \begin{declcs}{ltx@mbox}
% \end{declcs}
% Macro \cs{ltx@mbox} reimplements \cs{mbox} with two changes.
-% It uses \cs{ltx@leavevmode} instead of \cs{leavevmode} and
+% Instead of \cs{leavevmode} it uses \cs{ltx@leavevmode} and
% stops right after \cs{hbox}. Especially it does not grab
% the argument and allows the extended syntax of \cs{hbox}.
%
+% \subsection{Expandable test for emptiness}
+%
+% \begin{declcs}{ltx@ifempty} \M{stuff} \M{yes} \M{no}
+% \end{declcs}
+% Macro \cs{ltx@ifempty} checks in exact two expansion steps
+% whether \meta{stuff}
+% is empty or contains token. Depending on the result
+% \meta{yes} or \meta{no} is executed. The token in \meta{stuff}
+% may contain \cs{par} and unmatched conditionals (\cs{if}, \cs{else},
+% \cs{fi}, \dots). Since version 2010/11/12 v1.11.
+%
+% \begin{declcs}{ltx@ifblank} \M{stuff} \M{yes} \M{no}
+% \end{declcs}
+% Macro \cs{ltx@ifblank} tests in exact two expansion steps
+% if \meta{stuff} is empty or contain only blank spaces.
+% In this case argument \meta{yes} is called. If \meta{stuff}
+% contains other tokens than spaces then \meta{no} is executed.
+% Since version 2010/12/04 v1.13.
+%
+% \subsection{Stripping spaces}
+%
+% \begin{declcs}{ltx@zapspace} \M{stuff}
+% \end{declcs}
+% Macro \cs{ltx@zapspace} strips spaces from \meta{stuff}
+% that are not hidden inside curly braces. Like \hologo{LaTeX}'s
+% \cs{zap@space} it is expandable. Differences:
+% \begin{itemize}
+% \item
+% Syntax: \cs{zap@space} also expects a space token
+% and \cs{@empty} after \meta{stuff}.
+% \item
+% Macro \cs{ltx@zapspace} is expandable in exact two
+% expansion steps.
+% \item
+% Macro \cs{ltx@zapspace} always retains curly braces.
+% \item
+% Macro \cs{zap@space} has a bug. It stops stripping spaces
+% after a token group in curly braces if the first two tokens
+% inside the group are equal.
+% \item
+% Macro \cs{ltx@zapspace} also works with \cs{par}
+% and conditionals (\cs{if}, \cs{else}, \cs{fi}, \dots).
+% \end{itemize}
+% Macro \cs{ltx@zapspace} is available since version
+% 2010/12/07 v1.14.
+%
+% \subsection{Check for emptiness of boxes}
+%
+% \begin{declcs}{ltx@IfBoxEmpty} \M{box register number}
+% \M{yes} \M{no}
+% \end{declcs}
+% Macro \cs{ltx@IfBoxEmpty} calls \meta{yes} if
+% the box exists (\cs{ifvoid} returns false) and the box
+% does not contain any content. Otherwise if the box
+% is void or contains something, then \meta{no} is executed.
+% Thus being empty means that the box exists and is either
+% an \cs{hbox} or a \cs{vbox} and may even have dimensions other than
+% 0.0\,pt, but the box does not contain anything.
+% Macro \cs{ltx@IfBoxEmpty} is available since 2010/02/04 v1.16.
+%
+% \begin{declcs}{ltx@IfBoxVoidOrEmpty} \M{box register number}
+% \M{yes} \M{no}
+% \end{declcs}
+% Macro \cs{ltx@IfBoxVoidOrEmpty} calls \meta{yes} if
+% the box is either void or does not contain any content.
+% Otherwise \meta{no} is executed.
+% Macro \cs{ltx@IfBoxVoidOrEmpty} is available since 2010/02/04 v1.16.
+%
% \StopEventually{
% }
%
@@ -469,14 +582,18 @@ and the derived files
% \end{macrocode}
% 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@ltxcmds.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -484,7 +601,6 @@ and the derived files
\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.}%
@@ -496,24 +612,27 @@ and the derived files
\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}%
@@ -532,46 +651,57 @@ and the derived files
\fi
\expandafter\x\csname ver@ltxcmds.sty\endcsname
\ProvidesPackage{ltxcmds}%
- [2010/04/26 v1.7 LaTeX kernel commands for general use (HO)]
+ [2011/03/16 v1.18 LaTeX kernel commands for general use (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 LTXcmds@AtEnd\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\LTXcmds@AtEnd{%
\LTXcmds@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
+\TMP@EnsureCode{36}{3}% $
+\TMP@EnsureCode{38}{4}% &
\TMP@EnsureCode{40}{12}% (
\TMP@EnsureCode{41}{12}% )
\TMP@EnsureCode{45}{12}% -
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{91}{12}% [
\TMP@EnsureCode{96}{12}% `
\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{94}{12}% ^ (superscript) (!)
\TMP@EnsureCode{124}{12}% |
+\edef\LTXcmds@AtEnd{\LTXcmds@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Numbers}
@@ -602,6 +732,14 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ltx@minusone}
+% \begin{macrocode}
+\def\ltx@minusone{%
+ -\ltx@one
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Argument killers}
%
% \begin{macro}{\ltx@gobble}
@@ -631,8 +769,7 @@ and the derived files
\romannumeral
\csname ltx@zero%
\expandafter\LTXcmds@GobbleNum
- \romannumeral\expandafter\ltx@firstofone
- \expandafter{\LTXcmds@num#1}000{m\endcsname}%
+ \romannumeral\LTXcmds@num{#1}000{m\endcsname}%
}
% \end{macrocode}
% \end{macro}
@@ -669,6 +806,43 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ltx@firstofthree}
+% \begin{macrocode}
+\long\def\ltx@firstofthree#1#2#3{#1}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ltx@secondofthree}
+% \begin{macrocode}
+\long\def\ltx@secondofthree#1#2#3{#2}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ltx@thirdofthree}
+% \begin{macrocode}
+\long\def\ltx@thirdofthree#1#2#3{#3}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ltx@firstoffour}
+% \begin{macrocode}
+\long\def\ltx@firstoffour#1#2#3#4{#1}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ltx@secondoffour}
+% \begin{macrocode}
+\long\def\ltx@secondoffour#1#2#3#4{#2}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ltx@thirdoffour}
+% \begin{macrocode}
+\long\def\ltx@thirdoffour#1#2#3#4{#3}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ltx@fourthoffour}
+% \begin{macrocode}
+\long\def\ltx@fourthoffour#1#2#3#4{#4}%
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{List helpers}
%
% \begin{macro}{\ltx@car}
@@ -732,8 +906,7 @@ and the derived files
\romannumeral
\csname LTXcmds@CarNumFinish%
\expandafter\LTXcmds@CarNum
- \romannumeral\expandafter\ltx@firstofone
- \expandafter{\LTXcmds@num#1}000{x\endcsname}%
+ \romannumeral\LTXcmds@num{#1}000{x\endcsname}%
}
% \end{macrocode}
% \end{macro}
@@ -837,6 +1010,24 @@ and the derived files
}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\ltx@leftbracechar}
+% \begin{macrocode}
+\begingroup
+ \lccode`0=`\{\relax
+\lowercase{\endgroup
+ \def\ltx@leftbracechar{0}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ltx@rightbracechar}
+% \begin{macrocode}
+\begingroup
+ \lccode`0=`\}\relax
+\lowercase{\endgroup
+ \def\ltx@rightbracechar{0}%
+}
+% \end{macrocode}
+% \end{macro}
%
% \subsection{Boolean switch}
%
@@ -871,6 +1062,38 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ltx@newglobalif}
+% \begin{macrocode}
+\def\ltx@newglobalif#1{%
+ \begingroup
+ \escapechar=-1 %
+ \expandafter\endgroup
+ \expandafter\LTXcmds@newglobalif\string#1\@nil
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\LTXcmds@newglobalif}
+% \begin{macrocode}
+\begingroup
+ \escapechar=-1 %
+\expandafter\endgroup
+\expandafter
+\def\expandafter\LTXcmds@newglobalif\string\if#1\@nil{%
+ \expandafter\edef\csname#1true\endcsname{%
+ \global\let
+ \expandafter\noexpand\csname if#1\endcsname
+ \noexpand\iftrue
+ }%
+ \expandafter\edef\csname#1false\endcsname{%
+ \global\let
+ \expandafter\noexpand\csname if#1\endcsname
+ \noexpand\iffalse
+ }%
+ \csname#1false\endcsname
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Command definitions}
%
% \begin{macro}{\ltx@LocalExpandAfter}
@@ -958,6 +1181,17 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ltx@onelevel@sanitize}
+% \begin{macrocode}
+\def\ltx@onelevel@sanitize#1{%
+ \edef#1{%
+ \expandafter
+ \ltx@RemovePrefix\meaning#1%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{File management}
%
% \subsubsection{File extensions}
@@ -1042,7 +1276,7 @@ and the derived files
% \begin{macro}{\ltx@ifclasslater}
% \begin{macrocode}
\def\ltx@ifclasslater#1{%
- \ltx@ifclasslater{#1.\ltx@clsextension}%
+ \ltx@iffilelater{#1.\ltx@clsextension}%
}
% \end{macrocode}
% \end{macro}
@@ -1090,15 +1324,17 @@ and the derived files
0%
\fi
}%
-}
% \end{macrocode}
% \end{macro}
+% \begin{macrocode}
+}
+% \end{macrocode}
%
% \subsection{Macro additions}
%
% \begin{macro}{\ltx@GlobalAppendToMacro}
% \begin{macrocode}
-\def\ltx@GlobalAppendToMacro#1#2{%
+\long\def\ltx@GlobalAppendToMacro#1#2{%
\ifx\ltx@undefined#1%
\let#1\ltx@empty
\else
@@ -1115,7 +1351,7 @@ and the derived files
% \end{macro}
% \begin{macro}{\ltx@LocalAppendToMacro}
% \begin{macrocode}
-\def\ltx@LocalAppendToMacro#1#2{%
+\long\def\ltx@LocalAppendToMacro#1#2{%
\global\let\LTXcmds@gtemp#1%
\ifx\ltx@undefined\LTXcmds@gtemp
\global\let\LTXcmds@gtemp\ltx@empty
@@ -1237,15 +1473,242 @@ and the derived files
% \begin{macro}{\LTXcmds@num}
% \begin{macrocode}
\ltx@IfUndefined{numexpr}{%
- \let\LTXcmds@num\number
+ \def\LTXcmds@num#1{%
+ \expandafter\ltx@firstofone\expandafter{%
+ \number#1%
+ }%
+ }%
}{%
- \let\LTXcmds@num\numexpr
+ \def\LTXcmds@num#1{%
+ \expandafter\ltx@firstofone\expandafter{%
+ \the\numexpr#1%
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Expandable test for emptiness}
+%
+% \begin{macrocode}
+\ltx@IfUndefined{detokenize}{%
+% \end{macrocode}
+%
+% \subsubsection{Vanilla \hologo{TeX}}
+%
+% \begin{macro}{\ltx@ifempty}
+% The macro is based on \cs{@ifempty} of Robert R. Schneck
+% \cite{ifempty:schneck}
+% and \cs{@ifnull} of Ulrich Diez \cite{ifnull:diez}.
+% There are three cases to consider:
+% \begin{compactenum}
+% \item |#1| is empty,
+% \item |#1| is not empty and the first token
+% is not a begingroup character,
+% \item |#1| starts with a begingroup character (catcode 1).
+% \end{compactenum}
+% \begin{macrocode}
+ \def\LTXcmds@temp#1{%
+ \long\def\ltx@ifempty##1{%
+ \romannumeral0%
+ \iffalse{\fi
+ \expandafter\ltx@gobble\expandafter{%
+ \expandafter{\string##1}%
+ \expandafter\ltx@gobble\string
+ }%
+ \expandafter\ltx@firstofthree\expandafter
+ {\iffalse}\fi
+ \expandafter#1\ltx@secondoftwo
+ }%
+ \expandafter#1\ltx@firstoftwo
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ltx@ifblank}
+% \begin{macrocode}
+ \long\def\ltx@ifblank##1{%
+ \romannumeral0%
+ \iffalse{\fi
+ \expandafter\expandafter\expandafter\ltx@gobble
+ \expandafter\expandafter\expandafter{%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\string\ltx@gobble##1.%
+ }%
+ \expandafter\ltx@gobble\string
+ }%
+ \expandafter\ltx@firstofthree\expandafter
+ {\iffalse}\fi
+ \expandafter#1\ltx@secondoftwo
+ }%
+ \expandafter#1\ltx@firstoftwo
+ }%
+ }%
+ \LTXcmds@temp{ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}{%
+% \end{macrocode}
+%
+% \subsubsection{With \cs{detokenize}}
+%
+% Ahmed Musa provided \cs{ifstrempty} using \cs{detokenize}
+% and \cs{pdfstrcmp} \cite{ifstrempty:musa}. Ulrich Diez, GL,
+% Heiko Oberdiek
+% improved it further by removing \cs{pdfstrcmp} and
+% taking three arguments
+% \cite{ifstrempty:diez1,ifstrempty:diez2,ifstrempty:diez3,^^A
+% ifstrempty:gl,ifstrempty:ho}.
+%
+% \begin{macro}{\ltx@ifempty}
+% \begin{macrocode}
+ \long\def\ltx@ifempty#1{%
+ \romannumeral%
+ \csname
+ LTXcmds@ifempty%
+ \ifcat$\detokenize{#1}$%
+ @%
+ \fi
+ \endcsname
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\LTXcmds@ifempty@}
+% \begin{macrocode}
+ \long\def\LTXcmds@ifempty@#1#2{0 #1}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\LTXcmds@ifempty}
+% \begin{macrocode}
+ \long\def\LTXcmds@ifempty#1#2{0 #2}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{\cs{ltx@ifblank}}
+%
+% \begin{macro}{\ltx@ifblank}
+% \begin{macrocode}
+ \long\def\ltx@ifblank#1{%
+ \romannumeral%
+ \csname
+ LTXcmds@ifempty%
+ \ifcat$\detokenize\expandafter{\ltx@gobble#1.}$%
+ @%
+ \fi
+ \endcsname
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+}
+% \end{macrocode}
+%
+% \subsection{\cs{ltx@zapspace}}
+%
+% \begin{macro}{\ltx@zapspace}
+% \begin{macrocode}
+\long\def\ltx@zapspace#1{%
+ \romannumeral
+ \LTXcmds@zapspace\ltx@zero#1 \@nil
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\LTXcmds@zapspace}
+% \begin{macrocode}
+\long\def\LTXcmds@zapspace#1 #2\@nil{%
+ \ltx@ifempty{#2}{%
+ #1%
+ }{%
+ \LTXcmds@zapspace#1#2\@nil
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{\cs{ltx@IfBoxEmpty}}
+%
+% In case of \hologo{eTeX} the test for an empty box
+% is done via \cs{lastnodetype} as suggested
+% by David Kastrup \cite{ifboxempty:dak}.
+% \begin{macrocode}
+\ltx@IfUndefined{lastnodetype}{%
+ \catcode`\$=9 %
+ \catcode`\&=14 %
+}{%
+ \catcode`\$=14 %
+ \catcode`\&=9 %
+}
+% \end{macrocode}
+% \begin{macro}{\ltx@IfBoxEmpty}
+% \begin{macrocode}
+\def\ltx@IfBoxEmpty#1{%
+ \ifvoid#1\relax
+ \expandafter\ltx@secondoftwo
+ \else
+% \end{macrocode}
+% Implementation using \hologo{eTeX}'s \cs{lastnodetype}.
+% \begin{macrocode}
+& \begingroup
+& \setbox\ltx@zero=\ifhbox#1\hbox\else\vbox\fi{%
+& \ifhmode\unhcopy\else\unvcopy\fi#1\relax
+& \expandafter
+& }%
+& \expandafter\endgroup
+& \ifnum\lastnodetype<\ltx@zero
+& \expandafter\expandafter\expandafter\ltx@firstoftwo
+& \else
+& \expandafter\expandafter\expandafter\ltx@secondoftwo
+& \fi
+% \end{macrocode}
+% Implementation without \hologo{eTeX} using a signature
+% at the beginning of the test box.
+% \begin{macrocode}
+$ \begingroup
+$ \setbox\ltx@zero=\ifhbox#1\hbox\else\vbox\fi{%
+$ \penalty\ltx@one
+$ \ifhmode\unhcopy\else\unvcopy\fi#1\relax
+$ \expandafter
+$ }%
+$ \ifnum\lastpenalty=\ltx@one
+% \end{macrocode}
+% Box 0 has been changed and is restored by
+% closing the group.
+% \begin{macrocode}
+$ \endgroup
+$ \begingroup
+$ \setbox\ltx@zero=\ifhbox#1\hbox\else\vbox\fi{%
+$ \penalty\ltx@two
+$ \ifhmode\unhcopy\else\unvcopy\fi#1\relax
+$ \expandafter
+$ }%
+$ \ifnum\lastpenalty=\ltx@two
+$ \def\next{\endgroup\expandafter\ltx@firstoftwo}%
+$ \else
+$ \def\next{\endgroup\expandafter\ltx@secondoftwo}%
+$ \fi
+$ \else
+$ \def\next{\endgroup\expandafter\ltx@secondoftwo}%
+$ \fi
+$ \next
+ \fi
}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ltx@IfBoxVoidOrEmpty}
% \begin{macrocode}
-\LTXcmds@AtEnd
+\def\ltx@IfBoxVoidOrEmpty#1{%
+ \ifvoid#1\relax
+ \expandafter\ltx@thirdoffour
+ \fi
+ \ltx@IfBoxEmpty{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\LTXcmds@AtEnd%
%</package>
% \end{macrocode}
%
@@ -1309,6 +1772,22 @@ and the derived files
\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 ltxcmds.sty\relax}%
\fi
@@ -1319,15 +1798,20 @@ and the derived files
\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
@@ -1338,7 +1822,7 @@ and the derived files
%</test1>
% \end{macrocode}
%
-% \section{Test \cs{ltx@GobbleNum}}
+% \subsection{Test \cs{ltx@GobbleNum}}
%
% \begin{macrocode}
%<*test-gobble>
@@ -1348,7 +1832,7 @@ and the derived files
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ltxcmds.sty\relax
\else
- \RequirePackage{ltxcmds}[2010/04/26]%
+ \RequirePackage{ltxcmds}[2011/03/16]%
\fi
\catcode`\@=11 %
\def\msg#{\immediate\write16}%
@@ -1402,6 +1886,16 @@ X=X\\
\Test{-1}abc=abc\\
\Test2\par\par\relax=\relax\\
+\begingroup
+ \count1=2 %
+ \Test{\count1}abc=c\\%
+\endgroup
+
+\ltx@IfUndefined{numexpr}{%
+}{%
+ \Test{1+1}abc=c\\%
+}
+
\msg{[Test \string\ltx@CdrNum]}%
\long\def\Test#1=#2\\{%
\edef\StrA{\ltx@CdrNum#1\@nil}%
@@ -1512,6 +2006,298 @@ X=%
%</test-gobble>
% \end{macrocode}
%
+% \subsection{Test \cs{ltx@ifempty}}
+%
+% \begin{macrocode}
+%<*test-ifempty>
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\errorcontextlines=1000 %
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input ltxcmds.sty\relax
+\else
+ \RequirePackage{ltxcmds}[2011/03/16]%
+\fi
+\def\msg#{\immediate\write16}
+\def\TestY{\Y}
+\def\TestN{\N}
+\msg{* \string\ltx@ifempty}
+\long\def\test#1{%
+ \begingroup
+ % Calculate expected test result via macro definition
+ \def\Stuff{#1}%
+ \ifx\Stuff\ltx@empty
+ \def\StuffEmpty{\Y}%
+ \else
+ \def\StuffEmpty{\N}%
+ \fi
+ % Test \ltx@ifempty
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter\TestEmpty
+ \expandafter\expandafter\expandafter{%
+ \ltx@ifempty{#1}{\Y}{\N}%
+ }%
+ \ifx\StuffEmpty\TestEmpty
+ \msg{* Test OK}%
+ \else
+ \ltx@IfUndefined{detokenize}{}{%
+ \msg{Stuff: [\detokenize{\Stuff}]}%
+ }%
+ \errmessage{Test failed!}%
+ \fi
+ \endgroup
+}
+\test{}
+\test{a}
+\test{abc}
+\test{\par}
+\test{ }
+\test{\if}
+\test{{\if}}
+\test{\else}
+\test{{\else}}
+\test{\fi}
+\test{{}\fi}
+\test{\or\ifcase}
+\test{{}}
+\test{{a}}
+\test{{}abc}
+\test{{\par}}
+\test{{}\par}
+% \end{macrocode}
+% \begin{macrocode}
+\def\SpaceTwo#1{%
+ \def\SpaceTwo{#1#1}%
+}\SpaceTwo{ }
+\msg{* \string\ltx@ifblank}
+\long\def\test#1{%
+ \begingroup
+ % Calculate expected test result via macro definition
+ \def\Stuff{#1}%
+ \ifx\Stuff\ltx@empty
+ \def\StuffEmpty{\Y}%
+ \else
+ \ifx\Stuff\ltx@space
+ \def\StuffEmpty{\Y}%
+ \else
+ \ifx\Stuff\SpaceTwo
+ \def\StuffEmpty{\Y}%
+ \else
+ \def\StuffEmpty{\N}%
+ \fi
+ \fi
+ \fi
+ % Test \ltx@ifblank
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter\TestEmpty
+ \expandafter\expandafter\expandafter{%
+ \ltx@ifblank{#1}{\Y}{\N}%
+ }%
+ \ifx\StuffEmpty\TestEmpty
+ \msg{* Test OK}%
+ \else
+ \ltx@IfUndefined{detokenize}{}{%
+ \msg{Stuff: [\detokenize{\Stuff}]}%
+ }%
+ \errmessage{Test failed!}%
+ \fi
+ \endgroup
+}
+\test{}
+\test{a}
+\test{\if}
+\test{\else}
+\test{\fi}
+\test{ \fi}
+\test{\par}
+\test{ \par}
+\test{{}}
+\test{ {}}
+\def\x#1{%
+ \test{#1#1}%
+ \test{#1#1{}}%
+ \test{#1#1\par}%
+ \test{#1#1\else}%
+}\x{ }
+\csname @@end\endcsname\end
+%</test-ifempty>
+% \end{macrocode}
+%
+% \subsection{Test \cs{ltx@zap@space}}
+%
+% \begin{macrocode}
+%<*test-zapspace>
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\errorcontextlines=1000 %
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input ltxcmds.sty\relax
+\else
+ \RequirePackage{ltxcmds}[2011/03/16]%
+\fi
+\def\msg#{\immediate\write16}
+\def\space{ }
+\def\empty{}
+\msg{* \string\ltx@zapspace}
+\long\def\test#1#2{%
+ \begingroup
+ \def\TestInput{#1}%
+ \def\TestExpected{#2}%
+ % Test \ltx@zapspace
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter\TestResult
+ \expandafter\expandafter\expandafter{%
+ \ltx@zapspace{#1}%
+ }%
+ \ifx\TestResult\TestExpected
+ \msg{* Test OK}%
+ \else
+ \ltx@onelevel@sanitize\TestInput
+ \ltx@onelevel@sanitize\TestExpected
+ \ltx@onelevel@sanitize\TestResult
+ \msg{* Input: \space\space\space[\TestInput]}%
+ \msg{ \space Result: \space\space[\TestResult]}%
+ \msg{ \space Expected: [\TestExpected]}%
+ \errmessage{Test failed!}%
+ \fi
+ \endgroup
+}
+\long\def\etest#1#2{%
+ \begingroup
+ \edef\x{\endgroup
+ \noexpand\test{#1}{#2}%
+ }%
+ \x
+}
+\catcode`\~=13 %
+\let~\noexpand
+% \end{macrocode}
+% \begin{macrocode}
+\test{}{}
+\test{{}}{{}}
+\test{ {}}{{}}
+\test{{ }}{{ }}
+\test{{} }{{}}
+\test{ {} }{{}}
+\test{ { } }{{ }}
+\test{a {b} c}{a{b}c}
+\test{a bb ccc}{abbccc}
+\test{{a} {bb} {ccc}}{{a}{bb}{ccc}}
+\test{\par}{\par}
+\test{\if}{\if}
+\test{\space}{\space}
+\etest{\par\space\par}{\par\par}
+\etest{~\empty\space~\empty}{~\empty~\empty}
+\etest{~\fi\space~\else\space}{~\fi~\else}
+% \end{macrocode}
+% \begin{macrocode}
+\csname @@end\endcsname\end
+%</test-zapspace>
+% \end{macrocode}
+%
+% \subsection{Test \cs{ltx@IfBoxEmpty}}
+%
+% \begin{macrocode}
+%<*test-ifboxempty>
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input ltxcmds.sty\relax
+\else
+ \RequirePackage{ltxcmds}[2011/03/16]%
+\fi
+\def\msg#{\immediate\write16}
+ % make box 0 void
+\begingroup
+ \setbox0=\box0 %
+\endgroup
+\ifvoid0 %
+\else
+ \errmessage{Voiding box 0 failed}%
+\fi
+\setbox2=\box0 %
+\def\test#1#2{%
+ \@test{#1}{#2}%
+ \@@test{#1}{#2}%
+ \chardef\x=#1%
+ \@test\x{#2}%
+ \@@test\x{#2}%
+}
+\def\@test#1#2{%
+ \begingroup
+ \setbox9=\hbox{%
+ \def\TestExpected{#2}%
+ \ltx@IfBoxEmpty{#1}{%
+ \def\TestResult{Y}%
+ }{%
+ \def\TestResult{N}%
+ }%
+ \ifx\TestExpected\TestResult
+ \msg{* Test passed.}%
+ \else
+ \errmessage{Test failed!}%
+ \fi
+ }%
+ \ifdim\wd9=0pt %
+ \else
+ \errmessage{Unwanted space?}%
+ \fi
+ \endgroup
+}
+\def\@@test#1#2{%
+ \begingroup
+ \setbox9=\hbox{%
+ \def\TestExpected{#2}%
+ \ifvoid#1\def\TestExpected{Y}\fi
+ \ltx@IfBoxVoidOrEmpty{#1}{%
+ \def\TestResult{Y}%
+ }{%
+ \def\TestResult{N}%
+ }%
+ \ifx\TestExpected\TestResult
+ \msg{* Test passed.}%
+ \else
+ \errmessage{Test failed!}%
+ \fi
+ }%
+ \ifdim\wd9=0pt %
+ \else
+ \errmessage{Unwanted space?}%
+ \fi
+ \endgroup
+}
+\test0N
+\test2N
+\setbox0=\hbox{}
+\test0Y
+\setbox2=\hbox{}
+\test2Y
+\setbox0=\vbox{}
+\test0Y
+\setbox2=\vbox{}
+\test0Y
+\setbox0=\hbox{ }%
+\test0N
+\setbox2=\hbox{ }%
+\test2N
+\setbox0=\hbox{\penalty1}%
+\test0N
+\setbox2=\hbox{\penalty1}%
+\test2N
+\csname @@end\endcsname\end
+%</test-ifboxempty>
+% \end{macrocode}
+
+%
% \section{Installation}
%
% \subsection{Download}
@@ -1575,6 +2361,9 @@ X=%
% ltxcmds.pdf & doc/latex/oberdiek/ltxcmds.pdf\\
% test/ltxcmds-test1.tex & doc/latex/oberdiek/test/ltxcmds-test1.tex\\
% test/ltxcmds-test-gobble.tex & doc/latex/oberdiek/test/ltxcmds-test-gobble.tex\\
+% test/ltxcmds-test-ifempty.tex & doc/latex/oberdiek/test/ltxcmds-test-ifempty.tex\\
+% test/ltxcmds-test-zapspace.tex & doc/latex/oberdiek/test/ltxcmds-test-zapspace.tex\\
+% test/ltxcmds-test-ifboxempty.tex & doc/latex/oberdiek/test/ltxcmds-test-ifboxempty.tex\\
% ltxcmds.dtx & source/latex/oberdiek/ltxcmds.dtx\\
% \end{tabular}^^A
% }^^A
@@ -1695,6 +2484,92 @@ X=%
%\end{verbatim}
% \end{quote}
%
+% \begin{thebibliography}{9}
+% \raggedright
+%
+% \bibitem{ifempty:schneck}
+% Robert R. Schneck:
+% \textit{Re: \cs{ifempty} solution %
+% (was Macro puzzle: maximally general \cs{ifempty})};
+% newsgroup \xnewsgroup{comp.text.tex},
+% \url{news:3eef1ada_6@corp.newsgroups.com},
+% 2003-06-17.\\
+% {\small
+% \url{http://groups.google.com/group/comp.text.tex/msg/be03a159ec374895}}
+%
+% \bibitem{ifnull:diez}
+% Ulrich Diez:
+% \textit{Re: TeX refuses to strip outer braces in argument};
+% newsgroup \xnewsgroup{comp.text.tex},
+% \url{news:ibk3t8$ee7$1@news.albasani.net},
+% 2010-11-12.\\
+% {\small
+% \url{http://groups.google.com/group/comp.text.tex/msg/803bd57221a04996}}
+%
+% \bibitem{ifstrempty:musa}
+% Ahmed Musa:
+% \textit{Re: TeX refuses to strip outer braces in argument};
+% newsgroup \xnewsgroup{comp.text.tex},
+% \url{news:f5496afe-40ed-42bd-b629-a2419ecf7c0d@o14g2000prn.googlegroups.com},
+% 2010-12-03.\\
+% {\small
+% \url{http://groups.google.com/group/comp.text.tex/msg/fbf7d61a0c3a807d}}
+%
+% \bibitem{ifstrempty:diez1}
+% Ulrich Diez:
+% \textit{Re: TeX refuses to strip outer braces in argument};
+% newsgroup \xnewsgroup{comp.text.tex},
+% \url{news:idbo94$uka$1@four.albasani.net},
+% 2010-12-03.\\
+% {\small
+% \url{http://groups.google.com/group/comp.text.tex/msg/0c230ee479487962}}
+%
+% \bibitem{ifstrempty:diez2}
+% Ulrich Diez:
+% \textit{Re: TeX refuses to strip outer braces in argument};
+% newsgroup \xnewsgroup{comp.text.tex},
+% \url{news:idbpu4$cg1$1@news.albasani.net},
+% 2010-12-03.\\
+% {\small
+% \url{http://groups.google.com/group/comp.text.tex/msg/bbef4263390d647b}}
+%
+% \bibitem{ifstrempty:diez3}
+% Ulrich Diez:
+% \textit{Re: TeX refuses to strip outer braces in argument};
+% newsgroup \xnewsgroup{comp.text.tex},
+% \url{news:idd4ga$r83$1@four.albasani.net},
+% 2010-12-04.\\
+% {\small
+% \url{http://groups.google.com/group/comp.text.tex/msg/00dfd1ec103cd272}}
+%
+% \bibitem{ifstrempty:gl}
+% GL:
+% \textit{Re: TeX refuses to strip outer braces in argument};
+% newsgroup \xnewsgroup{comp.text.tex},
+% \url{news:4cfa2e27$0$7389$426a74cc@news.free.fr},
+% 2010-12-04.\\
+% {\small
+% \url{http://groups.google.com/group/comp.text.tex/msg/d3a75995c1cf267e}}
+%
+% \bibitem{ifstrempty:ho}
+% Heiko Oberdiek:
+% \textit{Re: TeX refuses to strip outer braces in argument};
+% newsgroup \xnewsgroup{comp.text.tex},
+% \url{news:iddhq1$3kj$1@news.eternal-september.org},
+% 2010-12-04.\\
+% {\small
+% \url{http://groups.google.com/group/comp.text.tex/msg/5f7a23e3ab70e347}}
+%
+% \bibitem{ifboxempty:dak}
+% David Kastrup:
+% \textit{How to detect if \cs{vbox} is empty};
+% newsgroup \xnewsgroup{comp.text.tex},
+% 2011-02-04.\\
+% {\small
+% \url{http://groups.google.com/group/comp.text.tex/msg/8d3cb89496a4d86d}}
+%
+% \end{thebibliography}
+%
% \begin{History}
% \begin{Version}{2009/08/05 v1.0}
% \item
@@ -1751,6 +2626,61 @@ X=%
% \item
% \cs{ltx@hashchar} added.
% \end{Version}
+% \begin{Version}{2010/09/11 v1.8}
+% \item
+% \cs{ltx@leftbracechar}, \cs{ltx@rightbracechar} added.
+% \end{Version}
+% \begin{Version}{2010/10/25 v1.9}
+% \item
+% \cs{ltx@LocalAppendToMacro} and \cs{ltx@GlobalAppendToMacro} are
+% now \cs{long}.
+% \end{Version}
+% \begin{Version}{2010/10/31 v1.10}
+% \item
+% \cs{ltx@newglobalif} added.
+% \end{Version}
+% \begin{Version}{2010/11/12 v1.11}
+% \item
+% \cs{ltx@ifempty} added.
+% \item
+% \cs{ltx@firstofthree}, \cs{ltx@secondofthree}, \cs{ltx@thirdofthree}
+% added.
+% \end{Version}
+% \begin{Version}{2010/12/02 v1.12}
+% \item
+% \cs{ltx@onelevel@sanitize} added.
+% \item
+% \cs{LTXcmds@num} fixed for the case with \cs{numexpr}
+% (bug found by GL).
+% \end{Version}
+% \begin{Version}{2010/12/04 v1.13}
+% \item
+% \cs{ltx@ifblank} added.
+% \item
+% Optimization for \cs{ltx@ifempty}.
+% \end{Version}
+% \begin{Version}{2010/12/07 v1.14}
+% \item
+% \cs{ltx@zapspace} added.
+% \end{Version}
+% \begin{Version}{2010/12/12 v1.15}
+% \item
+% \cs{ltx@minusone} added.
+% \end{Version}
+% \begin{Version}{2011/02/04 v1.16}
+% \item
+% \cs{ltx@IfBoxEmpty} and \cs{ltx@IfBoxVoidOrEmpty} added.
+% \item
+% \cs{ltx@firstoffour}, \dots, \cs{ltx@fourthoffour} added.
+% \end{Version}
+% \begin{Version}{2011/02/05 v1.17}
+% \item
+% \cs{ltx@IfBoxEmpty}: an empty box may have non-zero dimensions.
+% \end{Version}
+% \begin{Version}{2011/03/16 v1.18}
+% \item
+% \cs{ltx@ifclasslater} fixed.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/luacolor.dtx b/Master/texmf-dist/source/latex/oberdiek/luacolor.dtx
index 8f240d19396..22a22834df4 100644
--- a/Master/texmf-dist/source/latex/oberdiek/luacolor.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/luacolor.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007, 2009, 2010 by
+% Copyright (C) 2007, 2009-2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -21,7 +21,8 @@
% and the derived files
% luacolor.sty, luacolor.pdf, luacolor.ins, luacolor.drv,
% luacolor-test1.tex, luacolor-test2.tex, luacolor-test3.tex,
-% oberdiek.luacolor.lua, luacolor.lua.
+% oberdiek.luacolor.lua, luacolor.lua,
+% oberdiek.luacolor-pre065.lua, luacolor-pre065.lua.
%
% Distribution:
% CTAN:macros/latex/contrib/oberdiek/luacolor.dtx
@@ -57,6 +58,8 @@
% TDS:tex/latex/oberdiek/luacolor.sty
% TDS:scripts/oberdiek/oberdiek.luacolor.lua
% TDS:scripts/oberdiek/luacolor.lua
+% TDS:scripts/oberdiek/oberdiek.luacolor-pre065.lua
+% TDS:scripts/oberdiek/luacolor-pre065.lua
% TDS:doc/latex/oberdiek/luacolor.pdf
% TDS:doc/latex/oberdiek/test/luacolor-test1.tex
% TDS:doc/latex/oberdiek/test/luacolor-test2.tex
@@ -78,7 +81,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: luacolor 2010/03/09 v1.2 Coloring based on LuaTeX's node attributes (HO)}
+\Msg{* Package: luacolor 2011/03/29 v1.4 Coloring based on LuaTeX's node attributes (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -89,7 +92,7 @@
This is a generated file.
-Copyright (C) 2007, 2009, 2010 by
+Copyright (C) 2007, 2009-2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -110,7 +113,8 @@ This work consists of the main source file luacolor.dtx
and the derived files
luacolor.sty, luacolor.pdf, luacolor.ins, luacolor.drv,
luacolor-test1.tex, luacolor-test2.tex, luacolor-test3.tex,
- oberdiek.luacolor.lua, luacolor.lua.
+ oberdiek.luacolor.lua, luacolor.lua,
+ oberdiek.luacolor-pre065.lua, luacolor-pre065.lua.
\endpreamble
\let\MetaPrefix\DoubleperCent
@@ -135,6 +139,8 @@ and the derived files
\usedir{scripts/oberdiek}%
\file{oberdiek.luacolor.lua}{\from{luacolor.dtx}{lua}}%
\file{luacolor.lua}{\from{luacolor.dtx}{lua}}%
+ \file{oberdiek.luacolor-pre065.lua}{\from{luacolor.dtx}{lua,pre065}}%
+ \file{luacolor-pre065.lua}{\from{luacolor.dtx}{lua,pre065}}%
}
\catcode32=13\relax% active space
@@ -148,7 +154,8 @@ and the derived files
\Msg{*}
\Msg{* And install the following script files:}
\Msg{*}
-\Msg{* oberdiek.luacolor.lua, luacolor.lua}
+\Msg{* oberdiek.luacolor.lua, luacolor.lua,}
+\Msg{* oberdiek.luacolor-pre065.lua, luacolor-pre065.lua}
\Msg{*}
\Msg{* To produce the documentation run the file `luacolor.drv'}
\Msg{* through LaTeX.}
@@ -165,7 +172,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{luacolor.drv}%
- [2010/03/09 v1.2 Coloring based on LuaTeX's node attributes (HO)]%
+ [2011/03/29 v1.4 Coloring based on LuaTeX's node attributes (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\usepackage{paralist}
@@ -175,7 +182,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{343}
+% \CheckSum{455}
%
% \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
@@ -196,7 +203,7 @@ and the derived files
% \GetFileInfo{luacolor.drv}
%
% \title{The \xpackage{luacolor} package}
-% \date{2010/03/09 v1.2}
+% \date{2011/03/29 v1.4}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -266,28 +273,37 @@ and the derived files
% \subsection{Catcodes and identification}
%
% \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 LuaCol@AtEnd\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\LuaCol@AtEnd{%
\LuaCol@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{34}{12}% "
\TMP@EnsureCode{39}{12}% '
@@ -301,21 +317,19 @@ and the derived files
\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{95}{12}% _ (other!)
\TMP@EnsureCode{96}{12}% `
-\edef\LuaCol@AtEnd{%
- \LuaCol@AtEnd
- \noexpand\endinput
-}
+\edef\LuaCol@AtEnd{\LuaCol@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% Package identification.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luacolor}%
- [2010/03/09 v1.2 Coloring based on LuaTeX's node attributes (HO)]
+ [2011/03/29 v1.4 Coloring based on LuaTeX's node attributes (HO)]
% \end{macrocode}
%
% \subsection{Check for \LuaTeX}
@@ -324,17 +338,22 @@ and the derived files
% \begin{macrocode}
\RequirePackage{infwarerr}[2007/09/09]%
\RequirePackage{ifluatex}[2009/04/10]%
+\RequirePackage{ifpdf}[2010/01/28]%
+\RequirePackage{ltxcmds}[2010/04/26]%
\RequirePackage{color}
% \end{macrocode}
% \begin{macrocode}
\ifluatex
- \RequirePackage{luatex}[2010/03/09]%
+ \ltx@ifpackageloaded{luatexbase-attr}{%
+ }{%
+ \RequirePackage{luatex}[2010/03/09]%
+ }%
\else
\@PackageError{luacolor}{%
This package may only be run using LuaTeX%
}\@ehc
\expandafter\LuaCol@AtEnd
-\fi
+\fi%
% \end{macrocode}
%
% \begin{macro}{\LuaCol@directlua}
@@ -355,15 +374,19 @@ and the derived files
\@PackageWarningNoLine{luacolor}{%
Colors are disabled by option `monochrome'%
}%
+ \def\set@color{}%
+ \def\reset@color{}%
+ \def\set@page@color{}%
+ \def\define@color#1#2{}%
\expandafter\LuaCol@AtEnd
-\fi
+\fi%
% \end{macrocode}
%
% \subsection{Find driver}
%
% \begin{macrocode}
\LuaCol@directlua{%
- require("oberdiek.luacolor")%
+ require("oberdiek.luacolor\ifnum\luatexversion<65 -pre065\fi")%
}
\RequirePackage{ifpdf}[2007/09/09]
\ifpdf
@@ -392,7 +415,7 @@ and the derived files
\@PackageInfoNoLine{luacolor}{%
Type of color \string\special: \reserved@a
}%
- \fi
+ \fi%
\endgroup
\fi
% \end{macrocode}
@@ -401,7 +424,16 @@ and the derived files
%
% \begin{macro}{\LuaCol@Attribute}
% \begin{macrocode}
-\newattribute\LuaCol@Attribute
+\ltx@IfUndefined{newluatexattribute}{%
+ \newattribute\LuaCol@Attribute
+}{%
+ \newluatexattribute\LuaCol@Attribute
+}
+\ltx@IfUndefined{setluatexattribute}{%
+ \let\LuaCol@setattribute\setattribute
+}{%
+ \let\LuaCol@setattribute\setluatexattribute
+}
\LuaCol@directlua{%
oberdiek.luacolor.setattribute(\number\allocationnumber)%
}
@@ -411,7 +443,7 @@ and the derived files
% \begin{macro}{\set@color}
% \begin{macrocode}
\protected\def\set@color{%
- \setattribute\LuaCol@Attribute{%
+ \LuaCol@setattribute\LuaCol@Attribute{%
\LuaCol@directlua{%
oberdiek.luacolor.get("\luatexluaescapestring{\current@color}")%
}%
@@ -449,8 +481,50 @@ and the derived files
\set@color
% \end{macrocode}
%
+% \subsection{\cs{pdfxform} support}
+%
% \begin{macrocode}
-\LuaCol@AtEnd
+\ifpdf
+ \ltx@IfUndefined{pdfxform}{%
+ \ifnum\luatexversion>36 %
+ \directlua{%
+ tex.enableprimitives('',{%
+ 'pdfxform','pdflastxform','pdfrefxform'%
+ })%
+ }%
+ \fi
+ }{}%
+ \ltx@IfUndefined{protected}{%
+ \ifnum\luatexversion>36 %
+ \directlua{tex.enableprimitives('',{'protected'})}%
+ \fi
+ }{}%
+ \ltx@IfUndefined{pdfxform}{%
+ \@PackageWarning{luacolor}{\string\pdfxform\space not found}%
+ }{%
+ \let\LuaCol@org@pdfxform\pdfxform
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname protected\endcsname\relax
+ \@PackageWarning{luacolor}{\string\protected\space not found}%
+ \else
+ \expandafter\protected
+ \fi
+ \def\pdfxform{%
+ \begingroup
+ \afterassignment\LuaCol@pdfxform
+ \count@=%
+ }%
+ \def\LuaCol@pdfxform{%
+ \luacolorProcessBox\count@
+ \LuaCol@org@pdfxform\count@
+ \endgroup
+ }%
+ }%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\LuaCol@AtEnd%
%</package>
% \end{macrocode}
%
@@ -508,7 +582,8 @@ end
function dvidetect()
local v = tex.box[0]
assert(v.id == node.id("hlist"))
- for v in node.traverse_id(node.id("whatsit"), v.list) do
+%<!pre065> for v in node.traverse_id(node.id("whatsit"), v.head) do
+%<pre065> for v in node.traverse_id(node.id("whatsit"), v.list) do
if v and v.subtype == 3 then -- special
local data = v.data
for pattern, driver in pairs(patterns) do
@@ -591,7 +666,8 @@ function traverse(list, color)
return color
end
%<debug>texio.write_nl("traverse: " .. node.type(list.id))
- local head = list.list
+%<!pre065> local head = list.head
+%<pre065> local head = list.list
for n in node.traverse(head) do
%<debug>texio.write_nl(" node: " .. node.type(n.id))
local type = type[n.id]
@@ -627,7 +703,8 @@ function traverse(list, color)
end
end
end
- list.list = head
+%<!pre065> list.head = head
+%<pre065> list.list = head
return color
end
% \end{macrocode}
@@ -702,6 +779,22 @@ end
\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 luacolor.sty\relax}%
\fi
@@ -712,15 +805,20 @@ end
\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
@@ -741,7 +839,7 @@ end
\pdfoutput=0 %
\fi
\documentclass{minimal}
-\usepackage{luacolor}[2010/03/09]
+\usepackage{luacolor}[2011/03/29]
\csname @@end\endcsname
\end
%</test2>
@@ -753,7 +851,7 @@ end
% \end{macrocode}
% \begin{macrocode}
\documentclass{minimal}
-\usepackage{luacolor}[2010/03/09]
+\usepackage{luacolor}[2011/03/29]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -764,25 +862,6 @@ end
%</test3>
% \end{macrocode}
%
-% \subsection{Short test for \plainTeX}
-%
-% \begin{macrocode}
-%<*test4>
-\input luacolor.sty\relax
-\newluastate\TestLuaState
-\newattribute\TestAttr
-\setattribute\TestAttr{10}
-\unsetattribute\TestAttr
-\newcatcodetable\TestCTa
-\begingroup
- \SetCatcodeRange{`A}{`Z}{12}%
-\endgroup
-\BeginCatcodeRegime\__CT__LaTeX
-\EndCatcodeRegime
-\end
-%</test4>
-% \end{macrocode}
-%
% \section{Installation}
%
% \subsection{Download}
@@ -845,6 +924,8 @@ end
% luacolor.sty & tex/latex/oberdiek/luacolor.sty\\
% oberdiek.luacolor.lua & scripts/oberdiek/oberdiek.luacolor.lua\\
% luacolor.lua & scripts/oberdiek/luacolor.lua\\
+% oberdiek.luacolor-pre065.lua & scripts/oberdiek/oberdiek.luacolor-pre065.lua\\
+% luacolor-pre065.lua & scripts/oberdiek/luacolor-pre065.lua\\
% luacolor.pdf & doc/latex/oberdiek/luacolor.pdf\\
% test/luacolor-test1.tex & doc/latex/oberdiek/test/luacolor-test1.tex\\
% test/luacolor-test2.tex & doc/latex/oberdiek/test/luacolor-test2.tex\\
@@ -982,6 +1063,19 @@ end
% \item
% Adaptation for package \xpackage{luatex} 2010/03/09 v0.4.
% \end{Version}
+% \begin{Version}{2010/12/13 v1.3}
+% \item
+% Support for \cs{pdfxform} added.
+% \item
+% Loaded package \xpackage{luatexbase-attr} recognized.
+% \item
+% Update for \hologo{LuaTeX}: `list' fields renamed to `head' in v0.65.0.
+% \end{Version}
+% \begin{Version}{2011/03/29 v1.4}
+% \item
+% Avoid whatsit insertion if option \xoption{monochrome} is used
+% (thanks Manuel P\'egouri\'e-Gonnard).
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/luatex.dtx b/Master/texmf-dist/source/latex/oberdiek/luatex.dtx
index d02eceacc68..eabfc56de2d 100644
--- a/Master/texmf-dist/source/latex/oberdiek/luatex.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/luatex.dtx
@@ -185,7 +185,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1327}
+% \CheckSum{1429}
%
% \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
@@ -492,14 +492,18 @@ and the derived files
% \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 % @
- \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@luatex.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -507,7 +511,6 @@ and the derived files
\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.}%
@@ -519,24 +522,27 @@ and the derived files
\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}%
@@ -555,34 +561,43 @@ and the derived files
\fi
\expandafter\x\csname ver@luatex.sty\endcsname
\ProvidesPackage{luatex}%
- [2010/03/09 v0.4 LuaTeX basic definition package (HO)]
+ [2010/03/09 v0.4 LuaTeX basic definition package (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 LuT@AtEnd\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\LuT@AtEnd{%
\LuT@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{10}{12}% ^^J
\TMP@EnsureCode{34}{12}% "
@@ -597,10 +612,12 @@ and the derived files
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{95}{12}% _ (other!)
\TMP@EnsureCode{96}{12}% `
+\edef\LuT@AtEnd{\LuT@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Check for \LuaTeX}
@@ -622,9 +639,8 @@ and the derived files
\@PackageError{luatex}{%
This package may only be run using LuaTeX%
}\@ehc
- \LuT@AtEnd
- \expandafter\endinput
-\fi
+ \expandafter\LuT@AtEnd
+\fi%
% \end{macrocode}
%
% \subsection{Provide Lua\TeX\ primitives}
@@ -1162,7 +1178,7 @@ and the derived files
\fi
% \end{macrocode}
% \begin{macrocode}
-\LuT@AtEnd
+\LuT@AtEnd%
%</package>
% \end{macrocode}
%
@@ -1172,14 +1188,18 @@ and the derived files
%
% 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@luatex-loader.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -1187,7 +1207,6 @@ and the derived files
\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.}%
@@ -1199,24 +1218,27 @@ and the derived files
\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}%
@@ -1235,21 +1257,24 @@ and the derived files
\fi
\expandafter\x\csname ver@luatex-loader.sty\endcsname
\ProvidesPackage{luatex-loader}%
- [2010/03/09 v0.4 Lua module loader (HO)]
-% \end{macrocode}
-% \begin{macrocode}
-\begingroup
- \catcode10 12 % ^^J
- \catcode34 12 % "
- \catcode39 12 % '
- \catcode40 12 % (
- \catcode41 12 % )
- \catcode44 12 % ,
- \catcode46 12 % .
- \catcode60 12 % <
- \catcode61 12 % =
- \catcode95 12 % _ (other!)
- \catcode96 12 % `
+ [2010/03/09 v0.4 Lua module loader (HO)]%
+% \end{macrocode}
+% \begin{macrocode}
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5\endlinechar=13\relax%
+ \catcode10=12 % ^^J
+ \catcode34=12 % "
+ \catcode39=12 % '
+ \catcode40=12 % (
+ \catcode41=12 % )
+ \catcode44=12 % ,
+ \catcode46=12 % .
+ \catcode60=12 % <
+ \catcode61=12 % =
+ \catcode95=12 % _ (other!)
+ \catcode96=12 % `
+ \catcode123=1 % {
+ \catcode125=2 % }
\endlinechar=10 %
\ifnum\luatexversion<36 %
\directlua0%
@@ -1268,7 +1293,7 @@ and the derived files
end
end
}%
-\endgroup%
+\endgroup\endinput%
% \end{macrocode}
%
% \begin{macrocode}
@@ -1391,6 +1416,22 @@ table.insert(package.loaders, kpse_module_loader)
\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 luatex.sty\relax}%
\fi
@@ -1401,15 +1442,20 @@ table.insert(package.loaders, kpse_module_loader)
\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
@@ -1463,7 +1509,11 @@ table.insert(package.loaders, kpse_module_loader)
\repeat
\end{qstest}%
}
-\Test{LaTeX}{\the\count\numexpr\TestLaTeX+\count@}
+\begingroup
+ % luatex-unicode-letters.tex makes some slots to letters
+ \def\TestMax{169}%
+ \Test{LaTeX}{\the\count\numexpr\TestLaTeX+\count@}%
+\endgroup
\Test{String}{\ifnum\count@=32 10\else 12\fi}
\Test{Other}{12}
\luatexinitcatcodetable99 %
diff --git a/Master/texmf-dist/source/latex/oberdiek/magicnum.dtx b/Master/texmf-dist/source/latex/oberdiek/magicnum.dtx
index e96bfb37134..2c878ae6ff6 100644
--- a/Master/texmf-dist/source/latex/oberdiek/magicnum.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/magicnum.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007, 2009, 2010 by
+% Copyright (C) 2007, 2009, 2010, 2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -24,7 +24,7 @@
% and the derived files
% magicnum.sty, magicnum.pdf, magicnum.ins, magicnum.drv, magicnum.txt,
% magicnum-test1.tex, magicnum-test2.tex, magicnum-test3.tex,
-% magicnum.lua, oberdiek.magicnum.lua.
+% magicnum-test4.tex, magicnum.lua, oberdiek.magicnum.lua.
%
% Distribution:
% CTAN:macros/latex/contrib/oberdiek/magicnum.dtx
@@ -65,6 +65,7 @@
% TDS:doc/latex/oberdiek/test/magicnum-test1.tex
% TDS:doc/latex/oberdiek/test/magicnum-test2.tex
% TDS:doc/latex/oberdiek/test/magicnum-test3.tex
+% TDS:doc/latex/oberdiek/test/magicnum-test4.tex
% TDS:source/latex/oberdiek/magicnum.dtx
%
%<*ignore>
@@ -82,7 +83,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: magicnum 2010/03/09 v1.2 Magic numbers (HO)}
+\Msg{* Package: magicnum 2011/04/10 v1.4 Magic numbers (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -93,7 +94,7 @@
This is a generated file.
-Copyright (C) 2007, 2009, 2010 by
+Copyright (C) 2007, 2009, 2010, 2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -117,7 +118,7 @@ This work consists of the main source file magicnum.dtx
and the derived files
magicnum.sty, magicnum.pdf, magicnum.ins, magicnum.drv, magicnum.txt,
magicnum-test1.tex, magicnum-test2.tex, magicnum-test3.tex,
- magicnum.lua, oberdiek.magicnum.lua.
+ magicnum-test4.tex, magicnum.lua, oberdiek.magicnum.lua.
\endpreamble
\let\MetaPrefix\DoubleperCent
@@ -131,6 +132,7 @@ and the derived files
\file{magicnum-test1.tex}{\from{magicnum.dtx}{test1}}%
\file{magicnum-test2.tex}{\from{magicnum.dtx}{testplain,testdata}}%
\file{magicnum-test3.tex}{\from{magicnum.dtx}{testlatex,testdata}}%
+ \file{magicnum-test4.tex}{\from{magicnum.dtx}{test4}}%
\nopreamble
\nopostamble
\usedir{doc/latex/oberdiek}%
@@ -176,7 +178,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{magicnum.drv}%
- [2010/03/09 v1.2 Magic numbers (HO)]%
+ [2011/04/10 v1.4 Magic numbers (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\usepackage{array}
@@ -186,7 +188,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{592}
+% \CheckSum{755}
%
% \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
@@ -207,7 +209,7 @@ and the derived files
% \GetFileInfo{magicnum.drv}
%
% \title{The \xpackage{magicnum} package}
-% \date{2010/03/09 v1.2}
+% \date{2011/04/10 v1.4}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -432,14 +434,18 @@ and the derived files
% \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 % @
- \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@magicnum.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -447,7 +453,6 @@ and the derived files
\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.}%
@@ -459,24 +464,27 @@ and the derived files
\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}%
@@ -495,36 +503,46 @@ and the derived files
\fi
\expandafter\x\csname ver@magicnum.sty\endcsname
\ProvidesPackage{magicnum}%
- [2010/03/09 v1.2 Magic numbers (HO)]
+ [2011/04/10 v1.4 Magic numbers (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 magicnum@AtEnd\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\magicnum@AtEnd{%
\magicnum@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{34}{12}% "
+\TMP@EnsureCode{39}{12}% '
\TMP@EnsureCode{40}{12}% (
\TMP@EnsureCode{41}{12}% )
\TMP@EnsureCode{42}{12}% *
@@ -532,8 +550,12 @@ and the derived files
\TMP@EnsureCode{45}{12}% -
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{60}{12}% <
\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\edef\magicnum@AtEnd{\magicnum@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Check for previous definition}
@@ -544,7 +566,7 @@ and the derived files
\expandafter\ifx\csname magicnum\endcsname\relax
\else
\input infwarerr.sty\relax
- \@PackageErrorNoLine{magicnum}{%
+ \@PackageError{magicnum}{%
\string\magicnum\space is already defined%
}\@ehc
\fi
@@ -595,9 +617,11 @@ and the derived files
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input luatex.sty\relax
+ \input ifluatex.sty\relax
+ \input infwarerr.sty\relax
\else
- \RequirePackage{luatex}[2010/03/09]%
+ \RequirePackage{ifluatex}[2010/03/01]%
+ \RequirePackage{infwarerr}[2010/04/08]%
\fi
% \end{macrocode}
%
@@ -610,23 +634,64 @@ and the derived files
\fi
% \end{macrocode}
% \end{macro}
+% \begin{macrocode}
+ \magicnum@directlua{%
+ require("oberdiek.magicnum")%
+ }%
+ \begingroup
+ \def\x{2011/04/10 v1.4}%
+ \def\StripPrefix#1>{}%
+ \edef\x{\expandafter\StripPrefix\meaning\x}%
+ \edef\y{%
+ \magicnum@directlua{%
+ if oberdiek.magicnum.getversion then %
+ oberdiek.magicnum.getversion()%
+ end%
+ }%
+ }%
+ \ifx\x\y
+ \else
+ \@PackageError{magicnum}{%
+ Wrong version of lua module.\MessageBreak
+ Package version: \x\MessageBreak
+ Lua module: \y
+ }\@ehc
+ \fi
+ \endgroup
+% \end{macrocode}
+% \begin{macro}{\luaescapestring}
+% \begin{macrocode}
+ \begingroup
+ \expandafter\ifx\csname luaescapestring\endcsname\relax
+ \directlua{%
+ if tex.enableprimitives then %
+ tex.enableprimitives('magicnum@', {'luaescapestring'})%
+ end%
+ }%
+ \global\let\luaescapestring\magicnum@luaescapestring
+ \fi
+ \expandafter\ifx\csname luaescapestring\endcsname\relax
+ \escapechar=92 %
+ \@PackageError{magicnum}{%
+ Missing \string\luaescapestring
+ }\@ehc
+ \fi
+ \endgroup
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\magicnum}
% \begin{macrocode}
\def\magicnum#1{%
\magicnum@directlua{%
- require("oberdiek.magicnum")%
- oberdiek.magicnum.get(%
- "\luatexluaescapestring{#1}",\number\CatcodeTableString
- )%
+ oberdiek.magicnum.get("\luaescapestring{#1}")%
}%
}%
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
- \magicnum@AtEnd
- \expandafter\endinput
-\fi
+ \expandafter\magicnum@AtEnd
+\fi%
%</package>
% \end{macrocode}
%
@@ -842,7 +907,7 @@ luatex.pdfliteral.mode
\magicnum@add{luatex.pdfliteral.mode}{direct}{2}
% \end{macrocode}
% \begin{macrocode}
-\magicnum@AtEnd
+\magicnum@AtEnd%
%</package>
% \end{macrocode}
%
@@ -855,6 +920,11 @@ luatex.pdfliteral.mode
module("oberdiek.magicnum", package.seeall)
% \end{macrocode}
% \begin{macrocode}
+function getversion()
+ tex.write("2011/04/10 v1.4")
+end
+% \end{macrocode}
+% \begin{macrocode}
local data = {
["tex.catcode"] = {
[0] = "escape",
@@ -1025,7 +1095,7 @@ local data = {
}
% \end{macrocode}
% \begin{macrocode}
-function get(name, catcodetable)
+function get(name)
local startpos, endpos, category, entry =
string.find(name, "^(%a[%a%d%.]*)%.(-?[%a%d]+)$")
if not entry then
@@ -1049,7 +1119,7 @@ function get(name, catcodetable)
end
value = "" .. value
end
- tex.print(catcodetable, value)
+ tex.write(value)
end
% \end{macrocode}
%
@@ -1117,6 +1187,22 @@ end
\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 magicnum.sty\relax}%
\fi
@@ -1127,15 +1213,20 @@ end
\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
@@ -1170,7 +1261,7 @@ end
%<*testlatex>
\NeedsTeXFormat{LaTeX2e}
\documentclass{minimal}
-\usepackage{magicnum}[2010/03/09]
+\usepackage{magicnum}[2011/04/10]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -1212,6 +1303,27 @@ end
%</testlatex>
% \end{macrocode}
%
+% \subsection{Small test for \hologo{iniTeX}}
+%
+% \begin{macrocode}
+%<*test4>
+\catcode`\{=1
+\catcode`\}=2
+\catcode`\#=6
+\input magicnum.sty\relax
+\edef\x{\magicnum{tex.catcode.15}}
+\edef\y{invalid}
+\def\Strip#1>{}
+\edef\y{\expandafter\Strip\meaning\y}
+\ifx\x\y
+ \immediate\write16{Ok}%
+\else
+ \errmessage{\x<>\y}%
+\fi
+\csname @@end\endcsname\end
+%</test4>
+% \end{macrocode}
+%
% \section{Installation}
%
% \subsection{Download}
@@ -1279,6 +1391,7 @@ end
% test/magicnum-test1.tex & doc/latex/oberdiek/test/magicnum-test1.tex\\
% test/magicnum-test2.tex & doc/latex/oberdiek/test/magicnum-test2.tex\\
% test/magicnum-test3.tex & doc/latex/oberdiek/test/magicnum-test3.tex\\
+% test/magicnum-test4.tex & doc/latex/oberdiek/test/magicnum-test4.tex\\
% magicnum.dtx & source/latex/oberdiek/magicnum.dtx\\
% \end{tabular}^^A
% }^^A
@@ -1412,6 +1525,18 @@ end
% \item
% Adaptation to package \xpackage{luatex} 0.4.
% \end{Version}
+% \begin{Version}{2011/03/24 v1.3}
+% \item
+% Catcode fixes.
+% \end{Version}
+% \begin{Version}{2011/04/10 v1.4}
+% \item
+% Compatibility for \hologo{iniTeX}.
+% \item
+% Dependency from package \xpackage{luatex} removed.
+% \item
+% Version check for lua module.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/mleftright.dtx b/Master/texmf-dist/source/latex/oberdiek/mleftright.dtx
new file mode 100644
index 00000000000..a868d24affa
--- /dev/null
+++ b/Master/texmf-dist/source/latex/oberdiek/mleftright.dtx
@@ -0,0 +1,946 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2010 by
+% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any later
+% version. This version of this license is in
+% http://www.latex-project.org/lppl/lppl-1-3c.txt
+% and 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.
+%
+% The Base Interpreter refers to any `TeX-Format',
+% because some files are installed in TDS:tex/generic//.
+%
+% This work consists of the main source file mleftright.dtx
+% and the derived files
+% mleftright.sty, mleftright.pdf, mleftright.ins, mleftright.drv,
+% mleftright-test1.tex.
+%
+% Distribution:
+% CTAN:macros/latex/contrib/oberdiek/mleftright.dtx
+% CTAN:macros/latex/contrib/oberdiek/mleftright.pdf
+%
+% Unpacking:
+% (a) If mleftright.ins is present:
+% tex mleftright.ins
+% (b) Without mleftright.ins:
+% tex mleftright.dtx
+% (c) If you insist on using LaTeX
+% latex \let\install=y\input{mleftright.dtx}
+% (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+% (a) If mleftright.drv is present:
+% latex mleftright.drv
+% (b) Without mleftright.drv:
+% latex mleftright.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 mleftright.dtx
+% makeindex -s gind.ist mleftright.idx
+% pdflatex mleftright.dtx
+% makeindex -s gind.ist mleftright.idx
+% pdflatex mleftright.dtx
+%
+% Installation:
+% TDS:tex/generic/oberdiek/mleftright.sty
+% TDS:doc/latex/oberdiek/mleftright.pdf
+% TDS:doc/latex/oberdiek/test/mleftright-test1.tex
+% TDS:source/latex/oberdiek/mleftright.dtx
+%
+%<*ignore>
+\begingroup
+ \catcode123=1 %
+ \catcode125=2 %
+ \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: mleftright 2010/09/25 v1.0 Usual delimiter spacing with left and right (HO)}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2010 by
+ Heiko Oberdiek <heiko.oberdiek at googlemail.com>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3c of this license or (at your option) any later
+version. This version of this license is in
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+and 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.
+
+The Base Interpreter refers to any `TeX-Format',
+because some files are installed in TDS:tex/generic//.
+
+This work consists of the main source file mleftright.dtx
+and the derived files
+ mleftright.sty, mleftright.pdf, mleftright.ins, mleftright.drv,
+ mleftright-test1.tex.
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+ \file{mleftright.ins}{\from{mleftright.dtx}{install}}%
+ \file{mleftright.drv}{\from{mleftright.dtx}{driver}}%
+ \usedir{tex/generic/oberdiek}%
+ \file{mleftright.sty}{\from{mleftright.dtx}{package}}%
+ \usedir{doc/latex/oberdiek/test}%
+ \file{mleftright-test1.tex}{\from{mleftright.dtx}{test1}}%
+}
+
+\catcode32=13\relax% active space
+\let =\space%
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* mleftright.sty}
+\Msg{*}
+\Msg{* And install the following script file:}
+\Msg{*}
+\Msg{* }
+\Msg{*}
+\Msg{* To produce the documentation run the file `mleftright.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{mleftright.drv}%
+ [2010/09/25 v1.0 Usual delimiter spacing with left and right (HO)]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2008/08/11]
+\usepackage{mleftright}[2010/09/25]
+\begin{document}
+ \DocInput{mleftright.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{544}
+%
+% \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{mleftright.drv}
+%
+% \title{The \xpackage{mleftright} package}
+% \date{2010/09/25 v1.0}
+% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% \TeX\ sets subformulas by \cs{left} and \cs{right} as inner formulas
+% with additional surrounding spaces in some situations. This package
+% provides \cs{mleft} and \cs{mright} that call \cs{left} and \cs{right},
+% but the delimiters will act as normal \cs{mathopen} and \cs{mathclose}
+% delimiters without the additional space of an inner formula.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Documentation}
+%
+% The package is a result of a thread in the newsgroup \textsf{comp.text.tex}
+% with the subject \textit{spacing after \cs{right}\texttt{)}
+% and before \cs{left}\texttt{)}} \cite{dave}.
+% The problem: \cs{left} and \cs{right} adjust the size of the
+% delimiters automatically. However, \TeX\ treats the whole expression
+% as inner formula. In some circumstances \TeX\ adds extra space
+% before or after an inner formula.
+% Example:
+% \begin{quote}
+% \thinmuskip=1.5\thinmuskip
+% \begin{tabular}{@{}l@{\quad$\Rightarrow$\quad}l@{}}
+% |$\sin(x^2), x$|
+% & $\sin(x^2), x$\\
+% |$\sin\left(x^2\right), x$|
+% & $\sin\left(x^2\right), x$\\
+% ^^A \multicolumn{1}{@{}r@{\quad$\Rightarrow$\quad}}{^^A
+% ^^A \itshape with exaggerated spacing^^A
+% ^^A }
+% ^^A & $\thinmuskip=4\thinmuskip
+% ^^A \sin\left(x^2\right){,}\mskip.25\thinmuskip x$\\
+% |$\sin\mleft(x^2\mright), x$|
+% & $\sin\mleft(x^2\mright), x$\\
+% \end{tabular}\\*[.5ex]
+% (\cs{mleft} and \cs{mright} are provided by this package.)
+% \end{quote}
+%
+% In the newsgroup Donald Arseneau answered with clever macros \cite{arseneau}:
+% \begin{quote}
+%\begin{verbatim}
+%\newcommand\lft{\mathopen{}\left}
+%\newcommand\rgt{\aftergroup\mathclose\aftergroup{\aftergroup}\right}
+%\end{verbatim}
+% \end{quote}
+% However one problem remains, a following subscript or superscript
+% is not applied to the right delimiter but the empty
+% \cs{mathclose}.
+% Thus Philipp Stephani provided an improvement \cite{stephani}:
+%\begin{quote}
+%\begin{verbatim}
+%\mathopen{} \mathclose{\left\| A^2 \right\|}_2
+%\end{verbatim}
+%\end{quote}
+% Heiko Oberdiek converted this into macro form \cite{oberdiek}:
+%\begin{quote}
+%\begin{verbatim}
+%\newcommand\lft{\mathopen{}\mathclose\bgroup\left}
+%\newcommand\rgt{\aftergroup\egroup\right}
+%\end{verbatim}
+%\end{quote}
+%
+% The package uses longer macro names \cs{mleft} and \cs{mright}
+% to avoid name clashes. Also it adds some checks for error conditions.
+%
+% \subsection{Use}
+%
+% \begin{declcs}{mleft}\meta{delimL} \dots\unkern\ \cs{mright}\meta{delimR}
+% \end{declcs}
+% Macros \cs{mleft} and \cs{mright} are used in the same way as
+% \cs{left} and \cs{right}. Also \cs{middle} can be used inbetween if
+% \eTeX\ is present.
+%
+% \begin{declcs}{mleftright}
+% \end{declcs}
+% Macro \cs{mleftright} redefines \cs{left} as \cs{mleft} and
+% \cs{right} as \cs{mright}. The redefinition is local to the group.
+%
+% \begin{declcs}{mleftrightrestore}
+% \end{declcs}
+% Macro \cs{mleftright} restores \cs{left} and \cs{right} with
+% the original meaning if they were previously redefined by
+% \cs{mleftright} (also locally).
+%
+%
+% \StopEventually{
+% }
+%
+% \section{Implementation}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% Reload check, especially if the package is not used with \LaTeX.
+% \begin{macrocode}
+\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@mleftright.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \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{mleftright}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup%
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\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}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@mleftright.sty\endcsname
+\ProvidesPackage{mleftright}%
+ [2010/09/25 v1.0 Usual delimiter spacing with left and right (HO)]%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode123=1 % {
+ \catcode125=2 % }
+ \catcode64=11 % @
+ \def\x{\endgroup
+ \expandafter\edef\csname mleftright@AtEnd\endcsname{%
+ \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\catcode61\catcode48\catcode32=10\relax%
+\catcode13=5 % ^^M
+\endlinechar=13 %
+\catcode35=6 % #
+\catcode64=11 % @
+\catcode123=1 % {
+\catcode125=2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\mleftright@AtEnd{%
+ \mleftright@AtEnd
+ \catcode#1=\the\catcode#1\relax
+ }%
+ \catcode#1=#2\relax
+}
+\TMP@EnsureCode{38}{4}% &
+\TMP@EnsureCode{39}{12}% '
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
+\TMP@EnsureCode{42}{12}% *
+\TMP@EnsureCode{43}{12}% +
+\TMP@EnsureCode{44}{12}% ,
+\TMP@EnsureCode{45}{12}% -
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{60}{12}% <
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\edef\mleftright@AtEnd{%
+ \mleftright@AtEnd
+ \escapechar\the\escapechar\relax
+ \noexpand\endinput
+}
+\escapechar=92 %
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input infwarerr.sty\relax
+ \input ltxcmds.sty\relax
+\else
+ \RequirePackage{infwarerr}[2010/04/08]%
+ \RequirePackage{ltxcmds}[2010/04/26]%
+\fi
+% \end{macrocode}
+%
+% The original commands \cs{left} and \cs{right}
+% are saved and later used in \cs{mleft} and
+% \cs{mright} in order to deal with:
+% \begin{quote}
+%\begin{verbatim}
+%\let\left\mleft
+%\let\right\mright
+%\end{verbatim}
+% \end{quote}
+% \begin{macro}{\mleftright@OrgLeft}
+% \begin{macrocode}
+\let\mleftright@OrgLeft\left
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mleftright@OrgRight}
+% \begin{macrocode}
+\let\mleftright@OrgRight\right
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mleftright@Def}
+% Macro \cs{mleftright@Def} defines a macro as robust macro
+% if \eTeX\ or \LaTeX\ is available.
+% \begin{macrocode}
+\ltx@IfUndefined{protected}{%
+ \ltx@IfUndefined{DeclareRobustCommand}{%
+ \def\mleftright@Def{\def}%
+ }{%
+ \def\mleftright@Def{\DeclareRobustCommand*}%
+ }%
+}{%
+ \def\mleftright@Def{\protected\def}%
+}
+\edef\mleftright@Def#1{%
+ \noexpand\ltx@IfUndefined{%
+ \noexpand\expandafter\noexpand\ltx@gobble\noexpand\string#1%
+ }{%
+ \expandafter\noexpand\mleftright@Def#1%
+ }{%
+ \noexpand\@PackageError{mleftright}{%
+ Command \noexpand\string#1 already defined%
+ }\noexpand\@ehd
+ \noexpand\ltx@gobble
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% In case of \eTeX\ the group status after the left symbol
+% is saved and later checked at the beginning of \cs{mright}.
+% \begin{macrocode}
+\ltx@IfUndefined{currentgrouplevel}{%
+ \catcode38=14 % & = comment
+}{%
+ \catcode38=9 % & = ignore_
+}
+% \end{macrocode}
+%
+% \begin{macro}{\mleftright@GroupLevel}
+% \begin{macrocode}
+& \def\mleftright@GroupLevel{-1}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mleftright@WrongGroup}
+% \begin{macrocode}
+& \def\mleftright@WrongGroup#1(#2){%
+& \ifnum\mleftright@GroupLevel<\ltx@zero
+& \@PackageError{mleftright}{%
+& Missing previous \string\mleft
+& }\@ehc
+& \else
+& \@PackageError{mleftright}{%
+& Unexpected group status for \string\mright%
+& \ifnum\mleftright@GroupLevel=#1 %
+& \else
+& .\MessageBreak
+& Group level is #1, %
+& expected is \mleftright@GroupLevel
+& \fi
+& \ifnum16=#2 %
+& \else
+& .\MessageBreak
+& Group type is #2 (%
+& \ifcase#2 %
+& bottom level%
+& \expandafter\expandafter\expandafter\ltx@gobblefour
+& \expandafter\ltx@gobbletwo
+& \or simple%
+& \or hbox%
+& \or adjusted hbox%
+& \or vbox%
+& \or vtop%
+& \or align%
+& \or no align%
+& \or output%
+& \or math%
+& \or disc%
+& \or insert%
+& \or vcenter%
+& \or math choice%
+& \or semi simple%
+& \or math shift%
+& \or math left%
+& \else
+& unknown%
+& \fi
+& \space group),\MessageBreak
+& expected is 16 (math left group)%
+& \fi
+& }\@ehd
+& \fi
+& }%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mleft}
+% \begin{macrocode}
+\mleftright@Def\mleft{%
+ \mathopen{}\mathclose\bgroup
+& \edef\mleftright@GroupLevel{\the\numexpr\the\currentgrouplevel+1}%
+ \mleftright@OrgLeft
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mright}
+% \begin{macrocode}
+\mleftright@Def\mright{%
+& \ifnum\mleftright@GroupLevel=\currentgrouplevel
+& \ifnum16=\currentgrouptype
+ \aftergroup\egroup
+& \else
+& \expandafter\mleftright@WrongGroup
+& \the\expandafter\currentgrouplevel
+& \expandafter(\the\currentgrouptype)%
+& \fi
+& \else
+& \expandafter\mleftright@WrongGroup
+& \the\expandafter\currentgrouplevel
+& \expandafter(\the\currentgrouptype)%
+& \fi
+ \mleftright@OrgRight
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mleftright}
+% \begin{macrocode}
+\mleftright@Def\mleftright{%
+ \let\left\mleft
+ \let\right\mright
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mleftrightrestore}
+% \begin{macrocode}
+\mleftright@Def\mleftrightrestore{%
+ \ifx\left\mleft
+ \let\left\mleftright@OrgLeft
+ \fi
+ \ifx\right\mright
+ \let\right\mleftright@OrgRight
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\mleftright@AtEnd%
+%</package>
+% \end{macrocode}
+%
+% \section{Test}
+%
+% \subsection{Catcode checks for loading}
+%
+% \begin{macrocode}
+%<*test1>
+% \end{macrocode}
+% \begin{macrocode}
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\expandafter\ifx\csname count@\endcsname\relax
+ \countdef\count@=255 %
+\fi
+\expandafter\ifx\csname @gobble\endcsname\relax
+ \long\def\@gobble#1{}%
+\fi
+\expandafter\ifx\csname @firstofone\endcsname\relax
+ \long\def\@firstofone#1{#1}%
+\fi
+\expandafter\ifx\csname loop\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+{%
+ \def\loop#1\repeat{%
+ \def\body{#1}%
+ \iterate
+ }%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \let\repeat=\fi
+}%
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@ 1 %
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \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 mleftright.sty\relax}%
+\fi
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\%=14 %
+ \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
+\csname @@end\endcsname
+\end
+% \end{macrocode}
+% \begin{macrocode}
+%</test1>
+% \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/mleftright.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/oberdiek/mleftright.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{install/macros/latex/contrib/oberdiek.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTAN{tds/tds.pdf}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \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 mleftright.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}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+% mleftright.sty & tex/generic/oberdiek/mleftright.sty\\
+% mleftright.pdf & doc/latex/oberdiek/mleftright.pdf\\
+% test/mleftright-test1.tex & doc/latex/oberdiek/test/mleftright-test1.tex\\
+% mleftright.dtx & source/latex/oberdiek/mleftright.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+% \begingroup
+% \advance\linewidth by\leftmargin
+% \advance\linewidth by\rightmargin
+% \edef\x{\endgroup
+% \def\noexpand\lw{\the\linewidth}^^A
+% }\x
+% \def\lwbox{^^A
+% \leavevmode
+% \hbox to \linewidth{^^A
+% \kern-\leftmargin\relax
+% \hss
+% \usebox0
+% \hss
+% \kern-\rightmargin\relax
+% }^^A
+% }^^A
+% \ifdim\wd0>\lw
+% \sbox0{\small\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\footnotesize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\scriptsize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\tiny\t}^^A
+% \ifdim\wd0>\linewidth
+% \lwbox
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \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 mleftright.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{mleftright.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 mleftright.dtx
+%makeindex -s gind.ist mleftright.idx
+%pdflatex mleftright.dtx
+%makeindex -s gind.ist mleftright.idx
+%pdflatex mleftright.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \section{Acknowledgement}
+%
+% \begin{description}
+% \item[Donald Arsenau:]
+% He provided the main trick and the first macros.
+% \item[Philipp Stephani:]
+% He solved the subscript problem.
+% \end{description}
+%
+% \begin{thebibliography}{9}
+% \raggedright
+% \bibitem{dave}
+% Dave94705,
+% \textit{spacing after \cs{right}\texttt{)} and before \cs{left}\texttt{)}},
+% newsgroup comp.text.tex,
+% Message-ID: \texttt{\small 5d264909-7c3d-4c9d-9b22-434178b2bf90@g21g2000prn.googlegroups.com},
+% 2010-08-12.
+% \newblock
+% {\small\url{http://groups.google.com/group/comp.text.tex/msg/e5b6833da7dc29bf}}
+%
+% \bibitem{arseneau}
+% Donald Arseneau,
+% \textit{Re: spacing after \cs{right}\texttt) and before \cs{left}\texttt)},
+% newsgroup comp.text.tex,
+% Message-ID: \texttt{\small yfivd6svl8y.fsf@mutant.triumf.ca},
+% 2010-08-30.
+% \newblock
+% {\small\url{http://groups.google.com/group/comp.text.tex/msg/e0b2e4386e5d04e4}}
+%
+% \bibitem{stephani}
+% Philipp Stephani,
+% \textit{Re: spacing after \cs{right}\texttt) and before \cs{left}\texttt)},
+% newsgroup comp.text.tex,
+% Message-ID: \texttt{\small 4c8c8c1e\$0\$6981\$9b4e6d93@newsspool4.arcor-online.net},
+% 2010-09-12.
+% \newblock
+% {\small\url{http://groups.google.com/group/comp.text.tex/msg/87ac1f61321de3ef}}
+%
+% \bibitem{oberdiek}
+% Heiko Oberdiek,
+% \textit{Re: spacing after \cs{right}\texttt) and before \cs{left}\texttt)},
+% newsgroup comp.text.tex,
+% Message-ID: \texttt{\small i6jcc2\$8of\$1@news.eternal-september.org},
+% 2010-09-12.
+% \newblock
+% {\small\url{http://groups.google.com/group/comp.text.tex/msg/257aa6119bef878b}}
+%
+% \end{thebibliography}
+%
+% \begin{History}
+% \begin{Version}{2010/09/25 v1.0}
+% \item
+% The first version.
+% \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins
index 03729eac6f5..dc4420dea9c 100644
--- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins
+++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins
@@ -1,5 +1,5 @@
% oberdiek.ins
-% 2010/05/01
+% 2011/04/10
%
% Copyright (C) 1999, 2001, 2006 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
@@ -43,6 +43,7 @@
\batchinput{dvipscol.dtx}
\batchinput{embedfile.dtx}
\batchinput{engord.dtx}
+\batchinput{eolgrab.dtx}
\batchinput{epstopdf.dtx}
\batchinput{etexcmds.dtx}
\batchinput{flags.dtx}
@@ -51,6 +52,7 @@
\batchinput{grffile.dtx}
\batchinput{hologo.dtx}
\batchinput{holtxdoc.dtx}
+\batchinput{hopatch.dtx}
\batchinput{hycolor.dtx}
\batchinput{hypbmsec.dtx}
\batchinput{hypcap.dtx}
@@ -76,6 +78,7 @@
\batchinput{luatex.dtx}
\batchinput{magicnum.dtx}
\batchinput{makerobust.dtx}
+\batchinput{mleftright.dtx}
\batchinput{pagegrid.dtx}
\batchinput{pagesel.dtx}
\batchinput{pdfcol.dtx}
@@ -90,9 +93,11 @@
\batchinput{pdftexcmds.dtx}
\batchinput{picture.dtx}
\batchinput{pmboxdraw.dtx}
+\batchinput{protecteddef.dtx}
\batchinput{refcount.dtx}
\batchinput{rerunfilecheck.dtx}
\batchinput{resizegather.dtx}
+\batchinput{rotchiffre.dtx}
\batchinput{scrindex.dtx}
\batchinput{selinput.dtx}
\batchinput{setouterhbox.dtx}
@@ -108,6 +113,7 @@
\batchinput{twoopt.dtx}
\batchinput{uniquecounter.dtx}
\batchinput{zref.dtx}
+\batchinput{hobsub.dtx}
\Msg{}
\Msg{********************************************************}
diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex
index 88bd4a6f52f..df9cf29d76a 100644
--- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex
+++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex
@@ -6,9 +6,9 @@
\newcommand*{\Subject}{CTAN:\CTANdir}
\newcommand*{\Author}{Heiko Oberdiek}
\newcommand*{\Email}{heiko.oberdiek at googlemail.com}
-\newcommand*{\Date}{2010/05/01}
+\newcommand*{\Date}{2011/04/10}
-% Copyright (C) 2006-2010 by
+% Copyright (C) 2006-2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -172,25 +172,25 @@
[\entrysep]
\entry{askinclude}{2008/08/11}{2.1}{Interactive asking of included files}%
[\entrysep]
-\entry{atbegshi}{2010/03/25}{1.12}{At begin shipout hook}%
+\entry{atbegshi}{2011/01/30}{1.15}{At begin shipout hook}%
[\entrysep]
\entry{atenddvi}{2007/04/17}{1.1}{At end DVI hook}%
[\entrysep]
-\entry{attachfile2}{2009/09/25}{2.5}{attach files into PDF}%
+\entry{attachfile2}{2010/09/27}{2.6}{attach files into PDF}%
[\entrysep]
\entry{atveryend}{2010/03/24}{1.5}{Hooks at very end of document}%
[\entrysep]
-\entry{auxhook}{2009/12/14}{1.2}{Hooks for auxiliary files}%
+\entry{auxhook}{2011/03/04}{1.3}{Hooks for auxiliary files}%
[\entrysep]
-\entry{bigintcalc}{2007/11/11}{1.1}{Expandable big integer calculations}%
+\entry{bigintcalc}{2011/01/30}{1.2}{Expandable big integer calculations}%
[\entrysep]
-\entry{bitset}{2007/09/28}{1.0}{Data type bit set}%
+\entry{bitset}{2011/01/30}{1.1}{Data type bit set}%
[\entrysep]
\entry{bmpsize}{2009/09/04}{1.6}{Extract size and resolution data from bitmap files}%
[\entrysep]
-\entry{bookmark}{2010/04/08}{1.12}{PDF bookmarks}%
+\entry{bookmark}{2011/03/20}{1.19}{PDF bookmarks}%
[\entrysep]
-\entry{catchfile}{2010/04/28}{1.5}{Catches the contents of a file}%
+\entry{catchfile}{2011/03/01}{1.6}{Catches the contents of a file}%
[\entrysep]
\entry{centernot}{2010/03/29}{1.2}{Centers the not symbol horizontally}%
[\entrysep]
@@ -206,27 +206,33 @@
[\entrysep]
\entry{engord}{2010/03/01}{1.8}{Provides English ordinal numbers}%
[\entrysep]
+\entry{eolgrab}{2011/01/12}{1.0}{Grab line end delimited argument}%
+[\entrysep]
\entry{epstopdf}{2010/02/09}{2.5}{Conversion with epstopdf on the fly}%
[\entrysep]
-\entry{etexcmds}{2010/01/28}{1.3}{Prefix for e-TeX command names}%
+\entry{etexcmds}{2011/02/16}{1.5}{Prefix for e-TeX command names}%
[\entrysep]
\entry{flags}{2007/09/30}{0.4}{Flag setting in bit fields}%
[\entrysep]
-\entry{gettitlestring}{2009/12/18}{1.3}{Cleanup title references}%
+\entry{gettitlestring}{2010/12/03}{1.4}{Cleanup title references}%
+[\entrysep]
+\entry{grfext}{2010/08/19}{1.1}{Managing graphics extensions}%
[\entrysep]
-\entry{grfext}{2007/09/30}{1.0}{Managing graphics extensions}%
+\entry{grffile}{2010/12/09}{1.13}{Extended file name support for graphics}%
[\entrysep]
-\entry{grffile}{2010/01/28}{1.11}{Extended file name support for graphics}%
+\entry{hobsub}{2011/01/30}{1.0}{Subsetting bundle oberdiek}%
[\entrysep]
-\entry{hologo}{2010/04/24}{1.2}{Logo collection}%
+\entry{hologo}{2011/03/25}{1.4}{Logo collection}%
[\entrysep]
-\entry{holtxdoc}{2010/04/24}{0.19}{Private additional ltxdoc support}%
+\entry{holtxdoc}{2011/02/04}{0.21}{Private additional ltxdoc support}%
[\entrysep]
-\entry{hycolor}{2009/12/12}{1.6}{Color options of hyperref/bookmark}%
+\entry{hopatch}{2011/01/30}{1.0}{Wrapper for package hooks}%
+[\entrysep]
+\entry{hycolor}{2011/01/30}{1.7}{Color options of hyperref/bookmark}%
[\entrysep]
\entry{hypbmsec}{2007/04/11}{2.4}{Bookmarks in sectioning commands}%
[\entrysep]
-\entry{hypcap}{2008/09/08}{1.10}{Adjusting anchors of captions}%
+\entry{hypcap}{2011/02/16}{1.11}{Adjusting anchors of captions}%
[\entrysep]
\entry{hypdestopt}{2008/08/08}{2.2}{Hyperref destination optimizer}%
[\entrysep]
@@ -242,36 +248,38 @@
[\entrysep]
\entry{ifluatex}{2010/03/01}{1.3}{Provides the ifluatex switch}%
[\entrysep]
-\entry{ifpdf}{2010/01/28}{2.1}{Provides the ifpdf switch}%
+\entry{ifpdf}{2011/01/30}{2.3}{Provides the ifpdf switch}%
[\entrysep]
\entry{ifvtex}{2010/03/01}{1.5}{Switches for detecting VTeX and its modes}%
[\entrysep]
\entry{infwarerr}{2010/04/08}{1.3}{Providing info/warning/message}%
[\entrysep]
-\entry{inputenx}{2010/01/11}{1.6}{Enhanced input encoding handling}%
+\entry{inputenx}{2011/04/10}{1.8}{Enhanced input encoding handling}%
[\entrysep]
\entry{intcalc}{2007/09/27}{1.1}{Expandable integer calculations}%
[\entrysep]
-\entry{kvdefinekeys}{2010/03/01}{1.0}{Defining keys}%
+\entry{kvdefinekeys}{2011/04/07}{1.3}{Defining keys}%
[\entrysep]
-\entry{kvoptions}{2010/02/22}{3.7}{Keyval support for \LaTeX{} options}%
+\entry{kvoptions}{2010/12/23}{3.10}{Keyval support for \LaTeX{} options}%
[\entrysep]
-\entry{kvsetkeys}{2010/03/01}{1.9}{Key value parser}%
+\entry{kvsetkeys}{2011/04/07}{1.13}{Key value parser}%
[\entrysep]
-\entry{letltxmacro}{2008/06/24}{1.3}{Let assignment for \LaTeX{} macros}%
+\entry{letltxmacro}{2010/09/02}{1.4}{Let assignment for \LaTeX{} macros}%
[\entrysep]
\entry{listingsutf8}{2007/11/11}{1.1}{Adding support for UTF-8 to listings}%
[\entrysep]
-\entry{ltxcmds}{2010/04/26}{1.7}{\LaTeX{} kernel commands for general use}%
+\entry{ltxcmds}{2011/03/16}{1.18}{\LaTeX{} kernel commands for general use}%
[\entrysep]
-\entry{luacolor}{2010/03/09}{1.2}{Coloring based on LuaTeX's node attributes}%
+\entry{luacolor}{2011/03/29}{1.4}{Coloring based on LuaTeX's node attributes}%
[\entrysep]
\entry{luatex}{2010/03/09}{0.4}{LuaTeX basic definition package}%
[\entrysep]
-\entry{magicnum}{2010/03/09}{1.2}{Magic numbers}%
+\entry{magicnum}{2011/04/10}{1.4}{Magic numbers}%
[\entrysep]
\entry{makerobust}{2006/03/18}{1.0}{Making a macro robust}%
[\entrysep]
+\entry{mleftright}{2010/09/25}{1.0}{Usual delimiter spacing with left and right}%
+[\entrysep]
\entry{pagegrid}{2009/12/04}{1.4}{Print page grid in background}%
[\entrysep]
\entry{pagesel}{2008/08/11}{1.8}{Selecting shipout output pages}%
@@ -288,24 +296,28 @@
[\entrysep]
\entry{pdfcrypt}{2007/04/26}{1.0}{Setting pdf encryption}%
[\entrysep]
-\entry{pdfescape}{2010/03/01}{1.9}{Provides hex, PDF name and string conversions}%
+\entry{pdfescape}{2011/04/04}{1.12}{Provides string conversions}%
[\entrysep]
\entry{pdflscape}{2008/08/11}{0.10}{Landscape pages in PDF}%
[\entrysep]
\entry{pdfrender}{2010/01/28}{1.2}{Access to some PDF graphics parameters}%
[\entrysep]
-\entry{pdftexcmds}{2010/04/01}{0.9}{Utility functions of pdfTeX for LuaTeX}%
+\entry{pdftexcmds}{2011/04/10}{0.14}{Utilities of pdfTeX for LuaTeX}%
[\entrysep]
\entry{picture}{2009/10/11}{1.3}{Dimens for picture macros}%
[\entrysep]
-\entry{pmboxdraw}{2006/05/03}{1.0}{Poor man's box drawing characters}%
+\entry{pmboxdraw}{2011/03/24}{1.1}{Poor man's box drawing characters}%
[\entrysep]
-\entry{refcount}{2008/08/11}{3.1}{Data extraction from references}%
+\entry{protecteddef}{2011/01/31}{1.0}{Definition of protected macros}%
+[\entrysep]
+\entry{refcount}{2010/12/01}{3.2}{Data extraction from references}%
[\entrysep]
\entry{rerunfilecheck}{2010/03/16}{1.6}{Rerun checks for auxiliary files}%
[\entrysep]
\entry{resizegather}{2010/03/01}{1.2}{Automatically resizing of too large equations}%
[\entrysep]
+\entry{rotchiffre}{2010/11/12}{1.0}{Provides ROT13, ROT5, ROT18, ROT47}%
+[\entrysep]
\entry{scrindex}{2008/08/11}{1.1}{Package index with scr* classes}%
[\entrysep]
\entry{selinput}{2007/09/09}{1.2}{Select input encoding}%
@@ -332,9 +344,9 @@
[\entrysep]
\entry{twoopt}{2008/08/11}{1.5}{Definitions with two optional arguments}%
[\entrysep]
-\entry{uniquecounter}{2009/12/18}{1.1}{Provides unlimited unique counter}%
+\entry{uniquecounter}{2011/01/30}{1.2}{Provides unlimited unique counter}%
[\entrysep]
-\entry{zref}{2010/05/01}{2.17}{New reference scheme for \LaTeXe{}}%
+\entry{zref}{2011/03/18}{2.21}{New reference scheme for \LaTeXe{}}%
\end{overview}
\section{Packages}
@@ -561,6 +573,15 @@ It can be used with plain and \LaTeX\ formats.
\tocinclude{engord}
\newpage
+\subsection{\pkgsectformat{eolgrab}}
+\label{eolgrab}
+\begin{abstract}
+This package implements a generic argument grabber
+to catch an argument that is delimited by the line end.
+\end{abstract}
+\tocinclude{eolgrab}
+
+\newpage
\subsection{\pkgsectformat{epstopdf}}
\label{epstopdf}
\begin{abstract}
@@ -624,6 +645,15 @@ contain spaces.
\tocinclude{grffile}
\newpage
+\subsection{\pkgsectformat{hobsub}}
+\label{hobsub}
+\begin{abstract}
+Package \xpackage{hobsub} implements the idea of loading
+several packages in one big collection package.
+\end{abstract}
+\tocinclude{hobsub}
+
+\newpage
\subsection{\pkgsectformat{hologo}}
\label{hologo}
\begin{abstract}
@@ -644,6 +674,16 @@ that may be useful for others in package \xpackage{hypdoc}.
\tocinclude{holtxdoc}
\newpage
+\subsection{\pkgsectformat{hopatch}}
+\label{hopatch}
+\begin{abstract}
+This packages provides a wrapper to various package hooks
+provided by other packages or classes, but does not define
+own hooks.
+\end{abstract}
+\tocinclude{hopatch}
+
+\newpage
\subsection{\pkgsectformat{hycolor}}
\label{hycolor}
\begin{abstract}
@@ -901,6 +941,18 @@ that converts an existing macro to a robust one.
\tocinclude{makerobust}
\newpage
+\subsection{\pkgsectformat{mleftright}}
+\label{mleftright}
+\begin{abstract}
+\TeX\ sets subformulas by \cs{left} and \cs{right} as inner formulas
+with additional surrounding spaces in some situations. This package
+provides \cs{mleft} and \cs{mright} that call \cs{left} and \cs{right},
+but the delimiters will act as normal \cs{mathopen} and \cs{mathclose}
+delimiters without the additional space of an inner formula.
+\end{abstract}
+\tocinclude{mleftright}
+
+\newpage
\subsection{\pkgsectformat{pagegrid}}
\label{pagegrid}
\begin{abstract}
@@ -1037,6 +1089,18 @@ old code pages, e.g. cp437. It uses rules instead of using a font.
\tocinclude{pmboxdraw}
\newpage
+\subsection{\pkgsectformat{protecteddef}}
+\label{protecteddef}
+\begin{abstract}
+This packages provides \cs{ProtectedDef} for defining
+robust macros for both \hologo{plainTeX} and \hologo{LaTeX}.
+First \hologo{eTeX}'s \cs{protected} is tried, then
+\hologo{LaTeX}'s \cs{DeclareRobustCommand} is used.
+Otherwise the macro is not made robust.
+\end{abstract}
+\tocinclude{protecteddef}
+
+\newpage
\subsection{\pkgsectformat{refcount}}
\label{refcount}
\begin{abstract}
@@ -1073,6 +1137,15 @@ and its starred version.
\tocinclude{resizegather}
\newpage
+\subsection{\pkgsectformat{rotchiffre}}
+\label{rotchiffre}
+\begin{abstract}
+This package implements chiffres ROT13 with its variants
+ROT5, ROT18, and ROT47.
+\end{abstract}
+\tocinclude{rotchiffre}
+
+\newpage
\subsection{\pkgsectformat{scrindex}}
\label{scrindex}
\begin{abstract}
diff --git a/Master/texmf-dist/source/latex/oberdiek/pagegrid.dtx b/Master/texmf-dist/source/latex/oberdiek/pagegrid.dtx
index ed0dde94e49..d4cef116fb3 100644
--- a/Master/texmf-dist/source/latex/oberdiek/pagegrid.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/pagegrid.dtx
@@ -17,9 +17,6 @@
%
% This Current Maintainer of this work is Heiko Oberdiek.
%
-% The Base Interpreter refers to any `TeX-Format',
-% because some files are installed in TDS:tex/generic//.
-%
% This work consists of the main source file pagegrid.dtx
% and the derived files
% pagegrid.sty, pagegrid.pdf, pagegrid.ins, pagegrid.drv,
@@ -56,7 +53,7 @@
% pdflatex pagegrid.dtx
%
% Installation:
-% TDS:tex/generic/oberdiek/pagegrid.sty
+% TDS:tex/latex/oberdiek/pagegrid.sty
% TDS:doc/latex/oberdiek/pagegrid.pdf
% TDS:doc/latex/oberdiek/test/pagegrid-test1.tex
% TDS:source/latex/oberdiek/pagegrid.dtx
@@ -104,9 +101,6 @@ This work has the LPPL maintenance status "maintained".
This Current Maintainer of this work is Heiko Oberdiek.
-The Base Interpreter refers to any `TeX-Format',
-because some files are installed in TDS:tex/generic//.
-
This work consists of the main source file pagegrid.dtx
and the derived files
pagegrid.sty, pagegrid.pdf, pagegrid.ins, pagegrid.drv,
@@ -118,7 +112,7 @@ and the derived files
\generate{%
\file{pagegrid.ins}{\from{pagegrid.dtx}{install}}%
\file{pagegrid.drv}{\from{pagegrid.dtx}{driver}}%
- \usedir{tex/generic/oberdiek}%
+ \usedir{tex/latex/oberdiek}%
\file{pagegrid.sty}{\from{pagegrid.dtx}{package}}%
\usedir{doc/latex/oberdiek/test}%
\file{pagegrid-test1.tex}{\from{pagegrid.dtx}{test1}}%
@@ -161,7 +155,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{624}
+% \CheckSum{698}
%
% \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
@@ -344,14 +338,18 @@ and the derived files
% \end{macrocode}
% 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@pagegrid.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -359,7 +357,6 @@ and the derived files
\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.}%
@@ -371,24 +368,27 @@ and the derived files
\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}%
@@ -407,32 +407,41 @@ and the derived files
\fi
\expandafter\x\csname ver@pagegrid.sty\endcsname
\ProvidesPackage{pagegrid}%
- [2009/12/04 v1.4 Print page grid in background (HO)]
+ [2009/12/04 v1.4 Print page grid in background (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 pagegrid@AtEnd\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\pagegrid@AtEnd{%
\pagegrid@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{9}{10}% (tab)
\TMP@EnsureCode{10}{12}% ^^J
@@ -452,14 +461,15 @@ and the derived files
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{59}{12}% ;
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{63}{12}% ?
\TMP@EnsureCode{91}{12}% [
\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{94}{7}% ^ (superscript)
+\TMP@EnsureCode{95}{8}% _ (subscript)
\TMP@EnsureCode{96}{12}% `
\TMP@EnsureCode{124}{12}% |
+\edef\pagegrid@AtEnd{\pagegrid@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \begin{macrocode}
@@ -744,7 +754,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\pagegrid@AtEnd
+\pagegrid@AtEnd%
%</package>
% \end{macrocode}
%
@@ -808,6 +818,22 @@ and the derived files
\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 pagegrid.sty\relax}%
\fi
@@ -818,15 +844,20 @@ and the derived files
\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
@@ -896,7 +927,7 @@ and the derived files
% \begin{quote}
% \def\t{^^A
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
-% pagegrid.sty & tex/generic/oberdiek/pagegrid.sty\\
+% pagegrid.sty & tex/latex/oberdiek/pagegrid.sty\\
% pagegrid.pdf & doc/latex/oberdiek/pagegrid.pdf\\
% test/pagegrid-test1.tex & doc/latex/oberdiek/test/pagegrid-test1.tex\\
% pagegrid.dtx & source/latex/oberdiek/pagegrid.dtx\\
diff --git a/Master/texmf-dist/source/latex/oberdiek/pdfcol.dtx b/Master/texmf-dist/source/latex/oberdiek/pdfcol.dtx
index d1598de562a..25fb0420825 100644
--- a/Master/texmf-dist/source/latex/oberdiek/pdfcol.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/pdfcol.dtx
@@ -167,7 +167,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{646}
+% \CheckSum{721}
%
% \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
@@ -300,14 +300,18 @@ and the derived files
% \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 % @
- \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@pdfcol.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -315,7 +319,6 @@ and the derived files
\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.}%
@@ -327,24 +330,27 @@ and the derived files
\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}%
@@ -363,34 +369,43 @@ and the derived files
\fi
\expandafter\x\csname ver@pdfcol.sty\endcsname
\ProvidesPackage{pdfcol}%
- [2007/12/12 v1.2 Maintaining additional color stacks for pdfTeX (HO)]
+ [2007/12/12 v1.2 Maintaining additional color stacks for pdfTeX (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 PDFCOL@AtEnd\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\PDFCOL@AtEnd{%
\PDFCOL@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{39}{12}% '
\TMP@EnsureCode{40}{12}% (
@@ -399,8 +414,10 @@ and the derived files
\TMP@EnsureCode{44}{12}% ,
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
-\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{96}{12}% `
+\edef\PDFCOL@AtEnd{\PDFCOL@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Check requirements}
@@ -723,10 +740,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\PDFCOL@AtEnd
-% \end{macrocode}
-%
-% \begin{macrocode}
+\PDFCOL@AtEnd%
%</package>
% \end{macrocode}
%
@@ -790,6 +804,22 @@ and the derived files
\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 pdfcol.sty\relax}%
\fi
@@ -800,15 +830,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/pdfescape.dtx b/Master/texmf-dist/source/latex/oberdiek/pdfescape.dtx
index b57088ea189..96dfd24805e 100644
--- a/Master/texmf-dist/source/latex/oberdiek/pdfescape.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/pdfescape.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007, 2010 by
+% Copyright (C) 2007, 2010, 2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -25,7 +25,7 @@
% pdfescape.sty, pdfescape.pdf, pdfescape.ins, pdfescape.drv,
% pdfescape-test1.tex, pdfescape-test2.tex,
% pdfescape-test3.tex, pdfescape-test4.tex,
-% pdfescape-test5.tex.
+% pdfescape-test5.tex, pdfescape-test6.tex.
%
% Distribution:
% CTAN:macros/latex/contrib/oberdiek/pdfescape.dtx
@@ -65,6 +65,7 @@
% TDS:doc/latex/oberdiek/test/pdfescape-test3.tex
% TDS:doc/latex/oberdiek/test/pdfescape-test4.tex
% TDS:doc/latex/oberdiek/test/pdfescape-test5.tex
+% TDS:doc/latex/oberdiek/test/pdfescape-test6.tex
% TDS:source/latex/oberdiek/pdfescape.dtx
%
%<*ignore>
@@ -82,7 +83,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: pdfescape 2010/03/01 v1.9 Provides hex, PDF name and string conversions (HO)}
+\Msg{* Package: pdfescape 2011/04/04 v1.12 Provides string conversions (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -93,7 +94,7 @@
This is a generated file.
-Copyright (C) 2007, 2010 by
+Copyright (C) 2007, 2010, 2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -118,7 +119,7 @@ and the derived files
pdfescape.sty, pdfescape.pdf, pdfescape.ins, pdfescape.drv,
pdfescape-test1.tex, pdfescape-test2.tex,
pdfescape-test3.tex, pdfescape-test4.tex,
- pdfescape-test5.tex.
+ pdfescape-test5.tex, pdfescape-test6.tex.
\endpreamble
\let\MetaPrefix\DoubleperCent
@@ -134,6 +135,7 @@ and the derived files
\file{pdfescape-test3.tex}{\from{pdfescape.dtx}{test3}}%
\file{pdfescape-test4.tex}{\from{pdfescape.dtx}{test4}}%
\file{pdfescape-test5.tex}{\from{pdfescape.dtx}{test5}}%
+ \file{pdfescape-test6.tex}{\from{pdfescape.dtx}{test6}}%
}
\catcode32=13\relax% active space
@@ -164,7 +166,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{pdfescape.drv}%
- [2010/03/01 v1.9 Provides hex, PDF name and string conversions (HO)]%
+ [2011/04/04 v1.12 Provides string conversions (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -173,7 +175,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{2015}
+% \CheckSum{2451}
%
% \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
@@ -194,7 +196,7 @@ and the derived files
% \GetFileInfo{pdfescape.drv}
%
% \title{The \xpackage{pdfescape} package}
-% \date{2010/03/01 v1.9}
+% \date{2011/04/04 v1.12}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -276,14 +278,18 @@ and the derived files
% \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 % @
- \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@pdfescape.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -291,7 +297,6 @@ and the derived files
\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.}%
@@ -303,24 +308,27 @@ and the derived files
\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}%
@@ -339,34 +347,43 @@ and the derived files
\fi
\expandafter\x\csname ver@pdfescape.sty\endcsname
\ProvidesPackage{pdfescape}%
- [2010/03/01 v1.9 Provides hex, PDF name and string conversions (HO)]
+ [2011/04/04 v1.12 Provides string conversions (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \begin{macrocode}
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
\catcode123 1 % {
\catcode125 2 % }
+ \catcode64 11 %
\def\x{\endgroup
\expandafter\edef\csname PE@AtEnd\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#3{%
\edef\PE@AtEnd{%
\PE@AtEnd
- #1#2 \the#1#2\relax
+ #1#2=\the#1#2\relax
}%
- #1#2 #3\relax
+ #1#2=#3\relax
}
\TMP@EnsureCode\catcode{0}{12}% ^^@
\TMP@EnsureCode\catcode{34}{12}% "
@@ -376,13 +393,32 @@ and the derived files
\TMP@EnsureCode\catcode{46}{12}% .
\TMP@EnsureCode\catcode{47}{12}% /
\TMP@EnsureCode\catcode{60}{12}% <
-\TMP@EnsureCode\catcode{61}{12}% =
\TMP@EnsureCode\catcode{62}{12}% >
+\TMP@EnsureCode\catcode{91}{12}% [
+\TMP@EnsureCode\catcode{93}{12}% ]
\TMP@EnsureCode\catcode{94}{7}% ^
\TMP@EnsureCode\catcode{96}{12}% `
\TMP@EnsureCode\uccode{34}{0}% "
\TMP@EnsureCode\uccode{48}{0}% 0
\TMP@EnsureCode\uccode{61}{0}% =
+\edef\PE@AtEnd{\PE@AtEnd\noexpand\endinput}
+% \end{macrocode}
+%
+% \subsection{Load package}
+%
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+ \TMP@RequirePackage{ltxcmds}[2010/04/08]%
+\else
+ \RequirePackage{ltxcmds}[2010/04/08]%
+\fi
% \end{macrocode}
%
% \subsection{Sanitizing}
@@ -467,7 +503,7 @@ and the derived files
\ifx\\#2\\%
\else
\PE@space@other
- \@ReturnAfterFi{%
+ \ltx@ReturnAfterFi{%
\PE@SpaceToOther#2\relax
}%
\fi
@@ -475,12 +511,6 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@ReturnAfterFi}
-% \begin{macrocode}
-\long\def\@ReturnAfterFi#1\fi{\fi#1}
-% \end{macrocode}
-% \end{macro}
-%
% \subsection{\cs{EdefUnescapeName}}
%
% \begin{macro}{\EdefUnescapeName}
@@ -523,18 +553,18 @@ and the derived files
}%
\ifcase\ifcase\expandafter\PE@TestUcHexDigit\PE@testA
\ifcase\expandafter\PE@TestUcHexDigit\PE@testB
- \z@
+ \ltx@zero
\else
- \@ne
+ \ltx@one
\fi
\else
- \@ne
+ \ltx@one
\fi
- \uccode\z@="\PE@testA\PE@testB\relax
+ \uccode\ltx@zero="\PE@testA\PE@testB\relax
\uppercase{%
\def\PE@temp{^^@}%
}%
- \uccode\z@=\z@
+ \uccode\ltx@zero=\ltx@zero
\edef\PE@result{\PE@result$1\PE@temp}%
\let\PE@next\PE@DeName
\else
@@ -559,22 +589,22 @@ and the derived files
\uccode`d=`D\relax
\uccode`e=`E\relax
\uccode`f=`F\relax
- \uccode`A=\z@
- \uccode`B=\z@
- \uccode`C=\z@
- \uccode`D=\z@
- \uccode`E=\z@
- \uccode`F=\z@
- \uccode`0=\z@
- \uccode`1=\z@
- \uccode`2=\z@
- \uccode`3=\z@
- \uccode`4=\z@
- \uccode`5=\z@
- \uccode`6=\z@
- \uccode`7=\z@
- \uccode`8=\z@
- \uccode`9=\z@
+ \uccode`A=\ltx@zero
+ \uccode`B=\ltx@zero
+ \uccode`C=\ltx@zero
+ \uccode`D=\ltx@zero
+ \uccode`E=\ltx@zero
+ \uccode`F=\ltx@zero
+ \uccode`0=\ltx@zero
+ \uccode`1=\ltx@zero
+ \uccode`2=\ltx@zero
+ \uccode`3=\ltx@zero
+ \uccode`4=\ltx@zero
+ \uccode`5=\ltx@zero
+ \uccode`6=\ltx@zero
+ \uccode`7=\ltx@zero
+ \uccode`8=\ltx@zero
+ \uccode`9=\ltx@zero
}
% \end{macrocode}
% \end{macro}
@@ -583,19 +613,19 @@ and the derived files
% \begin{macrocode}
\def\PE@TestUcHexDigit#1{%
\ifnum`#1<48 % 0
- \@ne
+ \ltx@one
\else
\ifnum`#1>70 % F
- \@ne
+ \ltx@one
\else
\ifnum`#1>57 % 9
\ifnum`#1<65 % A
- \@ne
+ \ltx@one
\else
- \z@
+ \ltx@zero
\fi
\else
- \z@
+ \ltx@zero
\fi
\fi
\fi
@@ -679,19 +709,19 @@ and the derived files
|let|PE@next|relax
|else
|if n#2%
- |uccode|z@=10 %
+ |uccode|ltx@zero=10 %
|else|if r#2%
- |uccode|z@=13 %
+ |uccode|ltx@zero=13 %
|else|if t#2%
- |uccode|z@=9 %
+ |uccode|ltx@zero=9 %
|else|if b#2%
- |uccode|z@=8 %
+ |uccode|ltx@zero=8 %
|else|if f#2%
- |uccode|z@=12 %
+ |uccode|ltx@zero=12 %
|else
- |uccode|z@=|z@
+ |uccode|ltx@zero=|ltx@zero
|fi|fi|fi|fi|fi
- |ifnum|uccode|z@>|z@
+ |ifnum|uccode|ltx@zero>|ltx@zero
|uppercase{%
|edef|PE@temp{^^@}%
}%
@@ -739,12 +769,12 @@ and the derived files
% \begin{macrocode}
\def\PE@TestOctDigit#1{%
\ifnum`#1<48 % 0
- \@ne
+ \ltx@one
\else
\ifnum`#1>55 % 7
- \@ne
+ \ltx@one
\else
- \z@
+ \ltx@zero
\fi
\fi
}
@@ -777,7 +807,7 @@ and the derived files
% \begin{macro}{\PE@OctAll}
% \begin{macrocode}
\def\PE@OctAll#1{%
- \uccode\z@='#1\relax
+ \uccode\ltx@zero='#1\relax
\uppercase{%
\edef\PE@result{\PE@result^^@}%
}%
@@ -791,7 +821,13 @@ and the derived files
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input pdftexcmds.sty\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+ \TMP@RequirePackage{pdftexcmds}[2007/11/11]%
\else
\RequirePackage{pdftexcmds}[2007/11/11]%
\fi
@@ -886,9 +922,8 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
- \PE@AtEnd
- \expandafter\endinput
-\fi
+ \expandafter\PE@AtEnd
+\fi%
% \end{macrocode}
%
% \subsection{Help macros}
@@ -916,7 +951,7 @@ and the derived files
% \subsubsection{Switch for \eTeX}
%
% \begin{macrocode}
-\newif\ifPE@etex
+\ltx@newif\ifPE@etex
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname numexpr\endcsname\relax
\else
@@ -1067,8 +1102,8 @@ and the derived files
}%
\ifcase\expandafter\PE@TestUcHexDigit\PE@testA
\ifcase\expandafter\PE@TestUcHexDigit\PE@testB
- \uccode\z@="\PE@testA\PE@testB\relax
- \ifnum\uccode\z@=32 %
+ \uccode\ltx@zero="\PE@testA\PE@testB\relax
+ \ifnum\uccode\ltx@zero=32 %
\let\PE@temp\PE@space@space
\else
\uppercase{%
@@ -1223,7 +1258,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\PE@AtEnd
+\PE@AtEnd%
% \end{macrocode}
%
% \begin{macrocode}
@@ -1290,6 +1325,22 @@ and the derived files
\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 pdfescape.sty\relax}%
\fi
@@ -1300,15 +1351,20 @@ and the derived files
\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
@@ -1332,7 +1388,7 @@ and the derived files
% \begin{macrocode}
%<*test2>
\ProvidesFile{pdfescape-test2.tex}%
- [2010/03/01 v1.9 Test with \string\pdfescape... commands]%
+ [2011/04/04 v1.12 Test with \string\pdfescape... commands]%
%</test2>
% \end{macrocode}
%
@@ -1341,7 +1397,7 @@ and the derived files
% \begin{macrocode}
%<*test3>
\ProvidesFile{pdfescape-test3.tex}%
- [2010/03/01 v1.9 Test without \string\pdfescape..., with e-TeX]%
+ [2011/04/04 v1.12 Test without \string\pdfescape..., with e-TeX]%
%</test3>
% \end{macrocode}
%
@@ -1350,7 +1406,7 @@ and the derived files
% \begin{macrocode}
%<*test4>
\ProvidesFile{pdfescape-test4.tex}%
- [2010/03/01 v1.9 Test without \string\pdfescape... and e-TeX]%
+ [2011/04/04 v1.12 Test without \string\pdfescape... and e-TeX]%
%</test4>
% \end{macrocode}
%
@@ -1359,7 +1415,7 @@ and the derived files
% \begin{macrocode}
%<*test5>
\ProvidesFile{pdfescape-test5.tex}%
- [2010/03/01 v1.9 Test with LuaTeX]%
+ [2011/04/04 v1.12 Test with LuaTeX]%
%</test5>
% \end{macrocode}
%
@@ -1781,6 +1837,152 @@ and the derived files
%</test2|test3|test4|test5>
% \end{macrocode}
%
+% \subsubsection{Test for \hologo{iniTeX}}
+%
+% \begin{macrocode}
+%<*test6>
+\input pdfescape.sty\relax
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\^=7 %
+\catcode`\@=11 %
+% \end{macrocode}
+% \begin{macrocode}
+\begingroup
+ \catcode`\@=11 %
+ \countdef\count@=255 %
+ \def\space{ }%
+ \long\def\@whilenum#1\do #2{%
+ \ifnum #1\relax
+ #2\relax
+ \@iwhilenum{#1\relax#2\relax}%
+ \fi
+ }%
+ \long\def\@iwhilenum#1{%
+ \ifnum #1%
+ \expandafter\@iwhilenum
+ \else
+ \expandafter\ltx@gobble
+ \fi
+ {#1}%
+ }%
+ \gdef\AllBytes{}%
+ \count@=0 %
+ \catcode0=12 %
+ \@whilenum\count@<256 \do{%
+ \lccode0=\count@
+ \ifnum\count@=32 %
+ \xdef\AllBytes{\AllBytes\space}%
+ \else
+ \lowercase{%
+ \xdef\AllBytes{\AllBytes^^@}%
+ }%
+ \fi
+ \advance\count@ by 1 %
+ }%
+\endgroup
+\def\AllBytesHex{%
+ 000102030405060708090A0B0C0D0E0F%
+ 101112131415161718191A1B1C1D1E1F%
+ 202122232425262728292A2B2C2D2E2F%
+ 303132333435363738393A3B3C3D3E3F%
+ 404142434445464748494A4B4C4D4E4F%
+ 505152535455565758595A5B5C5D5E5F%
+ 606162636465666768696A6B6C6D6E6F%
+ 707172737475767778797A7B7C7D7E7F%
+ 808182838485868788898A8B8C8D8E8F%
+ 909192939495969798999A9B9C9D9E9F%
+ A0A1A2A3A4A5A6A7A8A9AAABACADAEAF%
+ B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF%
+ C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF%
+ D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF%
+ E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF%
+ F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF%
+}
+\ltx@onelevel@sanitize\AllBytesHex
+\expandafter\lowercase\expandafter{%
+ \expandafter\def\expandafter\AllBytesHexLC
+ \expandafter{\AllBytesHex}%
+}
+\begingroup
+ \catcode`\#=12 %
+ \xdef\AllBytesName{%
+ #01#02#03#04#05#06#07#08#09#0A#0B#0C#0D#0E#0F%
+ #10#11#12#13#14#15#16#17#18#19#1A#1B#1C#1D#1E#1F%
+ #20!"#23$#25&'#28#29*+,-.#2F%
+ 0123456789:;#3C=#3E?%
+ @ABCDEFGHIJKLMNO%
+ PQRSTUVWXYZ#5B\ltx@backslashchar#5D^_%
+ `abcdefghijklmno%
+ pqrstuvwxyz#7B|#7D\string~#7F%
+ #80#81#82#83#84#85#86#87#88#89#8A#8B#8C#8D#8E#8F%
+ #90#91#92#93#94#95#96#97#98#99#9A#9B#9C#9D#9E#9F%
+ #A0#A1#A2#A3#A4#A5#A6#A7#A8#A9#AA#AB#AC#AD#AE#AF%
+ #B0#B1#B2#B3#B4#B5#B6#B7#B8#B9#BA#BB#BC#BD#BE#BF%
+ #C0#C1#C2#C3#C4#C5#C6#C7#C8#C9#CA#CB#CC#CD#CE#CF%
+ #D0#D1#D2#D3#D4#D5#D6#D7#D8#D9#DA#DB#DC#DD#DE#DF%
+ #E0#E1#E2#E3#E4#E5#E6#E7#E8#E9#EA#EB#EC#ED#EE#EF%
+ #F0#F1#F2#F3#F4#F5#F6#F7#F8#F9#FA#FB#FC#FD#FE#FF%
+ }%
+\endgroup
+\ltx@onelevel@sanitize\AllBytesName
+\edef\AllBytesFromName{\expandafter\ltx@gobble\AllBytes}
+
+\begingroup
+ \def\|{|}%
+ \edef\%{\ltx@percentchar}%
+ \catcode`\|=0 %
+ \catcode`\#=12 %
+ \catcode`\~=12 %
+ \catcode`\\=12 %
+ |xdef|AllBytesString{%
+ \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017%
+ \020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037%
+ \040!"#$|%&'\(\)*+,-./%
+ 0123456789:;<=>?%
+ @ABCDEFGHIJKLMNO%
+ PQRSTUVWXYZ[\\]^_%
+ `abcdefghijklmno%
+ pqrstuvwxyz{||}~\177%
+ \200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217%
+ \220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237%
+ \240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257%
+ \260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277%
+ \300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317%
+ \320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337%
+ \340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357%
+ \360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377%
+ }%
+|endgroup
+\ltx@onelevel@sanitize\AllBytesString
+% \end{macrocode}
+% \begin{macrocode}
+\def\msg#{\immediate\write16}
+\def\Test#1#2#3{%
+ \begingroup
+ #1\TestResult{#2}%
+ \ifx\TestResult#3%
+ \else
+ \newlinechar=10 %
+ \msg{Expect:^^J#3}%
+ \msg{Result:^^J\TestResult}%
+ \errmessage{\string#2 -\string#1-> \string#3}%
+ \fi
+ \endgroup
+}
+\Test\EdefEscapeHex\AllBytes\AllBytesHex
+\Test\EdefUnescapeHex\AllBytesHex\AllBytes
+\Test\EdefEscapeName\AllBytes\AllBytesName
+\Test\EdefUnescapeName\AllBytesName\AllBytesFromName
+\Test\EdefEscapeString\AllBytes\AllBytesString
+\Test\EdefUnescapeString\AllBytesString\AllBytes
+% \end{macrocode}
+% \begin{macrocode}
+\csname @@end\endcsname\end
+%</test6>
+% \end{macrocode}
+%
% \section{Installation}
%
% \subsection{Download}
@@ -1847,6 +2049,7 @@ and the derived files
% test/pdfescape-test3.tex & doc/latex/oberdiek/test/pdfescape-test3.tex\\
% test/pdfescape-test4.tex & doc/latex/oberdiek/test/pdfescape-test4.tex\\
% test/pdfescape-test5.tex & doc/latex/oberdiek/test/pdfescape-test5.tex\\
+% test/pdfescape-test6.tex & doc/latex/oberdiek/test/pdfescape-test6.tex\\
% pdfescape.dtx & source/latex/oberdiek/pdfescape.dtx\\
% \end{tabular}^^A
% }^^A
@@ -2016,11 +2219,27 @@ and the derived files
% \end{Version}
% \begin{Version}{2007/11/11 v1.8}
% \item
-% Use of package \xpackage{pdftexcmds} for \LuaTeX\ support.
+% Use of package \xpackage{pdftexcmds} for \hologo{LuaTeX} support.
% \end{Version}
% \begin{Version}{2010/03/01 v1.9}
% \item
-% Compatibility with \iniTeX.
+% Compatibility with \hologo{iniTeX}.
+% \end{Version}
+% \begin{Version}{2010/11/12 v1.10}
+% \item
+% Use of package \xpackage{ltxcmds}.
+% \item
+% Fix for compatibility with \hologo{iniTeX}.
+% \end{Version}
+% \begin{Version}{2011/01/30 v1.11}
+% \item
+% Already loaded package files are not input in \hologo{plainTeX}.
+% \end{Version}
+% \begin{Version}{2011/04/04 v1.12}
+% \item
+% Further fixes for compatibility for \hologo{iniTeX}.
+% \item
+% Test file for \hologo{iniTeX} added.
% \end{Version}
% \end{History}
%
diff --git a/Master/texmf-dist/source/latex/oberdiek/pdfrender.dtx b/Master/texmf-dist/source/latex/oberdiek/pdfrender.dtx
index 12eb5314adb..0a684c5c44e 100644
--- a/Master/texmf-dist/source/latex/oberdiek/pdfrender.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/pdfrender.dtx
@@ -175,7 +175,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1393}
+% \CheckSum{1460}
%
% \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
@@ -381,14 +381,18 @@ and the derived files
% \end{macrocode}
% 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@pdfrender.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -396,7 +400,6 @@ and the derived files
\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.}%
@@ -408,24 +411,27 @@ and the derived files
\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}%
@@ -444,32 +450,41 @@ and the derived files
\fi
\expandafter\x\csname ver@pdfrender.sty\endcsname
\ProvidesPackage{pdfrender}%
- [2010/01/28 v1.2 Access to some PDF graphics parameters (HO)]
+ [2010/01/28 v1.2 Access to some PDF graphics parameters (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 PdfRender@AtEnd\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\PdfRender@AtEnd{%
\PdfRender@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{10}{12}% ^^J
\TMP@EnsureCode{36}{3}% $
@@ -485,7 +500,6 @@ and the derived files
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{59}{12}% ;
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{63}{12}% ?
\TMP@EnsureCode{91}{12}% [
@@ -614,7 +628,7 @@ and the derived files
% \begin{macrocode}
}%
\expandafter\PdfRender@AtEnd
-\fi
+\fi%
% \end{macrocode}
%
% \subsection{Enable color support of \LaTeX}
@@ -716,6 +730,8 @@ and the derived files
\PdfRender@PatchNormalColor
\PdfRender@PatchColorSetGroup
}
+% \end{macrocode}
+% \end{macro}
% \begin{macrocode}
\PdfRender@PatchColor
\ltx@IfUndefined{AtBeginDocument}{}{%
@@ -740,8 +756,6 @@ and the derived files
\AfterEndPreamble{\PdfRender@PatchColor}%
}%
% \end{macrocode}
-% \end{macro}
-
%
% \begin{macrocode}
\PdfRender@RequirePackage{kvsetkeys}[2010/01/28]
@@ -1293,7 +1307,7 @@ and the derived files
% \begin{macrocode}
\ifPdfRender@Match
\expandafter\PdfRender@AtEnd
-\fi
+\fi%
% \end{macrocode}
% \begin{macro}{\PdfRender@FindOp}
% \begin{macrocode}
@@ -1339,7 +1353,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\PdfRender@AtEnd
+\PdfRender@AtEnd%
%</package>
% \end{macrocode}
%
@@ -1403,6 +1417,22 @@ and the derived files
\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 pdfrender.sty\relax}%
\fi
@@ -1413,15 +1443,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/pdftexcmds.dtx b/Master/texmf-dist/source/latex/oberdiek/pdftexcmds.dtx
index 52752d99621..7f51559757b 100644
--- a/Master/texmf-dist/source/latex/oberdiek/pdftexcmds.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/pdftexcmds.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007, 2009, 2010 by
+% Copyright (C) 2007, 2009-2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -24,6 +24,7 @@
% and the derived files
% pdftexcmds.sty, pdftexcmds.pdf, pdftexcmds.ins, pdftexcmds.drv,
% pdftexcmds-test1.tex, pdftexcmds-test2.tex,
+% pdftexcmds-test-shell.tex, pdftexcmds-test-escape.tex,
% oberdiek.pdftexcmds.lua, pdftexcmds.lua.
%
% Distribution:
@@ -63,6 +64,8 @@
% TDS:doc/latex/oberdiek/pdftexcmds.pdf
% TDS:doc/latex/oberdiek/test/pdftexcmds-test1.tex
% TDS:doc/latex/oberdiek/test/pdftexcmds-test2.tex
+% TDS:doc/latex/oberdiek/test/pdftexcmds-test-shell.tex
+% TDS:doc/latex/oberdiek/test/pdftexcmds-test-escape.tex
% TDS:source/latex/oberdiek/pdftexcmds.dtx
%
%<*ignore>
@@ -80,7 +83,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: pdftexcmds 2010/04/01 v0.9 Utility functions of pdfTeX for LuaTeX (HO)}
+\Msg{* Package: pdftexcmds 2011/04/10 v0.14 Utilities of pdfTeX for LuaTeX (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -91,7 +94,7 @@
This is a generated file.
-Copyright (C) 2007, 2009, 2010 by
+Copyright (C) 2007, 2009-2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -115,6 +118,7 @@ This work consists of the main source file pdftexcmds.dtx
and the derived files
pdftexcmds.sty, pdftexcmds.pdf, pdftexcmds.ins, pdftexcmds.drv,
pdftexcmds-test1.tex, pdftexcmds-test2.tex,
+ pdftexcmds-test-shell.tex, pdftexcmds-test-escape.tex,
oberdiek.pdftexcmds.lua, pdftexcmds.lua.
\endpreamble
@@ -128,6 +132,8 @@ and the derived files
\usedir{doc/latex/oberdiek/test}%
\file{pdftexcmds-test1.tex}{\from{pdftexcmds.dtx}{test1}}%
\file{pdftexcmds-test2.tex}{\from{pdftexcmds.dtx}{test2}}%
+ \file{pdftexcmds-test-shell.tex}{\from{pdftexcmds.dtx}{test-shell}}%
+ \file{pdftexcmds-test-escape.tex}{\from{pdftexcmds.dtx}{test-escape}}%
}
\def\MetaPrefix{-- }
\def\defaultpostamble{%
@@ -169,7 +175,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{pdftexcmds.drv}%
- [2010/04/01 v0.9 Utility functions of pdfTeX for LuaTeX (HO)]%
+ [2011/04/10 v0.14 Utilities of pdfTeX for LuaTeX (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\usepackage{paralist}
@@ -179,7 +185,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{940}
+% \CheckSum{1618}
%
% \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
@@ -200,7 +206,7 @@ and the derived files
% \GetFileInfo{pdftexcmds.drv}
%
% \title{The \xpackage{pdftexcmds} package}
-% \date{2010/04/01 v0.9}
+% \date{2011/04/10 v0.14}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -329,14 +335,50 @@ and the derived files
% \end{declcs}
% Same as |\pdfmdfivesum file{|\meta{filename}|}|.
%
+% \begin{declcs}{pdf@draftmode}
+% \end{declcs}
+% If the \TeX\ compiler knows \cs{pdfdraftmode} (\hologo{pdfTeX},
+% \hologo{LuaTeX}), then \cs{pdf@draftmode} returns, whether
+% this mode is enabled. The result is an implicite number:
+% one means the draft mode is available and enabled.
+% If the value is zero, then the mode is not active or
+% \cs{pdfdraftmode} is not available.
+% An explicite number is yielded by \cs{number}\cs{pdf@draftmode}.
+% The macro cannot
+% be used to change the mode, see \cs{pdf@setdraftmode}.
+%
+% \begin{declcs}{pdf@ifdraftmode} \M{true} \M{false}
+% \end{declcs}
+% If \cs{pdfdraftmode} is available and enabled, \meta{true} is
+% called, otherwise \meta{false} is executed.
+%
+% \begin{declcs}{pdf@setdraftmode} \M{value}
+% \end{declcs}
+% Macro \cs{pdf@setdraftmode} expects the number zero or one as
+% \meta{value}. Zero deactivates the mode and one enables the draft mode.
+% The macro does not have an effect, if the feature \cs{pdfdraftmode} is not
+% available.
+%
% \begin{declcs}{pdf@shellescape}
% \end{declcs}
-% Same as |\pdfshellescape|. It expands to |1| if external
+% Same as |\pdfshellescape|. It is or expands to |1| if external
% commands can be executed and |0| otherwise. In \hologo{pdfTeX} external
% commands must be enabled first by command line option or
% configuration option. In \hologo{LuaTeX} option |--safer| disables
% the execution of external commands.
%
+% Hints for usage:
+% \begin{itemize}
+% \item \cs{pdf@shellescape} might be a numerical constant,
+% expands to the primitive, or expands to a plain number.
+% Therefore use it in contexts where these differences does not matter.
+% \item Use in comparisons, e.g.:
+% \begin{quote}
+% |\ifnum\pdf@shellescape=0 ...|
+% \end{quote}
+% \item Print the number: |\number\pdf@shellescape|
+% \end{itemize}
+%
% \begin{declcs}{pdf@system} \M{cmdline}
% \end{declcs}
% It is a wrapper for |\immediate\write18| in \hologo{pdfTeX} or
@@ -418,14 +460,18 @@ and the derived files
% \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 % @
- \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@pdftexcmds.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -433,7 +479,6 @@ and the derived files
\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.}%
@@ -445,24 +490,27 @@ and the derived files
\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}%
@@ -481,38 +529,51 @@ and the derived files
\fi
\expandafter\x\csname ver@pdftexcmds.sty\endcsname
\ProvidesPackage{pdftexcmds}%
- [2010/04/01 v0.9 Utility functions of pdfTeX for LuaTeX (HO)]
+ [2011/04/10 v0.14 Utilities of pdfTeX for LuaTeX (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 pdftexcmds@AtEnd\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\pdftexcmds@AtEnd{%
\pdftexcmds@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
+\TMP@EnsureCode{0}{12}%
+\TMP@EnsureCode{1}{12}%
+\TMP@EnsureCode{2}{12}%
\TMP@EnsureCode{10}{12}% ^^J
\TMP@EnsureCode{33}{12}% !
\TMP@EnsureCode{34}{12}% "
+\TMP@EnsureCode{38}{4}% &
\TMP@EnsureCode{39}{12}% '
\TMP@EnsureCode{40}{12}% (
\TMP@EnsureCode{41}{12}% )
@@ -524,8 +585,9 @@ and the derived files
\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{94}{7}% ^ (superscript)
\TMP@EnsureCode{95}{12}% _ (other)
\TMP@EnsureCode{96}{12}% `
@@ -533,22 +595,31 @@ and the derived files
\edef\pdftexcmds@AtEnd{%
\pdftexcmds@AtEnd
\escapechar=\number\escapechar\relax
+ \noexpand\endinput
}
\escapechar=92 %
% \end{macrocode}
%
-% \subsection{Load package \xpackage{infwarerr}}
+% \subsection{Load packages}
%
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input infwarerr.sty\relax
- \input ifluatex.sty\relax
- \input ltxcmds.sty\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+ \TMP@RequirePackage{infwarerr}[2007/09/09]%
+ \TMP@RequirePackage{ifluatex}[2010/03/01]%
+ \TMP@RequirePackage{ltxcmds}[2010/12/02]%
+ \TMP@RequirePackage{ifpdf}[2010/09/13]%
\else
\RequirePackage{infwarerr}[2007/09/09]%
\RequirePackage{ifluatex}[2010/03/01]%
- \RequirePackage{ltxcmds}[2009/12/12]%
+ \RequirePackage{ltxcmds}[2010/12/02]%
+ \RequirePackage{ifpdf}[2010/09/13]%
\fi
% \end{macrocode}
%
@@ -658,7 +729,10 @@ and the derived files
\endlinechar=\newlinechar
\pdftexcmds@directlua{%
if tex.enableprimitives then
- tex.enableprimitives('pdf@', {'primitive', 'ifprimitive'})
+ tex.enableprimitives(
+ 'pdf@',
+ {'primitive', 'ifprimitive', 'pdfdraftmode'}
+ )
tex.enableprimitives('', {'luaescapestring'})
end
}%
@@ -834,23 +908,156 @@ and the derived files
\ifluatex
\else
\pdf@isprimitive
- \pdftexcmds@AtEnd
- \expandafter\endinput
\fi
% \end{macrocode}
%
+% \subsection{\cs{pdf@draftmode}}
+%
+%
+% \begin{macrocode}
+\let\pdftexcmds@temp\ltx@zero %
+\ltx@IfUndefined{pdfdraftmode}{%
+ \@PackageInfoNoLine{pdftexcmds}{\ltx@backslashchar pdfdraftmode not found}%
+}{%
+ \ifpdf
+ \let\pdftexcmds@temp\ltx@one
+ \@PackageInfoNoLine{pdftexcmds}{\ltx@backslashchar pdfdraftmode found}%
+ \else
+ \@PackageInfoNoLine{pdftexcmds}{%
+ \ltx@backslashchar pdfdraftmode is ignored in DVI mode%
+ }%
+ \fi
+}
+\ifcase\pdftexcmds@temp
+% \end{macrocode}
+% \begin{macro}{\pdf@draftmode}
+% \begin{macrocode}
+ \let\pdf@draftmode\ltx@zero
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pdf@ifdraftmode}
+% \begin{macrocode}
+ \let\pdf@ifdraftmode\ltx@secondoftwo
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pdftexcmds@setdraftmode}
+% \begin{macrocode}
+ \def\pdftexcmds@setdraftmode#1{}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\else
+% \end{macrocode}
+% \begin{macro}{\pdftexcmds@draftmode}
+% \begin{macrocode}
+ \let\pdftexcmds@draftmode\pdfdraftmode
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pdf@ifdraftmode}
+% \begin{macrocode}
+ \def\pdf@ifdraftmode{%
+ \ifnum\pdftexcmds@draftmode=\ltx@one
+ \expandafter\ltx@firstoftwo
+ \else
+ \expandafter\ltx@secondoftwo
+ \fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pdf@draftmode}
+% \begin{macrocode}
+ \def\pdf@draftmode{%
+ \ifnum\pdftexcmds@draftmode=\ltx@one
+ \expandafter\ltx@one
+ \else
+ \expandafter\ltx@zero
+ \fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pdftexcmds@setdraftmode}
+% \begin{macrocode}
+ \def\pdftexcmds@setdraftmode#1{%
+ \pdftexcmds@draftmode=#1\relax
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+% \begin{macro}{\pdf@setdraftmode}
+% \begin{macrocode}
+\def\pdf@setdraftmode#1{%
+ \begingroup
+ \count\ltx@cclv=#1\relax
+ \edef\x{\endgroup
+ \noexpand\pdftexcmds@@setdraftmode{\the\count\ltx@cclv}%
+ }%
+ \x
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pdftexcmds@@setdraftmode}
+% \begin{macrocode}
+\def\pdftexcmds@@setdraftmode#1{%
+ \ifcase#1 %
+ \pdftexcmds@setdraftmode{#1}%
+ \or
+ \pdftexcmds@setdraftmode{#1}%
+ \else
+ \@PackageWarning{pdftexcmds}{%
+ \string\pdf@setdraftmode: Ignoring\MessageBreak
+ invalid value `#1'%
+ }%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Load Lua module}
%
% \begin{macrocode}
+\ifluatex
+\else
+ \expandafter\pdftexcmds@AtEnd
+\fi%
+% \end{macrocode}
+%
+% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input luatex-loader.sty\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+ \TMP@RequirePackage{luatex-loader}[2009/04/10]%
\else
\RequirePackage{luatex-loader}[2009/04/10]%
\fi
\pdftexcmds@directlua{%
require("oberdiek.pdftexcmds")%
}
+\begingroup
+ \def\x{2011/04/10 v0.14}%
+ \ltx@onelevel@sanitize\x
+ \edef\y{%
+ \pdftexcmds@directlua{%
+ if oberdiek.pdftexcmds.getversion then %
+ oberdiek.pdftexcmds.getversion()%
+ end%
+ }%
+ }%
+ \ifx\x\y
+ \else
+ \@PackageError{pdftexcmds}{%
+ Wrong version of lua module.\MessageBreak
+ Package version: \x\MessageBreak
+ Lua module: \y
+ }\@ehc
+ \fi
+\endgroup
% \end{macrocode}
%
% \subsection{Lua functions}
@@ -866,6 +1073,65 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pdftexcmds@Patch}
+% \begin{macrocode}
+\def\pdftexcmds@Patch{0}
+
+\ifnum\luatexversion>40 %
+ \ifnum\luatexversion<66 %
+ \def\pdftexcmds@Patch{1}%
+ \fi
+\fi
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\ifcase\pdftexcmds@Patch
+ \catcode`\&=14 %
+\else
+ \catcode`\&=9 %
+% \end{macrocode}
+% \begin{macro}{\pdftexcmds@PatchDecode}
+% \begin{macrocode}
+ \def\pdftexcmds@PatchDecode#1\@nil{%
+ \pdftexcmds@DecodeA#1^^A^^A\@nil{}%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pdftexcmds@DecodeA}
+% \begin{macrocode}
+ \def\pdftexcmds@DecodeA#1^^A^^A#2\@nil#3{%
+ \ifx\relax#2\relax
+ \ltx@ReturnAfterElseFi{%
+ \pdftexcmds@DecodeB#3#1^^A^^B\@nil{}%
+ }%
+ \else
+ \ltx@ReturnAfterFi{%
+ \pdftexcmds@DecodeA#2\@nil{#3#1^^@}%
+ }%
+ \fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pdftexcmds@DecodeB}
+% \begin{macrocode}
+ \def\pdftexcmds@DecodeB#1^^A^^B#2\@nil#3{%
+ \ifx\relax#2\relax%
+ \ltx@ReturnAfterElseFi{%
+ \ltx@zero
+ #3#1%
+ }%
+ \else
+ \ltx@ReturnAfterFi{%
+ \pdftexcmds@DecodeB#2\@nil{#3#1^^A}%
+ }%
+ \fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
% \begin{macrocode}
\ifnum\luatexversion<36 %
\else
@@ -907,22 +1173,26 @@ and the derived files
% \begin{macro}{\pdf@unescapehex}
% \begin{macrocode}
\def\pdf@unescapehex#1{%
+& \romannumeral\expandafter\pdftexcmds@PatchDecode
\the\expandafter\pdftexcmds@toks
\directlua0{%
oberdiek.pdftexcmds.toks="pdftexcmds@toks"%
- oberdiek.pdftexcmds.unescapehex("\luaescapestring{#1}", "byte")%
+ oberdiek.pdftexcmds.unescapehex("\luaescapestring{#1}", "byte", \pdftexcmds@Patch)%
}%
+& \@nil
}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\pdf@unescapehexnative}
% \begin{macrocode}
\def\pdf@unescapehexnative#1{%
+& \romannumeral\expandafter\pdftexcmds@PatchDecode
\the\expandafter\pdftexcmds@toks
\directlua0{%
oberdiek.pdftexcmds.toks="pdftexcmds@toks"%
- oberdiek.pdftexcmds.unescapehex("\luaescapestring{#1}")%
+ oberdiek.pdftexcmds.unescapehex("\luaescapestring{#1}", \pdftexcmds@Patch)%
}%
+& \@nil
}%
% \end{macrocode}
% \end{macro}
@@ -1064,18 +1334,20 @@ and the derived files
}%
=1 %
\def\pdf@pipe#1{%
+& \romannumeral\expandafter\pdftexcmds@PatchDecode
\the\expandafter\pdftexcmds@toks
\pdftexcmds@directlua{%
oberdiek.pdftexcmds.toks="pdftexcmds@toks"%
- oberdiek.pdftexcmds.pipe("\luaescapestring{#1}")%
+ oberdiek.pdftexcmds.pipe("\luaescapestring{#1}", \pdftexcmds@Patch)%
}%
+& \@nil
}%
\fi
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
-\pdftexcmds@AtEnd
+\pdftexcmds@AtEnd%
%</package>
% \end{macrocode}
%
@@ -1088,6 +1360,9 @@ and the derived files
% \begin{macrocode}
module("oberdiek.pdftexcmds", package.seeall)
local systemexitstatus
+function getversion()
+ tex.write("2011/04/10 v0.14")
+end
function strcmp(A, B)
if A == B then
tex.write("0")
@@ -1136,7 +1411,7 @@ end
% See procedure |unescapehex| in file \xfile{utils.c} of \hologo{pdfTeX}.
% Caution: |tex.write| ignores leading spaces.
% \begin{macrocode}
-function unescapehex(str, mode)
+function unescapehex(str, mode, patch)
local a = 0
local first = true
local result = {}
@@ -1164,6 +1439,23 @@ function unescapehex(str, mode)
if not first then
table.insert(result, a)
end
+ if patch == 1 then
+ local temp = {}
+ for i, a in ipairs(result) do
+ if a == 0 then
+ table.insert(temp, 1)
+ table.insert(temp, 1)
+ else
+ if a == 1 then
+ table.insert(temp, 1)
+ table.insert(temp, 2)
+ else
+ table.insert(temp, a)
+ end
+ end
+ end
+ result = temp
+ end
if mode == "byte" then
local utf8 = {}
for i, a in ipairs(result) do
@@ -1326,7 +1618,16 @@ function filemdfivesum(filename)
end
function shellescape()
if os.execute then
- tex.write("1")
+ local result = os.execute()
+ if result == 0 then
+ tex.write("0")
+ else
+ if result == nil then
+ tex.write("0")
+ else
+ tex.write("1")
+ end
+ end
else
tex.write("0")
end
@@ -1354,7 +1655,7 @@ function lastsystemexit()
tex.write(math.floor(result / 256))
end
end
-function pipe(cmdline)
+function pipe(cmdline, patch)
local result
systemexitstatus = nil
texio.write_nl("log", "pipe(" .. cmdline ..") ")
@@ -1369,6 +1670,23 @@ function pipe(cmdline)
texio.write("log", "disabled.")
end
if result then
+ if patch == 1 then
+ local temp = {}
+ for i, a in ipairs(result) do
+ if a == 0 then
+ table.insert(temp, 1)
+ table.insert(temp, 1)
+ else
+ if a == 1 then
+ table.insert(temp, 1)
+ table.insert(temp, 2)
+ else
+ table.insert(temp, a)
+ end
+ end
+ end
+ result = temp
+ end
tex.settoks(toks, result)
else
tex.settoks(toks, "")
@@ -1439,6 +1757,22 @@ end
\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 pdftexcmds.sty\relax}%
\fi
@@ -1449,15 +1783,20 @@ end
\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
@@ -1520,6 +1859,210 @@ end
%</test2>
% \end{macrocode}
%
+% \subsection{Test for \cs{pdf@shellescape}}
+%
+% \begin{macrocode}
+%<*test-shell>
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\input pdftexcmds.sty\relax
+\def\msg#{\immediate\write16}
+\ifx\pdf@shellescape\@undefined
+ \msg{SHELL=U}%
+\else
+ \msg{SHELL=\number\pdf@shellescape}%
+\fi
+\ifx\expected\@undefined
+\else
+ \ifx\expected\relax
+ \msg{EXPECTED=U}%
+ \ifx\pdf@shellescape\@undefined
+ \msg{OK}%
+ \else
+ \errmessage{Failed}%
+ \fi
+ \else
+ \msg{EXPECTED=\number\expected}%
+ \ifnum\pdf@shellescape=\expected\relax
+ \msg{OK}%
+ \else
+ \errmessage{Failed}%
+ \fi
+ \fi
+\fi
+\csname @@end\endcsname\end
+%</test-shell>
+% \end{macrocode}
+%
+% \subsection{Test for escape functions}
+%
+% \begin{macrocode}
+%<*test-escape>
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\^=7 %
+\catcode`\@=11 %
+\errorcontextlines=1000 %
+\input pdftexcmds.sty\relax
+\def\msg#1{%
+ \begingroup
+ \escapechar=92 %
+ \immediate\write16{#1}%
+ \endgroup
+}
+% \end{macrocode}
+% \begin{macrocode}
+\begingroup
+ \catcode`\@=11 %
+ \countdef\count@=255 %
+ \def\space{ }%
+ \long\def\@whilenum#1\do #2{%
+ \ifnum #1\relax
+ #2\relax
+ \@iwhilenum{#1\relax#2\relax}%
+ \fi
+ }%
+ \long\def\@iwhilenum#1{%
+ \ifnum #1%
+ \expandafter\@iwhilenum
+ \else
+ \expandafter\ltx@gobble
+ \fi
+ {#1}%
+ }%
+ \gdef\AllBytes{}%
+ \count@=0 %
+ \catcode0=12 %
+ \@whilenum\count@<256 \do{%
+ \lccode0=\count@
+ \ifnum\count@=32 %
+ \xdef\AllBytes{\AllBytes\space}%
+ \else
+ \lowercase{%
+ \xdef\AllBytes{\AllBytes^^@}%
+ }%
+ \fi
+ \advance\count@ by 1 %
+ }%
+\endgroup
+% \end{macrocode}
+% \begin{macrocode}
+\def\AllBytesHex{%
+ 000102030405060708090A0B0C0D0E0F%
+ 101112131415161718191A1B1C1D1E1F%
+ 202122232425262728292A2B2C2D2E2F%
+ 303132333435363738393A3B3C3D3E3F%
+ 404142434445464748494A4B4C4D4E4F%
+ 505152535455565758595A5B5C5D5E5F%
+ 606162636465666768696A6B6C6D6E6F%
+ 707172737475767778797A7B7C7D7E7F%
+ 808182838485868788898A8B8C8D8E8F%
+ 909192939495969798999A9B9C9D9E9F%
+ A0A1A2A3A4A5A6A7A8A9AAABACADAEAF%
+ B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF%
+ C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF%
+ D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF%
+ E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF%
+ F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF%
+}
+\ltx@onelevel@sanitize\AllBytesHex
+\expandafter\lowercase\expandafter{%
+ \expandafter\def\expandafter\AllBytesHexLC
+ \expandafter{\AllBytesHex}%
+}
+\begingroup
+ \catcode`\#=12 %
+ \xdef\AllBytesName{%
+ #01#02#03#04#05#06#07#08#09#0A#0B#0C#0D#0E#0F%
+ #10#11#12#13#14#15#16#17#18#19#1A#1B#1C#1D#1E#1F%
+ #20!"#23$#25&'#28#29*+,-.#2F%
+ 0123456789:;#3C=#3E?%
+ @ABCDEFGHIJKLMNO%
+ PQRSTUVWXYZ#5B\ltx@backslashchar#5D^_%
+ `abcdefghijklmno%
+ pqrstuvwxyz#7B|#7D\string~#7F%
+ #80#81#82#83#84#85#86#87#88#89#8A#8B#8C#8D#8E#8F%
+ #90#91#92#93#94#95#96#97#98#99#9A#9B#9C#9D#9E#9F%
+ #A0#A1#A2#A3#A4#A5#A6#A7#A8#A9#AA#AB#AC#AD#AE#AF%
+ #B0#B1#B2#B3#B4#B5#B6#B7#B8#B9#BA#BB#BC#BD#BE#BF%
+ #C0#C1#C2#C3#C4#C5#C6#C7#C8#C9#CA#CB#CC#CD#CE#CF%
+ #D0#D1#D2#D3#D4#D5#D6#D7#D8#D9#DA#DB#DC#DD#DE#DF%
+ #E0#E1#E2#E3#E4#E5#E6#E7#E8#E9#EA#EB#EC#ED#EE#EF%
+ #F0#F1#F2#F3#F4#F5#F6#F7#F8#F9#FA#FB#FC#FD#FE#FF%
+ }%
+\endgroup
+\ltx@onelevel@sanitize\AllBytesName
+\edef\AllBytesFromName{\expandafter\ltx@gobble\AllBytes}
+\begingroup
+ \def\|{|}%
+ \edef\%{\ltx@percentchar}%
+ \catcode`\|=0 %
+ \catcode`\#=12 %
+ \catcode`\~=12 %
+ \catcode`\\=12 %
+ |xdef|AllBytesString{%
+ \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017%
+ \020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037%
+ \040!"#$|%&'\(\)*+,-./%
+ 0123456789:;<=>?%
+ @ABCDEFGHIJKLMNO%
+ PQRSTUVWXYZ[\\]^_%
+ `abcdefghijklmno%
+ pqrstuvwxyz{||}~\177%
+ \200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217%
+ \220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237%
+ \240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257%
+ \260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277%
+ \300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317%
+ \320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337%
+ \340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357%
+ \360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377%
+ }%
+|endgroup
+\ltx@onelevel@sanitize\AllBytesString
+% \end{macrocode}
+% \begin{macrocode}
+\def\Test#1#2#3{%
+ \begingroup
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter\TestResult
+ \expandafter\expandafter\expandafter{%
+ #1{#2}%
+ }%
+ \ifx\TestResult#3%
+ \else
+ \newlinechar=10 %
+ \msg{Expect:^^J#3}%
+ \msg{Result:^^J\TestResult}%
+ \errmessage{\string#2 -\string#1-> \string#3}%
+ \fi
+ \endgroup
+}
+\def\test#1#2#3{%
+ \edef\TestFrom{#2}%
+ \edef\TestExpect{#3}%
+ \ltx@onelevel@sanitize\TestExpect
+ \Test#1\TestFrom\TestExpect
+}
+\test\pdf@unescapehex{74657374}{test}
+\begingroup
+ \catcode0=12 %
+ \catcode1=12 %
+ \test\pdf@unescapehex{740074017400740174}{t^^@t^^At^^@t^^At}%
+\endgroup
+\Test\pdf@escapehex\AllBytes\AllBytesHex
+\Test\pdf@unescapehex\AllBytesHex\AllBytes
+\Test\pdf@escapename\AllBytes\AllBytesName
+\Test\pdf@escapestring\AllBytes\AllBytesString
+% \end{macrocode}
+% \begin{macrocode}
+\csname @@end\endcsname\end
+%</test-escape>
+% \end{macrocode}
+%
% \section{Installation}
%
% \subsection{Download}
@@ -1585,6 +2128,8 @@ end
% pdftexcmds.pdf & doc/latex/oberdiek/pdftexcmds.pdf\\
% test/pdftexcmds-test1.tex & doc/latex/oberdiek/test/pdftexcmds-test1.tex\\
% test/pdftexcmds-test2.tex & doc/latex/oberdiek/test/pdftexcmds-test2.tex\\
+% test/pdftexcmds-test-shell.tex & doc/latex/oberdiek/test/pdftexcmds-test-shell.tex\\
+% test/pdftexcmds-test-escape.tex & doc/latex/oberdiek/test/pdftexcmds-test-escape.tex\\
% pdftexcmds.dtx & source/latex/oberdiek/pdftexcmds.dtx\\
% \end{tabular}^^A
% }^^A
@@ -1748,6 +2293,31 @@ end
% Use \cs{ifeof18} for defining \cs{pdf@shellescape} between
% \hologo{pdfTeX} 1.21a (inclusive) and 1.30.0 (exclusive).
% \end{Version}
+% \begin{Version}{2010/11/04 v0.10}
+% \item
+% \cs{pdf@draftmode}, \cs{pdf@ifdraftmode} and
+% \cs{pdf@setdraftmode} added.
+% \end{Version}
+% \begin{Version}{2010/11/11 v0.11}
+% \item
+% Missing \cs{RequirePackage} for package \xpackage{ifpdf} added.
+% \end{Version}
+% \begin{Version}{2011/01/30 v0.12}
+% \item
+% Already loaded package files are not input in \hologo{plainTeX}.
+% \end{Version}
+% \begin{Version}{2011/03/04 v0.13}
+% \item
+% Improved Lua function \texttt{shellescape} that also
+% uses the result of \texttt{os.execute()} (thanks to Philipp Stephani).
+% \end{Version}
+% \begin{Version}{2011/04/10 v0.14}
+% \item
+% Version check of loaded module added.
+% \item
+% Patch for bug in \hologo{LuaTeX} between 0.40.6 and 0.65 that
+% is fixed in revision 4096.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/pmboxdraw.dtx b/Master/texmf-dist/source/latex/oberdiek/pmboxdraw.dtx
index b2f0b254102..a0172a289fd 100644
--- a/Master/texmf-dist/source/latex/oberdiek/pmboxdraw.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/pmboxdraw.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2006 by
+% Copyright (C) 2006, 2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -20,7 +20,7 @@
% This work consists of the main source file pmboxdraw.dtx
% and the derived files
% pmboxdraw.sty, pmboxdraw.pdf, pmboxdraw.ins, pmboxdraw.drv,
-% pmboxdrawenc.dfu.
+% pmboxdrawenc.dfu, pmboxdraw-test1.tex.
%
% Distribution:
% CTAN:macros/latex/contrib/oberdiek/pmboxdraw.dtx
@@ -56,6 +56,7 @@
% TDS:tex/latex/oberdiek/pmboxdraw.sty
% TDS:tex/latex/oberdiek/pmboxdrawenc.dfu
% TDS:doc/latex/oberdiek/pmboxdraw.pdf
+% TDS:doc/latex/oberdiek/test/pmboxdraw-test1.tex
% TDS:source/latex/oberdiek/pmboxdraw.dtx
%
%<*ignore>
@@ -73,7 +74,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: pmboxdraw 2006/05/03 v1.0 Poor man's box drawing characters (HO)}
+\Msg{* Package: pmboxdraw 2011/03/24 v1.1 Poor man's box drawing characters (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -84,7 +85,7 @@
This is a generated file.
-Copyright (C) 2006 by
+Copyright (C) 2006, 2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -104,7 +105,7 @@ This Current Maintainer of this work is Heiko Oberdiek.
This work consists of the main source file pmboxdraw.dtx
and the derived files
pmboxdraw.sty, pmboxdraw.pdf, pmboxdraw.ins, pmboxdraw.drv,
- pmboxdrawenc.dfu.
+ pmboxdrawenc.dfu, pmboxdraw-test1.tex.
\endpreamble
\let\MetaPrefix\DoubleperCent
@@ -115,6 +116,8 @@ and the derived files
\usedir{tex/latex/oberdiek}%
\file{pmboxdraw.sty}{\from{pmboxdraw.dtx}{package}}%
\file{pmboxdrawenc.dfu}{\from{pmboxdraw.dtx}{utf8}}%
+ \usedir{doc/latex/oberdiek/test}%
+ \file{pmboxdraw-test1.tex}{\from{pmboxdraw.dtx}{test1}}%
}
\catcode32=13\relax% active space
@@ -145,11 +148,14 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{pmboxdraw.drv}%
- [2006/05/03 v1.0 Poor man's box drawing characters (HO)]%
+ [2011/03/24 v1.1 Poor man's box drawing characters (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\usepackage{color}
+\let\orgdimexpr\dimexpr
+%\let\dimexpr\relax
\usepackage{pmboxdraw}
+\let\dimexpr\orgdimexpr
\usepackage{longtable}
\setcounter{tocdepth}{2}
\hypersetup{bookmarksdepth=3}
@@ -159,7 +165,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{2712}
+% \CheckSum{8447}
%
% \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
@@ -180,7 +186,7 @@ and the derived files
% \GetFileInfo{pmboxdraw.drv}
%
% \title{The \xpackage{pmboxdraw} package}
-% \date{2006/05/03 v1.0}
+% \date{2011/03/24 v1.1}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -210,7 +216,7 @@ and the derived files
% \textSFxxxix===================\textSFxxv\\
% | P M B O X D R A W |\\
% \textSFxxxviii ==\textSFxlvii============\textSFxlvii===\textSFxxvi\\
-% ~~~\textSFxi~2006/05/03 \textSFxi\\
+% ~~~\textSFxi~2011/03/24 \textSFxi\\
% ~~~\textSFii------------\textSFiv
% \end{quote}
%
@@ -294,13 +300,26 @@ and the derived files
%
% \begingroup
% \def\entrygen#1#2#3#4{%
-% \fbox{\texttt{\csname text#3\endcsname}}
+% \textcolor{blue}{^^A
+% \fbox{\color{black}\texttt{\csname text#3\endcsname}}^^A
+% }
% & \texttt{U+25#1}
% & \texttt{#2}
% & \texttt{\textbackslash text#3}
% \\*[-\fboxsep]
% &
-% \multicolumn{3}{l}{\lowercase{#4}}\\
+% \multicolumn{3}{l}{\lowercase{#4}}\\^^A
+% }
+% \def\entryU#1#2{%
+% \textcolor{blue}{^^A
+% \fbox{\color{black}\texttt{\pmboxdrawuni{25#1}}}^^A
+% }
+% & \texttt{U+25#1}
+% & \texttt{uni25#1}
+% & \texttt{\textbackslash pmboxdrawuni\{25#1\}}
+% \\*[-\fboxsep]
+% &
+% \multicolumn{3}{l}{\lowercase{#2}}\\^^A
% }
% \def\entry#1#2{\entrygen{#1}{SF#20000}{SF\romannumeral#2}}
% \def\entryB#1#2{\entrygen{#1}{#2}{#2}}
@@ -309,16 +328,73 @@ and the derived files
% \hline
% \endhead
% \entry{00}{10}{BOX DRAWINGS LIGHT HORIZONTAL}
+% \entryU{01}{BOX DRAWINGS HEAVY HORIZONTAL}
% \entry{02}{11}{BOX DRAWINGS LIGHT VERTICAL}
+% \entryU{03}{BOX DRAWINGS HEAVY VERTICAL}
% \entry{0C}{01}{BOX DRAWINGS LIGHT DOWN AND RIGHT}
+% \entryU{0D}{BOX DRAWINGS DOWN LIGHT AND RIGHT HEAVY}
+% \entryU{0E}{BOX DRAWINGS DOWN HEAVY AND RIGHT LIGHT}
+% \entryU{0F}{BOX DRAWINGS HEAVY DOWN AND RIGHT}
% \entry{10}{03}{BOX DRAWINGS LIGHT DOWN AND LEFT}
+% \entryU{11}{BOX DRAWINGS DOWN LIGHT AND LEFT HEAVY}
+% \entryU{12}{BOX DRAWINGS DOWN HEAVY AND LEFT LIGHT}
+% \entryU{13}{BOX DRAWINGS HEAVY DOWN AND LEFT}
% \entry{14}{02}{BOX DRAWINGS LIGHT UP AND RIGHT}
+% \entryU{15}{BOX DRAWINGS UP LIGHT AND RIGHT HEAVY}
+% \entryU{16}{BOX DRAWINGS UP HEAVY AND RIGHT LIGHT}
+% \entryU{17}{BOX DRAWINGS HEAVY UP AND RIGHT}
% \entry{18}{04}{BOX DRAWINGS LIGHT UP AND LEFT}
+% \entryU{19}{BOX DRAWINGS UP LIGHT AND LEFT HEAVY}
+% \entryU{1A}{BOX DRAWINGS UP HEAVY AND LEFT LIGHT}
+% \entryU{1B}{BOX DRAWINGS HEAVY UP AND LEFT}
% \entry{1C}{08}{BOX DRAWINGS LIGHT VERTICAL AND RIGHT}
+% \entryU{1D}{BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY}
+% \entryU{1E}{BOX DRAWINGS UP HEAVY AND RIGHT DOWN LIGHT}
+% \entryU{1F}{BOX DRAWINGS DOWN HEAVY AND RIGHT UP LIGHT}
+% \entryU{20}{BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT}
+% \entryU{21}{BOX DRAWINGS DOWN LIGHT AND RIGHT UP HEAVY}
+% \entryU{22}{BOX DRAWINGS UP LIGHT AND RIGHT DOWN HEAVY}
+% \entryU{23}{BOX DRAWINGS HEAVY VERTICAL AND RIGHT}
% \entry{24}{09}{BOX DRAWINGS LIGHT VERTICAL AND LEFT}
+% \entryU{25}{BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY}
+% \entryU{26}{BOX DRAWINGS UP HEAVY AND LEFT DOWN LIGHT}
+% \entryU{27}{BOX DRAWINGS DOWN HEAVY AND LEFT UP LIGHT}
+% \entryU{28}{BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT}
+% \entryU{29}{BOX DRAWINGS DOWN LIGHT AND LEFT UP HEAVY}
+% \entryU{2A}{BOX DRAWINGS UP LIGHT AND LEFT DOWN HEAVY}
+% \entryU{2B}{BOX DRAWINGS HEAVY VERTICAL AND LEFT}
% \entry{2C}{06}{BOX DRAWINGS LIGHT DOWN AND HORIZONTAL}
+% \entryU{2D}{BOX DRAWINGS LEFT HEAVY AND RIGHT DOWN LIGHT}
+% \entryU{2E}{BOX DRAWINGS RIGHT HEAVY AND LEFT DOWN LIGHT}
+% \entryU{2F}{BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY}
+% \entryU{30}{BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT}
+% \entryU{31}{BOX DRAWINGS RIGHT LIGHT AND LEFT DOWN HEAVY}
+% \entryU{32}{BOX DRAWINGS LEFT LIGHT AND RIGHT DOWN HEAVY}
+% \entryU{33}{BOX DRAWINGS HEAVY DOWN AND HORIZONTAL}
% \entry{34}{07}{BOX DRAWINGS LIGHT UP AND HORIZONTAL}
+% \entryU{35}{BOX DRAWINGS LEFT HEAVY AND RIGHT UP LIGHT}
+% \entryU{36}{BOX DRAWINGS RIGHT HEAVY AND LEFT UP LIGHT}
+% \entryU{37}{BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY}
+% \entryU{38}{BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT}
+% \entryU{39}{BOX DRAWINGS RIGHT LIGHT AND LEFT UP HEAVY}
+% \entryU{3A}{BOX DRAWINGS LEFT LIGHT AND RIGHT UP HEAVY}
+% \entryU{3B}{BOX DRAWINGS HEAVY UP AND HORIZONTAL}
% \entry{3C}{05}{BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL}
+% \entryU{3D}{BOX DRAWINGS LEFT HEAVY AND RIGHT VERTICAL LIGHT}
+% \entryU{3E}{BOX DRAWINGS RIGHT HEAVY AND LEFT VERTICAL LIGHT}
+% \entryU{3F}{BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY}
+% \entryU{40}{BOX DRAWINGS UP HEAVY AND DOWN HORIZONTAL LIGHT}
+% \entryU{41}{BOX DRAWINGS DOWN HEAVY AND UP HORIZONTAL LIGHT}
+% \entryU{42}{BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT}
+% \entryU{43}{BOX DRAWINGS LEFT UP HEAVY AND RIGHT DOWN LIGHT}
+% \entryU{44}{BOX DRAWINGS RIGHT UP HEAVY AND LEFT DOWN LIGHT}
+% \entryU{45}{BOX DRAWINGS LEFT DOWN HEAVY AND RIGHT UP LIGHT}
+% \entryU{46}{BOX DRAWINGS RIGHT DOWN HEAVY AND LEFT UP LIGHT}
+% \entryU{47}{BOX DRAWINGS DOWN LIGHT AND UP HORIZONTAL HEAVY}
+% \entryU{48}{BOX DRAWINGS UP LIGHT AND DOWN HORIZONTAL HEAVY}
+% \entryU{49}{BOX DRAWINGS RIGHT LIGHT AND LEFT VERTICAL HEAVY}
+% \entryU{4A}{BOX DRAWINGS LEFT LIGHT AND RIGHT VERTICAL HEAVY}
+% \entryU{4B}{BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL}
% \entry{50}{43}{BOX DRAWINGS DOUBLE HORIZONTAL}
% \entry{51}{24}{BOX DRAWINGS DOUBLE VERTICAL}
% \entry{52}{51}{BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE}
@@ -348,14 +424,50 @@ and the derived files
% \entry{6A}{54}{BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE}
% \entry{6B}{53}{BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE}
% \entry{6C}{44}{BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL}
+% \entryU{74}{BOX DRAWINGS LIGHT LEFT}
+% \entryU{75}{BOX DRAWINGS LIGHT UP}
+% \entryU{76}{BOX DRAWINGS LIGHT RIGHT}
+% \entryU{77}{BOX DRAWINGS LIGHT DOWN}
+% \entryU{78}{BOX DRAWINGS HEAVY LEFT}
+% \entryU{79}{BOX DRAWINGS HEAVY UP}
+% \entryU{7A}{BOX DRAWINGS HEAVY RIGHT}
+% \entryU{7B}{BOX DRAWINGS HEAVY DOWN}
+% \entryU{7C}{BOX DRAWINGS LIGHT LEFT AND HEAVY RIGHT}
+% \entryU{7D}{BOX DRAWINGS LIGHT UP AND HEAVY DOWN}
+% \entryU{7E}{BOX DRAWINGS HEAVY LEFT AND LIGHT RIGHT}
+% \entryU{7F}{BOX DRAWINGS HEAVY UP AND LIGHT DOWN}
% \entryB{80}{upblock}{UPPER HALF BLOCK}
+% \entryU{81}{LOWER ONE EIGHTH BLOCK}
+% \entryU{82}{LOWER ONE QUARTER BLOCK}
+% \entryU{83}{LOWER THREE EIGHTHS BLOCK}
% \entryB{84}{dnblock}{LOWER HALF BLOCK}
+% \entryU{85}{LOWER FIVE EIGHTHS BLOCK}
+% \entryU{86}{LOWER THREE QUARTERS BLOCK}
+% \entryU{87}{LOWER SEVEN EIGHTHS BLOCK}
% \entryB{88}{block}{FULL BLOCK}
+% \entryU{89}{LEFT SEVEN EIGHTHS BLOCK}
+% \entryU{8A}{LEFT THREE QUARTERS BLOCK}
+% \entryU{8B}{LEFT FIVE EIGHTHS BLOCK}
% \entryB{8C}{lfblock}{LEFT HALF BLOCK}
+% \entryU{8D}{LEFT THREE EIGHTHS BLOCK}
+% \entryU{8E}{LEFT ONE QUARTER BLOCK}
+% \entryU{8F}{LEFT ONE EIGHTH BLOCK}
% \entryB{90}{rtblock}{RIGHT HALF BLOCK}
% \entryB{91}{ltshade}{LIGHT SHADE}
% \entryB{92}{shade}{MEDIUM SHADE}
% \entryB{93}{dkshade}{DARK SHADE}
+% \entryU{94}{UPPER ONE EIGHTH BLOCK}
+% \entryU{95}{RIGHT ONE EIGHTH BLOCK}
+% \entryU{96}{QUADRANT LOWER LEFT}
+% \entryU{97}{QUADRANT LOWER RIGHT}
+% \entryU{98}{QUADRANT UPPER LEFT}
+% \entryU{99}{QUADRANT UPPER LEFT AND LOWER LEFT AND LOWER RIGHT}
+% \entryU{9A}{QUADRANT UPPER LEFT AND LOWER RIGHT}
+% \entryU{9B}{QUADRANT UPPER LEFT AND UPPER RIGHT AND LOWER LEFT}
+% \entryU{9C}{QUADRANT UPPER LEFT AND UPPER RIGHT AND LOWER RIGHT}
+% \entryU{9D}{QUADRANT UPPER RIGHT}
+% \entryU{9E}{QUADRANT UPPER RIGHT AND LOWER LEFT}
+% \entryU{9F}{QUADRANT UPPER RIGHT AND LOWER LEFT AND LOWER RIGHT}
% \end{longtable}
% \endgroup
%
@@ -364,15 +476,167 @@ and the derived files
%
% \section{Implementation}
%
-% \subsection{Identification}
+% \subsection{Initial stuff}
%
% \begin{macrocode}
%<*package>
-\NeedsTeXFormat{LaTeX2e}
+% \end{macrocode}
+% Reload check, especially if the package is not used with \LaTeX.
+% \begin{macrocode}
+\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@pmboxdraw.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \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{pmboxdraw}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup%
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\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}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@pmboxdraw.sty\endcsname
\ProvidesPackage{pmboxdraw}%
- [2006/05/03 v1.0 Poor man's box drawing characters (HO)]%
+ [2011/03/24 v1.1 Poor man's box drawing characters (HO)]%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode123=1 % {
+ \catcode125=2 % }
+ \catcode64=11 % @
+ \def\x{\endgroup
+ \expandafter\edef\csname pmbd@AtEnd\endcsname{%
+ \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\catcode61\catcode48\catcode32=10\relax%
+\catcode13=5 % ^^M
+\endlinechar=13 %
+\catcode35=6 % #
+\catcode64=11 % @
+\catcode123=1 % {
+\catcode125=2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\pmbd@AtEnd{%
+ \pmbd@AtEnd
+ \catcode#1=\the\catcode#1\relax
+ }%
+ \catcode#1=#2\relax
+}
+\TMP@EnsureCode{34}{12}% "
+\TMP@EnsureCode{36}{3}% $
+\TMP@EnsureCode{38}{4}% &
+\TMP@EnsureCode{39}{12}% '
+\TMP@EnsureCode{42}{12}% *
+\TMP@EnsureCode{43}{12}% +
+\TMP@EnsureCode{44}{12}% ,
+\TMP@EnsureCode{45}{12}% -
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{60}{12}% <
+\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\TMP@EnsureCode{96}{12}% `
+\edef\pmbd@AtEnd{\pmbd@AtEnd\noexpand\endinput}
% \end{macrocode}
%
+% \subsection{Resources}
+%
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+\else
+ \let\TMP@RequirePackage\RequirePackage
+\fi
+\TMP@RequirePackage{ltxcmds}[2010/12/12]%
+\TMP@RequirePackage{kvsetkeys}[2011/01/30]%
+\TMP@RequirePackage{kvdefinekeys}[2011/01/30]%
+\TMP@RequirePackage{infwarerr}[2010/04/08]%
+% \end{macrocode}
+% \begin{macro}{\ifpmbd@latex}
+% \begin{macrocode}
+\ltx@newif\ifpmbd@latex
+\ltx@IfUndefined{fmtname}{}{%
+ \def\pmbd@tmp{LaTeX2e}%
+ \ifx\pmbd@tmp\fmtname
+ \pmbd@latextrue
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Dummy font encoding}
%
% Using a dummy font encoding because of
@@ -380,48 +644,341 @@ and the derived files
% |\usepackage[utf8]{inputenc}|
% \end{quote}
% \begin{macrocode}
-\DeclareFontEncoding{pmboxdraw}{}{}
-\DeclareFontFamily{pmboxdraw}{pmboxdraw}{}
-\DeclareFontShape{pmboxdraw}{pmboxdraw}{m}{n}{ <-> cmr10 }{}
-\DeclareFontSubstitution{pmboxdraw}{pmboxdraw}{m}{n}
+\ifpmbd@latex
+ \DeclareFontEncoding{pmboxdraw}{}{}%
+ \DeclareFontFamily{pmboxdraw}{pmboxdraw}{}%
+ \DeclareFontShape{pmboxdraw}{pmboxdraw}{m}{n}{ <-> cmr10 }{}%
+ \DeclareFontSubstitution{pmboxdraw}{pmboxdraw}{m}{n}%
% \end{macrocode}
%
% \subsection{Setup}
%
+% \subsubsection{Options}
+%
+% \begin{macrocode}
+ \RequirePackage{kvoptions}[2010/02/22]%
+ \SetupKeyvalOptions{%
+ family=PMBD,%
+ prefix=pmbd@%
+ }%
+\fi
+% \end{macrocode}
+% \begin{macrocode}
+\ltx@IfUndefined{dimexpr}{%
+ \catcode36=9 %
+ \catcode38=14 %
+}{%
+ \catcode36=14 %
+ \catcode38=9 %
+}
+% \end{macrocode}
+% \begin{macro}{\pmbd@ProtectedDef}
+% \begin{macrocode}
+\ltx@IfUndefined{protected}{%
+ \def\pmbd@ProtectedDef#1{%
+ \let\pmbd@temp\ltx@gobble
+ \@ifdefinable#1{%
+ \def\pmbd@temp{\DeclareRobustCommand*#1}%
+ }%
+ \pmbd@temp
+ }%
+ \def\pmbd@ProtectedDefOne#1{%
+ \let\pmbd@temp\ltx@gobble
+ \@ifdefinable#1{%
+ \def\pmbd@temp{\DeclareRobustCommand*#1[1]}%
+ }%
+ \pmbd@temp
+ }%
+}{%
+ \def\pmbd@ProtectedDef#1{%
+ \let\pmbd@temp\ltx@gobble
+ \@ifdefinable#1{%
+ \def\pmbd@temp{\protected\def#1}%
+ }%
+ \pmbd@temp
+ }%
+ \def\pmbd@ProtectedDefOne#1{%
+ \let\pmbd@temp\ltx@gobblethree
+ \@ifdefinable#1{%
+ \def\pmbd@temp{\protected\def#1}%
+ }%
+ \pmbd@temp##1%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pmboxdrawsetup}
+% \begin{macrocode}
+\pmbd@ProtectedDef\pmboxdrawsetup{%
+ \kvsetkeys{PMBD}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\catcode47=11 %
+\def\pmbd@temp#1#2{%
+ \DeclareStringOption[\width]{#1/width}%
+ \DeclareStringOption[\height]{#1/height}%
+ \DeclareStringOption[\depth]{#1/depth}%
+ \DeclareStringOption[{#2}]{#1/box/default}%
+ \expandafter\DeclareStringOption\expandafter[%
+ \csname pmbd@#1/box/default\endcsname
+ ]{#1/box}%
+}
+\pmbd@temp{BoxDrawing}{\strut0}%
+\pmbd@temp{Block}{%
+ \begingroup
+ \sbox\z@{\strut}%
+ \dimen@=\ht\z@
+ \advance\dimen@\dp\z@
+ \wd\z@=\dimen@
+ \box\z@
+ \endgroup
+}%
+\pmbd@temp{Shade}{%
+ \begingroup
+ \sbox\z@{\strut}%
+ \dimen@=\ht\z@
+ \advance\dimen@\dp\z@
+ \wd\z@=\dimen@
+ \box\z@
+ \endgroup
+}%
+\pmbd@temp{TerminalGraphic}{%
+ \begingroup
+ \sbox\z@{\"A}%
+ \wd\z@=\ht\z@
+ \dp\z@=\z@
+ \box\z@
+ \endgroup
+}%
+\DeclareStringOption[.1\width]{BoxDrawing/thinlinewidth}
+\DeclareStringOption[.25\width]{BoxDrawing/thicklinewidth}
+\DeclareStringOption[.25\width]{BoxDrawing/doublelinesep}
+%
+\DeclareStringOption[\strut0]{box} %%
+\DeclareStringOption[.1\width]{rulewidth}
+\DeclareStringOption[.25\width]{doublerulesep}
+% \end{macrocode}
+%
+% \begin{macro}{\pmboxdrawUniRobust}
+% \begin{macrocode}
+\pmbd@ProtectedDefOne\pmboxdrawUniRobust{%
+ \comma@parse{#1}{%
+ \ltx@IfUndefined{pmbd@U+\comma@entry}{%
+ \begingroup\expandafter\endgroup
+ \expandafter
+ \TextSymbolUnavailable\csname U+\comma@entry\endcsname
+ }{%
+ \csname pmbd@U+\comma@entry\endcsname
+ }%
+ \@gobble
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmboxdrawuni}
+% \begin{macrocode}
+\newcommand*{\pmboxdrawuni}[1]{%
+ \ifx\texorpdfstring\ltx@undefined
+ \expandafter\ltx@firstoftwo
+ \else
+ \ifx\texorpdfstring\relax
+ \expandafter\expandafter\expandafter\ltx@firstoftwo
+ \else
+ \expandafter\expandafter\expandafter\texorpdfstring
+ \fi
+ \fi
+ {%
+ \pmboxdrawUniRobust{#1}%
+ }{%
+ \expandafter\ifx\csname ifHy@unicode\expandafter\endcsname
+ \csname iftrue\endcsname
+ \expandafter\unichar\expandafter{\number"#1}%
+ \fi
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Setup commands of version 1.0}
+%
% \begin{macro}{\pmboxdrawbox}
% \begin{macrocode}
-\newcommand*{\pmboxdrawbox}[1]{%
+\pmbd@ProtectedDefOne\pmboxdrawbox{%
\def\pmbd@box{#1}%
}
-\pmboxdrawbox{\strut0}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pmboxdrawrulewidth}
% \begin{macrocode}
-\newcommand*{\pmboxdrawrulewidth}[1]{%
+\pmbd@ProtectedDefOne\pmboxdrawrulewidth{%
\def\pmbd@rulewidth{#1}%
}
-\pmboxdrawrulewidth{.1\width}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pmboxdrawdoublerulesep}
% \begin{macrocode}
-\newcommand*{\pmboxdrawdoublerulesep}[1]{%
+\pmbd@ProtectedDefOne\pmboxdrawdoublerulesep{%
\def\pmbd@doublerulesep{#1}%
}
-\pmboxdrawdoublerulesep{.25\width}
% \end{macrocode}
% \end{macro}
%
+% \subsection{Utils}
+%
+% \begin{macro}{\pmbd@UniDef}
+% \begin{macrocode}
+\def\pmbd@UniDef#1#2{%
+ \expandafter\pmbd@ProtectedDef\expandafter#1\expandafter{%
+ \csname pmbd@U+#2\endcsname
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pmbd@SetLength}
+% \begin{macrocode}
+\ltx@ifpackageloaded{calc}{%
+ \def\pmbd@SetLength{%
+ \setlength
+ }%
+}{%
+ \ltx@IfUndefined{dimexpr}{%
+ \def\pmbd@SetDim#1#2{%
+ #1=#2\relax
+ }%
+ }{%
+ \def\pmbd@SetDim#1#2{%
+ #1=\dimexpr#2\relax
+ }%
+ }%
+ \def\pmbd@SetLength{%
+ \ltx@ifpackageloaded{calc}{%
+ \setlength
+ }{%
+ \pmbd@SetDim
+ }%
+ }%
+ \AtBeginDocument{%
+ \ltx@ifpackageloaded{calc}{%
+ \def\pmbd@SetLength{\setlength}%
+ }{%
+ \let\pmbd@SetLength\pmbd@SetDim
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pmbd@W}
+% \begin{macrocode}
+\newdimen\pmbd@W
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@H}
+% \begin{macrocode}
+\newdimen\pmbd@H
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@L}
+% \begin{macrocode}
+\newdimen\pmbd@L
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@Thin}
+% \begin{macrocode}
+\newdimen\pmbd@Thin
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@Thick}
+% \begin{macrocode}
+\newdimen\pmbd@Thick
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@Sep}
+% \begin{macrocode}
+\newdimen\pmbd@Sep
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@A}
+% \begin{macrocode}
+\dimendef\pmbd@A=2 %
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@B}
+% \begin{macrocode}
+\dimendef\pmbd@B=4 %
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@C}
+% \begin{macrocode}
+\dimendef\pmbd@C=6 %
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@D}
+% \begin{macrocode}
+\dimendef\pmbd@D=8 %
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pmbd@BeginBox}
+% \begin{macrocode}
+\def\pmbd@BeginBox#1{%
+ \ltx@leavevmode
+ \@begin@tempboxa\hbox{%
+ \csname pmbd@#1/box\endcsname
+ }%
+ \pmbd@SetLength\pmbd@W{%
+ \csname pmbd@#1/width\endcsname
+ }%
+ \pmbd@SetLength\pmbd@H{%
+ \csname pmbd@#1/height\endcsname
+ }%
+ \pmbd@SetLength\pmbd@L{%
+ \csname pmbd@#1/depth\endcsname
+ }%
+ \advance\pmbd@H\pmbd@L
+ \setbox\ltx@zero\hbox to \pmbd@W\bgroup
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@EndBox}
+% \begin{macrocode}
+\def\pmbd@EndBox{%
+ \hss
+ \egroup
+ \ht\ltx@zero=\pmbd@H
+ \dp\ltx@zero=\z@
+ \ifdim\pmbd@L=\z@
+ \else
+ \lower\pmbd@L
+ \fi
+ \box\ltx@zero
+ \@end@tempboxa
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pmbd@Rule}
+% \begin{macrocode}
+\def\pmbd@Rule#1#2#3{%
+ \vrule\@width#1\@height#2\@depth#3\relax
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
% \subsection{Block elements}
%
% \begin{macrocode}
\def\pmbd@begin{%
\begingroup
- \setbox\z@\hbox{\pmbd@box}%
- \leavevmode
+ \sbox\z@{\pmbd@box}%
+ \ltx@leavevmode
\setbox\tw@\hb@xt@\wd\z@\bgroup
}
\def\pmbd@end{%
@@ -433,94 +990,300 @@ and the derived files
}
% \end{macrocode}
%
+% \begin{macro}{\pmbd@LowerBlock}
+% \begin{macrocode}
+\def\pmbd@LowerBlock#1{%
+ \pmbd@BeginBox{Block}%
+ \pmbd@Rule\pmbd@W{#1\pmbd@H}\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pmbd@LeftBlock}
+% \begin{macrocode}
+\def\pmbd@LeftBlock#1{%
+ \pmbd@BeginBox{Block}%
+ \pmbd@Rule{#1\pmbd@W}\pmbd@H\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2580} UPPER HALF BLOCK
+% \begin{macro}{\textupblock}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textupblock}{%
- \pmbd@begin
- \dimen@-\ht\z@
- \advance\dimen@\dp\z@
- \vrule\@width\wd\z@\@depth.5\dimen@
- \pmbd@end
+\pmbd@UniDef\textupblock{2580}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2580}
+% \begin{macrocode}
+\@namedef{pmbd@U+2580}{%
+ \pmbd@BeginBox{Block}%
+ \pmbd@Rule\pmbd@W\pmbd@H{-.5\pmbd@H}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2581} LOWER ONE EIGHTH BLOCK
+% \begin{macro}{\pmbd@U+2581}
+% \begin{macrocode}
+\@namedef{pmbd@U+2581}{%
+ \pmbd@LowerBlock{.125}%
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2582} LOWER ONE QUARTER BLOCK
+% \begin{macro}{\pmbd@U+2582}
+% \begin{macrocode}
+\@namedef{pmbd@U+2582}{%
+ \pmbd@LowerBlock{.25}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2583} LOWER THREE EIGHTHS BLOCK
+% \begin{macro}{pmbd@U+2583}
+% \begin{macrocode}
+\@namedef{pmbd@U+2583}{%
+ \pmbd@LowerBlock{.375}%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2584} LOWER HALF BLOCK
+% \begin{macro}{\textdnblock}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textdnblock}{%
- \pmbd@begin
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \vrule\@width\wd\z@\@height.5\dimen@
- \pmbd@end
+\pmbd@UniDef\textdnblock{2584}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2584}
+% \begin{macrocode}
+\@namedef{pmbd@U+2584}{%
+ \pmbd@LowerBlock{.5}%
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2585} LOWER FIVE EIGHTHS BLOCK
+% \begin{macro}{pmbd@U+2585}
+% \begin{macrocode}
+\@namedef{pmbd@U+2585}{%
+ \pmbd@LowerBlock{.625}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2586} LOWER THREE QUARTERS BLOCK
+% \begin{macro}{pmbd@U+2586}
+% \begin{macrocode}
+\@namedef{pmbd@U+2586}{%
+ \pmbd@LowerBlock{.75}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2587} LOWER SEVEN EIGHTHS BLOCK
+% \begin{macro}{pmbd@U+2587}
+% \begin{macrocode}
+\@namedef{pmbd@U+2587}{%
+ \pmbd@LowerBlock{.875}%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2588} FULL BLOCK
+% \begin{macro}{\textblock}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textblock}{%
- \pmbd@begin
- \vrule\@width\wd\z@
- \pmbd@end
+\pmbd@UniDef\textblock{2588}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{pmbd@U+2588}
+% \begin{macrocode}
+\@namedef{pmbd@U+2588}{%
+ \pmbd@LowerBlock{}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2589} LEFT SEVEN EIGHTHS BLOCK
+% \begin{macro}{\pmbd@U+2589}
+% \begin{macrocode}
+\@namedef{pmbd@U+2589}{%
+ \pmbd@LeftBlock{.875}%
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+258A} LEFT THREE QUARTERS BLOCK
+% \begin{macro}{\pmbd@U+258A}
+% \begin{macrocode}
+\@namedef{pmbd@U+258A}{%
+ \pmbd@LeftBlock{.75}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+258B} LEFT FIVE EIGHTHS BLOCK
+% \begin{macro}{\pmbd@U+258B}
+% \begin{macrocode}
+\@namedef{pmbd@U+258B}{%
+ \pmbd@LeftBlock{.625}%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+258C} LEFT HALF BLOCK
+% \begin{macro}{\textlfblock}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textlfblock}{%
- \pmbd@begin
- \vrule\@width.5\wd\z@
- \hfill
- \pmbd@end
+\pmbd@UniDef\textlfblock{258C}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+258C}
+% \begin{macrocode}
+\@namedef{pmbd@U+258C}{%
+ \pmbd@LeftBlock{.5}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+258D} LEFT THREE EIGHTHS BLOCK
+% \begin{macro}{\pmbd@U+258D}
+% \begin{macrocode}
+\@namedef{pmbd@U+258D}{%
+ \pmbd@LeftBlock{.375}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+258E} LEFT ONE QUARTER BLOCK
+% \begin{macro}{\pmbd@U+258E}
+% \begin{macrocode}
+\@namedef{pmbd@U+258E}{%
+ \pmbd@LeftBlock{.25}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+258F} LEFT ONE EIGHTH BLOCK
+% \begin{macro}{\pmbd@U+258F}
+% \begin{macrocode}
+\@namedef{pmbd@U+258F}{%
+ \pmbd@LeftBlock{.125}%
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2590} RIGHT HALF BLOCK
+% \begin{macro}{\textrtblock}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textrtblock}{%
- \pmbd@begin
- \hfill
- \vrule\@width.5\wd\z@
- \pmbd@end
+\pmbd@UniDef\textrtblock{2590}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2590}
+% \begin{macrocode}
+\@namedef{pmbd@U+2590}{%
+ \pmbd@BeginBox{Block}%
+ \kern.5\pmbd@W
+ \pmbd@Rule{.5\pmbd@W}\pmbd@H\z@
+ \pmbd@EndBox
}
% \end{macrocode}
-% \subsubsection{U+2591} LIGHT SHADE
+% \end{macro}
+%
+% \subsubsection{U+2594} UPPER ONE EIGHTH BLOCK
+% \begin{macro}{\pmbd@U+2594}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textltshade}{%
- \pmbd@begin
- \@ifundefined{textcolor}{%
- \pmbd@colorwarning\textltshade
+\@namedef{pmbd@U+2594}{%
+ \pmbd@BeginBox{Block}%
+ \pmbd@Rule\pmbd@W\pmbd@H{-.875\pmbd@H}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2595} RIGHT ONE EIGHTH BLOCK
+% \begin{macro}{\pmbd@U+2595}
+% \begin{macrocode}
+\@namedef{pmbd@U+2595}{%
+ \pmbd@BeginBox{Block}%
+ \kern.875\pmbd@W
+ \pmbd@Rule{.125\pmbd@W}\pmbd@H\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Shade characters}
+%
+% \begin{macro}{\pmbd@BeginShade}
+% \begin{macrocode}
+\def\pmbd@Shade#1#2{%
+ \pmbd@BeginBox{Shade}%
+ \ltx@ifundefined{textcolor}{%
+ \pmbd@colorwarning{#1}%
}{%
- \textcolor[gray]{.75}%
+ \textcolor[gray]{\csname pmbd@Shade/#2\endcsname}%
}{%
- \vrule\@width\wd\z@
+ \pmbd@Rule\pmbd@W\pmbd@H\z@
}%
- \pmbd@end
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2591} LIGHT SHADE
+% \begin{macrocode}
+\DeclareStringOption[.75]{Shade/light}
+% \end{macrocode}
+% \begin{macro}{\textltshade}
+% \begin{macrocode}
+\pmbd@UniDef\textltshade{2591}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2591}
+% \begin{macrocode}
+\@namedef{pmbd@U+2591}{%
+ \pmbd@Shade{2591}{light}%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2592} MEDIUM SHADE
% \begin{macrocode}
-\DeclareTextCommandDefault{\textshade}{%
- \pmbd@begin
- \@ifundefined{textcolor}{%
- \pmbd@colorwarning\textshade
- }{%
- \textcolor[gray]{.5}%
- }{%
- \vrule\@width\wd\z@
- }%
- \pmbd@end
+\DeclareStringOption[.5]{Shade/medium}
+% \end{macrocode}
+% \begin{macro}{\textshade}
+% \begin{macrocode}
+\pmbd@UniDef\textshade{2592}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2592}
+% \begin{macrocode}
+\@namedef{pmbd@U+2592}{%
+ \pmbd@Shade{2592}{medium}%
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2593} DARK SHADE
% \begin{macrocode}
-\DeclareTextCommandDefault{\textdkshade}{%
- \pmbd@begin
- \@ifundefined{textcolor}{%
- \pmbd@colorwarning\textdkshade
- }{%
- \textcolor[gray]{.25}%
- }{%
- \vrule\@width\wd\z@
- }%
- \pmbd@end
+\DeclareStringOption[.25]{Shade/dark}
+% \end{macrocode}
+% \begin{macro}{\textdkshade}
+% \begin{macrocode}
+\pmbd@UniDef\textdkshade{2593}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2593}
+% \begin{macrocode}
+\@namedef{pmbd@U+2593}{%
+ \pmbd@Shade{2593}{dark}%
}
% \end{macrocode}
+% \end{macro}
%
% \subsubsection{Color warning}
%
@@ -528,7 +1291,7 @@ and the derived files
% \begin{macrocode}
\def\pmbd@colorwarning#1{%
\PackageWarning{pmboxdraw}{%
- \string#1\space requires package \string`color\string'\MessageBreak
+ U+#1 requires package \string`color\string'\MessageBreak
}%
% \PackageWarningNoLine{pmboxdraw}{%
% Package \string`color\string' is required for\MessageBreak
@@ -540,228 +1303,2459 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
-% \subsection{Box drawing, light single lines}
+% \subsection{Terminal graphics characters}
%
-% \begin{macro}{\pmbd@beginA}
+% \begin{macro}{\pmbd@BeginTerminal}
% \begin{macrocode}
-\def\pmbd@beginA{%
- \pmbd@begin
- \def\width{\wd\z@}%
- \def\height{\ht\z@}%
- \def\depth{\dp\z@}%
- \setlength{\dimen@}{\pmbd@rulewidth}%
- \edef\pmbd@rulewidth{\number\dimen@ sp}%
+\def\pmbd@BeginTerminal{%
+ \pmbd@BeginBox{TerminalGraphic}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2596} QUADRANT LOWER LEFT
+% \begin{macro}{\pmbd@U+2596}
+% \begin{macrocode}
+\@namedef{pmbd@U+2596}{%
+ \pmbd@BeginTerminal
+ \pmbd@Rule{.5\pmbd@W}{.5\pmbd@H}\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2597} QUADRANT LOWER RIGHT
+% \begin{macro}{\pmbd@U+2597}
+% \begin{macrocode}
+\@namedef{pmbd@U+2597}{%
+ \pmbd@BeginTerminal
+ \kern.5\pmbd@W
+ \pmbd@Rule{.5\pmbd@W}{.5\pmbd@H}\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2598} QUADRANT UPPER LEFT
+% \begin{macro}{\pmbd@U+2598}
+% \begin{macrocode}
+\@namedef{pmbd@U+2598}{%
+ \pmbd@BeginTerminal
+ \pmbd@Rule{.5\pmbd@W}{\pmbd@H}{-.5\pmbd@H}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2599} QUADRANT UPPER LEFT AND LOWER LEFT AND LOWER RIGHT
+% \begin{macro}{\pmbd@U+2599}
+% \begin{macrocode}
+\@namedef{pmbd@U+2599}{%
+ \pmbd@BeginTerminal
+ \pmbd@Rule{.5\pmbd@W}{\pmbd@H}\z@
+ \pmbd@Rule{.5\pmbd@W}{.5\pmbd@H}\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+259A} QUADRANT UPPER LEFT AND LOWER RIGHT
+% \begin{macro}{\pmbd@U+259A}
+% \begin{macrocode}
+\@namedef{pmbd@U+259A}{%
+ \pmbd@BeginTerminal
+ \pmbd@Rule{.5\pmbd@W}{\pmbd@H}{-.5\pmbd@H}%
+ \pmbd@Rule{.5\pmbd@W}{.5\pmbd@H}\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+259B} QUADRANT UPPER LEFT AND UPPER RIGHT AND LOWER LEFT
+% \begin{macro}{\pmbd@U+259B}
+% \begin{macrocode}
+\@namedef{pmbd@U+259B}{%
+ \pmbd@BeginTerminal
+ \pmbd@Rule{.5\pmbd@W}{\pmbd@H}\z@
+ \pmbd@Rule{.5\pmbd@W}{\pmbd@H}{-.5\pmbd@H}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+259C} QUADRANT UPPER LEFT AND UPPER RIGHT AND LOWER RIGHT
+% \begin{macro}{\pmbd@U+259C}
+% \begin{macrocode}
+\@namedef{pmbd@U+259C}{%
+ \pmbd@BeginTerminal
+ \pmbd@Rule{.5\pmbd@W}{\pmbd@H}{-.5\pmbd@H}%
+ \pmbd@Rule{.5\pmbd@W}{\pmbd@H}\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+259D} QUADRANT UPPER RIGHT
+% \begin{macro}{\pmbd@U+259D}
+% \begin{macrocode}
+\@namedef{pmbd@U+259D}{%
+ \pmbd@BeginTerminal
+ \kern.5\pmbd@W
+ \pmbd@Rule{.5\pmbd@W}{\pmbd@H}{-.5\pmbd@H}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+259E} QUADRANT UPPER RIGHT AND LOWER LEFT
+% \begin{macro}{\pmbd@U+259E}
+% \begin{macrocode}
+\@namedef{pmbd@U+259E}{%
+ \pmbd@BeginTerminal
+ \pmbd@Rule{.5\pmbd@W}{.5\pmbd@H}\z@
+ \pmbd@Rule{.5\pmbd@W}{\pmbd@H}{-.5\pmbd@H}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+259F} QUADRANT UPPER RIGHT AND LOWER LEFT AND LOWER RIGHT
+% \begin{macro}{\pmbd@U+259F}
+% \begin{macrocode}
+\@namedef{pmbd@U+259F}{%
+ \pmbd@BeginTerminal
+ \pmbd@Rule{.5\pmbd@W}{.5\pmbd@H}\z@
+ \pmbd@Rule{.5\pmbd@W}{\pmbd@H}\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Box drawing}
+%
+% \begin{macro}{\pmbd@BeginDraw}
+% \begin{macrocode}
+\def\pmbd@BeginDraw#1#2{%
+ \pmbd@BeginBox{BoxDrawing}%
+ \ifx#1X%
+ \pmbd@SetLength\pmbd@Thin\pmbd@BoxDrawing/thinlinewidth%
+ \fi
+ \ifx#2X%
+ \pmbd@SetLength\pmbd@Thick\pmbd@BoxDrawing/thicklinewidth%
+ \fi
}
% \end{macrocode}
% \end{macro}
%
-% \noindent
% \subsubsection{U+2500} BOX DRAWINGS LIGHT HORIZONTAL
+% \begin{macro}{\textSFx}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFx}{%
- \pmbd@beginA
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \vrule\@width\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- \pmbd@end
+\pmbd@UniDef\textSFx{2500}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2500}
+% \begin{macrocode}
+\@namedef{pmbd@U+2500}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \dimen@=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@W\dimen@{-\dimexpr\dimen@-\pmbd@Thin\relax}
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2501} BOX DRAWINGS HEAVY HORIZONTAL
+% \begin{macro}{\pmbd@U+2501}
+% \begin{macrocode}
+\@namedef{pmbd@U+2501}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@W\pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thick\relax}%
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2502} BOX DRAWINGS LIGHT VERTICAL
+% \begin{macro}{\textSFxi}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxi}{%
- \pmbd@beginA
- \hss
- \vrule\@width\pmbd@rulewidth
- \hss
- \pmbd@end
+\pmbd@UniDef\textSFxi{2502}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2502}
+% \begin{macrocode}
+\@namedef{pmbd@U+2502}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@A=\pmbd@W
+$ \advance\pmbd@A-\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \kern\pmbd@A
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2503} BOX DRAWINGS HEAVY VERTICAL
+% \begin{macro}{\pmbd@U+2503}
+% \begin{macrocode}
+\@namedef{pmbd@U+2503}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@A=\pmbd@W
+$ \advance\pmbd@A-\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \kern\pmbd@A
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+ \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+250C} BOX DRAWINGS LIGHT DOWN AND RIGHT
+% \begin{macro}{\textSFi}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFi}{%
- \pmbd@beginA
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \rlap{%
- \hb@xt@\wd\z@{%
- \hss
- \vrule\@width\pmbd@rulewidth\@height.5\dimen@\@depth\dp\z@
- \hss
- }%
- }%
- \hfill
- \vrule\@width.5\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- \pmbd@end
+\pmbd@UniDef\textSFi{250C}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+250C}
+% \begin{macrocode}
+\@namedef{pmbd@U+250C}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thin\relax}%
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+250D} BOX DRAWINGS DOWN LIGHT AND RIGHT HEAVY
+% \begin{macro}{\pmbd@U+250D}
+% \begin{macrocode}
+\@namedef{pmbd@U+250D}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thick\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+250E} BOX DRAWINGS DOWN HEAVY AND RIGHT LIGHT
+% \begin{macro}{\pmbd@U+250E}
+% \begin{macrocode}
+\@namedef{pmbd@U+250E}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& \kern-\pmbd@Thick
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thin\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+250F} BOX DRAWINGS HEAVY DOWN AND RIGHT
+% \begin{macro}{\pmbd@U+250F}
+% \begin{macrocode}
+\@namedef{pmbd@U+250F}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& \kern-\pmbd@Thick
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thick\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2510} BOX DRAWINGS LIGHT DOWN AND LEFT
+% \begin{macro}{\textSFiii}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFiii}{%
- \pmbd@beginA
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \rlap{%
- \hb@xt@\wd\z@{%
- \hss
- \vrule\@width\pmbd@rulewidth\@height.5\dimen@\@depth\dp\z@
- \hss
- }%
- }%
- \vrule\@width.5\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- \hfill
- \pmbd@end
+\pmbd@UniDef\textSFiii{2510}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2510}
+% \begin{macrocode}
+\@namedef{pmbd@U+2510}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thin\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thin\relax}%
+& \kern-\pmbd@Thin
+& \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2511} BOX DRAWINGS DOWN LIGHT AND LEFT HEAVY
+% \begin{macro}{\pmbd@U+2511}
+% \begin{macrocode}
+\@namedef{pmbd@U+2511}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thin\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thick\relax}%
+& \kern-\pmbd@Thin
+& \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2512} BOX DRAWINGS DOWN HEAVY AND LEFT LIGHT
+% \begin{macro}{\pmbd@U+2512}
+% \begin{macrocode}
+\@namedef{pmbd@U+2512}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thick\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thin\relax}%
+& \kern-\pmbd@Thick
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2513} BOX DRAWINGS HEAVY DOWN AND LEFT
+% \begin{macro}{\pmbd@U+2513}
+% \begin{macrocode}
+\@namedef{pmbd@U+2513}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thick\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thick\relax}%
+& \kern-\pmbd@Thick
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2514} BOX DRAWINGS LIGHT UP AND RIGHT
+% \begin{macro}{\textSFii}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFii}{%
- \pmbd@beginA
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \rlap{%
- \hb@xt@\wd\z@{%
- \hss
- \vrule\@width\pmbd@rulewidth\@height\ht\z@\@depth-.5\dimen\tw@
- \hss
- }%
- }%
- \hfill
- \vrule\@width.5\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- \pmbd@end
+\pmbd@UniDef\textSFii{2514}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2514}
+% \begin{macrocode}
+\@namedef{pmbd@U+2514}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A\pmbd@B
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2515} BOX DRAWINGS UP LIGHT AND RIGHT HEAVY
+% \begin{macro}{\pmbd@U+2515}
+% \begin{macrocode}
+\@namedef{pmbd@U+2515}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2516} BOX DRAWINGS UP HEAVY AND RIGHT LIGHT
+% \begin{macro}{\pmbd@U+2516}
+% \begin{macrocode}
+\@namedef{pmbd@U+2516}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2517} BOX DRAWINGS HEAVY UP AND RIGHT
+% \begin{macro}{\pmbd@U+2517}
+% \begin{macrocode}
+\@namedef{pmbd@U+2517}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \kern-\pmbd@Thick
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2518} BOX DRAWINGS LIGHT UP AND LEFT
+% \begin{macro}{\textSFiv}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFiv}{%
- \pmbd@beginA
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \rlap{%
- \hb@xt@\wd\z@{%
- \hss
- \vrule\@width\pmbd@rulewidth\@height\ht\z@\@depth-.5\dimen\tw@
- \hss
- }%
- }%
- \vrule\@width.5\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- \hfill
- \pmbd@end
+\pmbd@UniDef\textSFiv{2518}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2518}
+% \begin{macrocode}
+\@namedef{pmbd@U+2518}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thin\relax}%
+& \pmbd@A\pmbd@B
+& \kern-\pmbd@Thin
+& \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2519} BOX DRAWINGS UP LIGHT AND LEFT HEAVY
+% \begin{macro}{\pmbd@U+2519}
+% \begin{macrocode}
+\@namedef{pmbd@U+2519}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thin\relax}%
+& \pmbd@A\pmbd@B
+& \kern-\pmbd@Thin
+& \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+251A} BOX DRAWINGS UP HEAVY AND LEFT LIGHT
+% \begin{macro}{\pmbd@U+251A}
+% \begin{macrocode}
+\@namedef{pmbd@U+251A}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thick\relax}%
+& \pmbd@A\pmbd@B
+& \kern-\pmbd@Thick
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+251B} BOX DRAWINGS HEAVY UP AND LEFT
+% \begin{macro}{\pmbd@U+251B}
+% \begin{macrocode}
+\@namedef{pmbd@U+251B}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thick\relax}%
+& \pmbd@A\pmbd@B
+& \kern-\pmbd@Thick
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+251C} BOX DRAWINGS LIGHT VERTICAL AND RIGHT
+% \begin{macro}{\textSFviii}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFviii}{%
- \pmbd@beginA
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \rlap{%
- \hb@xt@\wd\z@{%
- \hss
- \vrule\@width\pmbd@rulewidth\@height\ht\z@\@depth\dp\z@
- \hss
- }%
- }%
- \hfill
- \vrule\@width.5\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- \pmbd@end
+\pmbd@UniDef\textSFviii{251C}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+251C}
+% \begin{macrocode}
+\@namedef{pmbd@U+251C}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A
+& {-\dimexpr\pmbd@A-\pmbd@Thin\relax}%
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+251D} BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY
+% \begin{macro}{\pmbd@U+251D}
+% \begin{macrocode}
+\@namedef{pmbd@U+251D}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A
+& {-\dimexpr\pmbd@A-\pmbd@Thick\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+251E} BOX DRAWINGS UP HEAVY AND RIGHT DOWN LIGHT
+% \begin{macro}{\pmbd@U+251E}
+% \begin{macrocode}
+\@namedef{pmbd@U+251E}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \rlap{%
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+$ }%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \rlap{%
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A\pmbd@B
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+251F} BOX DRAWINGS DOWN HEAVY AND RIGHT UP LIGHT
+% \begin{macro}{\pmbd@U+251F}
+% \begin{macrocode}
+\@namedef{pmbd@U+251F}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \rlap{%
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+$ }%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \rlap{%
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A\pmbd@B
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2520} BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT
+% \begin{macro}{\pmbd@U+2520}
+% \begin{macrocode}
+\@namedef{pmbd@U+2520}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+& \kern-\pmbd@Thick
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A
+& {-\dimexpr\pmbd@A-\pmbd@Thin\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2521} BOX DRAWINGS DOWN LIGHT AND RIGHT UP HEAVY
+% \begin{macro}{\pmbd@U+2521}
+% \begin{macrocode}
+\@namedef{pmbd@U+2521}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \rlap{%
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+$ }%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \rlap{%
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A\pmbd@B
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2522} BOX DRAWINGS UP LIGHT AND RIGHT DOWN HEAVY
+% \begin{macro}{\pmbd@U+2522}
+% \begin{macrocode}
+\@namedef{pmbd@U+2522}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \rlap{%
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+$ }%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \rlap{%
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A\pmbd@B
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2523} BOX DRAWINGS HEAVY VERTICAL AND RIGHT
+% \begin{macro}{\pmbd@U+2523}
+% \begin{macrocode}
+\@namedef{pmbd@U+2523}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+& \kern-\pmbd@Thick
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A
+& {-\dimexpr\pmbd@A-\pmbd@Thick\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2524} BOX DRAWINGS LIGHT VERTICAL AND LEFT
+% \begin{macro}{\textSFix}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFix}{%
- \pmbd@beginA
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \rlap{%
- \hb@xt@\wd\z@{%
- \hss
- \vrule\@width\pmbd@rulewidth\@height\ht\z@\@depth\dp\z@
- \hss
- }%
- }%
- \vrule\@width.5\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- \hfill
- \pmbd@end
+\pmbd@UniDef\textSFix{2524}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2524}
+% \begin{macrocode}
+\@namedef{pmbd@U+2524}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thin
+$ \pmbd@Rule{.5\pmbd@C}\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thin\relax}%
+& \pmbd@A{\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+& \kern-\pmbd@Thin
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2525} BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY
+% \begin{macro}{\pmbd@U+2525}
+% \begin{macrocode}
+\@namedef{pmbd@U+2525}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thin
+$ \pmbd@Rule{.5\pmbd@C}\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thin\relax}%
+& \pmbd@A{\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+& \kern-\pmbd@Thin
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2526} BOX DRAWINGS UP HEAVY AND LEFT DOWN LIGHT
+% \begin{macro}{\pmbd@U+2526}
+% \begin{macrocode}
+\@namedef{pmbd@U+2526}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thin
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@Thick
+$ \rlap{%
+$ \pmbd@Rule{.5\pmbd@C}\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+$ }%
+$ \kern.5\pmbd@D
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \rlap{%
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thin\relax}%
+& \pmbd@A\pmbd@B
+& \kern-\pmbd@Thin
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2527} BOX DRAWINGS DOWN HEAVY AND LEFT UP LIGHT
+% \begin{macro}{\pmbd@U+2527}
+% \begin{macrocode}
+\@namedef{pmbd@U+2527}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thin
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@Thick
+$ \rlap{%
+$ \pmbd@Rule{.5\pmbd@C}\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+$ }%
+$ \kern.5\pmbd@D
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \rlap{%
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thin\relax}%
+& \pmbd@A{\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+& \kern-\pmbd@Thin
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2528} BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT
+% \begin{macro}{\pmbd@U+2528}
+% \begin{macrocode}
+\@namedef{pmbd@U+2528}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thick
+$ \pmbd@Rule{.5\pmbd@C}\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thick\relax}%
+& \pmbd@A{\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+& \kern-\pmbd@Thick
+& \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2529} BOX DRAWINGS DOWN LIGHT AND LEFT UP HEAVY
+% \begin{macro}{\pmbd@U+2529}
+% \begin{macrocode}
+\@namedef{pmbd@U+2529}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \rlap{%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+$ }%
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \rlap{%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& }%
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thick\relax}%
+& \pmbd@A\pmbd@B
+& \kern-\pmbd@Thick
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+252A} BOX DRAWINGS UP LIGHT AND LEFT DOWN HEAVY
+% \begin{macro}{\pmbd@U+252A}
+% \begin{macrocode}
+\@namedef{pmbd@U+252A}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \rlap{%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+$ }%
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \rlap{%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& }%
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thick\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thick\relax}%
+& \kern-\pmbd@Thick
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+252B} BOX DRAWINGS HEAVY VERTICAL AND LEFT
+% \begin{macro}{\pmbd@U+252B}
+% \begin{macrocode}
+\@namedef{pmbd@U+252B}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thick
+$ \pmbd@Rule{.5\pmbd@C}\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thick\relax}%
+& \pmbd@A{\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+& \kern-\pmbd@Thick
+& \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+252C} BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
+% \begin{macro}{\textSFvi}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFvi}{%
- \pmbd@beginA
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \rlap{%
- \vrule\@width\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- }%
- \hss
- \vrule\@width\pmbd@rulewidth\@height.5\dimen@
- \hss
- \pmbd@end
+\pmbd@UniDef\textSFvi{252C}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+252C}
+% \begin{macrocode}
+\@namedef{pmbd@U+252C}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \rlap{%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+$ }%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \rlap{%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+& }%
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+252D} BOX DRAWINGS LEFT HEAVY AND RIGHT DOWN LIGHT
+% \begin{macro}{\pmbd@U+252D}
+% \begin{macrocode}
+\@namedef{pmbd@U+252D}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thin
+$ \pmbd@Rule{.5\pmbd@C}\pmbd@A\pmbd@B
+$ }%
+$ \rlap{%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+$ }%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \rlap{%
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thin\relax}%
+& \pmbd@A{\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+& }%
+& \rlap{%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+& }%
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+252E} BOX DRAWINGS RIGHT HEAVY AND LEFT DOWN LIGHT
+% \begin{macro}{\pmbd@U+252E}
+% \begin{macrocode}
+\@namedef{pmbd@U+252E}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \kern\pmbd@C
+$ \advance\pmbd@C-\pmbd@W
+$ \pmbd@Rule{-\pmbd@C}\pmbd@A\pmbd@B
+$ }%
+$ \rlap{%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+$ }%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \rlap{%
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \kern\pmbd@C
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}%
+& \pmbd@A{\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+& }%
+& \rlap{%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+& }%
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+252F} BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY
+% \begin{macro}{\pmbd@U+252F}
+% \begin{macrocode}
+\@namedef{pmbd@U+252F}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \rlap{%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+$ }%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \rlap{%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+& }%
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2530} BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT
+% \begin{macro}{\pmbd@U+2530}
+% \begin{macrocode}
+\@namedef{pmbd@U+2530}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \rlap{%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+$ }%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \rlap{%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& }%
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2531} BOX DRAWINGS RIGHT LIGHT AND LEFT DOWN HEAVY
+% \begin{macro}{\pmbd@U+2531}
+% \begin{macrocode}
+\@namedef{pmbd@U+2531}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+$ }%
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \rlap{%
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+& }%
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thick\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thick\relax}%
+& \kern-\pmbd@Thick
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2532} BOX DRAWINGS LEFT LIGHT AND RIGHT DOWN HEAVY
+% \begin{macro}{\pmbd@U+2532}
+% \begin{macrocode}
+\@namedef{pmbd@U+2532}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+$ }%
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \rlap{%
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+& }%
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& \kern-\pmbd@Thick
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thick\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2533} BOX DRAWINGS HEAVY DOWN AND HORIZONTAL
+% \begin{macro}{\pmbd@U+2533}
+% \begin{macrocode}
+\@namedef{pmbd@U+2533}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \rlap{%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+$ }%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \rlap{%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& }%
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2534} BOX DRAWINGS LIGHT UP AND HORIZONTAL
+% \begin{macro}{\textSFvii}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFvii}{%
- \pmbd@beginA
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \rlap{%
- \vrule\@width\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- }%
- \hss
- \vrule\@width\pmbd@rulewidth\@depth-.5\dimen\tw@
- \hss
- \pmbd@end
+\pmbd@UniDef\textSFvii{2534}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2534}
+% \begin{macrocode}
+\@namedef{pmbd@U+2534}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \rlap{%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+$ }%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \rlap{%
+& \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2535} BOX DRAWINGS LEFT HEAVY AND RIGHT UP LIGHL
+% \begin{macro}{\pmbd@U+2535}
+% \begin{macrocode}
+\@namedef{pmbd@U+2535}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \rlap{%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+$ }%
+$ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thin
+$ \pmbd@Rule{.5\pmbd@C}\pmbd@A\pmbd@B
+$ }%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \rlap{%
+& \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& }%
+& \rlap{%
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thin\relax}%
+& \pmbd@A{\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2536} BOX DRAWINGS RIGHT HEAVY AND LEFT UP LIGHT
+% \begin{macro}{\pmbd@U+2536}
+% \begin{macrocode}
+\@namedef{pmbd@U+2536}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \rlap{%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+$ }%
+$ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \kern\pmbd@C
+$ \advance\pmbd@C-\pmbd@W
+$ \pmbd@Rule{-\pmbd@C}\pmbd@A\pmbd@B
+$ }%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \rlap{%
+& \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& }%
+& \rlap{%
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \kern\pmbd@C
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}%
+& \pmbd@A{\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2537} BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY
+% \begin{macro}{\pmbd@U+2537}
+% \begin{macrocode}
+\@namedef{pmbd@U+2537}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \rlap{%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+$ }%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \rlap{%
+& \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2538} BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT
+% \begin{macro}{\pmbd@U+2538}
+% \begin{macrocode}
+\@namedef{pmbd@U+2538}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \rlap{%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+$ }%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \rlap{%
+& \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2539} BOX DRAWINGS RIGHT LIGHT AND LEFT UP HEAVY
+% \begin{macro}{\pmbd@U+2539}
+% \begin{macrocode}
+\@namedef{pmbd@U+2539}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+$ }%
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \rlap{%
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+& }%
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thick\relax}%
+& \pmbd@A\pmbd@B
+& \kern-\pmbd@Thick
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+253A} BOX DRAWINGS LEFT LIGHT AND RIGHT UP HEAVY
+% \begin{macro}{\pmbd@U+253A}
+% \begin{macrocode}
+\@namedef{pmbd@U+253A}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+$ }%
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \rlap{%
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+& }%
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+253B} BOX DRAWINGS HEAVY UP AND HORIZONTAL
+% \begin{macro}{\pmbd@U+253B}
+% \begin{macrocode}
+\@namedef{pmbd@U+253B}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \rlap{%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+$ }%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \rlap{%
+& \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+253C} BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
+% \begin{macro}{\textSFv}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFv}{%
- \pmbd@beginA
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \rlap{%
- \vrule\@width\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- }%
- \hss
- \vrule\@width\pmbd@rulewidth
- \hss
- \pmbd@end
+\pmbd@UniDef\textSFv{253C}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+253C}
+% \begin{macrocode}
+\@namedef{pmbd@U+253C}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \dimen@=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@W\dimen@{-\dimexpr\dimen@-\pmbd@Thin\relax}%
+ \kern-\pmbd@W
+$ \pmbd@A=\pmbd@W
+$ \advance\pmbd@A-\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \kern\pmbd@A
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+253D} BOX DRAWINGS LEFT HEAVY AND RIGHT VERTICAL LIGHT
+% \begin{macro}{\pmbd@U+253D}
+% \begin{macrocode}
+\@namedef{pmbd@U+253D}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@Rule{.5\pmbd@W}\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\pmbd@W}\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+ }%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A
+& {-\dimexpr\pmbd@A-\pmbd@Thin\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+253E} BOX DRAWINGS RIGHT HEAVY AND LEFT VERTICAL LIGHT
+% \begin{macro}{\pmbd@U+253E}
+% \begin{macrocode}
+\@namedef{pmbd@U+253E}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+ \kern.5\pmbd@W
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@Rule{.5\pmbd@W}\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\pmbd@W}\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+ }%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thin
+$ \pmbd@Rule{.5\pmbd@C}\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thin\relax}%
+& \pmbd@A{\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+& \kern-\pmbd@Thin
+& \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+253F} BOX DRAWINGS RIGHT HEAVY AND LEFT VERTICAL LIGHT
+% \begin{macro}{\pmbd@U+253F}
+% \begin{macrocode}
+\@namedef{pmbd@U+253F}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \dimen@=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@W\dimen@{-\dimexpr\dimen@-\pmbd@Thick\relax}%
+ \kern-\pmbd@W
+$ \pmbd@A=\pmbd@W
+$ \advance\pmbd@A-\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \kern\pmbd@A
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2540} BOX DRAWINGS UP HEAVY AND DOWN HORIZONTAL LIGHT
+% \begin{macro}{\pmbd@U+2540}
+% \begin{macrocode}
+\@namedef{pmbd@U+2540}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \kern.5\pmbd@C
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+ \pmbd@Rule\pmbd@Thick\pmbd@H{-.5\pmbd@H}%
+ }%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \rlap{%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+$ }%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \rlap{%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+& }%
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2541} BOX DRAWINGS DOWN HEAVY AND UP HORIZONTAL LIGHT
+% \begin{macro}{\pmbd@U+2541}
+% \begin{macrocode}
+\@namedef{pmbd@U+2541}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \kern.5\pmbd@C
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+ \pmbd@Rule\pmbd@Thick{.5\pmbd@H}\z@
+ }%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \rlap{%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+$ }%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \rlap{%
+& \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{U+2542} BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT
+% \begin{macro}{\pmbd@U+2542}
+% \begin{macrocode}
+\@namedef{pmbd@U+2542}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \dimen@=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@W\dimen@{-\dimexpr\dimen@-\pmbd@Thin\relax}%
+ \kern-\pmbd@W
+$ \pmbd@A=\pmbd@W
+$ \advance\pmbd@A-\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+ \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2543} BOX DRAWINGS LEFT UP HEAVY AND RIGHT DOWN LIGHT
+% \begin{macro}{\pmbd@U+2543}
+% \begin{macrocode}
+\@namedef{pmbd@U+2543}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thin\relax}%
+ }%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thick\relax}%
+& \pmbd@A\pmbd@B
+& \kern-\pmbd@Thick
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2544} BOX DRAWINGS RIGHT UP HEAVY AND LEFT DOWN LIGHT
+% \begin{macro}{\pmbd@U+2544}
+% \begin{macrocode}
+\@namedef{pmbd@U+2544}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thin\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thin\relax}%
+& \kern-\pmbd@Thin
+& \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+ }%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \kern-\pmbd@Thick
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2545} BOX DRAWINGS LEFT DOWN HEAVY AND RIGHT UP LIGHT
+% \begin{macro}{\pmbd@U+2545}
+% \begin{macrocode}
+\@namedef{pmbd@U+2545}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+& \kern-\pmbd@Thin
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A\pmbd@B
+ }%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thick\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thick\relax}%
+& \kern-\pmbd@Thick
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2546} BOX DRAWINGS RIGHT DOWN HEAVY AND LEFT UP LIGHT
+% \begin{macro}{\pmbd@U+2546}
+% \begin{macrocode}
+\@namedef{pmbd@U+2546}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thin
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thin
+$ \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thin\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thin\relax}%
+& \pmbd@A\pmbd@B
+& \kern-\pmbd@Thin
+& \pmbd@Rule\pmbd@Thin\pmbd@H\pmbd@B
+ }%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& \kern-\pmbd@Thick
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}%
+& \pmbd@A{-\dimexpr\pmbd@A-\pmbd@Thick\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2547} BOX DRAWINGS DOWN LIGHT AND UP HORIZONTAL HEAVY
+% \begin{macro}{\pmbd@U+2547}
+% \begin{macrocode}
+\@namedef{pmbd@U+2547}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+$ \pmbd@A=\pmbd@W
+$ \advance\pmbd@A-\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \kern\pmbd@A
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+ }%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \rlap{%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+$ }%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@B=\dimexpr-\pmbd@A+\pmbd@Thick\relax
+& \rlap{%
+& \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& }%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@Thick\pmbd@H\pmbd@B
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2548} BOX DRAWINGS UP LIGHT AND DOWN HORIZONTAL HEAVY
+% \begin{macro}{\pmbd@U+2548}
+% \begin{macrocode}
+\@namedef{pmbd@U+2548}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+$ \pmbd@A=\pmbd@W
+$ \advance\pmbd@A-\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \kern\pmbd@A
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+ }%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \rlap{%
+$ \kern.5\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+$ }%
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \rlap{%
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@Thick\pmbd@A\z@
+& }%
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2549} BOX DRAWINGS RIGHT LIGHT AND LEFT VERTICAL HEAVY
+% \begin{macro}{\pmbd@U+2549}
+% \begin{macrocode}
+\@namedef{pmbd@U+2549}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \dimen@=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@W\dimen@{-\dimexpr\dimen@-\pmbd@Thin\relax}
+ }%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C\pmbd@Thick
+$ \pmbd@Rule{.5\pmbd@C}\pmbd@A\pmbd@B
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\dimexpr\pmbd@W+\pmbd@Thick\relax}%
+& \pmbd@A{\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+& \kern-\pmbd@Thick
+& \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+254A} BOX DRAWINGS LEFT LIGHT AND RIGHT VERTICAL HEAVY
+% \begin{macro}{\pmbd@U+254A}
+% \begin{macrocode}
+\@namedef{pmbd@U+254A}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \dimen@=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule\pmbd@W\dimen@{-\dimexpr\dimen@-\pmbd@Thin\relax}
+ }%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \pmbd@C=.5\pmbd@C
+$ \pmbd@D=\pmbd@W
+$ \advance\pmbd@D-\pmbd@C
+$ \kern\pmbd@C
+$ \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+$ \kern-\pmbd@Thick
+$ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@C=.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+& \kern\pmbd@C
+& \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+& \kern-\pmbd@Thick
+& \pmbd@Rule{\dimexpr\pmbd@W-\pmbd@C\relax}\pmbd@A
+& {-\dimexpr\pmbd@A-\pmbd@Thick\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+254B} BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL
+% \begin{macro}{\pmbd@U+254B}
+% \begin{macrocode}
+\@namedef{pmbd@U+254B}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \dimen@=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule\pmbd@W\dimen@{-\dimexpr\dimen@-\pmbd@Thick\relax}%
+ \kern-\pmbd@W
+$ \pmbd@A=\pmbd@W
+$ \advance\pmbd@A-\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \kern\pmbd@A
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+ \pmbd@Rule\pmbd@Thick\pmbd@H\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
%
% \subsection{Box drawing, double lines}
%
+% \begin{macro}{\pmbd@BeginDouble}
+% \begin{macrocode}
+\def\pmbd@BeginDouble{%
+ \pmbd@BeginDraw X-%
+ \pmbd@SetLength\pmbd@Sep\pmbd@BoxDrawing/doublelinesep%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\pmbd@beginB}
% \begin{macrocode}
\def\pmbd@beginB{%
@@ -782,164 +3776,211 @@ and the derived files
% \end{macro}
%
% \subsubsection{U+2550} BOX DRAWINGS DOUBLE HORIZONTAL
+% \begin{macro}{\textSFxliii}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxliii}{%
- \pmbd@beginC
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \rlap{%
- \advance\dimen@\pmbd@doublesepV
- \advance\dimen\tw@\pmbd@doublesepV
- \vrule\@width\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- }%
- \advance\dimen@-\pmbd@doublesepV
- \advance\dimen\tw@-\pmbd@doublesepV
- \vrule\@width\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- \pmbd@end
+\pmbd@UniDef\textSFxliii{2550}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2550}
+% \begin{macrocode}
+\@namedef{pmbd@U+2550}{%
+ \pmbd@BeginDouble
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A-\pmbd@Sep
+$ \pmbd@A=.5\pmbd@A
+& \pmbd@A=.5\dimexpr\pmbd@H-\pmbd@Sep\relax
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+ \kern-\pmbd@W
+$ \advance\pmbd@A\pmbd@Sep
+$ \advance\pmbd@A\pmbd@Thin
+$ \advance\pmbd@B-\pmbd@Sep
+$ \advance\pmbd@B-\pmbd@Thin
+& \pmbd@A=\dimexpr\pmbd@A+\pmbd@Sep+\pmbd@Thin\relax
+$ \pmbd@Rule\pmbd@W\pmbd@A\pmbd@B
+& \pmbd@Rule\pmbd@W\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2551} BOX DRAWINGS DOUBLE VERTICAL
+% \begin{macro}{\textSFxxiv}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxxiv}{%
- \pmbd@beginB
- \hss
- \vrule\@width\pmbd@rulewidth
- \kern\pmbd@doublesepH
- \vrule\@width\pmbd@rulewidth
- \hss
- \pmbd@end
+\pmbd@UniDef\textSFxxiv{2551}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{pmbd@U+2551}
+% \begin{macrocode}
+\@namedef{pmbd@U+2551}{%
+ \pmbd@BeginDouble
+$ \pmbd@A=\pmbd@W
+$ \advance\pmbd@A-\pmbd@Sep
+$ \pmbd@A=.5\pmbd@A
+$ \advance\pmbd@A-.5\pmbd@Thin
+$ \kern\pmbd@A
+& \kern\dimexpr.5\dimexpr\pmbd@W-\pmbd@Sep\relax-\pmbd@Thin\relax
+ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+ \kern\pmbd@Sep
+ \pmbd@Rule\pmbd@Thin\pmbd@H\z@
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2552} BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE
+% \begin{macro}{\textSFli}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFli}{%
- \pmbd@beginC
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \rlap{%
- \kern.5\wd\z@
- \advance\dimen@-\pmbd@doublesepV
- \advance\dimen\tw@-\pmbd@doublesepV
- \vrule\@width.5\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- }%
- \advance\dimen@\pmbd@doublesepV
- \advance\dimen\tw@\pmbd@doublesepV
- \rlap{%
- \kern.5\wd\z@
- \vrule\@width.5\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- }%
- \hss
- \vrule\@width\pmbd@rulewidth\@height.5\dimen@
- \hss
- \pmbd@end
+\pmbd@UniDef\textSFli{2552}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2552}
+% \begin{macrocode}
+\@namedef{pmbd@U+2552}{%
+ \pmbd@BeginDouble
+ \pmbd@C=\pmbd@W
+ \advance\pmbd@C-\pmbd@Thin
+ \pmbd@C=.5\pmbd@C
+ \kern\pmbd@C
+ \pmbd@A=\pmbd@H
+ \advance\pmbd@A\pmbd@Sep
+ \pmbd@A=.5\pmbd@A
+ \advance\pmbd@A\pmbd@Thin
+ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+ \kern-\pmbd@Thin
+ \pmbd@D=\pmbd@W
+ \advance\pmbd@D-\pmbd@C
+ \pmbd@B=-\pmbd@A
+ \advance\pmbd@B\pmbd@Thin
+ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+ \kern-\pmbd@D
+ \advance\pmbd@A-\pmbd@Sep
+ \advance\pmbd@A-\pmbd@Thin
+ \advance\pmbd@B\pmbd@Sep
+ \advance\pmbd@B\pmbd@Thin
+ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2553} BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE
+% \begin{macro}{\textSFlii}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFlii}{%
- \pmbd@beginB
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \rlap{%
- \dimen4 \wd\z@
- \advance\dimen4 \pmbd@doublesepH
- \hb@xt@\wd\z@{%
- \hfill
- \vrule\@width.5\dimen4 \@height.5\dimen@\@depth-.5\dimen\tw@
- }%
- }%
- \hss
- \vrule\@width\pmbd@rulewidth\@height.5\dimen@
- \kern\pmbd@doublesepH
- \vrule\@width\pmbd@rulewidth\@height.5\dimen@
- \hss
- \pmbd@end
+\pmbd@UniDef\textSFlii{2553}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2553}
+% \begin{macrocode}
+\@namedef{pmbd@U+2553}{%
+ \pmbd@BeginDouble
+ \pmbd@C=\pmbd@W
+ \advance\pmbd@C-\pmbd@Sep
+ \pmbd@C=.5\pmbd@C
+ \advance\pmbd@C-\pmbd@Thin
+ \kern\pmbd@C
+ \pmbd@D=\pmbd@W
+ \advance\pmbd@D-\pmbd@C
+ \pmbd@A=\pmbd@H
+ \advance\pmbd@A\pmbd@Thin
+ \pmbd@A=.5\pmbd@A
+ \pmbd@B=-\pmbd@A
+ \advance\pmbd@B\pmbd@Thin
+ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+ \kern-\pmbd@D
+ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+ \kern\pmbd@Sep
+ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
% \subsubsection{U+2554} BOX DRAWINGS DOUBLE DOWN AND RIGHT
+% \begin{macro}{\textSFxxxix}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxxxix}{%
- \pmbd@beginC
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \dimen4 \wd\z@
- \begingroup
- \advance\dimen@\pmbd@doublesepV
- \advance\dimen\tw@\pmbd@doublesepV
- \advance\dimen4 \pmbd@doublesepH
- \rlap{%
- \hb@xt@\wd\z@{%
- \hss
- \vrule\@width.5\dimen4 \@height.5\dimen@\@depth-.5\dimen\tw@
- }%
- }%
- \rlap{%
- \hb@xt@\wd\z@{%
- \hss
- \vrule\@width\pmbd@rulewidth\@height.5\dimen@\@depth\dp\z@
- \kern\pmbd@doublesepH
- \kern\pmbd@rulewidth
- \hss
- }%
- }%
- \endgroup
- \advance\dimen@-\pmbd@doublesepV
- \advance\dimen\tw@-\pmbd@doublesepV
- \advance\dimen4 -\pmbd@doublesepH
- \rlap{%
- \hb@xt@\wd\z@{%
- \hss
- \vrule\@width.5\dimen4 \@height.5\dimen@\@depth-.5\dimen\tw@
- }%
- }%
- \hss
- \kern\pmbd@rulewidth
- \kern\pmbd@doublesepH
- \vrule\@width\pmbd@rulewidth\@height.5\dimen@
- \hss
- \pmbd@end
+\pmbd@UniDef\textSFxxxix{2554}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2554}
+% \begin{macrocode}
+\@namedef{pmbd@U+2554}{%
+ \pmbd@BeginDouble
+ \pmbd@C=\pmbd@W
+ \advance\pmbd@C-\pmbd@Sep
+ \pmbd@C=.5\pmbd@C
+ \advance\pmbd@C-\pmbd@Thin
+ \kern\pmbd@C
+ \pmbd@A=\pmbd@H
+ \advance\pmbd@A\pmbd@Sep
+ \pmbd@A=.5\pmbd@A
+ \advance\pmbd@A\pmbd@Thin
+ \pmbd@B=-\pmbd@A
+ \advance\pmbd@B\pmbd@Thin
+ \pmbd@D=\pmbd@W
+ \advance\pmbd@D-\pmbd@C
+ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+ \kern-\pmbd@Thin
+ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+ \advance\pmbd@D-\pmbd@Sep
+ \advance\pmbd@D-\pmbd@Thin
+ \kern-\pmbd@D
+ \advance\pmbd@A-\pmbd@Sep
+ \advance\pmbd@A-\pmbd@Thin
+ \advance\pmbd@B\pmbd@Sep
+ \advance\pmbd@B\pmbd@Thin
+ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+ \kern-\pmbd@Thin
+ \pmbd@Rule\pmbd@D\pmbd@A\pmbd@B
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2555} BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE
+% \begin{macro}{\textSFxxii}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxxii}{%
- \pmbd@beginC
- \dimen@\ht\z@
- \advance\dimen@-\dp\z@
- \dimen\tw@\dimen@
- \advance\dimen@\pmbd@rulewidth
- \advance\dimen\tw@-\pmbd@rulewidth
- \rlap{%
- \advance\dimen@-\pmbd@doublesepV
- \advance\dimen\tw@-\pmbd@doublesepV
- \vrule\@width.5\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- }%
- \advance\dimen@\pmbd@doublesepV
- \advance\dimen\tw@\pmbd@doublesepV
- \rlap{%
- \vrule\@width.5\wd\z@\@height.5\dimen@\@depth-.5\dimen\tw@
- }%
- \hss
- \vrule\@width\pmbd@rulewidth\@height.5\dimen@
- \hss
- \pmbd@end
+\pmbd@UniDef\textSFxxii{2555}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2555}
+% \begin{macrocode}
+\@namedef{pmbd@U+2555}{%
+ \pmbd@BeginDouble
+ \pmbd@A=\pmbd@H
+ \advance\pmbd@A-\pmbd@Sep
+ \pmbd@A=.5\pmbd@A
+ \pmbd@B=-\pmbd@A
+ \advance\pmbd@B\pmbd@Thin
+ \pmbd@C=\pmbd@W
+ \advance\pmbd@C\pmbd@Thin
+ \pmbd@C=.5\pmbd@C
+ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+ \kern-\pmbd@C
+ \advance\pmbd@A\pmbd@Sep
+ \advance\pmbd@A\pmbd@Thin
+ \advance\pmbd@B-\pmbd@Sep
+ \advance\pmbd@B-\pmbd@Thin
+ \pmbd@Rule\pmbd@C\pmbd@A\pmbd@B
+ \kern-\pmbd@Thin
+ \pmbd@Rule\pmbd@Thin\pmbd@A\z@
+ \pmbd@EndBox
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2556} BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE
+% \begin{macro}{\textSFxxi}
+% \begin{macrocode}
+\pmbd@UniDef\textSFxxi{2556}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2556}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxxi}{%
+\@namedef{pmbd@U+2556}{%
\pmbd@beginB
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -959,9 +4000,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2557} BOX DRAWINGS DOUBLE DOWN AND LEFT
+% \begin{macro}{\textSFxxv}
+% \begin{macrocode}
+\pmbd@UniDef\textSFxxv{2557}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2557}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxxv}{%
+\@namedef{pmbd@U+2557}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1000,9 +4049,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2558} BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE
+% \begin{macro}{\textSFl}
+% \begin{macrocode}
+\pmbd@UniDef\textSFl{2558}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2558}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFl}{%
+\@namedef{pmbd@U+2558}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1027,9 +4084,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2559} BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE
+% \begin{macro}{\textSFxlix}
+% \begin{macrocode}
+\pmbd@UniDef\textSFxlix{2559}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2559}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxlix}{%
+\@namedef{pmbd@U+2559}{%
\pmbd@beginB
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1052,9 +4117,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+255A} BOX DRAWINGS DOUBLE UP AND RIGHT
+% \begin{macro}{\textSFxxxviii}
+% \begin{macrocode}
+\pmbd@UniDef\textSFxxxviii{255A}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+255A}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxxxviii}{%
+\@namedef{pmbd@U+255A}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1099,9 +4172,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+255B} BOX DRAWINGS UP SINGLE AND LEFT DOUBLE
+% \begin{macro}{\textSFxxviii}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxxviii}{%
+\pmbd@UniDef\textSFxxviii{255B}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+255B}
+% \begin{macrocode}
+\@namedef{pmbd@U+255B}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1124,9 +4205,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+255C} BOX DRAWINGS UP DOUBLE AND LEFT SINGLE
+% \begin{macro}{\textSFxxvii}
+% \begin{macrocode}
+\pmbd@UniDef\textSFxxvii{255C}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+255C}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxxvii}{%
+\@namedef{pmbd@U+255C}{%
\pmbd@beginB
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1146,9 +4235,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+255D} BOX DRAWINGS DOUBLE UP AND LEFT
+% \begin{macro}{\textSFxxvi}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxxvi}{%
+\pmbd@UniDef\textSFxxvi{255D}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+255D}
+% \begin{macrocode}
+\@namedef{pmbd@U+255D}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1187,9 +4284,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+255E} BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
+% \begin{macro}{\textSFxxxvi}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxxxvi}{%
+\pmbd@UniDef\textSFxxxvi{255E}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+255E}
+% \begin{macrocode}
+\@namedef{pmbd@U+255E}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1214,9 +4319,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+255F} BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE
+% \begin{macro}{\textSFxxxvii}
+% \begin{macrocode}
+\pmbd@UniDef\textSFxxxvii{255F}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+255F}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxxxvii}{%
+\@namedef{pmbd@U+255F}{%
\pmbd@beginB
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1239,9 +4352,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2560} BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
+% \begin{macro}{\textSFxlii}
+% \begin{macrocode}
+\pmbd@UniDef\textSFxlii{2560}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2560}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxlii}{%
+\@namedef{pmbd@U+2560}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1285,9 +4406,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2561} BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
+% \begin{macro}{\textSFxix}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxix}{%
+\pmbd@UniDef\textSFxix{2561}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2561}
+% \begin{macrocode}
+\@namedef{pmbd@U+2561}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1310,9 +4439,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2562} BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE
+% \begin{macro}{\textSFxx}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxx}{%
+\pmbd@UniDef\textSFxx{2562}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2562}
+% \begin{macrocode}
+\@namedef{pmbd@U+2562}{%
\pmbd@beginB
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1332,9 +4469,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2563} BOX DRAWINGS DOUBLE VERTICAL AND LEFT
+% \begin{macro}{\textSFxxiii}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxxiii}{%
+\pmbd@UniDef\textSFxxiii{2563}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2563}
+% \begin{macrocode}
+\@namedef{pmbd@U+2563}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1372,9 +4517,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2564} BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE
+% \begin{macro}{\textSFxlvii}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxlvii}{%
+\pmbd@UniDef\textSFxlvii{2564}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2564}
+% \begin{macrocode}
+\@namedef{pmbd@U+2564}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1397,9 +4550,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2565} BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE
+% \begin{macro}{\textSFxlviii}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxlviii}{%
+\pmbd@UniDef\textSFxlviii{2565}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2565}
+% \begin{macrocode}
+\@namedef{pmbd@U+2565}{%
\pmbd@beginB
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1417,9 +4578,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2566} BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
+% \begin{macro}{\textSFxli}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxli}{%
+\pmbd@UniDef\textSFxli{2566}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2566}
+% \begin{macrocode}
+\@namedef{pmbd@U+2566}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1450,9 +4619,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2567} BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE
+% \begin{macro}{\textSFxlv}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxlv}{%
+\pmbd@UniDef\textSFxlv{2567}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2567}
+% \begin{macrocode}
+\@namedef{pmbd@U+2567}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1475,9 +4652,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2568} BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE
+% \begin{macro}{\textSFxlvi}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxlvi}{%
+\pmbd@UniDef\textSFxlvi{2568}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2568}
+% \begin{macrocode}
+\@namedef{pmbd@U+2568}{%
\pmbd@beginB
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1495,9 +4680,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+2569} BOX DRAWINGS DOUBLE UP AND HORIZONTAL
+% \begin{macro}{\textSFxl}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxl}{%
+\pmbd@UniDef\textSFxl{2569}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+2569}
+% \begin{macrocode}
+\@namedef{pmbd@U+2569}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1532,9 +4725,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+256A} BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
+% \begin{macro}{\textSFliv}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFliv}{%
+\pmbd@UniDef\textSFliv{256A}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+256A}
+% \begin{macrocode}
+\@namedef{pmbd@U+256A}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1557,9 +4758,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+256B} BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE
+% \begin{macro}{\textSFliii}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFliii}{%
+\pmbd@UniDef\textSFliii{256B}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+256B}
+% \begin{macrocode}
+\@namedef{pmbd@U+256B}{%
\pmbd@beginB
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1577,9 +4786,17 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{U+256C} BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
+% \begin{macro}{\textSFxliv}
% \begin{macrocode}
-\DeclareTextCommandDefault{\textSFxliv}{%
+\pmbd@UniDef\textSFxliv{256C}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\pmbd@U+256C}
+% \begin{macrocode}
+\@namedef{pmbd@U+256C}{%
\pmbd@beginC
\dimen@\ht\z@
\advance\dimen@-\dp\z@
@@ -1625,8 +4842,264 @@ and the derived files
\pmbd@end
}
% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2574} BOX DRAWINGS LIGHT LEFT
+% \begin{macro}{\pmbd@U+2574}
+% \begin{macrocode}
+\@namedef{pmbd@U+2574}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule{.5\pmbd@W}\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule{.5\pmbd@W}\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2575} BOX DRAWINGS LIGHT UP
+% \begin{macro}{\pmbd@U+2575}
+% \begin{macrocode}
+\@namedef{pmbd@U+2575}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \kern.5\pmbd@C
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+ \pmbd@Rule\pmbd@Thin\pmbd@H{-.5\pmbd@H}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2576} BOX DRAWINGS LIGHT RIGHT
+% \begin{macro}{\pmbd@U+2576}
+% \begin{macrocode}
+\@namedef{pmbd@U+2576}{%
+ \pmbd@BeginDraw X-%
+ \kern.5\pmbd@W
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule{.5\pmbd@W}\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule{.5\pmbd@W}\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2577} BOX DRAWINGS LIGHT DOWN
+% \begin{macro}{\pmbd@U+2577}
+% \begin{macrocode}
+\@namedef{pmbd@U+2577}{%
+ \pmbd@BeginDraw X-%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \kern.5\pmbd@C
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+ \pmbd@Rule\pmbd@Thin{.5\pmbd@H}\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2578} BOX DRAWINGS HEAVY LEFT
+% \begin{macro}{\pmbd@U+2578}
+% \begin{macrocode}
+\@namedef{pmbd@U+2578}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@Rule{.5\pmbd@W}\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\pmbd@W}\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+2579} BOX DRAWINGS HEAVY UP
+% \begin{macro}{\pmbd@U+2579}
+% \begin{macrocode}
+\@namedef{pmbd@U+2579}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \kern.5\pmbd@C
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+ \pmbd@Rule\pmbd@Thick\pmbd@H{-.5\pmbd@H}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+257A} BOX DRAWINGS HEAVY RIGHT
+% \begin{macro}{\pmbd@U+257A}
+% \begin{macrocode}
+\@namedef{pmbd@U+257A}{%
+ \pmbd@BeginDraw -X%
+ \kern.5\pmbd@W
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@Rule{.5\pmbd@W}\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\pmbd@W}\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+257B} BOX DRAWINGS HEAVY DOWN
+% \begin{macro}{\pmbd@U+257B}
+% \begin{macrocode}
+\@namedef{pmbd@U+257B}{%
+ \pmbd@BeginDraw -X%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \kern.5\pmbd@C
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+ \pmbd@Rule\pmbd@Thick{.5\pmbd@H}\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+257C} BOX DRAWINGS LIGHT LEFT AND HEAVY RIGHT
+% \begin{macro}{\pmbd@U+257C}
+% \begin{macrocode}
+\@namedef{pmbd@U+257C}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule{.5\pmbd@W}\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule{.5\pmbd@W}\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@Rule{.5\pmbd@W}\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\pmbd@W}\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
%
+% \subsubsection{U+257D} BOX DRAWINGS LIGHT UP AND HEAVY DOWN
+% \begin{macro}{\pmbd@U+257D}
% \begin{macrocode}
+\@namedef{pmbd@U+257D}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \kern.5\pmbd@C
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+ \pmbd@Rule\pmbd@Thin\pmbd@H{-.5\pmbd@H}%
+ }%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \kern.5\pmbd@C
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+ \pmbd@Rule\pmbd@Thick{.5\pmbd@H}\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+257E} BOX DRAWINGS HEAVY LEFT AND LIGHT RIGHT
+% \begin{macro}{\pmbd@U+257E}
+% \begin{macrocode}
+\@namedef{pmbd@U+257E}{%
+ \pmbd@BeginDraw XX%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thick
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thick
+$ \pmbd@Rule{.5\pmbd@W}\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thick\relax
+& \pmbd@Rule{.5\pmbd@W}\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thick\relax}%
+$ \pmbd@A=\pmbd@H
+$ \advance\pmbd@A\pmbd@Thin
+$ \pmbd@A=.5\pmbd@A
+$ \pmbd@B=-\pmbd@A
+$ \advance\pmbd@B\pmbd@Thin
+$ \pmbd@Rule{.5\pmbd@W}\pmbd@A\pmbd@B
+& \pmbd@A=.5\dimexpr\pmbd@H+\pmbd@Thin\relax
+& \pmbd@Rule{.5\pmbd@W}\pmbd@A
+& {\dimexpr-\pmbd@A+\pmbd@Thin\relax}%
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{U+257F} BOX DRAWINGS HEAVY UP AND LIGHT DOWN
+% \begin{macro}{\pmbd@U+257F}
+% \begin{macrocode}
+\@namedef{pmbd@U+257F}{%
+ \pmbd@BeginDraw XX%
+ \rlap{%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thick
+$ \kern.5\pmbd@C
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thick\relax
+ \pmbd@Rule\pmbd@Thick\pmbd@H{-.5\pmbd@H}%
+ }%
+$ \pmbd@C=\pmbd@W
+$ \advance\pmbd@C-\pmbd@Thin
+$ \kern.5\pmbd@C
+& \kern.5\dimexpr\pmbd@W-\pmbd@Thin\relax
+ \pmbd@Rule\pmbd@Thin{.5\pmbd@H}\z@
+ \pmbd@EndBox
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Box drawing, light single lines}
+%
+% \begin{macro}{\pmbd@beginA}
+% \begin{macrocode}
+\def\pmbd@beginA{%
+ \pmbd@begin
+ \def\width{\wd\z@}%
+ \def\height{\ht\z@}%
+ \def\depth{\dp\z@}%
+ \setlength{\dimen@}{\pmbd@rulewidth}%
+ \edef\pmbd@rulewidth{\number\dimen@ sp}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+\pmbd@AtEnd%
%</package>
% \end{macrocode}
%
@@ -1635,21 +5108,71 @@ and the derived files
% \begin{macrocode}
%<*utf8>
\ProvidesFile{pmboxdrawenc.dfu}%
- [2006/05/03 v1.0 UTF-8 support for box drawing characters]%
+ [2011/03/24 v1.1 UTF-8 support for box drawing characters]%
% \end{macrocode}
%
% \begin{macrocode}
\DeclareUnicodeCharacter{2500}{\textSFx}
+\DeclareUnicodeCharacter{2501}{\pmboxdrawuni{2501}}
\DeclareUnicodeCharacter{2502}{\textSFxi}
+\DeclareUnicodeCharacter{2503}{\pmboxdrawuni{2503}}
\DeclareUnicodeCharacter{250C}{\textSFi}
+\DeclareUnicodeCharacter{250D}{\pmboxdrawuni{250D}}
+\DeclareUnicodeCharacter{250E}{\pmboxdrawuni{250E}}
+\DeclareUnicodeCharacter{250F}{\pmboxdrawuni{250F}}
\DeclareUnicodeCharacter{2510}{\textSFiii}
+\DeclareUnicodeCharacter{2511}{\pmboxdrawuni{2511}}
+\DeclareUnicodeCharacter{2512}{\pmboxdrawuni{2512}}
+\DeclareUnicodeCharacter{2513}{\pmboxdrawuni{2513}}
\DeclareUnicodeCharacter{2514}{\textSFii}
+\DeclareUnicodeCharacter{2515}{\pmboxdrawuni{2515}}
+\DeclareUnicodeCharacter{2516}{\pmboxdrawuni{2516}}
+\DeclareUnicodeCharacter{2517}{\pmboxdrawuni{2517}}
\DeclareUnicodeCharacter{2518}{\textSFiv}
+\DeclareUnicodeCharacter{2519}{\pmboxdrawuni{2519}}
+\DeclareUnicodeCharacter{251A}{\pmboxdrawuni{251A}}
+\DeclareUnicodeCharacter{251B}{\pmboxdrawuni{251B}}
\DeclareUnicodeCharacter{251C}{\textSFviii}
+\DeclareUnicodeCharacter{251D}{\pmboxdrawuni{251D}}
+\DeclareUnicodeCharacter{251E}{\pmboxdrawuni{251E}}
+\DeclareUnicodeCharacter{251F}{\pmboxdrawuni{251F}}
+\DeclareUnicodeCharacter{2520}{\pmboxdrawuni{2520}}
+\DeclareUnicodeCharacter{2521}{\pmboxdrawuni{2521}}
+\DeclareUnicodeCharacter{2522}{\pmboxdrawuni{2522}}
+\DeclareUnicodeCharacter{2523}{\pmboxdrawuni{2523}}
\DeclareUnicodeCharacter{2524}{\textSFix}
\DeclareUnicodeCharacter{252C}{\textSFvi}
+\DeclareUnicodeCharacter{252D}{\pmboxdrawuni{252D}}
+\DeclareUnicodeCharacter{252E}{\pmboxdrawuni{252E}}
+\DeclareUnicodeCharacter{252F}{\pmboxdrawuni{252F}}
+\DeclareUnicodeCharacter{2530}{\pmboxdrawuni{2530}}
+\DeclareUnicodeCharacter{2531}{\pmboxdrawuni{2531}}
+\DeclareUnicodeCharacter{2532}{\pmboxdrawuni{2532}}
+\DeclareUnicodeCharacter{2533}{\pmboxdrawuni{2533}}
\DeclareUnicodeCharacter{2534}{\textSFvii}
+\DeclareUnicodeCharacter{2535}{\pmboxdrawuni{2535}}
+\DeclareUnicodeCharacter{2536}{\pmboxdrawuni{2536}}
+\DeclareUnicodeCharacter{2537}{\pmboxdrawuni{2537}}
+\DeclareUnicodeCharacter{2538}{\pmboxdrawuni{2538}}
+\DeclareUnicodeCharacter{2539}{\pmboxdrawuni{2539}}
+\DeclareUnicodeCharacter{253A}{\pmboxdrawuni{253A}}
+\DeclareUnicodeCharacter{253B}{\pmboxdrawuni{253B}}
\DeclareUnicodeCharacter{253C}{\textSFv}
+\DeclareUnicodeCharacter{253D}{\pmboxdrawuni{253D}}
+\DeclareUnicodeCharacter{253E}{\pmboxdrawuni{253E}}
+\DeclareUnicodeCharacter{253F}{\pmboxdrawuni{253F}}
+\DeclareUnicodeCharacter{2540}{\pmboxdrawuni{2540}}
+\DeclareUnicodeCharacter{2541}{\pmboxdrawuni{2541}}
+\DeclareUnicodeCharacter{2542}{\pmboxdrawuni{2542}}
+\DeclareUnicodeCharacter{2543}{\pmboxdrawuni{2543}}
+\DeclareUnicodeCharacter{2544}{\pmboxdrawuni{2544}}
+\DeclareUnicodeCharacter{2545}{\pmboxdrawuni{2545}}
+\DeclareUnicodeCharacter{2546}{\pmboxdrawuni{2546}}
+\DeclareUnicodeCharacter{2547}{\pmboxdrawuni{2547}}
+\DeclareUnicodeCharacter{2548}{\pmboxdrawuni{2548}}
+\DeclareUnicodeCharacter{2549}{\pmboxdrawuni{2549}}
+\DeclareUnicodeCharacter{254A}{\pmboxdrawuni{254A}}
+\DeclareUnicodeCharacter{254B}{\pmboxdrawuni{254B}}
\DeclareUnicodeCharacter{2550}{\textSFxliii}
\DeclareUnicodeCharacter{2551}{\textSFxxiv}
\DeclareUnicodeCharacter{2552}{\textSFli}
@@ -1679,20 +5202,171 @@ and the derived files
\DeclareUnicodeCharacter{256A}{\textSFliv}
\DeclareUnicodeCharacter{256B}{\textSFliii}
\DeclareUnicodeCharacter{256C}{\textSFxliv}
+\DeclareUnicodeCharacter{2574}{\pmboxdrawuni{2574}}
+\DeclareUnicodeCharacter{2575}{\pmboxdrawuni{2575}}
+\DeclareUnicodeCharacter{2576}{\pmboxdrawuni{2576}}
+\DeclareUnicodeCharacter{2577}{\pmboxdrawuni{2577}}
+\DeclareUnicodeCharacter{2578}{\pmboxdrawuni{2578}}
+\DeclareUnicodeCharacter{2579}{\pmboxdrawuni{2579}}
+\DeclareUnicodeCharacter{257A}{\pmboxdrawuni{257A}}
+\DeclareUnicodeCharacter{257B}{\pmboxdrawuni{257B}}
+\DeclareUnicodeCharacter{257C}{\pmboxdrawuni{257C}}
+\DeclareUnicodeCharacter{257D}{\pmboxdrawuni{257D}}
+\DeclareUnicodeCharacter{257E}{\pmboxdrawuni{257E}}
+\DeclareUnicodeCharacter{257F}{\pmboxdrawuni{257R}}
\DeclareUnicodeCharacter{2580}{\textupblock}
+\DeclareUnicodeCharacter{2581}{\pmboxdrawuni{2581}}
+\DeclareUnicodeCharacter{2582}{\pmboxdrawuni{2582}}
+\DeclareUnicodeCharacter{2583}{\pmboxdrawuni{2583}}
\DeclareUnicodeCharacter{2584}{\textdnblock}
+\DeclareUnicodeCharacter{2585}{\pmboxdrawuni{2585}}
+\DeclareUnicodeCharacter{2586}{\pmboxdrawuni{2586}}
+\DeclareUnicodeCharacter{2587}{\pmboxdrawuni{2587}}
\DeclareUnicodeCharacter{2588}{\textblock}
+\DeclareUnicodeCharacter{2589}{\pmboxdrawuni{2589}}
+\DeclareUnicodeCharacter{258A}{\pmboxdrawuni{258A}}
+\DeclareUnicodeCharacter{258B}{\pmboxdrawuni{258B}}
\DeclareUnicodeCharacter{258C}{\textlfblock}
+\DeclareUnicodeCharacter{258D}{\pmboxdrawuni{258D}}
+\DeclareUnicodeCharacter{258E}{\pmboxdrawuni{258E}}
+\DeclareUnicodeCharacter{258F}{\pmboxdrawuni{258F}}
\DeclareUnicodeCharacter{2590}{\textrtblock}
\DeclareUnicodeCharacter{2591}{\textltshade}
\DeclareUnicodeCharacter{2592}{\textshade}
\DeclareUnicodeCharacter{2593}{\textdkshade}
+\DeclareUnicodeCharacter{2594}{\pmboxdrawuni{2594}}
+\DeclareUnicodeCharacter{2595}{\pmboxdrawuni{2595}}
+\DeclareUnicodeCharacter{2596}{\pmboxdrawuni{2596}}
+\DeclareUnicodeCharacter{2597}{\pmboxdrawuni{2597}}
+\DeclareUnicodeCharacter{2598}{\pmboxdrawuni{2598}}
+\DeclareUnicodeCharacter{2599}{\pmboxdrawuni{2599}}
+\DeclareUnicodeCharacter{259A}{\pmboxdrawuni{259A}}
+\DeclareUnicodeCharacter{259B}{\pmboxdrawuni{259B}}
+\DeclareUnicodeCharacter{259C}{\pmboxdrawuni{259C}}
+\DeclareUnicodeCharacter{259D}{\pmboxdrawuni{259D}}
+\DeclareUnicodeCharacter{259E}{\pmboxdrawuni{259E}}
+\DeclareUnicodeCharacter{259F}{\pmboxdrawuni{259F}}
% \end{macrocode}
%
% \begin{macrocode}
%</utf8>
% \end{macrocode}
%
+% \section{Test}
+%
+% \begin{macrocode}
+%<*test1>
+\def\LoadCommand{\RequirePackage{pmboxdraw}[2011/03/24]}
+%</test1>
+% \end{macrocode}
+% \subsection{Catcode checks for loading}
+%
+% \begin{macrocode}
+%<*test1>
+% \end{macrocode}
+% \begin{macrocode}
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\expandafter\ifx\csname count@\endcsname\relax
+ \countdef\count@=255 %
+\fi
+\expandafter\ifx\csname @gobble\endcsname\relax
+ \long\def\@gobble#1{}%
+\fi
+\expandafter\ifx\csname @firstofone\endcsname\relax
+ \long\def\@firstofone#1{#1}%
+\fi
+\expandafter\ifx\csname loop\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+{%
+ \def\loop#1\repeat{%
+ \def\body{#1}%
+ \iterate
+ }%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \let\repeat=\fi
+}%
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@ 1 %
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \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 pmboxdraw.sty\relax}%
+\fi
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\%=14 %
+ \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
+\csname @@end\endcsname
+\end
+% \end{macrocode}
+% \begin{macrocode}
+%</test1>
+% \end{macrocode}
+%
% \section{Installation}
%
% \subsection{Download}
@@ -1755,6 +5429,7 @@ and the derived files
% pmboxdraw.sty & tex/latex/oberdiek/pmboxdraw.sty\\
% pmboxdrawenc.dfu & tex/latex/oberdiek/pmboxdrawenc.dfu\\
% pmboxdraw.pdf & doc/latex/oberdiek/pmboxdraw.pdf\\
+% test/pmboxdraw-test1.tex & doc/latex/oberdiek/test/pmboxdraw-test1.tex\\
% pmboxdraw.dtx & source/latex/oberdiek/pmboxdraw.dtx\\
% \end{tabular}^^A
% }^^A
@@ -1906,6 +5581,12 @@ and the derived files
% \item
% First version.
% \end{Version}
+% \begin{Version}{2011/03/24 v1.1}
+% \item
+% Support of more characters.
+% \item
+% Catcode section added.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/protecteddef.dtx b/Master/texmf-dist/source/latex/oberdiek/protecteddef.dtx
new file mode 100644
index 00000000000..7f23d40bb67
--- /dev/null
+++ b/Master/texmf-dist/source/latex/oberdiek/protecteddef.dtx
@@ -0,0 +1,1002 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2011 by
+% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any later
+% version. This version of this license is in
+% http://www.latex-project.org/lppl/lppl-1-3c.txt
+% and 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.
+%
+% The Base Interpreter refers to any `TeX-Format',
+% because some files are installed in TDS:tex/generic//.
+%
+% This work consists of the main source file protecteddef.dtx
+% and the derived files
+% protecteddef.sty, protecteddef.pdf, protecteddef.ins, protecteddef.drv,
+% protecteddef-test1.tex, protecteddef-test2.tex.
+%
+% Distribution:
+% CTAN:macros/latex/contrib/oberdiek/protecteddef.dtx
+% CTAN:macros/latex/contrib/oberdiek/protecteddef.pdf
+%
+% Unpacking:
+% (a) If protecteddef.ins is present:
+% tex protecteddef.ins
+% (b) Without protecteddef.ins:
+% tex protecteddef.dtx
+% (c) If you insist on using LaTeX
+% latex \let\install=y\input{protecteddef.dtx}
+% (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+% (a) If protecteddef.drv is present:
+% latex protecteddef.drv
+% (b) Without protecteddef.drv:
+% latex protecteddef.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 protecteddef.dtx
+% makeindex -s gind.ist protecteddef.idx
+% pdflatex protecteddef.dtx
+% makeindex -s gind.ist protecteddef.idx
+% pdflatex protecteddef.dtx
+%
+% Installation:
+% TDS:tex/generic/oberdiek/protecteddef.sty
+% TDS:doc/latex/oberdiek/protecteddef.pdf
+% TDS:doc/latex/oberdiek/test/protecteddef-test1.tex
+% TDS:doc/latex/oberdiek/test/protecteddef-test2.tex
+% TDS:source/latex/oberdiek/protecteddef.dtx
+%
+%<*ignore>
+\begingroup
+ \catcode123=1 %
+ \catcode125=2 %
+ \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: protecteddef 2011/01/31 v1.0 Definition of protected macros (HO)}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2011 by
+ Heiko Oberdiek <heiko.oberdiek at googlemail.com>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3c of this license or (at your option) any later
+version. This version of this license is in
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+and 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.
+
+The Base Interpreter refers to any `TeX-Format',
+because some files are installed in TDS:tex/generic//.
+
+This work consists of the main source file protecteddef.dtx
+and the derived files
+ protecteddef.sty, protecteddef.pdf, protecteddef.ins, protecteddef.drv,
+ protecteddef-test1.tex, protecteddef-test2.tex.
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+ \file{protecteddef.ins}{\from{protecteddef.dtx}{install}}%
+ \file{protecteddef.drv}{\from{protecteddef.dtx}{driver}}%
+ \usedir{tex/generic/oberdiek}%
+ \file{protecteddef.sty}{\from{protecteddef.dtx}{package}}%
+ \usedir{doc/latex/oberdiek/test}%
+ \file{protecteddef-test1.tex}{\from{protecteddef.dtx}{test1}}%
+ \file{protecteddef-test2.tex}{\from{protecteddef.dtx}{test2}}%
+}
+
+\catcode32=13\relax% active space
+\let =\space%
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* protecteddef.sty}
+\Msg{*}
+\Msg{* And install the following script file:}
+\Msg{*}
+\Msg{* }
+\Msg{*}
+\Msg{* To produce the documentation run the file `protecteddef.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{protecteddef.drv}%
+ [2011/01/31 v1.0 Definition of protected macros (HO)]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2008/08/11]
+\begin{document}
+ \DocInput{protecteddef.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{810}
+%
+% \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{protecteddef.drv}
+%
+% \title{The \xpackage{protecteddef} package}
+% \date{2011/01/31 v1.0}
+% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% This packages provides \cs{ProtectedDef} for defining
+% robust macros for both \hologo{plainTeX} and \hologo{LaTeX}.
+% First \hologo{eTeX}'s \cs{protected} is tried, then
+% \hologo{LaTeX}'s \cs{DeclareRobustCommand} is used.
+% Otherwise the macro is not made robust.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Documentation}
+%
+% Many of my packages work for both formats \hologo{plainTeX}
+% and \hologo{LaTeX}, even \hologo{iniTeX} is often supported.
+% It would be nice if fragile macros could be protected and
+% made robust. However the different format worlds offer different
+% solutions.
+%
+% \subsection{The \hologo{LaTeX}'s way}
+%
+% Usually \cs{newcommand} is used to define macros. It provides
+% a check if the command to be defined is already defined or
+% cannot be defined for other reasons.
+%
+% For making robust macros \hologo{LaTeX} provides \cs{DeclareRobustCommand}.
+% It shares the syntax with \cs{newcommand}. However it does not provide
+% latters check. Internally the check is available via \cs{@ifdefinable}.
+%
+% Internally the robust macro is using \cs{protect} with a nested
+% macro definition. The \cs{protect} infrastructure is a feature of
+% \cs{LaTeX} and usually not available in other formats.
+%
+% \subsection{The \hologo{eTeX}'s way}
+%
+% The need for robust macros is addressed in \cs{eTeX}. It provides
+% \cs{protected} that modifies the behaviour of \cs{def} in a similar
+% way as \cs{long}. A protected macro does not expand in
+% some expandable contexts like writing to a file or \cs{edef}.
+%
+% \subsection{The way of this package}
+%
+% The package tries to find the available protection mechanism.
+% First it looks for \cs{eTeX}'s \cs{protected}, then
+% it uses \hologo{LaTeX}'s \cs{DeclareRobustCommand}.
+% If both fails, then the macro remains unprotected.
+%
+% Additionally, \cs{LaTeX}'s check, if a macro is already defined
+% is added in all cases. First \hologo{LaTeX}'s \cs{@ifdefinable}
+% is tried to be compatible with \hologo{LaTeX}.
+% If \cs{@ifdefinable} is not available, then the test is implemented
+% by asserting that the macro is undefined or has the meaning of \cs{relax}.
+% If the test fails, then in all cases the macro is not defined
+% and an error is thrown.
+%
+% \subsection{Usage}
+%
+% \begin{declcs}{ProtectedDef} \* \M{cmd} [\meta{num}] \M{definition text}
+% \end{declcs}
+% Macro \cs{ProtectedDef} follows the syntax of \hologo{LaTeX}'s
+% \cs{newcommand} with the exception that an optional argument
+% is not supported. Macro \meta{cmd} is to be defined as
+% \cs{long} macro without star with \meta{num} arguments.
+%
+% The number of arguments \meta{num} must be given as explicite digit
+% |0| upto |9|. Otherwise the part between the argument \meta{cmd} and
+% the \meta{definition text} is taken as parameter text in the syntax
+% of vanilla \hologo{TeX}. Examples (with \cs{protected}):
+% \begin{quote}
+% \def\to{$\Rightarrow$ }%
+% |\ProtectedDef*{\foo}[1]{\message{#1}}|\\
+% \to |\protected\def\foo#1{\message#1}}|\\[1ex]
+% |\ProtectedDef\foo{abc}|\\
+% \to |\protected\def\foo{abc}|\\[1ex]
+% |\ProtectedDef*\foo(#1)<#2>{#1/#2}|\\
+% \to |\protected\def\foo(#1)<#2>{#1/#2}|
+% \end{quote}
+%
+% \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\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@protecteddef.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \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{protecteddef}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup%
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\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}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@protecteddef.sty\endcsname
+\ProvidesPackage{protecteddef}%
+ [2011/01/31 v1.0 Definition of protected macros (HO)]%
+% \end{macrocode}
+%
+% \subsection{Catcodes}
+%
+% \begin{macrocode}
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode123=1 % {
+ \catcode125=2 % }
+ \catcode64=11 % @
+ \def\x{\endgroup
+ \expandafter\edef\csname ProDef@AtEnd\endcsname{%
+ \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\catcode61\catcode48\catcode32=10\relax%
+\catcode13=5 % ^^M
+\endlinechar=13 %
+\catcode35=6 % #
+\catcode64=11 % @
+\catcode123=1 % {
+\catcode125=2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\ProDef@AtEnd{%
+ \ProDef@AtEnd
+ \catcode#1=\the\catcode#1\relax
+ }%
+ \catcode#1=#2\relax
+}
+\TMP@EnsureCode{38}{4}% &
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
+\TMP@EnsureCode{42}{12}% *
+\TMP@EnsureCode{45}{12}% -
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\TMP@EnsureCode{96}{12}% `
+\edef\ProDef@AtEnd{\ProDef@AtEnd\noexpand\endinput}
+% \end{macrocode}
+%
+% \subsection{Resources}
+%
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+\else
+ \let\TMP@RequirePackage\RequirePackage
+\fi
+\TMP@RequirePackage{ltxcmds}[2010/12/12]%
+\TMP@RequirePackage{infwarerr}[2010/04/08]%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\ProDef@temp#1{%
+ \expandafter\def\csname ProDef@param[#1]\endcsname % hash-ok
+}
+\expandafter\def\csname ProDef@param\endcsname{}
+\ProDef@temp0{}
+\ProDef@temp1{##1}
+\ProDef@temp2{##1##2}
+\ProDef@temp3{##1##2##3}
+\ProDef@temp4{##1##2##3##4}
+\ProDef@temp5{##1##2##3##4##5}
+\ProDef@temp6{##1##2##3##4##5##6}
+\ProDef@temp7{##1##2##3##4##5##7}
+\ProDef@temp8{##1##2##3##4##5##7##8}
+\ProDef@temp9{##1##2##3##4##5##7##8##9}
+% \end{macrocode}
+%
+% \begin{macro}{\ProDef@IfDefinable}
+% \begin{macrocode}
+\ltx@IfUndefined{@ifdefinable}{%
+ \long\def\ProDef@IfDefinable#1{%
+ \begingroup
+ \escapechar=-1 %
+ \ltx@ifundefined{\string#1}{%
+ \endgroup
+ \ltx@firstofone
+ }{%
+ \expandafter\endgroup
+ \expandafter
+ \edef\expandafter\ProDef@temp\expandafter{\string#1 }%
+ \@PackageError{protecteddef}{%
+ Command \ltx@backslashchar\ProDef@temp already defined%
+ }\@ehc
+ \ltx@gobbletwo
+ }%
+ }%
+}{%
+ \long\def\ProDef@IfDefinable#1{%
+ \let\ProDef@next\ltx@gobbletwo
+ \@ifdefinable{#1}{%
+ \let\ProDef@next\ltx@firstofone
+ }%
+ \ProDef@next
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname protected\endcsname\relax
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname DeclareRobustCommand\endcsname\relax
+ \catcode`\&=14 % comment
+ \else
+ \newcommand*{\ProtectedDef}{%
+ \ltx@ifnextchar*{%
+ \ProDef@ProtectedDef
+ }{%
+ \ProDef@ProtectedDef{}%
+ }%
+ }%
+ \long\def\ProDef@ProtectedDef#1#2#3#{%
+ \ProDef@IfDefinable{#2}{%
+ \ltx@IfUndefined{ProDef@param#3}{%
+ \DeclareRobustCommand*{#2}{}%
+ \begingroup
+ \escapechar=-1 %
+ \def\ProDef@temp{#1}%
+ \edef\x{\endgroup
+ \ifx\ProDef@temp\ltx@empty
+ \noexpand\long
+ \fi
+ \noexpand\def
+ \expandafter\noexpand\csname\string#2 \endcsname
+ }%
+ \x#3%
+ }{%
+ \DeclareRobustCommand#1{#2}#3%
+ }%
+ }%
+ }%
+ \expandafter\expandafter\expandafter\ProDef@AtEnd
+ \fi
+\else
+ \catcode`\&=9 % ignore
+\fi%
+\ProDef@IfDefinable\ProtectedDef{%
+& \protected
+ \def\ProtectedDef%
+}{%
+ \ltx@ifnextchar*{%
+ \let\ProDef@long\ltx@empty
+ \expandafter\ProDef@ProtectedDef\ltx@gobble
+ }{%
+ \let\ProDef@long\long
+ \ProDef@ProtectedDef
+ }%
+}
+\long\def\ProDef@ProtectedDef#1#2#{%
+ \ProDef@IfDefinable{#1}{%
+ \ltx@IfUndefined{ProDef@param#2}{%
+& \protected
+ \ProDef@long
+ \def#1#2%
+ }{%
+& \protected
+ \ProDef@long
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter#1%
+ \csname ProDef@param#2\endcsname
+ }%
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ProDef@AtEnd%
+% \end{macrocode}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \section{Test}
+%
+% \subsection{Catcode checks for loading}
+%
+% \begin{macrocode}
+%<*test1>
+% \end{macrocode}
+% \begin{macrocode}
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\expandafter\ifx\csname count@\endcsname\relax
+ \countdef\count@=255 %
+\fi
+\expandafter\ifx\csname @gobble\endcsname\relax
+ \long\def\@gobble#1{}%
+\fi
+\expandafter\ifx\csname @firstofone\endcsname\relax
+ \long\def\@firstofone#1{#1}%
+\fi
+\expandafter\ifx\csname loop\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+{%
+ \def\loop#1\repeat{%
+ \def\body{#1}%
+ \iterate
+ }%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \let\repeat=\fi
+}%
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@ 1 %
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \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 protecteddef.sty\relax}%
+\fi
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\%=14 %
+ \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
+\csname @@end\endcsname
+\end
+% \end{macrocode}
+% \begin{macrocode}
+%</test1>
+% \end{macrocode}
+%
+% \subsection{Test without \hologo{LaTeX} and \cs{protected}}
+%
+% \begin{macrocode}
+%<*test2>
+\errorcontextlines=10000 %
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input protecteddef.sty\relax
+ \catcode`\{=1 %
+ \catcode`\}=2 %
+ \catcode`\#=6 %
+\else
+ \RequirePackage{protecteddef}[2011/01/31]%
+\fi
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname protected\endcsname\relax
+ \let\pdef\def
+\else
+ \def\pdef{\protected\def}%
+\fi
+\def\msg#{\immediate\write16}
+\countdef\errcount=2 %
+\long\def\BeginCheck#1\ProtectedDef#2\EndCheck{%
+ \begingroup
+ \toks0={\ProtectedDef#2}%
+ \msg{<<\the\toks0>>}%
+ \endgroup
+ \setbox0=\hbox{%
+ #1%
+ \ProtectedDef#2%
+ \check\foo
+ }%
+ \ifdim\wd0=0pt\relax
+ \else
+ \errmessage{[Definition] Unwanted spaces?!}%
+ \fi
+ \setbox0=\hbox{%
+ \def\fooinitial{XYZ}%
+ \let\foo\fooinitial
+ \errcount=0 %
+ \expandafter\def\csname @PackageError\endcsname##1##2##3{%
+ \advance\errcount by 1 %
+ }%
+ \expandafter\def\csname @notdefinable\endcsname{%
+ \advance\errcount by 1 %
+ }%
+ \ProtectedDef#2%
+ \ifnum\errcount=1 %
+ \else
+ \errmessage{1 error expected, but found: \the\errcount}%
+ \fi
+ \ifx\foo\fooinitial
+ \else
+ \def\space{ }%
+ \errmessage{\string\foo\space is overwritten}%
+ \fi
+ }%
+ \ifdim\wd0=0pt\relax
+ \else
+ \errmessage{[Error] Unwanted spaces?!}%
+ \fi
+}
+\chardef\DeclareVersion=0 %
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname protected\endcsname\relax
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname DeclareRobustCommand\endcsname\relax
+ \else
+ \chardef\DeclareVersion=1 %
+ \fi
+\fi
+\ifnum\DeclareVersion=0 %
+ \def\check#1{%
+ \ifx\cmp#1%
+ \msg{* Test passed.}%
+ \else
+ \msg{}%
+ \msg{[\meaning#1]}%
+ \msg{[\meaning\cmp]}%
+ \errmessage{Test failed!}%
+ \fi
+ }%
+\else
+ \def\check#1{%
+ \begingroup
+ \escapechar=-1 %
+ \edef\x{\endgroup
+ \def\noexpand\cs/{\string#1}%
+ }\x
+ \edef\CMP{%
+ \noexpand\protect
+ \expandafter\noexpand\csname\cs/ \endcsname
+ }%
+ \ifx\CMP#1%
+ \expandafter\ifx\csname\cs/ \endcsname\cmp
+ \msg{Test passed.}%
+ \else
+ \msg{}%
+ \msg{[\expandafter\meaning\csname\cs/ \endcsname]}%
+ \msg{[\meaning\cmp]}%
+ \errmessage{Test failed!}%
+ \fi
+ \else
+ \msg{}%
+ \msg{[\meaning#1]}%
+ \msg{[\meaning\CMP]}%
+ \errmessage{Test failed!}%
+ \fi
+ }%
+\fi
+
+\tracingmacros=1
+
+\BeginCheck
+ \pdef\cmp{}%
+ \ProtectedDef*\foo{}%
+\EndCheck
+
+\BeginCheck
+ \pdef\cmp{}%
+ \ProtectedDef*\foo[0]{}%
+\EndCheck
+
+\BeginCheck
+ \pdef\cmp#1{<#1>}%
+ \ProtectedDef*\foo[1]{<#1>}%
+\EndCheck
+
+\BeginCheck
+ \pdef\cmp(#1){<#1>}%
+ \ProtectedDef*\foo(#1){<#1>}%
+\EndCheck
+
+\BeginCheck
+ \long\pdef\cmp{}%
+ \ProtectedDef\foo{}%
+\EndCheck
+
+\BeginCheck
+ \long\pdef\cmp{}%
+ \ProtectedDef\foo[0]{}%
+\EndCheck
+
+\BeginCheck
+ \long\pdef\cmp#1{<#1>}%
+ \ProtectedDef\foo[1]{<#1>}%
+\EndCheck
+
+\BeginCheck
+ \long\pdef\cmp(#1){<#1>}%
+ \ProtectedDef\foo(#1){<#1>}%
+\EndCheck
+
+\csname @@end\endcsname\end
+%</test2>
+% \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/protecteddef.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/oberdiek/protecteddef.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{install/macros/latex/contrib/oberdiek.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTAN{tds/tds.pdf}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \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 protecteddef.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}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+% protecteddef.sty & tex/generic/oberdiek/protecteddef.sty\\
+% protecteddef.pdf & doc/latex/oberdiek/protecteddef.pdf\\
+% test/protecteddef-test1.tex & doc/latex/oberdiek/test/protecteddef-test1.tex\\
+% test/protecteddef-test2.tex & doc/latex/oberdiek/test/protecteddef-test2.tex\\
+% protecteddef.dtx & source/latex/oberdiek/protecteddef.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+% \begingroup
+% \advance\linewidth by\leftmargin
+% \advance\linewidth by\rightmargin
+% \edef\x{\endgroup
+% \def\noexpand\lw{\the\linewidth}^^A
+% }\x
+% \def\lwbox{^^A
+% \leavevmode
+% \hbox to \linewidth{^^A
+% \kern-\leftmargin\relax
+% \hss
+% \usebox0
+% \hss
+% \kern-\rightmargin\relax
+% }^^A
+% }^^A
+% \ifdim\wd0>\lw
+% \sbox0{\small\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\footnotesize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\scriptsize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\tiny\t}^^A
+% \ifdim\wd0>\linewidth
+% \lwbox
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \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 protecteddef.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{protecteddef.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 protecteddef.dtx
+%makeindex -s gind.ist protecteddef.idx
+%pdflatex protecteddef.dtx
+%makeindex -s gind.ist protecteddef.idx
+%pdflatex protecteddef.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \begin{History}
+% \begin{Version}{2011/01/31 v1.0}
+% \item
+% First public version.
+% \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/oberdiek/readme-ctan.txt b/Master/texmf-dist/source/latex/oberdiek/readme-ctan.txt
index 63ab6bbb8ac..73320b277b9 100644
--- a/Master/texmf-dist/source/latex/oberdiek/readme-ctan.txt
+++ b/Master/texmf-dist/source/latex/oberdiek/readme-ctan.txt
@@ -1,4 +1,4 @@
-README 2008/04/16
+README 2011/04/10
This file describes the directory
CTAN:macros/latex/contrib/oberdiek/
diff --git a/Master/texmf-dist/source/latex/oberdiek/refcount.dtx b/Master/texmf-dist/source/latex/oberdiek/refcount.dtx
index 2240771f766..fe35c6b0df0 100644
--- a/Master/texmf-dist/source/latex/oberdiek/refcount.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/refcount.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1998, 2000, 2006, 2008 by
+% Copyright (C) 1998, 2000, 2006, 2008, 2010 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -19,7 +19,9 @@
%
% This work consists of the main source file refcount.dtx
% and the derived files
-% refcount.sty, refcount.pdf, refcount.ins, refcount.drv.
+% refcount.sty, refcount.pdf, refcount.ins, refcount.drv,
+% refcount-test1.tex, refcount-test2.tex, refcount-test3.tex,
+% refcount-test4.tex.
%
% Distribution:
% CTAN:macros/latex/contrib/oberdiek/refcount.dtx
@@ -54,6 +56,10 @@
% Installation:
% TDS:tex/latex/oberdiek/refcount.sty
% TDS:doc/latex/oberdiek/refcount.pdf
+% TDS:doc/latex/oberdiek/test/refcount-test1.tex
+% TDS:doc/latex/oberdiek/test/refcount-test2.tex
+% TDS:doc/latex/oberdiek/test/refcount-test3.tex
+% TDS:doc/latex/oberdiek/test/refcount-test4.tex
% TDS:source/latex/oberdiek/refcount.dtx
%
%<*ignore>
@@ -71,7 +77,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: refcount 2008/08/11 v3.1 Data extraction from references (HO)}
+\Msg{* Package: refcount 2010/12/01 v3.2 Data extraction from references (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -82,7 +88,7 @@
This is a generated file.
-Copyright (C) 1998, 2000, 2006, 2008 by
+Copyright (C) 1998, 2000, 2006, 2008, 2010 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -101,7 +107,9 @@ This Current Maintainer of this work is Heiko Oberdiek.
This work consists of the main source file refcount.dtx
and the derived files
- refcount.sty, refcount.pdf, refcount.ins, refcount.drv.
+ refcount.sty, refcount.pdf, refcount.ins, refcount.drv,
+ refcount-test1.tex, refcount-test2.tex, refcount-test3.tex,
+ refcount-test4.tex.
\endpreamble
\let\MetaPrefix\DoubleperCent
@@ -111,6 +119,11 @@ and the derived files
\file{refcount.drv}{\from{refcount.dtx}{driver}}%
\usedir{tex/latex/oberdiek}%
\file{refcount.sty}{\from{refcount.dtx}{package}}%
+ \usedir{doc/latex/oberdiek/test}%
+ \file{refcount-test1.tex}{\from{refcount.dtx}{test1}}%
+ \file{refcount-test2.tex}{\from{refcount.dtx}{test2}}%
+ \file{refcount-test3.tex}{\from{refcount.dtx}{test3}}%
+ \file{refcount-test4.tex}{\from{refcount.dtx}{test3,test4}}%
}
\catcode32=13\relax% active space
@@ -141,7 +154,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{refcount.drv}%
- [2008/08/11 v3.1 Data extraction from references (HO)]%
+ [2010/12/01 v3.2 Data extraction from references (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -150,7 +163,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{198}
+% \CheckSum{1072}
%
% \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
@@ -171,7 +184,7 @@ and the derived files
% \GetFileInfo{refcount.drv}
%
% \title{The \xpackage{refcount} package}
-% \date{2008/08/11 v3.1}
+% \date{2010/12/01 v3.2}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -258,6 +271,10 @@ and the derived files
% \end{tabular}
% \end{quote}
%
+% Since version 3.2 the expandable macros described before
+% in this section
+% are expandable in exact two expansion steps.
+%
% \subsection{Undefined references}
%
% Because warnings and assignments cannot be used in
@@ -285,6 +302,20 @@ and the derived files
% \end{quote}
% outside the expanding context. Example, see above.
%
+% \subsubsection{Check for undefined references}
+%
+% In version 3.2 macros were added, that test, whether references
+% are defined.
+% \begin{declcs}{IfRefUndefinedExpandable} \M{refname} \M{then} \M{else}\\
+% \cs{IfRefUndefinedBabel} \M{refname} \M{then} \M{else}
+% \end{declcs}
+% If the reference is not available and therefore undefined, then
+% argument \meta{then} is executed, otherwise argument \meta{else}
+% is called. Macro \cs{IfRefUndefinedExpandable} is expandable,
+% but \meta{refname} must not contain babel shorthand characters.
+% Macro \cs{IfRefUndefinedBabel} supports shorthand characters of
+% babel, but it is not expandable.
+%
% \subsection{Notes}
%
% \begin{itemize}
@@ -308,41 +339,291 @@ and the derived files
%
% \begin{macrocode}
%<*package>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{refcount}
- [2008/08/11 v3.1 Data extraction from references (HO)]%
-
-\def\setrefcountdefault#1{%
+% \end{macrocode}
+% Reload check, especially if the package is not used with \LaTeX.
+% \begin{macrocode}
+\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@refcount.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \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{refcount}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup%
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\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}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@refcount.sty\endcsname
+\ProvidesPackage{refcount}%
+ [2010/12/01 v3.2 Data extraction from references (HO)]%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode123=1 % {
+ \catcode125=2 % }
+ \catcode64=11 % @
+ \def\x{\endgroup
+ \expandafter\edef\csname rc@AtEnd\endcsname{%
+ \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\catcode61\catcode48\catcode32=10\relax%
+\catcode13=5 % ^^M
+\endlinechar=13 %
+\catcode35=6 % #
+\catcode64=11 % @
+\catcode123=1 % {
+\catcode125=2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\rc@AtEnd{%
+ \rc@AtEnd
+ \catcode#1=\the\catcode#1\relax
+ }%
+ \catcode#1=#2\relax
+}
+\TMP@EnsureCode{33}{12}% !
+\TMP@EnsureCode{39}{12}% '
+\TMP@EnsureCode{42}{12}% *
+\TMP@EnsureCode{45}{12}% -
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\TMP@EnsureCode{96}{12}% `
+\edef\rc@AtEnd{\rc@AtEnd\noexpand\endinput}
+% \end{macrocode}
+%
+% \subsection{Loading packages}
+%
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input ltxcmds.sty\relax
+ \input infwarerr.sty\relax
+\else
+ \RequirePackage{ltxcmds}[2010/04/08]%
+ \RequirePackage{infwarerr}[2010/04/08]%
+\fi
+% \end{macrocode}
+%
+% \subsection{Defining commands}
+%
+% \begin{macro}{\rc@IfDefinable}
+% \begin{macrocode}
+\ltx@IfUndefined{@ifdefinable}{%
+ \def\rc@IfDefinable#1{%
+ \ifx#1\ltx@undefined
+ \expandafter\ltx@firstofone
+ \else
+ \ifx#1\relax
+ \expandafter\expandafter\expandafter\ltx@firstofone
+ \else
+ \@PackageError{refcount}{%
+ Command \string#1 is already defined.\MessageBreak
+ It will not redefined by this package%
+ }\@ehc
+ \expandafter\expandafter\expandafter\ltx@gobble
+ \fi
+ \fi
+ }%
+}{%
+ \let\rc@IfDefinable\@ifdefinable
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\rc@RobustDefOne}
+% \begin{macrocode}
+\ltx@IfUndefined{protected}{%
+ \ltx@IfUndefined{DeclareRobustCommand}{%
+ \def\rc@RobustDefOne#1#2#3#4{%
+ \rc@IfDefinable#3{%
+ #1\def#3##1{#4}%
+ }%
+ }%
+ }{%
+ \def\rc@RobustDefOne#1#2#3#4{%
+ \rc@IfDefinable#3{%
+ \DeclareRobustCommand#2#3[1]{#4}%
+ }%
+ }%
+ }%
+}{%
+ \def\rc@RobustDefOne#1#2#3#4{%
+ \rc@IfDefinable#3{%
+ \protected#1\def#3##1{#4}%
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\rc@newcommand}
+% \begin{macrocode}
+\ltx@IfUndefined{newcommand}{%
+ \def\rc@newcommand*#1[#2]#3{% hash-ok
+ \rc@IfDefinable#1{%
+ \ifcase#2 %
+ \def#1{#3}%
+ \or
+ \def#1##1{#3}%
+ \or
+ \def#1##1##2{#3}%
+ \else
+ \rc@InternalError
+ \fi
+ }%
+ }%
+}{%
+ \let\rc@newcommand\newcommand
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{\cs{setrefcountdefault}}
+%
+% \begin{macro}{\setrefcountdefault}
+% \begin{macrocode}
+\rc@RobustDefOne\long{}\setrefcountdefault{%
\def\rc@default{#1}%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\setrefcountdefault{0}
-
-% \def\@car#1#2\@nil{#1} % defined in LaTeX kernel
-\def\rc@cartwo#1#2#3\@nil{#2}
-
-% generic check without babel support
-\long\def\rc@refused#1{%
- \expandafter\ifx\csname r@#1\endcsname\relax
- \protect\G@refundefinedtrue
+% \end{macrocode}
+%
+% \subsection{\cs{refused}}
+%
+% \begin{macro}{\refused}
+% \begin{macrocode}
+\ltx@IfUndefined{G@refundefinedtrue}{%
+ \rc@RobustDefOne{}{*}\refused{%
+ \begingroup
+ \csname @safe@activestrue\endcsname
+ \ltx@IfUndefined{r@#1}{%
+ \protect\G@refundefinedtrue
+ \rc@WarningUndefined{#1}%
+ }{}%
+ \endgroup
+ }%
+}{%
+ \rc@RobustDefOne{}{*}\refused{%
+ \begingroup
+ \csname @safe@activestrue\endcsname
+ \ltx@IfUndefined{r@#1}{%
+ \csname protect\expandafter\endcsname
+ \csname G@refundefinedtrue\endcsname
+ \rc@WarningUndefined{#1}%
+ }{}%
+ \endgroup
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\rc@WarningUndefined}
+% \begin{macrocode}
+\ltx@IfUndefined{@latex@warning}{%
+ \def\rc@WarningUndefined#1{%
+ \ltx@ifundefined{thepage}{%
+ \def\thepage{\number\count0 }%
+ }{}%
+ \@PackageWarning{refcount}{%
+ Reference `#1' on page \thepage\space undefined%
+ }%
+ }%
+}{%
+ \def\rc@WarningUndefined#1{%
\@latex@warning{%
Reference `#1' on page \thepage\space undefined%
}%
- \fi
+ }%
}
-
-% user command, add babel support
-\newcommand*{\refused}[1]{%
- \begingroup
- \csname @safe@activestrue\endcsname
- \rc@refused{#1}{}%
- \endgroup
-}
-
-% Generic command for "\{set,addto}counter{page,}ref":
-% #1: \setcounter, \addtocounter
-% #2: \@car (for \ref), \@cartwo (for \pageref)
-% #3: LaTeX counter
-% #4: reference
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Setting counters by reference data}
+%
+% \subsubsection{Generic setting}
+%
+% \begin{macro}{\rc@set}
+% Generic command for
+% |\|$\{$|set|$,$|addto|$\}$|counter|$\{$|page|$,\}$|ref|:
+%\begin{quote}
+%\begin{tabular}[t]{@{}l@{: }l@{}}
+% |#1|& \cs{setcounter}, \cs{addtocounter}\\
+% |#2|& \cs{ltx@car} (for \cs{ref}), \cs{ltx@cartwo} (for \cs{pageref})\\
+% |#3|& \hologo{LaTeX} counter\\
+% |#4|& reference\\
+%\end{tabular}
+%\end{quote}
+% \begin{macrocode}
\def\rc@set#1#2#3#4{%
\begingroup
\csname @safe@activestrue\endcsname
@@ -350,10 +631,18 @@ and the derived files
\expandafter\rc@@set\csname r@#4\endcsname{#1}{#2}{#3}%
\endgroup
}
-% #1: \r@<...>
-% #2: \setcounter, \addtocounter
-% #3: \@car (for \ref), \@cartwo (for \pageref)
-% #4: LaTeX counter
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\rc@@set}
+%\begin{quote}
+%\begin{tabular}[t]{@{}l@{: }l@{}}
+% |#1|& \cs{r@<...>}\\
+% |#2|& \cs{setcounter}, \cs{addtocounter}\\
+% |#3|& \cs{ltx@car} (for \cs{ref}), \cs{ltx@cartwo} (for \cs{pageref})\\
+% |#4|& \hologo{LaTeX} counter\\
+%\end{tabular}
+%\end{quote}
+% \begin{macrocode}
\def\rc@@set#1#2#3#4{%
\ifx#1\relax
#2{#4}{\rc@default}%
@@ -363,81 +652,560 @@ and the derived files
}%
\fi
}
-
-% user commands:
-
-\newcommand*{\setcounterref}{\rc@set\setcounter\@car}
-\newcommand*{\addtocounterref}{\rc@set\addtocounter\@car}
-\newcommand*{\setcounterpageref}{\rc@set\setcounter\rc@cartwo}
-\newcommand*{\addtocounterpageref}{\rc@set\addtocounter\rc@cartwo}
-
-\newcommand*{\getrefnumber}[1]{%
- \expandafter\ifx\csname r@#1\endcsname\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{User commands}
+%
+% \begin{macro}{\setcounterref}
+% \begin{macrocode}
+\rc@newcommand*{\setcounterref}[0]{%
+ \rc@set\setcounter\ltx@car
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\addtocounterref}
+% \begin{macrocode}
+\rc@newcommand*{\addtocounterref}[0]{%
+ \rc@set\addtocounter\ltx@car
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\setcounterpageref}
+% \begin{macrocode}
+\rc@newcommand*{\setcounterpageref}[0]{%
+ \rc@set\setcounter\ltx@cartwo
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\addtocounterpageref}
+% \begin{macrocode}
+\rc@newcommand*{\addtocounterpageref}[0]{%
+ \rc@set\addtocounter\ltx@cartwo
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Extracting references}
+%
+% \begin{macro}{\getrefnumber}
+% \begin{macrocode}
+\rc@newcommand*{\getrefnumber}[1]{%
+ \romannumeral
+ \ltx@ifundefined{r@#1}{%
+ \expandafter\ltx@zero
\rc@default
- \else
- \expandafter\expandafter\expandafter\@car
- \csname r@#1\endcsname\@nil
- \fi
+ }{%
+ \expandafter\expandafter\expandafter\rc@extract@
+ \expandafter\expandafter\expandafter!%
+ \csname r@#1\expandafter\endcsname
+ \expandafter{\rc@default}\@nil
+ }%
}
-\newcommand*{\getpagerefnumber}[1]{%
- \expandafter\ifx\csname r@#1\endcsname\relax
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\getpagerefnumber}
+% \begin{macrocode}
+\rc@newcommand*{\getpagerefnumber}[1]{%
+ \romannumeral
+ \ltx@ifundefined{r@#1}{%
+ \expandafter\ltx@zero
\rc@default
- \else
- \expandafter\expandafter\expandafter\rc@cartwo
- \csname r@#1\endcsname\rc@default\rc@default\@nil
- \fi
+ }{%
+ \expandafter\expandafter\expandafter\rc@extract@page
+ \expandafter\expandafter\expandafter!%
+ \csname r@#1\expandafter\expandafter\expandafter\endcsname
+ \expandafter\expandafter\expandafter{%
+ \expandafter\rc@default
+ \expandafter}\expandafter{\rc@default}\@nil
+ }%
}
-\newcommand*{\getrefbykeydefault}[2]{%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\getrefbykeydefault}
+% \begin{macrocode}
+\rc@newcommand*{\getrefbykeydefault}[2]{%
+ \romannumeral
\expandafter\rc@getrefbykeydefault
\csname r@#1\expandafter\endcsname
\csname rc@extract@#2\endcsname
}
-% #1: \r@<...>
-% #2: \rc@extract@<...>
-% #3: default
-\def\rc@getrefbykeydefault#1#2#3{%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\rc@getrefbykeydefault}
+%\begin{quote}
+%\begin{tabular}[t]{@{}l@{: }l@{}}
+% |#1|& \cs{r@<...>}\\
+% |#2|& \cs{rc@extract@<...>}\\
+% |#3|& default\\
+%\end{tabular}
+%\end{quote}
+% \begin{macrocode}
+\long\def\rc@getrefbykeydefault#1#2#3{%
\ifx#1\relax
% reference is undefined
- #3%
- \else
- \ifx#2\relax
- % extract method is missing
+ \ltx@ReturnAfterElseFi{%
+ \ltx@zero
#3%
- \else
- \expandafter\rc@generic#1{#3}{#3}{#3}{#3}{#3}\@nil#2{#3}%
- \fi
+ }%
+ \else
+ \ltx@ReturnAfterFi{%
+ \ifx#2\relax
+ % extract method is missing
+ \ltx@ReturnAfterElseFi{%
+ \ltx@zero
+ #3%
+ }%
+ \else
+ \ltx@ReturnAfterFi{%
+ \expandafter
+ \rc@generic#1{#3}{#3}{#3}{#3}{#3}\@nil#2{#3}%
+ }%
+ \fi
+ }%
\fi
}
-% #1: first item in \r@<...>
-% #2: remaining items in \r@<...>
-% #3: \rc@extract@<...>
-% #4: default
-\def\rc@generic#1#2\@nil#3#4{%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\rc@generic}
+%\begin{quote}
+%\begin{tabular}[t]{@{}l@{: }l@{}}
+% |#1|& first item in \cs{r@<...>}\\
+% |#2|& remaining items in \cs{r@<...>}\\
+% |#3|& \cs{rc@extract@<...>}\\
+% |#4|& default\\
+%\end{tabular}
+%\end{quote}
+% \begin{macrocode}
+\long\def\rc@generic#1#2\@nil#3#4{%
#3{#1\TR@TitleReference\@empty{#4}\@nil}{#1}#2\@nil
}
-\def\rc@extract@{%
- \expandafter\@car\@gobble
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\rc@extract@}
+% \begin{macrocode}
+\long\def\rc@extract@#1#2#3\@nil{%
+ \ltx@zero
+ #2%
}
-\def\rc@extract@page{%
- \expandafter\@car\@gobbletwo
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\rc@extract@page}
+% \begin{macrocode}
+\long\def\rc@extract@page#1#2#3#4\@nil{%
+ \ltx@zero
+ #3%
}
-\def\rc@extract@name{%
- \expandafter\@car\@gobblefour\@empty
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\rc@extract@name}
+% \begin{macrocode}
+\long\def\rc@extract@name#1#2#3#4#5\@nil{%
+ \ltx@zero
+ #4%
}
-\def\rc@extract@anchor{%
- \expandafter\@car\@gobblefour
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\rc@extract@anchor}
+% \begin{macrocode}
+\long\def\rc@extract@anchor#1#2#3#4#5#6\@nil{%
+ \ltx@zero
+ #5%
}
-\def\rc@extract@url{%
- \expandafter\expandafter\expandafter\@car\expandafter
- \@gobble\@gobblefour
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\rc@extract@url}
+% \begin{macrocode}
+\long\def\rc@extract@url#1#2#3#4#5#6#7\@nil{%
+ \ltx@zero
+ #6%
}
-\def\rc@extract@title#1#2\@nil{%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\rc@extract@title}
+% \begin{macrocode}
+\long\def\rc@extract@title#1#2\@nil{%
\rc@@extract@title#1%
}
-\def\rc@@extract@title#1\TR@TitleReference#2#3#4\@nil{#3}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\rc@@extract@title}
+% \begin{macrocode}
+\long\def\rc@@extract@title#1\TR@TitleReference#2#3#4\@nil{%
+ \ltx@zero
+ #3%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Macros for checking undefined references}
+%
+% \begin{macro}{\IfRefUndefinedExpandable}
+% \begin{macrocode}
+\rc@newcommand*{\IfRefUndefinedExpandable}[1]{%
+ \ltx@ifundefined{r@#1}\ltx@firstoftwo\ltx@secondoftwo
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\IfRefUndefinedBabel}
+% \begin{macrocode}
+\rc@RobustDefOne{}*\IfRefUndefinedBabel{%
+ \begingroup
+ \csname safe@actives@true\endcsname
+ \expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname r@#1\endcsname\relax
+ \expandafter\ltx@firstoftwo
+ \else
+ \expandafter\ltx@secondoftwo
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\rc@AtEnd%
%</package>
% \end{macrocode}
%
+% \section{Test}
+%
+% \subsection{Catcode checks for loading}
+%
+% \begin{macrocode}
+%<*test1>
+% \end{macrocode}
+% \begin{macrocode}
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\expandafter\ifx\csname count@\endcsname\relax
+ \countdef\count@=255 %
+\fi
+\expandafter\ifx\csname @gobble\endcsname\relax
+ \long\def\@gobble#1{}%
+\fi
+\expandafter\ifx\csname @firstofone\endcsname\relax
+ \long\def\@firstofone#1{#1}%
+\fi
+\expandafter\ifx\csname loop\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+{%
+ \def\loop#1\repeat{%
+ \def\body{#1}%
+ \iterate
+ }%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \let\repeat=\fi
+}%
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@ 1 %
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \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 refcount.sty\relax}%
+\fi
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\%=14 %
+ \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
+\csname @@end\endcsname
+\end
+% \end{macrocode}
+% \begin{macrocode}
+%</test1>
+% \end{macrocode}
+%
+% \subsection{Macro tests}
+%
+% \begin{macrocode}
+%<*test2>
+\errorcontextlines=10000 %
+\showboxbreadth=10000 %
+\showboxdepth=10000 %
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input refcount.sty\relax
+\else
+ \RequirePackage{refcount}[2010/12/01]%
+\fi
+\catcode`\@=11 %
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname @onelevel@sanitize\endcsname\relax
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname detokenize\endcsname\relax
+ \def\strip@prefix#1->{}%
+ \def\@onelevel@sanitize#1{%
+ \edef#1{%
+ \expandafter\strip@prefix\meaning#1%
+ }%
+ }%
+ \else
+ \def\@onelevel@sanitize#1{%
+ \edef#1{%
+ \detokenize\expandafter{#1}%
+ }%
+ }%
+ \fi
+\fi
+\def\msg#{\immediate\write16}
+\def\empty{}
+\def\space{ }
+% \end{macrocode}
+% \begin{macrocode}
+\def\r@foo{{\empty 1}{\empty 2}}
+\long\def\test#1#2{%
+ \begingroup
+ \setbox0=\hbox{%
+ \def\TestTask{#1}%
+ \@onelevel@sanitize\TestTask
+ \msg{* \TestTask}%
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter\TestResult
+ \expandafter\expandafter\expandafter{%
+ #1%
+ }%
+ \def\TestExpected{#2}%
+ \ifx\TestResult\TestExpected
+ \msg{ \space ok.}%
+ \else
+ \@onelevel@sanitize\TestResult
+ \@onelevel@sanitize\TestExpected
+ \msg{ \space Result: \space\space[\TestResult]}%
+ \msg{ \space Expected: [\TestExpected]}%
+ \errmessage{Test failed!}%
+ \fi
+ }%
+ \ifdim\wd0=0pt %
+ \else
+ \showbox0 %
+ \fi
+ \endgroup
+}
+\test{\getrefnumber{foo}}{\empty 1}
+\test{\getpagerefnumber{foo}}{\empty 2}
+\test{\getrefbykeydefault{foo}{}{\empty default}}{\empty 1}
+\test{\getrefbykeydefault{foo}{page}{\empty default}}{\empty 2}
+\test{\getrefbykeydefault{foo}{name}{\empty default}}{\empty default}
+\test{\getrefbykeydefault{foo}{anchor}{\empty default}}{\empty default}
+\test{\getrefbykeydefault{foo}{url}{\empty default}}{\empty default}
+\test{\getrefbykeydefault{foo}{title}{\empty default}}{\empty default}
+\msg{}
+\def\r@foo{{}{}{}{}{}{}{}{}{}{}}
+\def\Test#1#2\\{%
+ \test{#1{foo}#2}{}%
+}
+\def\TestGroup{%
+ \Test\getrefnumber\\%
+ \Test\getpagerefnumber\\%
+ \Test\getrefbykeydefault{}{}\\%
+ \Test\getrefbykeydefault{page}{}\\%
+ \Test\getrefbykeydefault{anchor}{}\\%
+ \Test\getrefbykeydefault{name}{}\\%
+ \Test\getrefbykeydefault{url}{}\\%
+}
+\TestGroup
+\Test\getrefbykeydefault{title}{}\\%
+\msg{}
+\def\r@foo{\par\par\par\par\par\par\par\par}
+\long\def\Test#1#2\\{%
+ \test{#1{foo}#2}{\par}%
+}
+\TestGroup
+\test{\getrefbykeydefault{title}{}{}}{}
+\msg{}
+\def\r@foo{{ }{ }{ }{ }{ }}
+\def\Test#1#2\\{%
+ \test{#1{foo}#2}{ }%
+}
+\TestGroup
+\msg{}
+\long\def\TestDefault#1{%
+ \begingroup
+ \setrefcountdefault{#1}%
+ \test{\getrefnumber{foo}}{#1}%
+ \test{\getpagerefnumber{foo}}{#1}%
+ \endgroup
+}
+\def\TestDefaultX{%
+ \TestDefault{}%
+ \TestDefault{\par}%
+ \TestDefault{ }%
+ \TestDefault{\space}%
+}
+\let\r@foo\@undefined
+\TestDefaultX
+\let\r@foo\relax
+\TestDefaultX
+\def\r@foo{}
+\TestDefaultX
+% \end{macrocode}
+% \begin{macrocode}
+\msg{}
+\long\def\Test#1#2#3#4{%
+ \begingroup
+ \def\TestTask{#1}%
+ \@onelevel@sanitize\TestTask
+ \msg{* [\TestTask]}%
+ \edef\TestResultA{\IfRefUndefinedExpandable{#1}{#2}{#3}}%
+ \IfRefUndefinedBabel{#1}{%
+ \def\TestResultB{#2}%
+ }{%
+ \def\TestResultB{#3}%
+ }%
+ \def\TestExpected{#4}%
+ \ifx\TestResultA\TestExpected
+ \msg{ \space ok.}%
+ \else
+ \begingroup
+ \@onelevel@sanitize\TestResultA
+ \@onelevel@sanitize\TestExpected
+ \msg{ \space Result: \space\space[\TestResultA]}%
+ \msg{ \space Expected: [\TestExpected]}%
+ \errmessage{Test failed!}%
+ \endgroup
+ \fi
+ \ifx\TestResultB\TestExpected
+ \msg{ \space ok.}%
+ \else
+ \begingroup
+ \@onelevel@sanitize\TestResultB
+ \@onelevel@sanitize\TestExpected
+ \msg{ \space Result: \space\space[\TestResultB]}%
+ \msg{ \space Expected: [\TestExpected]}%
+ \errmessage{Test failed!}%
+ \endgroup
+ \fi
+ \endgroup
+}
+\begingroup
+ \def\r@foo{{}{}}%
+ \let\r@bar\@undefined
+ \let\r@xyz\relax
+ \Test{foo}{true}{false}{false}%
+ \Test{bar}{true}{false}{true}%
+ \Test{xyz}{true}{false}{true}%
+\endgroup
+% \end{macrocode}
+% \begin{macrocode}
+\csname @@end\endcsname\end
+%</test2>
+% \end{macrocode}
+% \subsection{Test with package \xpackage{titleref}}
+%
+% \begin{macrocode}
+%<*test3>
+\NeedsTeXFormat{LaTeX2e}
+\documentclass{article}
+\usepackage{refcount}[2010/12/01]
+%<test4>\usepackage{nameref}
+\usepackage{titleref}
+\begin{document}
+\section{Hello World}
+\label{sec:hello}
+\section{\hbox{xy}}
+\label{sec:foo}
+%
+\makeatletter
+\@ifundefined{r@sec:hello}{%
+ \typeout{==> Compile twice!}%
+}{%
+ \def\test#1#2{%
+ \begingroup
+ \def\TestTask{#1}%
+ \@onelevel@sanitize\TestTask
+ \typeout{* \TestTask}%
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter\TestResult
+ \expandafter\expandafter\expandafter{%
+ #1%
+ }%
+ \def\TestExpected{#2}%
+ \ifx\TestResult\TestExpected
+ \typeout{ \space ok.}%
+ \else
+ \@onelevel@sanitize\TestResult
+ \@onelevel@sanitize\TestExpected
+ \typeout{ \space Result: \space\space[\TestResult]}%
+ \typeout{ \space Expected: [\TestExpected]}%
+ \errmessage{Test failed!}%
+ \fi
+ \endgroup
+ }%
+ \test{\getrefbykeydefault{sec:hello}{title}{}}{Hello World}%
+ \test{\getrefbykeydefault{sec:foo}{title}{}}{\hbox{xy}}%
+ \begingroup
+ \def\hbox#1{[#1]}% hash-ok
+ \test{\getrefbykeydefault{sec:foo}{title}{}}{\hbox{xy}}%
+ \endgroup
+}
+\makeatother
+% \end{macrocode}
+% \begin{macrocode}
+\end{document}
+%</test3>
+% \end{macrocode}
+%
% \section{Installation}
%
% \subsection{Download}
@@ -499,6 +1267,10 @@ and the derived files
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
% refcount.sty & tex/latex/oberdiek/refcount.sty\\
% refcount.pdf & doc/latex/oberdiek/refcount.pdf\\
+% test/refcount-test1.tex & doc/latex/oberdiek/test/refcount-test1.tex\\
+% test/refcount-test2.tex & doc/latex/oberdiek/test/refcount-test2.tex\\
+% test/refcount-test3.tex & doc/latex/oberdiek/test/refcount-test3.tex\\
+% test/refcount-test4.tex & doc/latex/oberdiek/test/refcount-test4.tex\\
% refcount.dtx & source/latex/oberdiek/refcount.dtx\\
% \end{tabular}^^A
% }^^A
@@ -649,6 +1421,17 @@ and the derived files
% \item
% URLs updated.
% \end{Version}
+% \begin{Version}{2010/12/01 v3.2}
+% \item
+% \cs{IfRefUndefinedExpandable} and \cs{IfRefUndefinedBabel} added.
+% \item
+% \cs{getrefnumber}, \cs{getpagerefnumber}, \cs{getrefbykeydefault}
+% are expandable in exact two expansion steps.
+% \item
+% Non-expandable macros are made robust.
+% \item
+% Test files added.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/rerunfilecheck.dtx b/Master/texmf-dist/source/latex/oberdiek/rerunfilecheck.dtx
index b64d34f38f9..4b9fb4e1ff0 100644
--- a/Master/texmf-dist/source/latex/oberdiek/rerunfilecheck.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/rerunfilecheck.dtx
@@ -162,7 +162,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{545}
+% \CheckSum{601}
%
% \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
@@ -309,28 +309,37 @@ and the derived files
% \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 ReFiCh@AtEnd\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\ReFiCh@AtEnd{%
\ReFiCh@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{39}{12}% '
\TMP@EnsureCode{40}{12}% (
@@ -342,12 +351,11 @@ and the derived files
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{59}{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}% `
-\g@addto@macro\ReFiCh@AtEnd{\endinput}
+\edef\ReFiCh@AtEnd{\ReFiCh@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% Package identification.
@@ -423,7 +431,7 @@ and the derived files
\newcommand*{\RerunFileCheck}[3]{}%
\renewcommand*{\RerunFileCheckSetup}[1]{}%
\expandafter\ReFiCh@AtEnd
-\fi
+\fi%
% \end{macrocode}
%
% \subsection{Standard \xext{.aux} files}
@@ -700,7 +708,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\ReFiCh@AtEnd
+\ReFiCh@AtEnd%
%</package>
% \end{macrocode}
%
@@ -767,6 +775,22 @@ and the derived files
\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 rerunfilecheck.sty\relax}%
\fi
@@ -777,15 +801,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/resizegather.dtx b/Master/texmf-dist/source/latex/oberdiek/resizegather.dtx
index 2f02f18109c..ca70f3a00f0 100644
--- a/Master/texmf-dist/source/latex/oberdiek/resizegather.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/resizegather.dtx
@@ -158,7 +158,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{492}
+% \CheckSum{565}
%
% \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
@@ -324,14 +324,18 @@ and the derived files
% \end{macrocode}
% 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@resizegather.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -339,7 +343,6 @@ and the derived files
\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.}%
@@ -351,24 +354,27 @@ and the derived files
\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}%
@@ -387,32 +393,41 @@ and the derived files
\fi
\expandafter\x\csname ver@resizegather.sty\endcsname
\ProvidesPackage{resizegather}%
- [2010/03/01 v1.2 Automatically resizing of too large equations (HO)]
+ [2010/03/01 v1.2 Automatically resizing of too large equations (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 ResizeGather@AtEnd\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\ResizeGather@AtEnd{%
\ResizeGather@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{10}{12}% ^^J
\TMP@EnsureCode{33}{12}% !
@@ -430,13 +445,13 @@ and the derived files
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{59}{12}% ;
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{63}{12}% ?
\TMP@EnsureCode{91}{12}% [
\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{94}{7}% ^ (superscript)
\TMP@EnsureCode{96}{12}% `
+\edef\ResizeGather@AtEnd{\ResizeGather@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \begin{macrocode}
@@ -644,7 +659,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\ResizeGather@AtEnd
+\ResizeGather@AtEnd%
%</package>
% \end{macrocode}
%
@@ -708,6 +723,22 @@ and the derived files
\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 resizegather.sty\relax}%
\fi
@@ -718,15 +749,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/rotchiffre.dtx b/Master/texmf-dist/source/latex/oberdiek/rotchiffre.dtx
new file mode 100644
index 00000000000..e2dd5796b34
--- /dev/null
+++ b/Master/texmf-dist/source/latex/oberdiek/rotchiffre.dtx
@@ -0,0 +1,1363 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2010 by
+% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any later
+% version. This version of this license is in
+% http://www.latex-project.org/lppl/lppl-1-3c.txt
+% and 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.
+%
+% The Base Interpreter refers to any `TeX-Format',
+% because some files are installed in TDS:tex/generic//.
+%
+% This work consists of the main source file rotchiffre.dtx
+% and the derived files
+% rotchiffre.sty, rotchiffre.pdf, rotchiffre.ins, rotchiffre.drv,
+% rotchiffre-test1.tex, rotchiffre-test2.tex.
+%
+% Distribution:
+% CTAN:macros/latex/contrib/oberdiek/rotchiffre.dtx
+% CTAN:macros/latex/contrib/oberdiek/rotchiffre.pdf
+%
+% Unpacking:
+% (a) If rotchiffre.ins is present:
+% tex rotchiffre.ins
+% (b) Without rotchiffre.ins:
+% tex rotchiffre.dtx
+% (c) If you insist on using LaTeX
+% latex \let\install=y\input{rotchiffre.dtx}
+% (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+% (a) If rotchiffre.drv is present:
+% latex rotchiffre.drv
+% (b) Without rotchiffre.drv:
+% latex rotchiffre.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 rotchiffre.dtx
+% makeindex -s gind.ist rotchiffre.idx
+% pdflatex rotchiffre.dtx
+% makeindex -s gind.ist rotchiffre.idx
+% pdflatex rotchiffre.dtx
+%
+% Installation:
+% TDS:tex/generic/oberdiek/rotchiffre.sty
+% TDS:doc/latex/oberdiek/rotchiffre.pdf
+% TDS:doc/latex/oberdiek/test/rotchiffre-test1.tex
+% TDS:doc/latex/oberdiek/test/rotchiffre-test2.tex
+% TDS:source/latex/oberdiek/rotchiffre.dtx
+%
+%<*ignore>
+\begingroup
+ \catcode123=1 %
+ \catcode125=2 %
+ \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: rotchiffre 2010/11/12 v1.0 Provides ROT13, ROT5, ROT18, ROT47 (HO)}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2010 by
+ Heiko Oberdiek <heiko.oberdiek at googlemail.com>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3c of this license or (at your option) any later
+version. This version of this license is in
+ http://www.latex-project.org/lppl/lppl-1-3c.txt
+and 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.
+
+The Base Interpreter refers to any `TeX-Format',
+because some files are installed in TDS:tex/generic//.
+
+This work consists of the main source file rotchiffre.dtx
+and the derived files
+ rotchiffre.sty, rotchiffre.pdf, rotchiffre.ins, rotchiffre.drv,
+ rotchiffre-test1.tex, rotchiffre-test2.tex.
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+ \file{rotchiffre.ins}{\from{rotchiffre.dtx}{install}}%
+ \file{rotchiffre.drv}{\from{rotchiffre.dtx}{driver}}%
+ \usedir{tex/generic/oberdiek}%
+ \file{rotchiffre.sty}{\from{rotchiffre.dtx}{package}}%
+ \usedir{doc/latex/oberdiek/test}%
+ \file{rotchiffre-test1.tex}{\from{rotchiffre.dtx}{test1}}%
+ \file{rotchiffre-test2.tex}{\from{rotchiffre.dtx}{test2}}%
+}
+
+\catcode32=13\relax% active space
+\let =\space%
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* rotchiffre.sty}
+\Msg{*}
+\Msg{* And install the following script file:}
+\Msg{*}
+\Msg{* }
+\Msg{*}
+\Msg{* To produce the documentation run the file `rotchiffre.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{rotchiffre.drv}%
+ [2010/11/12 v1.0 Provides ROT13, ROT5, ROT18, ROT47 (HO)]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2008/08/11]
+\usepackage{rotchiffre}[2010/11/12]
+\usepackage{wasysym}
+\begin{document}
+ \DocInput{rotchiffre.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{933}
+%
+% \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{rotchiffre.drv}
+%
+% \title{The \xpackage{rotchiffre} package}
+% \date{2010/11/12 v1.0}
+% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% This package implements chiffres ROT13 with its variants
+% ROT5, ROT18, and ROT47.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Documentation}
+%
+% \subsection{Motivation}
+%
+% In the newsgroup \xnewsgroup{comp.text.tex} there was a discussion
+% \cite{fontspecthread}
+% about package \xpackage{fontspec}. Stephan Hennig provided
+% an example to implement ROT13 as OpenType feature \cite{rot13modern}.
+% And Robin Fairbairns requested a CTAN upload \cite{rot13robin} \smiley.
+%
+% But I think it would be not fair to the users of old \TeX\ engines
+% without OpenType support that they will not be able to
+% decrypt texts generated by the new package \smiley.
+% Therefore I have written this package that implements ROT13
+% even for \iniTeX. Also other variants ROT5, ROT18, ROT47 are
+% provided.
+%
+% \subsection{Usage}
+%
+% \begin{declcs}{EdefRot} \M{type} \M{cmd} \M{text}
+% \end{declcs}
+% The \meta{text} is expanded and sanitized. All tokens
+% are letters with catcode 12 (other) with the exeption of
+% the space token that has character code 32 (0x20) and
+% catcode 10 (space). This follows \hologo{TeX}'s convention of
+% \cs{string} and \cs{meaning}.
+%
+% The chiffre type is specified by \meta{type} it takes
+% a number. For example, ROT13 is specified by |13|.
+% The selected chiffre is applied to \meta{text} and
+% the result is stored in macro \meta{cmd}.
+%
+% The following table lists the supported rotation chiffres.
+% \begin{center}
+% \renewcommand*{\arraystretch}{1.2}
+% \begin{tabular}{lll}
+% chiffre & from & to\\
+% \hline
+% \textbf{ROT13} & |A|-|Z| & |N|-|Z|\,|A|-|M|\\
+% & |a|-|z| & |n|-|z|\,|a|-|m|\\
+% \hline
+% \textbf{ROT5} & |0|-|9| & |5|-|9|\,|0|-|4|\\
+% \hline
+% \textbf{ROT18} & |A|-|Z|\,|0|-|9| & |S|-|Z|\,|0|-|9|\,|A|-|R|\\
+% & |a|-|z| & |n|-|z|\,|a|-|m|\\
+% \hline
+% \textbf{ROT47} & |!|-|~| & |P|-|~|\,|!|-|O|\\
+% \end{tabular}
+% \end{center}
+% In case of ROT47 the range is the ASCII range from character codes
+% 33 (0x21) `|!|' upto 126 (0xFE) `|~|'.
+%
+% The specifications of the algorithms are taken from the description
+% in Wikipedia \cite{wiki:rot13:de,wiki:rot13:en}, ROT18 is further
+% specified by ``computerfreak'' \cite{cf:rot18}.
+%
+% \subsubsection{Examples}
+%
+% The famous English pangram \cite{lazydog} is converted by
+% \begin{quote}
+% |\EdefRot{13}\result{The quick brown fox jumps over the lazy dog}|
+% \end{quote}
+% The result is stored in macro \cs{result} with
+% the following contents:
+% \begin{quote}
+% \EdefRot{13}\result{The quick brown fox jumps over the lazy dog}
+% \texttt{\result}
+% \end{quote}
+%
+% Command names are converted to strings before. Therefore the
+% text should not contain \hologo{TeX} markup, example:
+% \begin{quote}
+% \def\Input{Hello\par World}
+% \EdefRot{13}\result\Input
+% |\EdefRot{13}\result{\texttt{Hello}\par\textit{World}}|\\
+% \cs{result} $\rightarrow$ \texttt{\result}
+% \end{quote}
+% But macros can be used that contain text. They are expanded.
+% \begin{quote}
+% \def\Name{Heiko}
+% \def\Email{heiko.oberdiek at googlemail.com}
+% \EdefRot{13}\result{Hello \Name\space<\Email>}
+% |\newcommand{\Name}{Heiko}|\\
+% |\newcommand{\Email}{heiko.oberdiek at googlemail.com}|\\
+% |\EdefRot{13}\result{Hello \Name\space<\Email>}|\\
+% \cs{result} $\rightarrow$ \texttt{\result}
+% \end{quote}
+%
+%
+% \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\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@rotchiffre.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \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{rotchiffre}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup%
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\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}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@rotchiffre.sty\endcsname
+\ProvidesPackage{rotchiffre}%
+ [2010/11/12 v1.0 Provides ROT13, ROT5, ROT18, ROT47 (HO)]%
+% \end{macrocode}
+%
+% \subsection{Catcodes}
+%
+% \begin{macrocode}
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode123=1 % {
+ \catcode125=2 % }
+ \catcode64=11 % @
+ \def\x{\endgroup
+ \expandafter\edef\csname RotCh@AtEnd\endcsname{%
+ \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\catcode61\catcode48\catcode32=10\relax%
+\catcode13=5 % ^^M
+\endlinechar=13 %
+\catcode35=6 % #
+\catcode64=11 % @
+\catcode123=1 % {
+\catcode125=2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\RotCh@AtEnd{%
+ \RotCh@AtEnd
+ \catcode#1=\the\catcode#1\relax
+ }%
+ \catcode#1=#2\relax
+}
+\TMP@EnsureCode{42}{12}% *
+\TMP@EnsureCode{43}{12}% +
+\TMP@EnsureCode{45}{12}% -
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{60}{12}% <
+\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\TMP@EnsureCode{96}{12}% `
+\edef\RotCh@AtEnd{\RotCh@AtEnd\noexpand\endinput}
+% \end{macrocode}
+%
+% \subsection{Loading resources}
+%
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input infwarerr.sty\relax
+ \input ltxcmds.sty\relax
+ \input pdfescape.sty\relax
+\else
+ \RequirePackage{infwarerr}[2010/04/08]%
+ \RequirePackage{ltxcmds}[2010/03/01]%
+ \RequirePackage{pdfescape}[2010/03/01]%
+\fi
+% \end{macrocode}
+%
+% \subsection{\cs{EdefRot} as robust macro}
+%
+% The main macro \cs{EdefRot} is made robust if
+% \hologo{eTeX} or \hologo{LaTeX} are present.
+% \begin{macro}{\EdefRot}
+% \begin{macrocode}
+\ltx@IfUndefined{protected}{%
+ \ltx@IfUndefined{DeclareRobustCommand}{%
+ \def\RotCh@temp{\def\EdefRot##1}%
+ }{%
+ \def\RotCh@temp{\DeclareRobustCommand*\EdefRot[1]}%
+ }%
+}{%
+ \def\RotCh@temp{\protected\def\EdefRot##1}%
+}
+\RotCh@temp{%
+ \RotCh@GetNumber{#1}%
+ \ltx@IfUndefined{RotCh@rot@\romannumeral\RotCh@number}{%
+ \@PackageError{rotchiffre}{%
+ Unknown chiffre ROT\RotCh@number
+ }\@ehc
+ \EdefSanitize
+ }{%
+ \RotCh@rot
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RotCh@GetNumber}
+% If \hologo{eTeX} is active, then
+% the chiffre number can be an expression supported
+% by \cs{numexpr}.
+% \begin{macrocode}
+\ltx@IfUndefined{numexpr}{%
+ \def\RotCh@GetNumber#1{%
+ \edef\RotCh@number{\number#1}%
+ }%
+}{%
+ \def\RotCh@GetNumber#1{%
+ \edef\RotCh@number{\the\numexpr#1\relax}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Set \cs{lccode} on a range of characters}
+%
+% \begin{macro}{\RotCh@count}
+% \begin{macrocode}
+\countdef\RotCh@count=255 %
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\RotCh@count@end}
+% \begin{macrocode}
+\countdef\RotCh@count@end=2 %
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{RotCh@RangeIgnore}
+% \begin{macrocode}
+\def\RotCh@RangeIgnore{%
+ \RotCh@loop{%
+ \lccode\RotCh@count=\ltx@zero
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\RotCh@RangeSet}
+% \begin{macrocode}
+\ltx@IfUndefined{numexpr}{%
+ \countdef\RotCh@count@temp=4 %
+ \def\RotCh@RangeSet#1{%
+ \RotCh@loop{%
+ \RotCh@count@temp=\RotCh@count
+ \advance\RotCh@count@temp #1 %
+ \lccode\RotCh@count=\RotCh@count@temp
+ }%
+ }%
+}{%
+ \def\RotCh@RangeSet#1{%
+ \RotCh@loop{%
+ \lccode\RotCh@count=\numexpr\RotCh@count#1\relax
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\RotCh@loop}
+% \begin{macrocode}
+\def\RotCh@loop#1#2#3{%
+ \RotCh@count=#2 %
+ \RotCh@count@end=#3 %
+ \def\RotCh@action{#1}%
+ \RotCh@@loop
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{RotCh@@loop}
+% \begin{macrocode}
+\def\RotCh@@loop{%
+ \RotCh@action
+ \ifnum\RotCh@count<\RotCh@count@end
+ \advance\RotCh@count\ltx@one
+ \expandafter\RotCh@@loop
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Chiffres}
+%
+% \subsubsection{ROT13}
+%
+% \begin{macro}{\RotCh@rot@xiii}
+% \begin{macrocode}
+\def\RotCh@rot@xiii{%
+ \RotCh@RangeIgnore{0}{64}%
+ \RotCh@RangeSet{+13}{65}{77}%
+ \RotCh@RangeSet{-13}{78}{90}%
+ \RotCh@RangeIgnore{91}{96}%
+ \RotCh@RangeSet{+13}{97}{109}%
+ \RotCh@RangeSet{-13}{110}{122}%
+ \RotCh@RangeIgnore{123}{255}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{ROT5}
+%
+% \begin{macro}{\RotCh@rot@v}
+% \begin{macrocode}
+\def\RotCh@rot@v{%
+ \RotCh@RangeIgnore{0}{47}%
+ \RotCh@RangeSet{+5}{48}{52}%
+ \RotCh@RangeSet{-5}{53}{57}%
+ \RotCh@RangeIgnore{58}{255}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{ROT18}
+%
+% \begin{macro}{\RotCh@rot@xviii}
+% \begin{macrocode}
+\def\RotCh@rot@xviii{%
+ \RotCh@RangeIgnore{0}{47}%
+ \RotCh@RangeSet{+25}{48}{57}%
+ \RotCh@RangeIgnore{58}{64}%
+ \RotCh@RangeSet{+18}{65}{72}%
+ \RotCh@RangeSet{-25}{73}{82}%
+ \RotCh@RangeSet{-18}{83}{90}%
+ \RotCh@RangeIgnore{91}{96}%
+ \RotCh@RangeSet{+13}{97}{109}%
+ \RotCh@RangeSet{-13}{110}{122}%
+ \RotCh@RangeIgnore{123}{255}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{ROT47}
+%
+% \begin{macro}{\RotCh@rot@xlvii}
+% \begin{macrocode}
+\def\RotCh@rot@xlvii{%
+ \RotCh@RangeIgnore{0}{32}%
+ \RotCh@RangeSet{+47}{33}{79}%
+ \RotCh@RangeSet{-47}{80}{126}%
+ \RotCh@RangeIgnore{127}{255}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{\cs{RotCh@rot} with big char support}
+%
+% Some modern \hologo{TeX} engines support characters with more
+% than eight bits (codes greater as 255). \hologo{LuaTeX} and
+% \hologo{XeTeX} are detected by the caret notation that is
+% extended by these engines.
+% \begin{macrocode}
+\begingroup
+ \catcode0=9 %
+ \catcode`\^=7 %
+ \catcode`\^^^=12 %
+ \def\x{^^^^0000}%
+\expandafter\endgroup
+\ifx\x\ltx@empty
+% \end{macrocode}
+%
+% \begin{macro}{\RotCh@toks}
+% \begin{macrocode}
+ \toksdef\RotCh@toks=0 %
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\RotCh@rot}
+% \begin{macrocode}
+ \long\def\RotCh@rot#1#2{%
+ \EdefSanitize#1{#2}%
+ \begingroup
+ \csname RotCh@rot@\romannumeral\RotCh@number\endcsname
+ \RotCh@toks={}%
+ \expandafter\RotCh@SplitSpace#1 \@nil
+ \expandafter\endgroup
+ \expandafter\def\expandafter#1\expandafter{%
+ \the\RotCh@toks
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\RotCh@SplitSpace}
+% \begin{macrocode}
+ \def\RotCh@temp#1{%
+ \def\RotCh@SplitSpace##1 ##2\@nil{%
+ \RotCh@Add##1\relax
+ \ifx\relax##2\relax
+ \expandafter\ltx@gobble
+ \else
+ \RotCh@toks\expandafter{\the\RotCh@toks#1}%
+ \expandafter\ltx@firstofone
+ \fi
+ {%
+ \RotCh@SplitSpace##2\@nil
+ }%
+ }%
+ }%
+ \RotCh@temp{ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\RotCh@Add}
+% \begin{macrocode}
+ \def\RotCh@Add#1{%
+ \ifx#1\relax
+ \else
+ \ifnum`#1>126 %
+ \RotCh@toks\expandafter{\the\RotCh@toks#1}%
+ \else
+ \lowercase{%
+ \RotCh@toks\expandafter{\the\RotCh@toks#1}%
+ }%
+ \fi
+ \expandafter\RotCh@Add
+ \fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\else
+% \end{macrocode}
+%
+% \subsection{\cs{RotCh@rot} without big char support}
+%
+% \begin{macro}{\RotCh@rot}
+% \begin{macrocode}
+ \long\def\RotCh@rot#1#2{%
+ \EdefSanitize#1{#2}%
+ \begingroup
+ \csname RotCh@rot@\romannumeral\RotCh@number\endcsname
+ \lowercase\expandafter{\expandafter\endgroup
+ \expandafter\def\expandafter#1\expandafter{#1}%
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\RotCh@AtEnd%
+%</package>
+% \end{macrocode}
+%
+% \section{Test}
+%
+% \subsection{Catcode checks for loading}
+%
+% \begin{macrocode}
+%<*test1>
+% \end{macrocode}
+% \begin{macrocode}
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\expandafter\ifx\csname count@\endcsname\relax
+ \countdef\count@=255 %
+\fi
+\expandafter\ifx\csname @gobble\endcsname\relax
+ \long\def\@gobble#1{}%
+\fi
+\expandafter\ifx\csname @firstofone\endcsname\relax
+ \long\def\@firstofone#1{#1}%
+\fi
+\expandafter\ifx\csname loop\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+{%
+ \def\loop#1\repeat{%
+ \def\body{#1}%
+ \iterate
+ }%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \let\repeat=\fi
+}%
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@ 1 %
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \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 rotchiffre.sty\relax}%
+\fi
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\%=14 %
+ \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
+\csname @@end\endcsname
+\end
+% \end{macrocode}
+% \begin{macrocode}
+%</test1>
+% \end{macrocode}
+%
+% \subsection{Macro tests}
+%
+% \subsubsection{Preamble}
+%
+% \begin{macrocode}
+%<*test2>
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\^=7 %
+\font\rmfont=ec-lmtt10\relax
+\rmfont
+\showboxbreadth=10000 %
+\showboxdepth=10000 %
+\errorcontextlines=10000
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input rotchiffre.sty\relax
+\else
+ \RequirePackage{rotchiffre}[2010/11/12]%
+ \RequirePackage{ifluatex}[2010/03/01]%
+ \RequirePackage{ifxetex}[2010/09/12]%
+\fi
+\catcode`\@=11 %
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname @onelevel@sanitize\endcsname\relax
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname detokenize\endcsname\relax
+ \def\strip@prefix#1->{}%
+ \def\@onelevel@sanitize#1{%
+ \edef#1{%
+ \expandafter\strip@prefix\meaning#1%
+ }%
+ }%
+ \else
+ \def\@onelevel@sanitize#1{%
+ \edef#1{%
+ \detokenize\expandafter{#1}%
+ }%
+ }%
+ \fi
+\fi
+\def\msg#{\immediate\write16}
+\def\empty{}
+\begingroup
+ \def\x#1{%
+ \def\space{#1}%
+ \def\spacesII{#1#1}%
+ \def\spacesIII{#1#1#1}%
+ \def\spacesIV{#1#1#1#1}%
+ }%
+\expandafter\endgroup\x{ }
+% \end{macrocode}
+% \begin{macrocode}
+\def\PrintStr#1#2{%
+ \begingroup
+ \@onelevel@sanitize#2%
+ \msg{#1: [#2]}% hash-ok
+ \endgroup
+}
+\def\CheckResult{%
+ \PrintStr{Result}\StrResult
+ \ifx\StrExpect\StrResult
+ \msg{==> Ok}%
+ \else
+ \begingroup
+ \edef\x{\endgroup
+ \errmessage{Test failed (\chiffre)!}%
+ }\x
+ \fi
+}
+\long\def\test#1#2{%
+ \msg{}%
+ \begingroup
+ \setbox0=\hbox{%
+ \edef\StrInput{#1}%
+ \@onelevel@sanitize\StrInput
+ \PrintStr{ Input}\StrInput
+ \edef\StrExpect{#2}%
+ \@onelevel@sanitize\StrExpect
+ \PrintStr{Expect}\StrExpect
+ \action{#1}%
+ \CheckResult
+ }%
+ \ifdim\wd0=0pt %
+ \else
+ \showbox0 %
+ \fi
+ \endgroup
+}
+\def\cmd#1{%
+ \msg{* CMD: ROT#1}%
+ \def\chiffre{ROT#1}%
+ \def\action{\EdefRot{#1}\StrResult}%
+}
+% \end{macrocode}
+% \begin{macrocode}
+\def\TestIgnore#1{%
+ \test{#1}{#1}%
+}
+\begingroup
+ \lccode`\P=`\%%
+ \lccode`\B=`\\%
+ \lccode`\H=`\#%
+\lowercase{\endgroup
+ \def\PercentChar{P}%
+ \def\BackslashChar{B}%
+ \def\HashChar{H}%
+}
+\def\TestI{%
+ \TestIgnore{%
+ \space!"\HashChar$\PercentChar&'()*+,-./%
+ :;<=>?@%
+ [\BackslashChar]^_`%
+ \string{|\string}\string~%
+ }%
+}
+\begingroup
+ \catcode0=12 %
+ \lccode`A=1 %
+ \lccode`B=2 %
+ \lccode`C=3 %
+ \lccode`D=4 %
+ \lccode`E=5 %
+ \lccode`F=6 %
+ \lccode`G=7 %
+ \lccode`H=8 %
+ \lccode`I=9 %
+ \lccode`J=10 %
+ \lccode`K=11 %
+ \lccode`L=12 %
+ \lccode`M=13 %
+ \lccode`N=14 %
+ \lccode`O=15 %
+ \lccode`P=16 %
+ \lccode`Q=17 %
+ \lccode`R=18 %
+ \lccode`S=19 %
+ \lccode`T=20 %
+ \lccode`U=21 %
+ \lccode`V=22 %
+ \lccode`W=23 %
+ \lccode`X=24 %
+ \lccode`Y=25 %
+ \lccode`Z=26 %
+ \lccode`a=27 %
+ \lccode`b=28 %
+ \lccode`c=29 %
+ \lccode`d=30 %
+ \lccode`e=31 %
+ \lccode`f=127 %
+ \lccode`g=128 %
+ \lccode`h=129 %
+ \lccode`y=254 %
+ \lccode`z=255 %
+\lowercase{\endgroup
+ \def\TestC{%
+ \TestIgnore{%
+ ^^@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefhyz%
+ }%
+ }%
+ \def\TestZ{%
+ \TestIgnore{^^@}%
+ }%
+}
+% \end{macrocode}
+%
+% \subsubsection{ROT13}
+%
+% \begin{macrocode}
+\cmd{13}
+\test{%
+ 0123456789%
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ%
+ abcdefghijklmnopqrstuvwxyz%
+}{%
+ 0123456789%
+ NOPQRSTUVWXYZABCDEFGHIJKLM%
+ nopqrstuvwxyzabcdefghijklm%
+}
+\TestI
+\TestC
+\test{}{}
+\test{A}{N}
+\test{N}{A}
+\test{ }{ }
+\test{0a}{0n}
+\test{\spacesIV}{\spacesIV}
+\test{{}}{{}}
+\test{\par}{\noexpand\cne}
+% \end{macrocode}
+%
+% \subsubsection{ROT5}
+%
+% \begin{macrocode}
+\cmd{5}
+\test{%
+ 0123456789%
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ%
+ abcdefghijklmnopqrstuvwxyz%
+}{%
+ 5678901234%
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ%
+ abcdefghijklmnopqrstuvwxyz%
+}
+\TestI
+\TestC
+% \end{macrocode}
+%
+% \subsubsection{ROT18}
+%
+% \begin{macrocode}
+\cmd{18}
+\test{%
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789%
+ abcdefghijklmnopqrstuvwxyz%
+}{%
+ STUVWXYZ0123456789ABCDEFGHIJKLMNOPQR%
+ nopqrstuvwxyzabcdefghijklm%
+}
+\TestI
+\TestC
+% \end{macrocode}
+%
+% \subsubsection{ROT47}
+%
+% \begin{macrocode}
+\cmd{47}
+\test{%
+ !"\HashChar$\PercentChar&'()*+,-./%
+ 0123456789%
+ :;<=>?@%
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ%
+ [\BackslashChar]^_`%
+ abcdefghijklmnopqrstuvwxyz%
+ \string{|\string}\string~%
+}{%
+ PQRSTUVWXYZ%
+ [\BackslashChar]^_`%
+ abcdefghijklmnopqrstuvwxyz%
+ \string{|\string}\string~%
+ !"\HashChar$\PercentChar&'()*+,-./%
+ 0123456789%
+ :;<=>?@%
+ ABCDEFGHIJKLMNO%
+}
+\TestZ
+\TestC
+% \end{macrocode}
+%
+% \subsubsection{Big chars}
+%
+% \begin{macrocode}
+\chardef\temp=0 %
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname XeTeXrevision\endcsname\relax
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input ifluatex.sty\relax
+ \else
+ \RequirePackage{ifluatex}[2010/03/01]%
+ \fi
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname luatexversion\endcsname\relax
+ \else
+ \chardef\temp=1 %
+ \fi
+\else
+ \chardef\temp=1 %
+\fi
+\ifcase\temp
+ \csname @@end\expandafter\endcsname\expandafter\end
+\fi
+% \end{macrocode}
+% \begin{macrocode}
+\msg{* Big chars}
+\cmd{5}
+\test{}{}
+\test{ }{ }
+\test{ 0 1 }{ 5 6 }
+\begingroup
+ \lccode`A=300 %
+ \lccode`B=1000 %
+ \lccode`C=10000 %
+\lowercase{\endgroup
+ \TestIgnore{ABC}%
+ \TestIgnore{x A By zC xAy AxB}%
+}%
+% \end{macrocode}
+% \begin{macrocode}
+\csname @@end\endcsname\end
+%</test2>
+% \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/rotchiffre.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/oberdiek/rotchiffre.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{install/macros/latex/contrib/oberdiek.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTAN{tds/tds.pdf}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \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 rotchiffre.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}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+% rotchiffre.sty & tex/generic/oberdiek/rotchiffre.sty\\
+% rotchiffre.pdf & doc/latex/oberdiek/rotchiffre.pdf\\
+% test/rotchiffre-test1.tex & doc/latex/oberdiek/test/rotchiffre-test1.tex\\
+% test/rotchiffre-test2.tex & doc/latex/oberdiek/test/rotchiffre-test2.tex\\
+% rotchiffre.dtx & source/latex/oberdiek/rotchiffre.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+% \begingroup
+% \advance\linewidth by\leftmargin
+% \advance\linewidth by\rightmargin
+% \edef\x{\endgroup
+% \def\noexpand\lw{\the\linewidth}^^A
+% }\x
+% \def\lwbox{^^A
+% \leavevmode
+% \hbox to \linewidth{^^A
+% \kern-\leftmargin\relax
+% \hss
+% \usebox0
+% \hss
+% \kern-\rightmargin\relax
+% }^^A
+% }^^A
+% \ifdim\wd0>\lw
+% \sbox0{\small\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\footnotesize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\scriptsize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\tiny\t}^^A
+% \ifdim\wd0>\linewidth
+% \lwbox
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \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 rotchiffre.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{rotchiffre.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 rotchiffre.dtx
+%makeindex -s gind.ist rotchiffre.idx
+%pdflatex rotchiffre.dtx
+%makeindex -s gind.ist rotchiffre.idx
+%pdflatex rotchiffre.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \begin{thebibliography}{9}
+% \raggedright
+%
+% \bibitem{fontspecthread}
+% Stephan Hennig et.\,al.:
+% \textit{fontspec: no ligatures with Times New Roman};
+% newsgroup \xnewsgroup{comp.text.tex},
+% \url{news:4cdbed27$0$6765$9b4e6d93@newsspool3.arcor-online.net},
+% 2010-11-11.\\
+% {\small
+% \url{http://groups.google.com/group/comp.text.tex/browse_thread/thread/6266f98e998ce333/d7b32e9dcc610c87}}
+%
+% \bibitem{rot13modern}
+% Stephan Hennig:
+% \textit{Re: fontspec: no ligatures with Times New Roman};
+% newsgroup \xnewsgroup{comp.text.tex},
+% \url{news:4cdc2abe$0$6762$9b4e6d93@newsspool3.arcor-online.net},
+% 2010-11-11.\\
+% {\small
+% \url{http://groups.google.com/group/comp.text.tex/msg/d7b32e9dcc610c87}}
+%
+% \bibitem{rot13robin}
+% Robin Fairbairns:
+% \textit{Re: fontspec: no ligatures with Times New Roman};
+% newsgroup \xnewsgroup{comp.text.tex},
+% \url{news:qf4obmua0v.fsf@sxp10.cl.cam.ac.uk},
+% 2010-11-12.\\
+% {\small
+% \url{http://groups.google.com/group/comp.text.tex/msg/7c03e91407144704}}
+%
+% \bibitem{wiki:rot13:de}
+% Wikipedia/German:
+% \textit{ROT13};
+% 2010-10-26.
+% {\small
+% \url{http://de.wikipedia.org/wiki/ROT13}}
+%
+% \bibitem{wiki:rot13:en}
+% Wikipedia/English:
+% \textit{ROT13};
+% 2010-11-11.
+% {\small
+% \url{http://en.wikipedia.org/wiki/ROT13}}
+%
+% \bibitem{cf:rot18}
+% Computerfreak/German: \textit{ROT-18};
+% 2010-04-12.\\
+% {\small
+% \url{http://www.compufreak.info/2010/04/12/rot-18/}}
+%
+% \bibitem{lazydog}
+% Wikipedia/English: \textit{The quick brown fox jumps over the lazy dog};
+% 2010-11-09.\\
+% {\small
+% \url{http://en.wikipedia.org/wiki/The_quick_brown_fox_jumps_over_the_lazy_dog}}
+%
+% \end{thebibliography}
+%
+% \begin{History}
+% \begin{Version}{2010/11/12 v1.0}
+% \item
+% First version.
+% \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput
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
diff --git a/Master/texmf-dist/source/latex/oberdiek/soulutf8.dtx b/Master/texmf-dist/source/latex/oberdiek/soulutf8.dtx
index 349cd5ba858..c0a8fae064b 100644
--- a/Master/texmf-dist/source/latex/oberdiek/soulutf8.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/soulutf8.dtx
@@ -171,7 +171,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1931}
+% \CheckSum{2006}
%
% \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
@@ -272,14 +272,18 @@ and the derived files
% \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 % @
- \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@soulutf8.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -287,7 +291,6 @@ and the derived files
\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.}%
@@ -299,24 +302,27 @@ and the derived files
\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}%
@@ -335,34 +341,43 @@ and the derived files
\fi
\expandafter\x\csname ver@soulutf8.sty\endcsname
\ProvidesPackage{soulutf8}%
- [2007/09/09 v1.0 Adding support for UTF-8 to soul (HO)]
+ [2007/09/09 v1.0 Adding support for UTF-8 to soul (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 SOuL@AtEnd\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\SOuL@AtEnd{%
\SOuL@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{10}{12}% ^^J
\TMP@EnsureCode{33}{12}% !
@@ -379,8 +394,9 @@ and the derived files
\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{94}{7}% ^
\TMP@EnsureCode{96}{12}% `
\TMP@EnsureCode{126}\active % ~
@@ -390,6 +406,7 @@ and the derived files
\TMP@EnsureCode{160}{12}% ^^a0
\TMP@EnsureCode{194}{12}% ^^c2
\TMP@EnsureCode{226}{12}% ^^e2
+\edef\SOuL@AtEnd{\SOuL@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Loading packages}
@@ -1090,7 +1107,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\SOuL@AtEnd
+\SOuL@AtEnd%
% \end{macrocode}
%
% \begin{macrocode}
@@ -1157,6 +1174,22 @@ and the derived files
\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 soulutf8.sty\relax}%
\fi
@@ -1167,15 +1200,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/stringenc.dtx b/Master/texmf-dist/source/latex/oberdiek/stringenc.dtx
index 9547b19af23..50987c19850 100644
--- a/Master/texmf-dist/source/latex/oberdiek/stringenc.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/stringenc.dtx
@@ -280,7 +280,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{6133}
+% \CheckSum{6179}
%
% \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
@@ -448,14 +448,18 @@ and the derived files
% \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 % @
- \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@stringenc.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -463,7 +467,6 @@ and the derived files
\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.}%
@@ -475,24 +478,27 @@ and the derived files
\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}%
@@ -511,34 +517,43 @@ and the derived files
\fi
\expandafter\x\csname ver@stringenc.sty\endcsname
\ProvidesPackage{stringenc}%
- [2010/03/01 v1.8 Converts strings between encodings (HO)]
+ [2010/03/01 v1.8 Converts strings between encodings (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \begin{macrocode}
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
\catcode123 1 % {
\catcode125 2 % }
+ \catcode64 11 %
\def\x{\endgroup
\expandafter\edef\csname SE@AtEnd\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#3{%
\edef\SE@AtEnd{%
\SE@AtEnd
- #1#2 \the#1#2\relax
+ #1#2=\the#1#2\relax
}%
- #1#2 #3\relax
+ #1#2=#3\relax
}
\TMP@EnsureCode\catcode{34}{12}% "
\TMP@EnsureCode\catcode{36}{3}% $
@@ -554,7 +569,6 @@ and the derived files
\TMP@EnsureCode\catcode{47}{12}% /
\TMP@EnsureCode\catcode{58}{12}% :
\TMP@EnsureCode\catcode{60}{12}% <
-\TMP@EnsureCode\catcode{61}{12}% =
\TMP@EnsureCode\catcode{62}{12}% >
\TMP@EnsureCode\catcode{91}{12}% [
\TMP@EnsureCode\catcode{93}{12}% ]
@@ -563,6 +577,7 @@ and the derived files
\TMP@EnsureCode\uccode{34}{0}% "
\TMP@EnsureCode\uccode{48}{0}% 0
\TMP@EnsureCode\uccode{61}{0}% =
+\edef\SE@AtEnd{\SE@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Tools}
@@ -2675,7 +2690,7 @@ $ \fi
}
% \end{macrocode}
% \begin{macrocode}
-\SE@AtEnd
+\SE@AtEnd%
%</package>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/oberdiek/telprint.dtx b/Master/texmf-dist/source/latex/oberdiek/telprint.dtx
index 1c3b5d25548..8642d4b0f99 100644
--- a/Master/texmf-dist/source/latex/oberdiek/telprint.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/telprint.dtx
@@ -162,7 +162,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{526}
+% \CheckSum{601}
%
% \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
@@ -333,14 +333,18 @@ and the derived files
% \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 % @
- \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@telprint.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -348,7 +352,6 @@ and the derived files
\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.}%
@@ -360,24 +363,27 @@ and the derived files
\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}%
@@ -396,34 +402,43 @@ and the derived files
\fi
\expandafter\x\csname ver@telprint.sty\endcsname
\ProvidesPackage{telprint}%
- [2008/08/11 v1.10 Formatting of German phone numbers (HO)]
+ [2008/08/11 v1.10 Formatting of German phone numbers (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 TELAtEnd\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\TELAtEnd{%
\TELAtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{33}{12}% !
\TMP@EnsureCode{36}{3}% $
@@ -435,8 +450,10 @@ and the derived files
\TMP@EnsureCode{45}{12}% -
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
-\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{126}{13}% ~ (active)
+\edef\TELAtEnd{\TELAtEnd\noexpand\endinput}
% \end{macrocode}
%
% \subsection{Package macros}
@@ -593,7 +610,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\TELAtEnd
+\TELAtEnd%
%</package>
% \end{macrocode}
%
@@ -657,6 +674,22 @@ and the derived files
\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 telprint.sty\relax}%
\fi
@@ -667,15 +700,20 @@ and the derived files
\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
diff --git a/Master/texmf-dist/source/latex/oberdiek/uniquecounter.dtx b/Master/texmf-dist/source/latex/oberdiek/uniquecounter.dtx
index c84b4bc4646..40a2bbec0c9 100644
--- a/Master/texmf-dist/source/latex/oberdiek/uniquecounter.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/uniquecounter.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2009 by
+% Copyright (C) 2009, 2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -81,7 +81,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: uniquecounter 2009/12/18 v1.1 Provides unlimited unique counter (HO)}
+\Msg{* Package: uniquecounter 2011/01/30 v1.2 Provides unlimited unique counter (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -92,7 +92,7 @@
This is a generated file.
-Copyright (C) 2009 by
+Copyright (C) 2009, 2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -163,7 +163,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{uniquecounter.drv}%
- [2009/12/18 v1.1 Provides unlimited unique counter (HO)]%
+ [2011/01/30 v1.2 Provides unlimited unique counter (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -172,7 +172,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{632}
+% \CheckSum{720}
%
% \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
@@ -193,7 +193,7 @@ and the derived files
% \GetFileInfo{uniquecounter.drv}
%
% \title{The \xpackage{uniquecounter} package}
-% \date{2009/12/18 v1.1}
+% \date{2011/01/30 v1.2}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -270,14 +270,18 @@ and the derived files
% \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 % @
- \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@uniquecounter.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -285,7 +289,6 @@ and the derived files
\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.}%
@@ -297,24 +300,27 @@ and the derived files
\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}%
@@ -333,34 +339,43 @@ and the derived files
\fi
\expandafter\x\csname ver@uniquecounter.sty\endcsname
\ProvidesPackage{uniquecounter}%
- [2009/12/18 v1.1 Provides unlimited unique counter (HO)]
+ [2011/01/30 v1.2 Provides unlimited unique counter (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
%
% \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 uqc@AtEnd\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\uqc@AtEnd{%
\uqc@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{33}{12}% !
\TMP@EnsureCode{39}{12}% '
@@ -368,15 +383,23 @@ and the derived files
\TMP@EnsureCode{43}{12}% +
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
-\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{96}{12}% `
+\edef\uqc@AtEnd{\uqc@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input bigintcalc.sty\relax
- \input infwarerr.sty\relax
+ \def\TMP@RequirePackage#1[#2]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname ver@#1.sty\endcsname\relax
+ \input #1.sty\relax
+ \fi
+ }%
+ \TMP@RequirePackage{bigintcalc}[2007/11/11]%
+ \TMP@RequirePackage{infwarerr}[2007/09/09]%
\else
\RequirePackage{bigintcalc}[2007/11/11]%
\RequirePackage{infwarerr}[2007/09/09]%
@@ -487,7 +510,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\uqc@AtEnd
+\uqc@AtEnd%
% \end{macrocode}
% \begin{macrocode}
%</package>
@@ -553,6 +576,22 @@ and the derived files
\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 uniquecounter.sty\relax}%
\fi
@@ -563,15 +602,20 @@ and the derived files
\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
@@ -591,7 +635,7 @@ and the derived files
\NeedsTeXFormat{LaTeX2e}
\nofiles
\documentclass{minimal}
-\usepackage{uniquecounter}[2009/12/18]
+\usepackage{uniquecounter}[2011/01/30]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -950,6 +994,10 @@ and the derived files
% Bug fix in \cs{UniqueCounterCall} for values \textgreater\ 9
% (bug report of Lev Bishop).
% \end{Version}
+% \begin{Version}{2011/01/30 v1.2}
+% \item
+% Already loaded package files are not input in \hologo{plainTeX}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/zref.dtx b/Master/texmf-dist/source/latex/oberdiek/zref.dtx
index dfeab3aaf88..0e4722b16bc 100644
--- a/Master/texmf-dist/source/latex/oberdiek/zref.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/zref.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2006-2010 by
+% Copyright (C) 2006-2011 by
% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%
% This work may be distributed and/or modified under the
@@ -21,12 +21,12 @@
% and the derived files
% zref.sty, zref.pdf, zref.ins, zref.drv, zref-base.sty,
% zref-abspage.sty, zref-abspos.sty, zref-counter.sty,
-% zref-dotfill.sty, zref-hyperref.sty, zref-lastpage.sty,
-% zref-marks.sty, zref-nextpage.sty, zref-pageattr.sty,
-% zref-pagelayout.sty, zref-perpage.sty, zref-runs.sty,
-% zref-savepos.sty, zref-thepage.sty, zref-titleref.sty,
-% zref-totpages.sty, zref-user.sty, zref-xr.sty,
-% zref-example.tex, zref-example-lastpage.tex,
+% zref-dotfill.sty, zref-env.sty, zref-hyperref.sty,
+% zref-lastpage.sty, zref-marks.sty, zref-nextpage.sty,
+% zref-pageattr.sty, zref-pagelayout.sty, zref-perpage.sty,
+% zref-runs.sty, zref-savepos.sty, zref-thepage.sty,
+% zref-titleref.sty, zref-totpages.sty, zref-user.sty,
+% zref-xr.sty, zref-example.tex, zref-example-lastpage.tex,
% zref-example-nextpage.tex, zref-test1.tex,
% zref-test-base.tex, zref-test-runs.tex,
% zref-test-titleref-memoir.tex.
@@ -68,6 +68,7 @@
% TDS:tex/latex/oberdiek/zref-abspos.sty
% TDS:tex/latex/oberdiek/zref-counter.sty
% TDS:tex/latex/oberdiek/zref-dotfill.sty
+% TDS:tex/latex/oberdiek/zref-env.sty
% TDS:tex/latex/oberdiek/zref-hyperref.sty
% TDS:tex/latex/oberdiek/zref-lastpage.sty
% TDS:tex/latex/oberdiek/zref-marks.sty
@@ -107,7 +108,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: zref 2010/05/01 v2.17 New reference scheme for LaTeX2e (HO)}
+\Msg{* Package: zref 2011/03/18 v2.21 New reference scheme for LaTeX2e (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -118,7 +119,7 @@
This is a generated file.
-Copyright (C) 2006-2010 by
+Copyright (C) 2006-2011 by
Heiko Oberdiek <heiko.oberdiek at googlemail.com>
This work may be distributed and/or modified under the
@@ -139,12 +140,12 @@ This work consists of the main source file zref.dtx
and the derived files
zref.sty, zref.pdf, zref.ins, zref.drv, zref-base.sty,
zref-abspage.sty, zref-abspos.sty, zref-counter.sty,
- zref-dotfill.sty, zref-hyperref.sty, zref-lastpage.sty,
- zref-marks.sty, zref-nextpage.sty, zref-pageattr.sty,
- zref-pagelayout.sty, zref-perpage.sty, zref-runs.sty,
- zref-savepos.sty, zref-thepage.sty, zref-titleref.sty,
- zref-totpages.sty, zref-user.sty, zref-xr.sty,
- zref-example.tex, zref-example-lastpage.tex,
+ zref-dotfill.sty, zref-env.sty, zref-hyperref.sty,
+ zref-lastpage.sty, zref-marks.sty, zref-nextpage.sty,
+ zref-pageattr.sty, zref-pagelayout.sty, zref-perpage.sty,
+ zref-runs.sty, zref-savepos.sty, zref-thepage.sty,
+ zref-titleref.sty, zref-totpages.sty, zref-user.sty,
+ zref-xr.sty, zref-example.tex, zref-example-lastpage.tex,
zref-example-nextpage.tex, zref-test1.tex,
zref-test-base.tex, zref-test-runs.tex,
zref-test-titleref-memoir.tex.
@@ -162,6 +163,7 @@ and the derived files
\file{zref-abspos.sty}{\from{zref.dtx}{abspos}}%
\file{zref-counter.sty}{\from{zref.dtx}{counter}}%
\file{zref-dotfill.sty}{\from{zref.dtx}{dotfill}}%
+ \file{zref-env.sty}{\from{zref.dtx}{env}}%
\file{zref-hyperref.sty}{\from{zref.dtx}{hyperref}}%
\file{zref-lastpage.sty}{\from{zref.dtx}{lastpage}}%
\file{zref-marks.sty}{\from{zref.dtx}{marks}}%
@@ -195,12 +197,12 @@ and the derived files
\Msg{* files into a directory searched by TeX:}
\Msg{*}
\Msg{* zref.sty, zref-base.sty, zref-abspage.sty, zref-abspos.sty,}
-\Msg{* zref-counter.sty, zref-dotfill.sty, zref-hyperref.sty,}
-\Msg{* zref-lastpage.sty, zref-marks.sty, zref-nextpage.sty,}
-\Msg{* zref-pageattr.sty, zref-pagelayout.sty, zref-perpage.sty,}
-\Msg{* zref-runs.sty, zref-savepos.sty, zref-thepage.sty,}
-\Msg{* zref-titleref.sty, zref-totpages.sty, zref-user.sty,}
-\Msg{* zref-xr.sty}
+\Msg{* zref-counter.sty, zref-dotfill.sty, zref-env.sty,}
+\Msg{* zref-hyperref.sty, zref-lastpage.sty, zref-marks.sty,}
+\Msg{* zref-nextpage.sty, zref-pageattr.sty, zref-pagelayout.sty,}
+\Msg{* zref-perpage.sty, zref-runs.sty, zref-savepos.sty,}
+\Msg{* zref-thepage.sty, zref-titleref.sty, zref-totpages.sty,}
+\Msg{* zref-user.sty, zref-xr.sty}
\Msg{*}
\Msg{* And install the following script file:}
\Msg{*}
@@ -221,7 +223,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{zref.drv}%
- [2010/05/01 v2.17 New reference scheme for LaTeX2e (HO)]%
+ [2011/03/18 v2.21 New reference scheme for LaTeX2e (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\setlength{\emergencystretch}{1em}
@@ -231,7 +233,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{3166}
+% \CheckSum{3468}
%
% \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
@@ -252,7 +254,7 @@ and the derived files
% \GetFileInfo{zref.drv}
%
% \title{The \xpackage{zref} package}
-% \date{2010/05/01 v2.17}
+% \date{2011/03/18 v2.21}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -910,13 +912,13 @@ and the derived files
\newcounter{foo}
\renewcommand*{\thefoo}{\Alph{foo}}
-\usepackage{zref-lastpage,zref-user}[2010/05/01]
+\usepackage{zref-lastpage,zref-user}[2011/03/18]
\makeatletter
\zref@newprop{thefoo}{\thefoo}
\zref@newprop{valuefoo}{\the\value{foo}}
\zref@newprop{chapter}{\thechapter}
-\zref@addprop{LastPage}{thefoo,valuefoo,chapter}
+\zref@addprops{LastPage}{thefoo,valuefoo,chapter}
\makeatother
\newcommand*{\foo}{%
@@ -1024,7 +1026,7 @@ and the derived files
%<<END_EXAMPLE
\documentclass{book}
-\usepackage{zref-nextpage}[2010/05/01]
+\usepackage{zref-nextpage}[2011/03/18]
\znextpagesetup
{\thepage}% next page is unknown
{\thepage\ (#1)}% this page is last page
@@ -1120,7 +1122,7 @@ and the derived files
% \end{declcs}
% At the end of document the page layout parameter for each page are
% printed into the \xext{log} file if macro \cs{zlistpagelayout}
-% is called.
+% is called before |\end{document}| (preamble is a good place).
%
% \subsection{Module \xmodule{marks}}
%
@@ -1254,8 +1256,9 @@ and the derived files
% \begin{declcs}{zsavepos}
% \M{refname}
% \end{declcs}
-% It generates a reference with name \meta{refname} to
-% the location where the command is executed.
+% It generates a reference with name \meta{refname}.
+% The reference stores the location where \cs{zsavepos}
+% is executed in properties |posx| and |posy|.
%
% \begin{declcs}{zposx}\markexp
% \M{refname}\\
@@ -1280,6 +1283,16 @@ and the derived files
% and \cs{pdflastypos}. They are available in PDF mode and
% since version 1.40.0 also in DVI mode.
%
+% \begin{declcs}{zref@savepos}
+% \end{declcs}
+% Macro \cs{zref@savepos} performs the first part of \cs{zsavepos}
+% by calling \cs{pdfsavepos} (if \xext{aux} files are writable).
+%
+% Thus \cs{zsavepos} is basically \cs{zref@savepos} followed
+% by |\zreflabelbylist{|\texttt{\meta{refname}}|}{savepos}|.
+% The property list |savepos| contains the properties |posx|
+% and |posy|.
+%
% \subsection{Module \xmodule{dotfill}}
%
% \begin{declcs}{zdotfill}
@@ -1306,6 +1319,12 @@ and the derived files
% the dot in \cs{dotfill}).
% \end{description}
%
+% \subsection{Module \xmodule{env}}
+%
+% This module defines two properties |envname| and |envline|. They
+% remember the name of the environment and the line number at
+% the start of the environment.
+%
% \subsection{Module \xmodule{xr}}
%
% This package provides the functionality of package \xpackage{xr},
@@ -1566,13 +1585,13 @@ the height difference of the two baselines is
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref}
- [2010/05/01 v2.17 New reference scheme for LaTeX2e (HO)]%
+ [2011/03/18 v2.21 New reference scheme for LaTeX2e (HO)]%
% \end{macrocode}
%
% \subsubsection{Load basic module}
%
% \begin{macrocode}
-\RequirePackage{zref-base}[2010/05/01]
+\RequirePackage{zref-base}[2011/03/18]
% \end{macrocode}
% Abort package loading if \xpackage{zref-base} could not be
% loaded successfully.
@@ -1587,7 +1606,7 @@ the height difference of the two baselines is
\def\ZREF@temp#1{%
\DeclareOption{#1}{%
\AtEndOfPackage{%
- \RequirePackage{zref-#1}[2010/05/01]%
+ \RequirePackage{zref-#1}[2011/03/18]%
}%
}%
}
@@ -1653,7 +1672,7 @@ the height difference of the two baselines is
%<*base>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-base}%
- [2010/05/01 v2.17 Module base for zref (HO)]%
+ [2011/03/18 v2.21 Module base for zref (HO)]%
% \end{macrocode}
%
% \subsubsection{Utilities}
@@ -1662,6 +1681,8 @@ the height difference of the two baselines is
\RequirePackage{ltxcmds}[2010/03/01]
\RequirePackage{infwarerr}[2010/04/08]
\RequirePackage{kvsetkeys}[2010/03/01]
+\RequirePackage{kvdefinekeys}[2010/03/01]
+\RequirePackage{pdftexcmds}[2010/04/01]
% \end{macrocode}
%
% \begin{macro}{\ZREF@name}
@@ -1896,12 +1917,12 @@ the height difference of the two baselines is
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\zref@addprop}
-% \cs{zref@addprop} adds the property \verb|#2| to the property
+% \begin{macro}{\zref@addprops}
+% \cs{zref@addprop} adds the properties \verb|#2| to the property
% list \verb|#1|, if the property is not already in the list.
% Otherwise a warning is given.
% \begin{macrocode}
-\ZREF@Robust\def\zref@addprop#1#2{%
+\ZREF@Robust\def\zref@addprops#1#2{%
\zref@listexists{#1}{%
\comma@parse{#2}{%
\zref@propexists\comma@entry{%
@@ -1922,10 +1943,33 @@ the height difference of the two baselines is
}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\zref@addprop}
+% \cs{zref@addprop} adds the property \verb|#2| to the property
+% list \verb|#1|, if the property is not already in the list.
+% Otherwise a warning is given.
+% \begin{macrocode}
+\ZREF@Robust\def\zref@addprop#1#2{%
+ \zref@listexists{#1}{%
+ \zref@propexists{#2}{%
+ \zref@iflistcontainsprop{#1}{#2}{%
+ \PackageWarning\ZREF@name{%
+ Property `#2' is already in list `#1'%
+ }%
+ }{%
+ \begingroup\expandafter\endgroup
+ \expandafter\g@addto@macro
+ \csname Z@L@#1\expandafter\endcsname
+ \expandafter{\csname#2\endcsname}%
+ }%
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
%
-% \begin{macro}{\zref@localaddprop}
+% \begin{macro}{\zref@localaddprops}
% \begin{macrocode}
-\ZREF@Robust\def\zref@localaddprop#1#2{%
+\ZREF@Robust\def\zref@localaddprops#1#2{%
\zref@listexists{#1}{%
\comma@parse{#2}{%
\zref@propexists\comma@entry{%
@@ -1946,6 +1990,148 @@ the height difference of the two baselines is
}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\zref@localaddprop}
+% \begin{macrocode}
+\ZREF@Robust\def\zref@localaddprop#1#2{%
+ \zref@listexists{#1}{%
+ \zref@propexists{#2}{%
+ \zref@iflistcontainsprop{#1}{#2}{%
+ \PackageWarning\ZREF@name{%
+ Property `#2' is already in list `#1'%
+ }%
+ }{%
+ \begingroup\expandafter\endgroup
+ \expandafter\ltx@LocalAppendToMacro
+ \csname Z@L@#1\expandafter\endcsname
+ \expandafter{\csname#2\endcsname}%
+ }%
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\ltx@IfUndefined{pdf@strcmp}{%
+% \end{macrocode}
+% \begin{macro}{\zref@delprop}
+% \begin{macrocode}
+ \ZREF@Robust\def\zref@delprop{%
+ \ZREF@delprop\gdef
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\zref@localdelprop}
+% \begin{macrocode}
+ \ZREF@Robust\def\zref@localdelprop{%
+ \ZREF@delprop\def
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@delprop}
+% \begin{macrocode}
+ \def\ZREF@delprop#1#2#3{%
+ \zref@listexists{#2}{%
+ \begingroup
+ \escapechar=-1 %
+ \def\ZREF@param{#3}%
+ \@onelevel@sanitize\ZREF@param
+ \toks@{}%
+ \expandafter\expandafter\expandafter\ZREF@@delprop
+ \csname Z@L@#2\endcsname!%
+ \expandafter\endgroup
+ \expandafter#1\csname Z@L@#2\expandafter\endcsname
+ \expandafter{%
+ \the\toks@
+ }%
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@@delprop}
+% \begin{macrocode}
+ \def\ZREF@@delprop#1{%
+ \expandafter\ZREF@@@delprop\expandafter{\string#1}#1%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@@@delprop}
+% \begin{macrocode}
+ \def\ZREF@@@delprop#1#2{%
+ \ifx#2!%
+ \else
+ \def\ZREF@temp{#1}%
+ \@onelevel@sanitize\ZREF@temp
+ \ifx\ZREF@param\ZREF@temp
+ \else
+ \toks@\expandafter{%
+ \the\expandafter\toks@\csname#1\endcsname
+ }%
+ \fi
+ \expandafter\ZREF@@delprop
+ \fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}{%
+% \end{macrocode}
+% \begin{macro}{\zref@delprop}
+% \begin{macrocode}
+ \ZREF@Robust\def\zref@delprop{%
+ \ZREF@delprop\xdef
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\zref@localdelprop}
+% \begin{macrocode}
+ \ZREF@Robust\def\zref@localdelprop{%
+ \ZREF@delprop\edef
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@delprop}
+% \begin{macrocode}
+ \def\ZREF@delprop#1#2#3{%
+ \zref@listexists{#2}{%
+ \def\ZREF@param{#3}%
+ \edef\ZREF@SavedEscapechar{\the\escapechar}%
+ \escapechar=-1 %
+ \expandafter#1\csname Z@L@#2%
+ \expandafter\expandafter\expandafter\endcsname{%
+ \expandafter\expandafter\expandafter\ZREF@@delprop
+ \csname Z@L@#2\endcsname!%
+ }%
+ \escapechar=\ZREF@SavedEscapechar\relax
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@@delprop}
+% Caution: |#1| might be an \cs{if} or similar token.
+% \begin{macrocode}
+ \def\ZREF@@delprop#1{%
+ \expandafter\ZREF@@@delprop\expandafter{\string#1}#1%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@@@delprop}
+% \begin{macrocode}
+ \def\ZREF@@@delprop#1#2{%
+ \ifx#2!%
+ \else
+ \ifnum\pdf@strcmp{#1}{\ZREF@param}=\ltx@zero
+ \else
+ \expandafter\noexpand\csname#1\endcsname
+ \fi
+ \expandafter\ZREF@@delprop
+ \fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}
+% \end{macrocode}
%
% \subsubsection{Properties}
%
@@ -2152,6 +2338,94 @@ the height difference of the two baselines is
}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\zref@labelbykv}
+% \begin{macrocode}
+\ZREF@Robust\def\zref@labelbykv#1#2{%
+ \@bsphack
+ \begingroup
+ \let\Z@L@ZREF@temp\ltx@empty
+ \kvsetkeys{ZREF@LABEL}{#1}%
+ \ifZREF@immediate
+ \expandafter\zref@wrapper@immediate\expandafter{%
+ \expandafter\ZREF@label\expandafter{\Z@L@ZREF@temp}{#2}%
+ }%
+ \else
+ \expandafter\ZREF@label\expandafter{\Z@L@ZREF@temp}{#2}%
+ \fi
+ \endgroup
+ \@esphack
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\kv@define@key{ZREF@LABEL}{prop}{%
+ \edef\ZREF@param{#1}%
+ \zref@propexists\ZREF@param{%
+ \zref@iflistcontainsprop{ZREF@temp}\ZREF@param{}{%
+ \begingroup\expandafter\endgroup
+ \expandafter\ltx@LocalAppendToMacro
+ \expandafter\Z@L@ZREF@temp
+ \expandafter{\csname\ZREF@param\endcsname}%
+ }%
+ }%
+}
+\kv@define@key{ZREF@LABEL}{list}{%
+ \zref@listforloop{#1}{%
+ \zref@iflistcontainsprop{ZREF@temp}\zref@prop{}{%
+ \begingroup\expandafter\endgroup
+ \expandafter\ltx@LocalAppendToMacro
+ \expandafter\Z@L@ZREF@temp
+ \expandafter{\csname\zref@prop\endcsname}%
+ }%
+ \ltx@gobble
+ }%
+}
+\kv@define@key{ZREF@LABEL}{delprop}{%
+ \zref@propexists{#1}{%
+ \zref@localdelprop{ZREF@temp}{#1}%
+ }%
+}
+\kv@define@key{ZREF@LABEL}{immediate}[true]{%
+ \edef\ZREF@param{#1}%
+ \ifx\ZREF@param\ZREF@true
+ \ZREF@immediatetrue
+ \else
+ \ifx\ZREF@param\ZREF@false
+ \ZREF@immediatefalse
+ \else
+ \PackageWarning\ZREF@name{%
+ Option `immediate' expects `true' or `false'.\MessageBreak
+ Ignoring invalid value `\ZREF@param'%
+ }%
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \begin{macro}{\ZREF@false}
+% \begin{macrocode}
+\def\ZREF@false{false}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@true}
+% \begin{macrocode}
+\def\ZREF@true{true}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\kv@define@key{ZREF@LABEL}{values}[]{%
+ \kv@parse{#1}{%
+ \ifx\kv@value\relax
+ \@PackageWarning\ZREF@name{%
+ Missing value for property `\kv@key'%
+ }%
+ \expandafter\ltx@gobbletwo
+ \else
+ \expandafter\zref@setcurrent
+ \fi
+ }%
+}
+% \end{macrocode}
%
% \begin{macro}{\ifZREF@immediate}
% The switch \cs{ifZREF@immediate} tells us, whether the
@@ -2571,9 +2845,44 @@ the height difference of the two baselines is
% \begin{macrocode}
\zref@newprop{default}{\@currentlabel}
\zref@newprop*{page}{\thepage}
-\zref@addprop\ZREF@mainlist{default,page}
+\zref@addprops\ZREF@mainlist{default,page}
% \end{macrocode}
%
+% \paragraph{Properties}
+%
+% \begin{macro}{\ZREF@NewPropAnchor}
+% \begin{macrocode}
+\def\ZREF@NewPropAnchor{%
+ \zref@newprop{anchor}{%
+ \ltx@ifundefined{@currentHref}{}{\@currentHref}%
+ }%
+ \global\let\ZREF@NewPropAnchor\relax
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\zref@titleref@current}
+% Later we will redefine the section and caption macros
+% to catch the current title and remember the value in
+% \cs{zref@titleref@current}.
+% \begin{macro}{\ZREF@NewPropTitle}
+% \begin{macrocode}
+\def\ZREF@NewPropTitle{%
+ \gdef\zref@titleref@current{}%
+ \zref@newprop{title}{\zref@titleref@current}%
+ \global\let\ZREF@NewPropTitle\relax
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\ZREF@NewPropTheotype}
+% \begin{macrocode}
+\def\ZREF@NewPropTheotype{%
+ \zref@newprop{theotype}{}%
+ \global\let\ZREF@NewPropTheotype\relax
+}
+% \end{macrocode}
+% \end{macro}
+%
% \paragraph{Mark successful loading}
%
% \begin{macrocode}
@@ -2588,8 +2897,8 @@ the height difference of the two baselines is
%<*user>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-user}%
- [2010/05/01 v2.17 Module user for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module user for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -2619,6 +2928,17 @@ the height difference of the two baselines is
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\zkvlabel}
+% \begin{macrocode}
+\newcommand*{\zkvlabel}[1]{%
+ \ifx\label\ltx@gobble
+ \expandafter\ltx@gobblethree
+ \fi
+ \zref@wrapper@babel{\zref@labelbykv{#1}}%
+}%
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\zref}
% Macro \cs{zref} is the corresponding macro for \cs{ref}.
% Also it provides an optional argument in order to
@@ -2668,8 +2988,8 @@ the height difference of the two baselines is
%<*abspage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-abspage}%
- [2010/05/01 v2.17 Module abspage for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module abspage for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -2716,8 +3036,8 @@ the height difference of the two baselines is
%<*counter>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-counter}%
- [2010/05/01 v2.17 Module counter for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module counter for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -2756,9 +3076,9 @@ the height difference of the two baselines is
%<*lastpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-lastpage}%
- [2010/05/01 v2.17 Module lastpage for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
-\RequirePackage{zref-abspage}[2010/05/01]
+ [2011/03/18 v2.21 Module lastpage for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
+\RequirePackage{zref-abspage}[2011/03/18]
\RequirePackage{atveryend}[2009/12/07]
\ifx\ZREF@base@ok Y%
\else
@@ -2828,8 +3148,8 @@ the height difference of the two baselines is
%<*thepage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-thepage}%
- [2010/05/01 v2.17 Module thepage for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module thepage for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -2838,7 +3158,7 @@ the height difference of the two baselines is
%
% \begin{macrocode}
\RequirePackage{atbegshi}
-\RequirePackage{zref-abspage}[2010/05/01]
+\RequirePackage{zref-abspage}[2011/03/18]
% \end{macrocode}
% \begin{macrocode}
\zref@newlist{thepage}
@@ -2893,8 +3213,8 @@ the height difference of the two baselines is
%<*nextpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-nextpage}%
- [2010/05/01 v2.17 Module nextpage for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module nextpage for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -2902,9 +3222,9 @@ the height difference of the two baselines is
% \end{macrocode}
%
% \begin{macrocode}
-\RequirePackage{zref-abspage}[2010/05/01]
-\RequirePackage{zref-thepage}[2010/05/01]
-\RequirePackage{zref-lastpage}[2010/05/01]
+\RequirePackage{zref-abspage}[2011/03/18]
+\RequirePackage{zref-thepage}[2011/03/18]
+\RequirePackage{zref-lastpage}[2011/03/18]
\RequirePackage{uniquecounter}[2009/12/18]
% \end{macrocode}
% \begin{macrocode}
@@ -2997,8 +3317,8 @@ the height difference of the two baselines is
%<*totpages>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-totpages}%
- [2010/05/01 v2.17 Module totpages for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module totpages for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -3008,8 +3328,8 @@ the height difference of the two baselines is
% The absolute page number of the last page is the total
% page number.
% \begin{macrocode}
-\RequirePackage{zref-abspage}[2010/05/01]
-\RequirePackage{zref-lastpage}[2010/05/01]
+\RequirePackage{zref-abspage}[2011/03/18]
+\RequirePackage{zref-lastpage}[2011/03/18]
% \end{macrocode}
%
% \begin{macro}{\ztotpages}
@@ -3039,8 +3359,8 @@ the height difference of the two baselines is
%<*pagelayout>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-pagelayout}%
- [2010/05/01 v2.17 Module pagelayout for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module pagelayout for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -3048,7 +3368,7 @@ the height difference of the two baselines is
% \end{macrocode}
%
% \begin{macrocode}
-\RequirePackage{zref-thepage}[2010/05/01]
+\RequirePackage{zref-thepage}[2011/03/18]
\RequirePackage{ifluatex}[2010/03/01]
\RequirePackage{atveryend}[2010/03/24]
% \end{macrocode}
@@ -3133,7 +3453,7 @@ the height difference of the two baselines is
% \begin{macro}{\zref@listpagelayout}
% \begin{macrocode}
\ZREF@IfDefinable\zlistpagelayout\def{%
- {\ZREF@pl@listtrue}%
+ {\global\ZREF@pl@listtrue}%
}
% \end{macrocode}
% \end{macro}
@@ -3148,7 +3468,7 @@ the height difference of the two baselines is
\ZREF@org@testdef{##1}{##2}{##3}%
\def\ZREF@temp{##1}%
\ifx\ZREF@temp\ZREF@RefPrefix
- \expandafter\xdef\csname##1@##2\endcsname{##3}%
+ \expandafter\gdef\csname##1@##2\endcsname{##3}%
\fi
}%
}{}%
@@ -3247,8 +3567,8 @@ the height difference of the two baselines is
%<*pageattr>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-pageattr}%
- [2010/05/01 v2.17 Module pageattr for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module pageattr for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -3298,7 +3618,7 @@ the height difference of the two baselines is
\def\zref@pdfpageattr#1{}%
\def\zref@pdfpageattr@used#1{}%
}{%
- \RequirePackage{zref-thepage}[2010/05/01]%
+ \RequirePackage{zref-thepage}[2011/03/18]%
\zref@newprop*{pdfpageattr}[]{\zref@hex{\the\pdfpageattr}}%
\zref@addprop{thepage}{pdfpageattr}%
\let\ZREF@temp=Y%
@@ -3310,7 +3630,7 @@ the height difference of the two baselines is
\def\zref@pdfpagesattr{}%
\def\zref@pdfpagesattr@used{}%
}{%
- \RequirePackage{zref-lastpage}[2010/05/01]%
+ \RequirePackage{zref-lastpage}[2011/03/18]%
\zref@newprop*{pdfpagesattr}[]{\zref@hex{\the\pdfpagesattr}}%
\zref@addprop{LastPage}{pdfpagesattr}%
\let\ZREF@temp=Y%
@@ -3322,7 +3642,7 @@ the height difference of the two baselines is
\fi
% \end{macrocode}
% \begin{macrocode}
-\RequirePackage{zref-abspage}[2010/05/01]
+\RequirePackage{zref-abspage}[2011/03/18]
\RequirePackage{atveryend}[2010/03/24]
\RequirePackage{pdftexcmds}[2010/04/01]
\let\ZREF@temp=Y%
@@ -3472,8 +3792,8 @@ the height difference of the two baselines is
%<*marks>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-marks}%
- [2010/05/01 v2.17 Module marks for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module marks for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -3481,7 +3801,6 @@ the height difference of the two baselines is
% \end{macrocode}
%
% \begin{macrocode}
-\RequirePackage{kvsetkeys}[2009/07/30]
\newcommand*{\zref@marks@register}[3][]{%
\edef\ZREF@TempName{#1}%
\edef\ZREF@TempNum{\ZREF@number#2}%
@@ -3579,7 +3898,7 @@ the height difference of the two baselines is
%<*runs>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-runs}%
- [2010/05/01 v2.17 Module runs for zref (HO)]%
+ [2011/03/18 v2.21 Module runs for zref (HO)]%
% \end{macrocode}
%
% \begin{macro}{\zruns}
@@ -3611,8 +3930,8 @@ the height difference of the two baselines is
%<*perpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-perpage}%
- [2010/05/01 v2.17 Module perpage for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module perpage for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -3627,7 +3946,7 @@ the height difference of the two baselines is
% For detecting changed pages module \xmodule{abspage}
% is loaded.
% \begin{macrocode}
-\RequirePackage{zref-abspage}[2010/05/01]
+\RequirePackage{zref-abspage}[2011/03/18]
% \end{macrocode}
%
% We group the properties for the needed references
@@ -3636,7 +3955,7 @@ the height difference of the two baselines is
% \begin{macrocode}
\zref@newprop*{pagevalue}[0]{\number\c@page}
\zref@newlist{perpage}
-\zref@addprop{perpage}{abspage,page,pagevalue}
+\zref@addprops{perpage}{abspage,page,pagevalue}
% \end{macrocode}
% The page value, known by the reference mechanism, will be
% stored in counter |zpage|.
@@ -3778,8 +4097,8 @@ the height difference of the two baselines is
%<*titleref>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-titleref}%
- [2010/05/01 v2.17 Module titleref for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module titleref for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -3796,18 +4115,10 @@ the height difference of the two baselines is
% for the reference system. It uses some of the ideas
% of package \xpackage{nameref} and \xpackage{titleref}.
%
-% \begin{macro}{\zref@titleref@current}
-% Later we will redefine the section and caption macros
-% to catch the current title and remember the value in
-% \cs{zref@titleref@current}.
-% \begin{macrocode}
-\let\zref@titleref@current\ltx@empty
-% \end{macrocode}
-% \end{macro}
% Now we can add the property \verb|title| is added to
% the main property list.
% \begin{macrocode}
-\zref@newprop{title}{\zref@titleref@current}%
+\ZREF@NewPropTitle
\zref@addprop\ZREF@mainlist{title}%
% \end{macrocode}
%
@@ -3936,7 +4247,7 @@ the height difference of the two baselines is
\def\zref@titleref@current{#1}%
}%
\ZREF@IfDefinable\ztitlerefsetup\def{%
- {\setkeys{ZREF@TR}}%
+ {\kvsetkeys{ZREF@TR}}%
}%
% \end{macrocode}
% \end{macro}
@@ -4188,8 +4499,8 @@ the height difference of the two baselines is
%<*xr>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-xr}%
- [2010/05/01 v2.17 Module xr for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module xr for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -4211,39 +4522,6 @@ the height difference of the two baselines is
\zref@newprop{externaldocument}{}%
% \end{macrocode}
%
-% \begin{macro}{\ZREF@xr@NewPropAnchor}
-% \begin{macrocode}
-\def\ZREF@xr@NewPropAnchor{%
- \ltx@ifpackageloaded{zref-hyper}{%
- }{%
- \zref@newprop{anchor}{%
- \ltx@ifundefined{@currentHref}{}{\@currentHref}%
- }%
- }%
- \global\let\ZREF@xr@NewPropAnchor\relax
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ZREF@xr@NewPropTitle}
-% \begin{macrocode}
-\def\ZREF@xr@NewPropTitle{%
- \ltx@ifpackageloaded{zref-title}{%
- }{%
- \zref@newprop{title}{}%
- }%
- \global\let\ZREF@xr@NewPropTitle\relax
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\ZREF@xr@NewPropTheotype}
-% \begin{macrocode}
-\def\ZREF@xr@NewPropTheotype{%
- \zref@newprop{theotype}{}%
- \global\let\ZREF@xr@NewPropTheotype
-}
-% \end{macrocode}
-% \end{macro}
-%
% Most code, especially the handling of the \xfile{.aux}
% files are taken from David Carlisle's \xpackage{xr} package.
% Therefore I drop the documentation for these macros here.
@@ -4281,7 +4559,7 @@ the height difference of the two baselines is
% \begin{macro}{\zxrsetup}
% \begin{macrocode}
\newcommand*{\zxrsetup}{%
- \setkeys{ZREF@XR}%
+ \kvsetkeys{ZREF@XR}%
}%
% \end{macrocode}
% \end{macro}
@@ -4336,8 +4614,8 @@ the height difference of the two baselines is
% \begin{macrocode}
\ZREF@IfDefinable\zexternaldocument\def{%
{%
- \ZREF@xr@NewPropAnchor
- \ZREF@xr@NewPropTitle
+ \ZREF@NewPropAnchor
+ \ZREF@NewPropTitle
\begingroup
\csname @safe@actives@true\endcsname
\makeatletter
@@ -4538,7 +4816,7 @@ the height difference of the two baselines is
\ifx\\#4\\%
\else
% ntheorem knows an optional argument at the end of \newlabel
- \ZREF@xr@NewPropTheotype
+ \ZREF@NewPropTheotype
\expandafter\ltx@LocalAppendToMacro
\csname\ZREF@xr@temprefname\endcsname{\theotype{#4}}%
\fi
@@ -4621,8 +4899,8 @@ the height difference of the two baselines is
Zref label `#1' is already in use\MessageBreak
in file `\ZREF@xr@file'%
}%
- \edef\ZREF@xr@ignored@empty{%
- \the\numexpr\ZREF@xr@ignored+1%
+ \edef\ZREF@xr@ignored@zref{%
+ \the\numexpr\ZREF@xr@ignored@zref+1%
}%
}%
% \end{macrocode}
@@ -4757,8 +5035,8 @@ the height difference of the two baselines is
%<*hyperref>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-hyperref}%
- [2010/05/01 v2.17 Module hyperref for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module hyperref for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -4766,11 +5044,7 @@ the height difference of the two baselines is
% \end{macrocode}
%
% \begin{macrocode}
-\ltx@ifpackageloaded{zref-xr}{}{%
- \zref@newprop{anchor}[]{%
- \ltx@ifundefined{@currentHref}{}{\@currentHref}%
- }%
-}
+\ZREF@NewPropAnchor
\zref@addprop\ZREF@mainlist{anchor}%
% \end{macrocode}
%
@@ -4791,8 +5065,8 @@ the height difference of the two baselines is
%<*savepos>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-savepos}%
- [2010/05/01 v2.17 Module savepos for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module savepos for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -4839,11 +5113,21 @@ the height difference of the two baselines is
\zref@newlist{savepos}
\zref@newprop*{posx}[0]{\the\pdflastxpos}
\zref@newprop*{posy}[0]{\the\pdflastypos}
-\zref@addprop{savepos}{posx,posy}
+\zref@addprops{savepos}{posx,posy}
% \end{macrocode}
%
% \subsubsection{User macros}
%
+% \begin{macro}{\zref@savepos}
+% \begin{macrocode}
+\def\zref@savepos{%
+ \if@filesw
+ \pdfsavepos
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\zsavepos}
% The current location is stored in a reference with the
% given name.
@@ -4852,7 +5136,7 @@ the height difference of the two baselines is
#1{%
\@bsphack
\if@filesw
- \pdfsavepos
+ \zref@savepos
\zref@labelbylist{#1}{savepos}%
\fi
\@esphack
@@ -4906,8 +5190,8 @@ the height difference of the two baselines is
%<*abspos>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-abspos}%
- [2010/05/01 v2.17 Module abspos for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module abspos for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -4915,14 +5199,14 @@ the height difference of the two baselines is
% \end{macrocode}
%
% \begin{macrocode}
-\RequirePackage{zref-savepos}[2010/05/01]
+\RequirePackage{zref-savepos}[2011/03/18]
\ifx\ZREF@savepos@ok Y%
\else
\expandafter\endinput
\fi
% \end{macrocode}
% \begin{macrocode}
-\RequirePackage{zref-pagelayout}[2010/05/01]
+\RequirePackage{zref-pagelayout}[2011/03/18]
\zref@addprop{savepos}{abspage}
% \end{macrocode}
%
@@ -4937,8 +5221,8 @@ the height difference of the two baselines is
%<*dotfill>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-dotfill}%
- [2010/05/01 v2.17 Module dotfill for zref (HO)]%
-\RequirePackage{zref-base}[2010/05/01]
+ [2011/03/18 v2.21 Module dotfill for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
\ifx\ZREF@base@ok Y%
\else
\expandafter\endinput
@@ -4948,7 +5232,7 @@ the height difference of the two baselines is
% For measuring the width of \cs{zdotfill} we use the features
% provided by module \xmodule{savepos}.
% \begin{macrocode}
-\RequirePackage{zref-savepos}[2010/05/01]
+\RequirePackage{zref-savepos}[2011/03/18]
% \end{macrocode}
% For automatically generated label names we use the unique
% counter of module \xmodule{base}.
@@ -4981,7 +5265,7 @@ the height difference of the two baselines is
% \begin{macro}{\zdotfillsetup}
% Configuration of \cs{zdotfill} is done by \cs{zdotfillsetup}.
% \begin{macrocode}
-\newcommand*{\zdotfillsetup}{\setkeys{ZREF@DF}}
+\newcommand*{\zdotfillsetup}{\kvsetkeys{ZREF@DF}}
% \end{macrocode}
% \end{macro}
%
@@ -5031,6 +5315,49 @@ the height difference of the two baselines is
%</dotfill>
% \end{macrocode}
%
+% \subsection{Module \xmodule{env}}
+%
+% \begin{macrocode}
+%<*env>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{zref-env}%
+ [2011/03/18 v2.21 Module env for zref (HO)]%
+\RequirePackage{zref-base}[2011/03/18]
+\ifx\ZREF@base@ok Y%
+\else
+ \expandafter\endinput
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\zref@newprop{envname}[]{\@currenvir}
+\zref@newprop{envline}[]{\zref@env@line}
+% \end{macrocode}
+%
+% \begin{macro}{\zref@env@line}
+% Macro \cs{zref@env@line} extracts the line number
+% from \cs{@currenvline}.
+% \begin{macrocode}
+\def\zref@env@line{%
+ \ifx\@currenvline\ltx@empty
+ \else
+ \expandafter
+ \ZREF@ENV@line\@currenvline\ltx@empty line \ltx@empty\@nil
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ZREF@ENV@line}
+% \begin{macrocode}
+\def\ZREF@ENV@line#1line #2\ltx@empty#3\@nil{#2}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</env>
+% \end{macrocode}
+%
+%
% \section{Test}
%
% \subsection{\cs{zref@localaddprop}}
@@ -5040,7 +5367,7 @@ the height difference of the two baselines is
\NeedsTeXFormat{LaTeX2e}
\nofiles
\documentclass{article}
-\usepackage{zref-base}[2010/05/01]
+\usepackage{zref-base}[2011/03/18]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -5080,7 +5407,7 @@ the height difference of the two baselines is
%<*test-base>
\NeedsTeXFormat{LaTeX2e}
\documentclass{article}
-\usepackage{zref-base,zref-titleref}[2010/05/01]
+\usepackage{zref-base,zref-titleref}[2011/03/18]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -5139,7 +5466,7 @@ the height difference of the two baselines is
%<*test-runs>
\NeedsTeXFormat{LaTeX2e}
\documentclass{article}
-\usepackage{zref-runs}[2010/05/01]
+\usepackage{zref-runs}[2011/03/18]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -5168,7 +5495,7 @@ the height difference of the two baselines is
%<*test-titleref-memoir>
\NeedsTeXFormat{LaTeX2e}
\documentclass{memoir}
-\usepackage{zref-titleref}[2010/05/01]
+\usepackage{zref-titleref}[2011/03/18]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -5289,6 +5616,7 @@ the height difference of the two baselines is
% zref-abspos.sty & tex/latex/oberdiek/zref-abspos.sty\\
% zref-counter.sty & tex/latex/oberdiek/zref-counter.sty\\
% zref-dotfill.sty & tex/latex/oberdiek/zref-dotfill.sty\\
+% zref-env.sty & tex/latex/oberdiek/zref-env.sty\\
% zref-hyperref.sty & tex/latex/oberdiek/zref-hyperref.sty\\
% zref-lastpage.sty & tex/latex/oberdiek/zref-lastpage.sty\\
% zref-marks.sty & tex/latex/oberdiek/zref-marks.sty\\
@@ -5656,6 +5984,36 @@ the height difference of the two baselines is
% \item
% Module \xmodule{xr}: Property `urluse' and option \xoption{urluse} added.
% \end{Version}
+% \begin{Version}{2010/05/13 v2.18}
+% \item
+% Module \xmodule{env} added.
+% \item
+% Module \xmodule{savepos}: \cs{zref@savepos} added.
+% \end{Version}
+% \begin{Version}{2010/10/22 v2.19}
+% \item
+% \cs{zref@addprop} and \cs{zref@localaddprop} are limited
+% to one property only
+% (incompatibility to versions v2.13 to v2.18).
+% \item
+% \cs{zref@addprops} and \cs{zref@localaddprops} added.
+% \item
+% \cs{zref@delprop} and \cs{zref@localdelprop} added.
+% \item
+% \cs{zref@labelbykv} and \cs{zkvlabel} (module \xmodule{user})
+% with keys \xoption{prop}, \xoption{list}, \xoption{delprop},
+% \xoption{immediate}, \xoption{values} added.
+% \end{Version}
+% \begin{Version}{2011/02/12 v2.20}
+% \item
+% Fix for warning in \xpackage{zref-xr}.
+% \end{Version}
+% \begin{Version}{2011/03/18 v2.21}
+% \item
+% Fix in module \xmodule{pagelayout} for \cs{zlistpagelayout}.
+% \item
+% Fix for \cs{zref@localaddprop} (probably since v2.19).
+% \end{Version}
% \end{History}
%
% \PrintIndex