[texhax] Problems with \halign within a \write environment

Oleg Katsitadze olegkat at gmail.com
Fri Sep 14 21:14:16 CEST 2007

On Fri, Sep 14, 2007 at 08:27:13PM +0200, Rodolfo Medina wrote:
> And in fact, in myfile.tex there are two `##' instead of one.
> Can anybody suggest a possible solution to avoid that?

To avoid the doubled `#' in \write, define this:


and then say

  \immediate\write\myfile{\halign{\hash&\hash\cr a&b\cr}}

(\write doubles the macro parameter character (catcode 6), which is
`#' in plain TeX).


More information about the texhax mailing list