summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/oberdiek/thepdfnumber.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/oberdiek/thepdfnumber.dtx')
-rw-r--r--macros/latex/contrib/oberdiek/thepdfnumber.dtx319
1 files changed, 1 insertions, 318 deletions
diff --git a/macros/latex/contrib/oberdiek/thepdfnumber.dtx b/macros/latex/contrib/oberdiek/thepdfnumber.dtx
index 5b56027d9d..61eb42684c 100644
--- a/macros/latex/contrib/oberdiek/thepdfnumber.dtx
+++ b/macros/latex/contrib/oberdiek/thepdfnumber.dtx
@@ -67,9 +67,6 @@
% Installation:
% TDS:tex/generic/oberdiek/thepdfnumber.sty
% TDS:doc/latex/oberdiek/thepdfnumber.pdf
-% TDS:doc/latex/oberdiek/test/thepdfnumber-test1.tex
-% TDS:doc/latex/oberdiek/test/thepdfnumber-test2.tex
-% TDS:doc/latex/oberdiek/test/thepdfnumber-test3.tex
% TDS:source/latex/oberdiek/thepdfnumber.dtx
%
%<*ignore>
@@ -186,21 +183,6 @@ and the derived files
% \fi
%
%
-% \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{thepdfnumber.drv}
%
@@ -1102,303 +1084,7 @@ $ \else\ifnum`#2=46 % .
\ThPdNu@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 thepdfnumber.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`\@=11
-\errorcontextlines=10000 %
-\def\msg#{\immediate\write16}
-\def\space{ }
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input thepdfnumber.sty\relax
-\else
- \RequirePackage{thepdfnumber}[2016/05/16]%
-\fi
-% \end{macrocode}
-%
-% \begin{macro}{\Test}
-% \begin{macrocode}
-\def\Test#1#2{%
- \def\TestExpected{#2}%
-%<*active>
- \edef\TestExpected{\TestExpected}%
-%</active>
- \expandafter\expandafter\expandafter\def
- \expandafter\expandafter\expandafter\TestResult
- \expandafter\expandafter\expandafter{%
- \TestCommand{#1}%
- }%
- \begingroup
- \toks0\expandafter{\TestResult}%
- \toks2\expandafter{\TestExpected}%
- \ifx\TestResult\TestExpected
- \msg{* OK: #1 => \the\toks0}%
- \else
- \errmessage{FAILED: #1 => \the\toks0\space(\the\toks2)}%
- \fi
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\let\thepdfnumber@ErrorUnexpectedEnd\relax
-\let\thepdfnumber@ErrorInvalidToken\relax
-% \end{macrocode}
-%
-% \subsubsection{Test with active catcodes}
-%
-% \begin{macrocode}
-%<*active>
-\catcode`\~=13 %
-\def\ThPdNu@Temp#1{%
- \begingroup
- \lccode`\~=`#1 %
- \lowercase{\endgroup
- \edef~%
- }{\string#1}%
- \catcode`#1=13 %
-}
-\ThPdNu@Temp{.}
-\ThPdNu@Temp{-}
-\ThPdNu@Temp{+}
-%</active>
-% \end{macrocode}
-%
-% \subsubsection{Test cases for \cs{thepdfnumber}}
-%
-% \begin{macro}{\TestCommand}
-% \begin{macrocode}
-\let\TestCommand\thepdfnumber
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\Test{0}{0}
-\Test{1}{1}
-\Test{23}{23}
-\Test{0045}{45}
-\Test{4500}{4500}
-\Test{-0}{0}
-\Test{-1}{-1}
-\Test{-00002}{-2}
-\Test{-010203}{-10203}
-\Test{+0}{0}
-\Test{+123}{123}
-
-\Test{+-4}{-4}
-\Test{+-+-4}{4}
-\Test{++--++--++4}{4}
-\Test{+++---+++---+++---4}{-4}
-
-\Test{.}{0}
-\Test{0.}{0}
-\Test{.0}{0}
-\Test{0.}{0}
-\Test{-.}{0}
-\Test{-0.}{0}
-\Test{-.0}{0}
-\Test{-0.}{0}
-\Test{010.020}{10.02}
-\Test{123.456}{123.456}
-\Test{12.}{12}
-\Test{.123}{.123}
-\Test{.0001}{.0001}
-\Test{.00100}{.001}
-\Test{.12003400560078009}{.12003400560078009}
-\Test{-.12003400560078009}{-.12003400560078009}
-\Test{04.0500000}{4.05}
-
-\Test{}{0\thepdfnumber@ErrorUnexpectedEnd}
-\Test{+}{0\thepdfnumber@ErrorUnexpectedEnd}
-\Test{-}{0\thepdfnumber@ErrorUnexpectedEnd}
-\Test{a}{0\thepdfnumber@ErrorInvalidToken}
-\Test{0x1}{0\thepdfnumber@ErrorInvalidToken}
-\Test{4x56}{4\thepdfnumber@ErrorInvalidToken}
-\Test{012,34}{12\thepdfnumber@ErrorInvalidToken}
-\Test{0.12x4}{.12\thepdfnumber@ErrorInvalidToken}
-% \end{macrocode}
-%
-% \subsubsection{Test cases for \cs{thepdfnumberNormZeroOne}}
-%
-% \begin{macro}{\TestCommand}
-% \begin{macrocode}
-\let\TestCommand\thepdfnumberNormZeroOne
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\Test{0}{0}
-\Test{1}{1}
-\Test{23}{1}
-\Test{12}{1}
-\Test{10}{1}
-\Test{0045}{1}
-\Test{001}{1}
-\Test{-0}{0}
-\Test{-1}{0}
-\Test{-01}{0}
-\Test{-4}{0}
-
-\Test{+-0}{0}
-\Test{+-+-1}{1}
-\Test{++--++--++1}{1}
-\Test{+++---+++---+++---1}{0}
-
-\Test{.}{0}
-\Test{0.}{0}
-\Test{.0}{0}
-\Test{0.}{0}
-\Test{-.}{0}
-\Test{-0.}{0}
-\Test{-.0}{0}
-\Test{-0.}{0}
-\Test{010.020}{1}
-\Test{123.456}{1}
-\Test{12.}{1}
-\Test{.123}{.123}
-\Test{.0001}{.0001}
-\Test{.00100}{.001}
-\Test{.12003400560078009}{.12003400560078009}
-\Test{-.12003400560078009}{0}
-\Test{04.0500000}{1}
-\Test{0.1200340056}{.1200340056}
-\Test{1.05}{1}
-
-\Test{}{0\thepdfnumber@ErrorUnexpectedEnd}
-\Test{+}{0\thepdfnumber@ErrorUnexpectedEnd}
-\Test{-}{0\thepdfnumber@ErrorUnexpectedEnd}
-\Test{a}{0\thepdfnumber@ErrorInvalidToken}
-\Test{0x1}{0\thepdfnumber@ErrorInvalidToken}
-\Test{4x56}{1}
-\Test{012,34}{1}
-\Test{.012x4}{.012\thepdfnumber@ErrorInvalidToken}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\csname @@end\endcsname\end
-%</test2>
-% \end{macrocode}
-%
-% \section{Installation}
+%% \section{Installation}
%
% \subsection{Download}
%
@@ -1447,9 +1133,6 @@ $ \else\ifnum`#2=46 % .
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
% thepdfnumber.sty & tex/generic/oberdiek/thepdfnumber.sty\\
% thepdfnumber.pdf & doc/latex/oberdiek/thepdfnumber.pdf\\
-% test/thepdfnumber-test1.tex & doc/latex/oberdiek/test/thepdfnumber-test1.tex\\
-% test/thepdfnumber-test2.tex & doc/latex/oberdiek/test/thepdfnumber-test2.tex\\
-% test/thepdfnumber-test3.tex & doc/latex/oberdiek/test/thepdfnumber-test3.tex\\
% thepdfnumber.dtx & source/latex/oberdiek/thepdfnumber.dtx\\
% \end{tabular}^^A
% }^^A