TEX hacker 请看
tex2page 最初对于 TEX的 primitive 支持有问题,对于国际化有 一些不好配置的地方。经过我和 Dorai 的共同努力,tex2page 已经 可以正确处理以下这些奇怪的 TEX命令。
\documentclass{article}
\begin{document}
\tracingcommands=1
\tracingmacros=1
\def\gobble#1{}
\section{Done}
\string OK.
\section{Done}
\string\TeX
\section{Done}
\expandafter\gobble\string\TeX
\section{Done}
\def\OK{Haha}
\expandafter\gobble\string\OK hahahaha
\section{Done}
\expandafter\csname\gobble Tsubsection\endcsname{This is OK.}
\section{Done}
\csname\expandafter\gobble\string\section\endcsname{OK!}
\section{Done}
\def\TeXxxx{hello}
\def\appendroman#1#2#3{\expandafter\def\expandafter#1\expandafter{%
\csname\expandafter\gobble\string#2\romannumeral#3\endcsname}}
\appendroman\a\TeX{30}
\a
\end{document}
如果你看不懂这些是怎么回事,那么你就可以放心的使用 tex2page. 因为你不会使它为难 :P
如果你还能想出比最后一个 \appendroman 更奇怪的宏,那么你
最好小心点。这是我们考虑过的最怪的一个宏。你可以参考
The
TeXbook 练习题 7.10 的勘误。