Re: TeX syntax?

glen herrmannsfeldt <gah@ugcs.caltech.edu>
16 Feb 2007 23:43:38 -0500

          From comp.compilers

Related articles
TeX syntax? rjshaw@netspace.net.au (Russell Shaw) (2007-02-08)
Re: TeX syntax? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-02-09)
Re: TeX syntax? adrian@cs.rhul.ac.uk (A Johnstone) (2007-02-09)
Re: TeX syntax? ara@nestle.csail.mit.edu (Allan Adler) (2007-02-09)
Re: TeX syntax? phlucas@f-m.fm (Philipp Lucas) (2007-02-12)
Re: TeX syntax? jhallen@TheWorld.com (2007-02-16)
Re: TeX syntax? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-02-16)
Re: TeX syntax? jhallen@TheWorld.com (2007-02-25)
Re: TeX syntax? gjthill@gmail.com (Jim Hill) (2007-02-25)
Re: TeX syntax? rockbrentwood@gmail.com (Rock Brentwood) (2021-04-04)
Re: TeX syntax? gah4@u.washington.edu (gah4) (2021-04-05)
Re: TeX syntax? gah4@u.washington.edu (gah4) (2021-04-05)
| List of all articles for this month |

From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: 16 Feb 2007 23:43:38 -0500
Organization: Compilers Central
References: 07-02-024 07-02-029 07-02-037 07-02-046
Keywords: macros
Posted-Date: 16 Feb 2007 23:43:38 EST

Joseph H Allen wrote:
(snip)


> I made my own preprocessor/format for TeX based on these books. I
> remember playing a lot of games with the macro name space. For
> example, only a limited character set can be used in macro names, but
> I wanted to use any character. I ended up escaping: AA maps to A, AB
> maps to backslash, AC to {, etc.


Just about any character can be used in macro names if one really
wants to do it. LaTeX uses @ in many of its internal names, by
first changing the catcode of @ to letter, then defining macros
with @ in the names, or references to those macros. After
defining all the internal macros, it changes @ back to other.


You can also change the escape character used for macro references
from \ to something else. I believe catcode is described fairly
early in the TeXbook.


-- glen


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.