[pdftex] writing `#', `{', `}' into auxiliary file

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Thu Apr 28 12:57:36 CEST 2005


> I'd like to write a literal `#1' (not expanded, just as a string)
> and unequilibrated `{' or `}' into an auxiliary file using the
> \protected at write command.
> 
> I want LaTeX to write a macro definition with arguments into this
> auxiliary file on the first run, which is used in subsequent runs.
> 
> Commenting out `#' and the `{' with `\' doesn't help, because `\' will
> appear in the aux.-file too.

\string# (etc) will probably do what you want

> Sorry if this question seems to be off topic,

it's on-topic for texhax -- reply-to set

> but I want to add some
> kind of (reliable) physical page counter to my package for usage with
> pdflatex, as incrementing some counter on every shipout doesn't yield
> the expected result.

look at the count1to package



More information about the pdftex mailing list