[texhax] Query : why can \ifnum comparison operators not be \let, yet \def is OK ?

David Carlisle d.p.carlisle at gmail.com
Wed Feb 3 11:46:53 CET 2016


personally I'd do the definitions with normal catcodes rather than
having to use \string every time at runtime:

\newcount \maxchapter
\maxchapter = 0
\advance \maxchapter by 1



\def \Chapter #1 #2%
    {%
        \vfill \eject
        \mark {{Chapter #1}{#2}}%
        \ifnum #1<\maxchapter
        \def \next {\input #1.xml }%
        \else
        \let \next = \relax
        \fi
        \next
    }
\catcode `\< = \active
\def <#1>{\csname XML:#1\endcsname}

\Chapter 1 {Introduction}
\end


More information about the texhax mailing list