diff options
author | Karl Berry <karl@freefriends.org> | 2007-09-16 00:07:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-09-16 00:07:34 +0000 |
commit | d85f248e3b38ea0ecda38c5340e3cadd08d65346 (patch) | |
tree | 52e17f32b395006895b3917bc7729c7ac1514ae3 /Master/texmf-dist/source/latex/oberdiek/iflang.dtx | |
parent | 2389552f283181e0d8c610037712ade989112da3 (diff) |
oberdiek update (14sep07)
git-svn-id: svn://tug.org/texlive/trunk@4947 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/iflang.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/iflang.dtx | 165 |
1 files changed, 137 insertions, 28 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/iflang.dtx b/Master/texmf-dist/source/latex/oberdiek/iflang.dtx index 9932f23a351..94a700a37b5 100644 --- a/Master/texmf-dist/source/latex/oberdiek/iflang.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/iflang.dtx @@ -17,7 +17,8 @@ % This work consists of the main source file iflang.dtx % and the derived files % iflang.sty, iflang.pdf, iflang.ins, iflang.drv, -% iflang-test1.tex, iflang-test2.tex, iflang-test3.tex. +% iflang-test1.tex, iflang-test2.tex, iflang-test3.tex, +% iflang-test4.tex, iflang-test5.tex. % % Distribution: % CTAN:macros/latex/contrib/oberdiek/iflang.dtx @@ -55,6 +56,8 @@ % TDS:doc/latex/oberdiek/iflang-test1.tex % TDS:doc/latex/oberdiek/iflang-test2.tex % TDS:doc/latex/oberdiek/iflang-test3.tex +% TDS:doc/latex/oberdiek/iflang-test4.tex +% TDS:doc/latex/oberdiek/iflang-test5.tex % TDS:source/latex/oberdiek/iflang.dtx % %<*ignore> @@ -70,7 +73,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: iflang 2007/04/26 v1.3 Language checks (HO)} +\Msg{* Package: iflang 2007/09/09 v1.4 Language checks (HO)} \Msg{************************************************************************} \keepsilent @@ -97,7 +100,8 @@ This Current Maintainer of this work is Heiko Oberdiek. This work consists of the main source file iflang.dtx and the derived files iflang.sty, iflang.pdf, iflang.ins, iflang.drv, - iflang-test1.tex, iflang-test2.tex, iflang-test3.tex. + iflang-test1.tex, iflang-test2.tex, iflang-test3.tex, + iflang-test4.tex, iflang-test5.tex. \endpreamble @@ -110,6 +114,8 @@ and the derived files \file{iflang-test1.tex}{\from{iflang.dtx}{test1}}% \file{iflang-test2.tex}{\from{iflang.dtx}{test2}}% \file{iflang-test3.tex}{\from{iflang.dtx}{test3}}% + \file{iflang-test4.tex}{\from{iflang.dtx}{test4}}% + \file{iflang-test5.tex}{\from{iflang.dtx}{test5}}% } \obeyspaces @@ -135,7 +141,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{iflang.drv}% - [2007/04/26 v1.3 Language checks (HO)]% + [2007/09/09 v1.4 Language checks (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc} \begin{document} @@ -144,7 +150,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{608} +% \CheckSum{727} % % \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 @@ -165,7 +171,7 @@ and the derived files % \GetFileInfo{iflang.drv} % % \title{The \xpackage{iflang} package} -% \date{2007/04/26 v1.3} +% \date{2007/09/09 v1.4} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -316,23 +322,29 @@ and the derived files \fi \expandafter\x\csname ver@iflang.sty\endcsname \ProvidesPackage{iflang}% - [2007/04/26 v1.3 Language checks (HO)] + [2007/09/09 v1.4 Language checks (HO)] % \end{macrocode} % % \begin{macrocode} -\expandafter\edef\csname IfLang@endinput\endcsname{% - \catcode39 \the\catcode39\relax % ' - \catcode40 \the\catcode40\relax % ( - \catcode41 \the\catcode41\relax % ) - \catcode61 \the\catcode61\relax % = - \catcode64 \the\catcode64\relax % @ - \noexpand\endinput +\expandafter\edef\csname IfLang@AtEnd\endcsname{% + \catcode64 \the\catcode64\relax } -\catcode39 12\relax % ' -\catcode40 12\relax % ( -\catcode41 12\relax % ) -\catcode61 12\relax % = -\catcode64 11\relax % @ +\catcode64 11 % @ +\def\TMP@EnsureCode#1#2{% + \edef\IfLang@AtEnd{% + \IfLang@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{44}{12}% , +\TMP@EnsureCode{46}{12}% . +\TMP@EnsureCode{47}{12}% / +\TMP@EnsureCode{58}{12}% : +\TMP@EnsureCode{61}{12}% = % \end{macrocode} % % \subsection{Tools} @@ -400,7 +412,7 @@ and the derived files \expandafter\ifx\csname RequirePackage\endcsname\relax \input infwarerr.sty\relax \else - \RequirePackage{infwarerr}% + \RequirePackage{infwarerr}[2007/09/09]% \fi % \end{macrocode} % @@ -535,7 +547,7 @@ and the derived files % \begin{macrocode} \def\IfLanguageName#1{% \ifnum\IfLang@IfDefined{languagename}{% - \if\expandafter\IfLang@strequal\expandafter% + \if\expandafter\IfLang@StrEqual\expandafter% {\languagename}{#1}% 0% \else @@ -586,19 +598,72 @@ and the derived files % \end{macrocode} % % \begin{macrocode} -\IfLang@endinput +\IfLang@AtEnd %</package> % \end{macrocode} % % \section{Test} % -% \subsection{Test with \LaTeX} +% \subsection{Catcode checks for loading} % % \begin{macrocode} %<*test1> % \end{macrocode} % \begin{macrocode} +\catcode`\@=11 % +\def\RestoreCatcodes{} +\count@=0 % +\loop + \edef\RestoreCatcodes{% + \RestoreCatcodes + \catcode\the\count@=\the\catcode\count@\relax + }% +\ifnum\count@<255 % + \advance\count@\@ne +\repeat + +\def\RangeCatcodeInvalid#1#2{% + \count@=#1\relax + \loop + \catcode\count@=15 % + \ifnum\count@<#2\relax + \advance\count@\@ne + \repeat +} +\def\Test{% + \RangeCatcodeInvalid{0}{47}% + \RangeCatcodeInvalid{58}{64}% + \RangeCatcodeInvalid{91}{96}% + \RangeCatcodeInvalid{123}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \input iflang.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +% \end{macrocode} +% \begin{macrocode} +%</test1> +% \end{macrocode} +% +% \subsection{Test with \LaTeX} +% +% \begin{macrocode} +%<*test2|test3> +% \end{macrocode} +% \begin{macrocode} \NeedsTeXFormat{LaTeX2e} +%<test3>\let\pdfstrcmp\relax \nofiles \documentclass{minimal} \usepackage{qstest} @@ -626,6 +691,40 @@ and the derived files \test{ngerman}{false}% \test{naustrian}{true}% \test{foobar}{false}% + % + \def\languagename{naustrian}% + \test{naustrian}{true}% + \test{ngerman}{false}% + % + \edef\languagename{\string naustrian}% + \test{naustrian}{true}% + \test{ngerman}{false}% + % + \def\languagename{naustrian}% + \makeatletter + \@onelevel@sanitize\languagename + \test{naustrian}{true}% + \test{ngerman}{false}% + % + \def\languagename{naustrian}% + \def\xaustrian{naustrian}% + \def\xgerman{ngerman}% + \test{\xaustrian}{true}% + \test{\xgerman}{false}% + % + \def\languagename{\xaustrian}% + \test{naustrian}{true}% + \test{ngerman}{false}% + \test{\xaustrian}{true}% + \test{\xgerman}{false}% + \test{\languagename}{true}% + \test{\languagename\space}{false}% + % + \def\languagename{\empty\xaustrian\empty}% + \test{naustrian}{true}% + \test{ngerman}{false}% + \test{\empty\xaustrian\empty}{true}% + \test{\empty\xgerman\empty}{false}% \end{qstest} \begin{qstest}{IfDefined}{defined} \makeatletter @@ -640,13 +739,13 @@ and the derived files \end{document} % \end{macrocode} % \begin{macrocode} -%</test1> +%</test2|test3> % \end{macrocode} % % \subsection{Test with \plainTeX\ and \eTeX} % % \begin{macrocode} -%<*test2> +%<*test4> % \end{macrocode} % \begin{macrocode} %% Format `etex' based on `language.def' @@ -684,13 +783,13 @@ and the derived files \end % \end{macrocode} % \begin{macrocode} -%</test2> +%</test4> % \end{macrocode} % % \subsection{Test with \plainTeX\ and without \eTeX/\pdfTeX} % % \begin{macrocode} -%<*test3> +%<*test5> % \end{macrocode} % \begin{macrocode} %% Format `tex' (vanilla plain-TeX) @@ -755,8 +854,9 @@ and the derived files \end % \end{macrocode} % \begin{macrocode} -%</test3> +%</test5> % \end{macrocode} +% % \section{Installation} % % \subsection{Download} @@ -821,6 +921,8 @@ and the derived files % iflang-test1.tex & doc/latex/oberdiek/iflang-test1.tex\\ % iflang-test2.tex & doc/latex/oberdiek/iflang-test2.tex\\ % iflang-test3.tex & doc/latex/oberdiek/iflang-test3.tex\\ +% iflang-test4.tex & doc/latex/oberdiek/iflang-test4.tex\\ +% iflang-test5.tex & doc/latex/oberdiek/iflang-test5.tex\\ % iflang.dtx & source/latex/oberdiek/iflang.dtx\\ % \end{tabular}^^A % }^^A @@ -968,6 +1070,13 @@ and the derived files % \item % Use of package \xpackage{infwarerr}. % \end{Version} +% \begin{Version}{2007/09/09 v1.4} +% \item +% Bug fix: \cs{IfLang@StrEqual} $\rightarrow$ \cs{IfLangStrEqual} +% (Gabriele Balducci). +% \item +% Catcode section rewritten. +% \end{Version} % \end{History} % % \PrintIndex |