[tex-eplain] make \write[numbered]tocentry more abstract about section depth?

Oleg Katsitadze olegkat at gmail.com
Thu Apr 27 13:00:27 CEST 2006


On Wed, Apr 26, 2006 at 02:01:15PM -0500, Karl Berry wrote:
> \writetocentry and friends could try to detect
> if the PART arg is a number (is this possible?)

Not totally foolproof, but sufficient for our purpose:

  http://www.tex.ac.uk/cgi-bin/texfaq2html?label=isitanum

> and if so, write a different macro to the .toc file, say:
> 
> \tocdepthentry{DEPTH}{TEXT}{PAGENO}

That is, we produce an extra leading argument.  What about a
simpler name like \tocentry?  This would still be compatible
even if someone used an empty PART before -- the integer
checking macro would say that the empty string is not a
number, so we would get \tocentry in the .toc file but
without the extra DEPTH argument.

Best,
Oleg


More information about the tex-eplain mailing list