diff options
author | Karl Berry <karl@freefriends.org> | 2011-07-31 18:28:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-07-31 18:28:13 +0000 |
commit | ed6913bb5d71e9779f8714d469d5903b9d328020 (patch) | |
tree | 575f78ad2ea535586194aa7390aa903db16f2515 /Master/texmf-dist/doc/latex/l3experimental/xcoffins/commands-check.tex | |
parent | 1b26357f303f48ae0b233a5fee9c2e5b8c3d8647 (diff) |
l3experimental (5jun11)
git-svn-id: svn://tug.org/texlive/trunk@23284 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/l3experimental/xcoffins/commands-check.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/l3experimental/xcoffins/commands-check.tex | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/l3experimental/xcoffins/commands-check.tex b/Master/texmf-dist/doc/latex/l3experimental/xcoffins/commands-check.tex new file mode 100644 index 00000000000..0d79e690945 --- /dev/null +++ b/Master/texmf-dist/doc/latex/l3experimental/xcoffins/commands-check.tex @@ -0,0 +1,47 @@ +% +% Execute this TeX file with +% latex -interaction=batchmode commands-check +% +% The package loaded and the commands checked can be customised: +\providecommand\PKG{expl3} +\providecommand\CMDS{commands-check.cmds} + +\documentclass{minimal} +\usepackage{\PKG} +\makeatletter + +% "loop...if...then...repeat" from TeX by Topic: +\def\cmdchk@loop#1\cmdchk@repeat{\def\cmdchk@body{#1}\cmdchk@iterate} +\def\cmdchk@iterate{% + \let\cmdchk@next\relax + \cmdchk@body \let\cmdchk@next\cmdchk@iterate \fi \cmdchk@next} + +\let \@tempb \@empty +\newread \cmdchk@read +\openin \cmdchk@read \CMDS \relax + +\def\checkcmds{% + \begingroup + \catcode`\\=12 + \endlinechar=-1 + \loop + \read \cmdchk@read to \@tempa \relax + \ifx \@tempa \@empty + \closein \cmdchk@read + \else + \ifcsname \expandafter \@gobble \@tempa \endcsname + \else + \xdef \@tempb {\@tempb ^^J!>\space\space\space\space\@tempa} + \fi + \repeat + \endgroup + \ifx\@tempb\@empty\else + \nonstopmode + \errmessage{\@tempb^^J} + \batchmode + \fi +} +\makeatother +\begin{document} +\checkcmds +\end{document} |