diff options
Diffstat (limited to 'Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx')
-rw-r--r-- | Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx index 4b7b8c64231..c60cdc0c709 100644 --- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx +++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx @@ -113,11 +113,7 @@ See source file '\inFileName' for details. % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % -% \title{The \pk{luatexbase-cctb} package} -% \date{v0.2a 2010-05-27} -% \author{% -% Manuel P\'egouri\'e-Gonnard \\ \texttt{mpg@elzevir.fr} \and -% \'Elie Roux \\ \texttt{elie.roux@telecom-bretagne.eu}} +% \pkdate{luatexbase-cctb}{v0.3 2010-05-27} % % \maketitle % @@ -246,7 +242,7 @@ See source file '\inFileName' for details. \let\x\ProvidesPackage \fi \expandafter\endgroup -\x{luatexbase-cctb}[2010/05/27 v0.2a Catcodetable allocation for LuaTeX] +\x{luatexbase-cctb}[2010/10/10 v0.3 Catcodetable allocation for LuaTeX] % \end{macrocode} % % Make sure \luatex is used. @@ -260,14 +256,17 @@ See source file '\inFileName' for details. \fi \ifluatex\else \begingroup - \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax - \def\x#1#2{\begingroup\newlinechar10 - \immediate\write16{Package #1 warning: #2}\endgroup} + \expandafter\ifx\csname PackageError\endcsname\relax + \def\x#1#2#3{\begingroup \newlinechar10 + \errhelp{#3}\errmessage{Package #1 error: #2}\endgroup} \else - \let\x\PackageWarningNoLine + \let\x\PackageError \fi \expandafter\endgroup - \x{luatexbase-cctb}{LuaTeX is required for this package. Aborting.} + \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{% + This package can only be used with the LuaTeX engine^^J% + (command `lualatex' or `luatex').^^J% + Package loading has been stopped to prevent additional errors.} \lltxb@cctb@AtEnd \expandafter\endinput \fi @@ -505,6 +504,7 @@ end % Plain TeX. % % \begin{macrocode} +%<testplain,testlatex>\catcode00 15 %<testplain>\input luatexbase-cctb.sty %<testlatex>\RequirePackage{luatexbase-cctb} %<*testplain,testlatex> @@ -524,13 +524,29 @@ end \lua{assert(luatexbase.catcodetables.anothercctb)} % \end{macrocode} % -% Now, play a little bit with predefined tables. +% Now, play a little bit with predefined tables. Be careful to change +% catcodes only inside a group to avoid chaos. % % \begin{macrocode} -\luatexcatcodetable\CatcodeTableLaTeXAtLetter -\ifnum\catcode64=11 \else \ERROR \fi -\luatexcatcodetable\CatcodeTableLaTeX -\ifnum\catcode64=12 \else \ERROR \fi +\def\test#1#2#3{% + \begingroup + \ifcsname CatcodeTable#1\endcsname \else \INTERR \fi + \luatexcatcodetable\csname CatcodeTable#1\endcsname + \ifnum\catcode#2=#3 \else \ERROR \fi + \endgroup} +\test {IniTeX} {00} {09} +\test {IniTeX} {92} {00} +\test {IniTeX} {64} {12} +\test {IniTeX} {65} {11} +\test {String} {92} {12} +\test {String} {65} {12} +\test {String} {32} {10} +\test {Other} {92} {12} +\test {Other} {65} {12} +\test {Other} {32} {12} +\test {LaTeXAtLetter} {64} {11} +\test {LaTeX} {64} {12} +\test {Expl} {32} {09} %<testlatex>\documentclass{minimal} \lua{% tex.sprint('\string\\setbox0=\string\\hbox{') |