[texhax] plain TeX macros for TOC

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Feb 5 15:33:41 CET 2010


On 05/02/2010 14:09, Philip TAYLOR wrote:
>
>
> Rodolfo Medina wrote:
>
>> What did you put in place of `\dimexpr' when you tested it?
>
> It looks to me as if
>
> \hsize\dimexpr\hsize-2em
>
> is meant to signify
>
> \advance \hsize by -2 em
>
> although (a) I cannot be sure, and (b) I have no idea
> in which package (if any) \dimexpr is defined.
>
> ** Phil.

\dimexpr is an e-TeX primitve.  There is a \relax missing to terminate 
the \dimexpr:

\hsize \dimexpr \hsize - 2 em\relax

In this case, you can also do the same directly with the TeX82 
primitives, as you say. However, you can do several steps in one go 
using \dimexpr, which then can't be done using the TeX82 primitives.
--
Joseph Wright



More information about the texhax mailing list