summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/oberdiek/soulutf8.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/oberdiek/soulutf8.dtx')
-rw-r--r--macros/latex/contrib/oberdiek/soulutf8.dtx577
1 files changed, 1 insertions, 576 deletions
diff --git a/macros/latex/contrib/oberdiek/soulutf8.dtx b/macros/latex/contrib/oberdiek/soulutf8.dtx
index a25b50be1c..f5708e8ac2 100644
--- a/macros/latex/contrib/oberdiek/soulutf8.dtx
+++ b/macros/latex/contrib/oberdiek/soulutf8.dtx
@@ -67,11 +67,6 @@
% Installation:
% TDS:tex/generic/oberdiek/soulutf8.sty
% TDS:doc/latex/oberdiek/soulutf8.pdf
-% TDS:doc/latex/oberdiek/test/soulutf8-test1.tex
-% TDS:doc/latex/oberdiek/test/soulutf8-test2.tex
-% TDS:doc/latex/oberdiek/test/soulutf8-test3.tex
-% TDS:doc/latex/oberdiek/test/soulutf8-test4.tex
-% TDS:doc/latex/oberdiek/test/soulutf8-test5.tex
% TDS:source/latex/oberdiek/soulutf8.dtx
%
%<*ignore>
@@ -147,10 +142,6 @@ and the derived files
% \file{soulutf8-test3.tex}{\from{soulutf8.dtx}{test3,utf8x}}%
% \file{soulutf8-test4.tex}{\from{soulutf8.dtx}{test4,utf8,noetex}}%
% \file{soulutf8-test5.tex}{\from{soulutf8.dtx}{test5,utf8x,noetex}}%
- \nopreamble
- \nopostamble
-% \usedir{source/latex/oberdiek/catalogue}%
-% \file{soulutf8.xml}{\from{soulutf8.dtx}{catalogue}}%
}
\catcode32=13\relax% active space
@@ -187,21 +178,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{soulutf8.drv}
%
@@ -1128,553 +1104,7 @@ and the derived files
% \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 soulutf8.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{\LaTeX\space tests}
-%
-% \begin{macrocode}
-%<*test2|test3|test4|test5>
-% \end{macrocode}
-% \begin{macrocode}
-%<noetex>\let\SavedUnexpanded\unexpanded
-%<noetex>\let\unexpanded\UNDEFINED
-\NeedsTeXFormat{LaTeX2e}
-\documentclass{article}
-\usepackage[T1]{fontenc}
-\usepackage{lmodern}
-\usepackage{textcomp}
-\usepackage[ngerman]{babel}
-\expandafter\def\csname ver@hypdestopt.sty\endcsname{}
-\usepackage[unicode]{hyperref}
-\usepackage{bookmark}
-\usepackage{color}
-\usepackage{soul}[2003/11/17]
-\makeatletter
-\newcommand*{\@ifDefined}[1]{%
- \@ifundefined{#1}{%
- \@latex@error{%
- \expandafter\noexpand\csname#1\endcsname undefined%
- }\@ehc
- }%
-}
-\newcommand*{\SaveOrg}[1]{%
- \@ifdefinable{ORG@SOUL@#1}{%
- \@ifDefined{SOUL@#1}{%
- \expandafter\let\csname ORG@SOUL@#1\expandafter\endcsname
- \csname SOUL@#1\endcsname
- }%
- }%
-}
-\newcommand*{\RestoreOrg}[1]{%
- \@ifDefined{ORG@SOUL@#1}{%
- \@ifDefined{SOUL@#1}{%
- \expandafter\let\csname SOUL@#1\expandafter\endcsname
- \csname ORG@SOUL@#1\endcsname
- }%
- }%
-}
-\makeatother
-\SaveOrg{eval}
-\SaveOrg{splittoken}
-\SaveOrg{flushcomma}
-\SaveOrg{flushapo}
-\SaveOrg{grave}
-\SaveOrg{addgroup}
-\SaveOrg{addmath}
-\SaveOrg{addprotect}
-\SaveOrg{addtoken}
-\usepackage{soulutf8}[2016/05/16]
-% \end{macrocode}
-% \begin{macrocode}
-%<noetex>\let\unexpanded\SavedUnexpanded
-% \end{macrocode}
-% Input encoding \xfile{utf8}.
-% \begin{macrocode}
-%<*utf8>
-\usepackage[utf8]{inputenc}
-\DeclareUnicodeCharacter{00A0}{\nobreakspace}
-%</utf8>
-% \end{macrocode}
-% Input encoding \xfile{utf8x}. Package \xpackage{ucs}
-% has a nasty bug, that it redefines \cs{show}.
-% \begin{macrocode}
-%<*utf8x>
-\let\origshow\show
-\usepackage[utf8x]{inputenc}
-\AtBeginDocument{%
- \let\show\origshow
-}
-%</utf8x>
-% \end{macrocode}
-%
-% \subsubsection{Driver definitions}
-%
-% \begin{macrocode}
-\makeatletter
-% \end{macrocode}
-% \begin{macro}{\an}
-% The definition for \cs{an} is taken from the documentation of
-% package \xpackage{soul}.
-% \begin{macrocode}
-\DeclareRobustCommand*{\an}{%
- \def\SOUL@preamble{$^{^P}$}%
- \def\SOUL@everyspace##1{##1\texttt{\char`\ }\linebreak[2]}%
- \def\SOUL@postamble{$^{^E}$}%
- \def\SOUL@everyhyphen{$^{^-}$\linebreak[1]}%
- \def\SOUL@everyexhyphen##1{##1$^{^=}$}%
- \def\SOUL@everysyllable{$^{^S}$}%
- \def\SOUL@everytoken{\the\SOUL@token$^{^T}$}%
- \def\SOUL@everylowerthan{$^{^L}$}%
- \SOUL@
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\sy}
-% The definition for \cs{sy} is taken from the documentation of
-% package \xpackage{soul}.
-% \begin{macrocode}
-\DeclareRobustCommand*{\sy}{%
- \SOUL@setup
- \def\SOUL@preamble{%
- \lefthyphenmin=\z@
- \righthyphenmin=\z@
- }%
- \def\SOUL@everyspace##1{##1\space}%
- \def\SOUL@everysyllable{\the\SOUL@syllable}%
- \def\SOUL@everyhyphen{%
- \discretionary{%
- \SOUL@setkern\SOUL@hyphkern
- \SOUL@sethyphenchar
- }{}{%
- \hbox{\kern1pt$\cdot$}%
- }%
- }%
- \def\SOUL@everyexhyphen##1{%
- \SOUL@setkern\SOUL@hyphkern
- \hbox{##1}%
- \discretionary{}{}{%
- \SOUL@setkern\SOUL@charkern
- }%
- }%
- \SOUL@
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\soulH}
-% \begin{macrocode}
-\DeclareRobustCommand*{\soulH}{%
- \def\SOUL@preamble{%
- \gdef\SOULH{}%
- \soulHadd{[}%
- }%
- \def\SOUL@everyspace##1{%
- \soulHadd{Sp}%
- }%
- \def\SOUL@postamble{%
- \soulHadd{]}%
- }%
- \def\SOUL@everyhyphen{%
- \soulHadd{Hy}%
- }%
- \def\SOUL@everyexhyphen##1{%
- \soulHadd{Exhy}%
- }%
- \def\SOUL@everysyllable{%
- \soulHadd{Sy}%
- }%
- \def\SOUL@everytoken{%
- \soulHadd{T}%
- }%
- \def\SOUL@everylowerthan{%
- \soulHadd{<}%
- }%
- \SOUL@
-}
-\newcommand*{\soulHadd}[1]{%
- #1%
- \expandafter\gdef\expandafter\soulHstring\expandafter{%
- \soulHstring
- #1%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Test macros}
-%
-% \begin{macrocode}
-\usepackage{qstest}
-\IncludeTests{*}
-\LogTests{log}{*}{*}
-% \end{macrocode}
-% \begin{macrocode}
-\newsavebox\boxA
-\newsavebox\boxB
-\newsavebox\boxC
-% \end{macrocode}
-% \begin{macro}{\TestDriver}
-% \begin{macrocode}
-\newcommand*{\TestDriver}[4]{%
- \subsection{Driver #1}%
- \@PackageInfo{soulutf8-test}{* Driver #1}%
- \expandafter\let\expandafter\testdriver\csname #1\endcsname
- \def\teststringA{#3}%
- \def\teststringB{#4}%
- \begin{qstest}{string-#2-driver-#1}{string,#2,driver,#1}%
- \@PackageInfo{soulutf8-test}{* Version: soulutf8}%
- \global\let\soulHstring\@empty
- \setbox0=\hbox{\expandafter\testdriver\expandafter{\teststringA}}%
- \let\HstringA\soulHstring
- \SetTestVBox{\boxA}{\teststringA}%
- %
- \@PackageInfo{soulutf8-test}{* Version: soul + patch}%
- \global\let\soulHstring\@empty
- \RestoreOrg{eval}%
- \setbox2=\hbox{\expandafter\testdriver\expandafter{\teststringB}}%
- \let\HstringB\soulHstring
- \SetTestVBox{\boxB}{\teststringB}%
- %
- \@PackageInfo{soulutf8-test}{* Version: original soul}%
- \global\let\soulHstring\@empty
- \RestoreOrg{splittoken}%
- \RestoreOrg{flushcomma}%
- \RestoreOrg{flushapo}%
- \RestoreOrg{grave}%
- \RestoreOrg{addgroup}%
- \RestoreOrg{addmath}%
- \RestoreOrg{addprotect}%
- \RestoreOrg{addtoken}%
- \setbox4=\hbox{\expandafter\testdriver\expandafter{\teststringB}}%
- \let\HstringC\soulHstring
- \SetTestVBox{\boxC}{\teststringB}%
- %
- \TestInfo{0}{soulutf8}%
- \TestInfo{2}{soul + patch}%
- \TestInfo{4}{original soul}%
- \TestInfoVBox
- \showboxdepth=\maxdimen
- \showboxbreadth=\maxdimen
- \tracingonline=\@ne
- \Expect*{\HstringA}*{\HstringB}%
- \Expect*{\HstringA}*{\HstringC}%
- \Expect*{\the\wd0}*{\the\wd2}%
- \ifdim\wd0=\wd2 %
- \else
- \showbox0 %
- \showbox2 %
- \fi
- \Expect*{\the\ht0}*{\the\ht2}%
- \Expect*{\the\dp0}*{\the\dp2}%
- \Expect*{\the\wd\boxB}*{\the\wd\boxA}%
- \Expect*{\the\wd\boxC}*{\the\wd\boxA}%
- \Expect*{\the\ht\boxB}*{\the\ht\boxA}%
- \ifdim\ht\boxB=\ht\boxA
- \else
- \showbox\boxA
- \showbox\boxB
- \fi
- \Expect*{\the\ht\boxC}*{\the\ht\boxA}%
- \Expect*{\the\dp\boxB}*{\the\dp\boxA}%
- \Expect*{\the\dp\boxC}*{\the\dp\boxA}%
- \end{qstest}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\SetTestVBox}
-% \begin{macrocode}
-\newcommand*{\SetTestVBox}[2]{%
- \setbox#1=\vbox{%
- \hsize=0pt\relax
- \hfuzz=100mm\relax
- \expandafter\testdriver\expandafter{#2}%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\TestInfo}
-% \begin{macrocode}
-\newcommand*{\TestInfo}[2]{%
- \par
- \noindent
- \copy#1\relax
- \hfill
- \begingroup
- \small
- \ifdim\wd0=\wd2\relax
- \ifdim\wd0=\wd4\relax
- \else
- \ifnum#1=2 %
- \raisebox{.5\baselineskip}[0pt][0pt]{%
- \llap{$\}$ }%
- \rlap{width = \the\wd#1\relax\space$\{$}%
- \phantom{width = 999.99999pt}%
- \qquad
- }%
- \else
- \ifnum#1=4 %
- \rlap{width = \the\wd#1}%
- \phantom{width = 999.99999pt}%
- \qquad
- \fi
- \fi
- \fi
- \else
- \begingroup
- \bfseries
- \rlap{width = \the\wd#1}%
- \phantom{width = 999.99999pt}%
- \endgroup
- \qquad
- \fi
- \rlap{(#2)}%
- \phantom{(original soul)}%
- \endgroup
- \par
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\TestInfoVBox}
-% \begin{macrocode}
-\newcommand*{\TestInfoVBox}{%
- \par
- \noindent
- \mbox{\vrule\relax\space\copy\boxA}%
- \ifdim\ht\boxA=\ht\boxB
- \else
- \hfill
- \begingroup
- \small
- \rlap{(soulutf8)}%
- \phantom{(soulutf8)}%
- \endgroup
- \par
- \noindent
- \mbox{\vrule\relax\space\copy\boxB}%
- \hfill
- \begingroup
- \small
- \rlap{(soul)}%
- \phantom{(soulutf8)}%
- \endgroup
- \fi
- \par
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\Test}
-% \begin{macrocode}
-\makeatletter
-\newcommand*{\Test}[3]{%
- \clearpage
- \begingroup
- \def\linebreak{\textbackslash linebreak }%
- \def\\{\textbackslash\textbackslash}%
- \def\soulomit##1{%
- \textbackslash soulomit\textbraceleft##1\textbraceright
- }%
- \def\mbox##1{%
- \textbackslash mbox\textbraceleft##1\textbraceright
- }%
- \def\abc{\textbackslash abc }%
- \def\texttt##1{%
- \textbackslash texttt\textbraceleft##1\textbraceright
- }%
- \def\c##1{%
- \textbackslash c\textbraceleft##1\textbraceright
- }%
-%<*utf8x>
- \count@=128 %
- \loop
- \ifnum\count@<256 %
- \lccode`\~=\count@
- \lowercase{%
- \def~{\noexpand~}%
- }%
- \advance\count@\@ne
- \repeat
-%</utf8x>
- \csname protected@edef\endcsname\x{\endgroup
- \noexpand\section{String #1: #2}%
- }%
- \x
- \TestDriver{so}{#1}{#2}{#3}%
- \TestDriver{caps}{#1}{#2}{#3}%
- \TestDriver{ul}{#1}{#2}{#3}%
- \TestDriver{st}{#1}{#2}{#3}%
- \TestDriver{hl}{#1}{#2}{#3}%
- \TestDriver{an}{#1}{#2}{#3}%
- \TestDriver{sy}{#1}{#2}{#3}%
- \TestDriver{soulH}{#1}{#2}{#3}%
-}
-\makeatother
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Testing}
-%
-% \begin{macrocode}
-\begin{document}
- \Test A{}{}%
- \Test B{Hello World}{Hello World}%
- \Test C{%
- Umlauts: ^^c3^^84^^c3^^96^^c3^^9c^^c3^^a4^^c3^^b6^^c3^^bc^^c3^^9f%
- }{%
- Umlauts: \"A\"O\"U\"a\"o\"u\ss
- }%
- \Test D{Euro: ^^e2^^82^^ac}{Euro: \texteuro}%
- \Test E{Stra^^c3^^9fe}{Stra\ss e}%
- \Test F{R^^c3^^b6mer}{R\"omer}%
- \Test G{A^^e2^^80^^93B^^e2^^80^^94C}{A--B---C}%
- \Test H{X^^c2^^a0Y}{X~Y}%
- \Test I{A^^c5^^a4}{A\v T}%
- \Test J{A,B,,C,,,D,,,,E}{A,B,,C,,,D,,,,E}%
- \Test K{A'B''C'''D''''E}{A'B''C'''D''''E}%
- \Test L{A`B``C```D````E}{A`B``C```D````E}%
- \Test M{A$x$B}{A$x$B}%
- \Test N{A\mbox{abc}B}{A\mbox{abc}B}%
- \Test O{,,TA''}{,,TA''}%
- \Test P{{!`}Hola{?`}}{{!`}Hola{?`}}%
- \Test Q{re-sent\slash x}{re-sent\slash x}%
- \Test R{new\\line}{new\\line}%
- \Test S{foo\linebreak bar}{foo\linebreak bar}%
- \Test T{Virchow{sche}}{Virchow{sche}}%
- \Test U{A\soulomit{foo}B}{A\soulomit{foo}B}%
- \Test V{A\texttt{xyz}B}{A\texttt{xyz}B}%
- \Test W{ffi}{ffi}%
- \Test X{f{}f{}i}{f{}f{}i}%
- \Test Y{f\mbox{}f\mbox{}i}{f\mbox{}f\mbox{}i}%
- \Test Z{\c{\"a}}{{\c{\"a}}}%
-%<*test2|test3>
- \let\abcx\UNDEFINED
- \def\abc{%
- \begingroup
- \def\abcx{x}%
- \abcx
- \endgroup
- }%
- \Test{AA}{[{x\abc x}]}{[{xxx}]}%
-%</test2|test3>
-% \end{macrocode}
-%
-% \begin{macrocode}
-\end{document}
-% \end{macrocode}
-% \begin{macrocode}
-%</test2|test3|test4|test5>
-% \end{macrocode}
-%
-% \section{Installation}
+%% \section{Installation}
%
% \subsection{Download}
%
@@ -1723,11 +1153,6 @@ and the derived files
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
% soulutf8.sty & tex/generic/oberdiek/soulutf8.sty\\
% soulutf8.pdf & doc/latex/oberdiek/soulutf8.pdf\\
-% test/soulutf8-test1.tex & doc/latex/oberdiek/test/soulutf8-test1.tex\\
-% test/soulutf8-test2.tex & doc/latex/oberdiek/test/soulutf8-test2.tex\\
-% test/soulutf8-test3.tex & doc/latex/oberdiek/test/soulutf8-test3.tex\\
-% test/soulutf8-test4.tex & doc/latex/oberdiek/test/soulutf8-test4.tex\\
-% test/soulutf8-test5.tex & doc/latex/oberdiek/test/soulutf8-test5.tex\\
% soulutf8.dtx & source/latex/oberdiek/soulutf8.dtx\\
% \end{tabular}^^A
% }^^A