[texhax] macro help

John R. Culleton john at wexfordpress.com
Wed Aug 9 21:57:22 CEST 2006


On Wednesday 09 August 2006 10:35, Tom Sgouros wrote:
> Hello all:
>
> >
> The problem I have is that in a huge list of XML tags, there are a
> few whose names have digits: STREET1 and STREET2, for example.  The
> only digits in use are 1 and 2, and they only occur at the end of the
> tags.  I haven't quite been able to come up with a macro definition that
> could translate STREET1 into \STREETONE or \STREETA, and I wonder if
> anyone here could lend a hand, or tell me definitely that I'm wasting
> time.
>
> Many thanks all,
>
>  -tom

I can only confirm that TeX treats a numeric at the end of a tag
not as part of the tag but as a parameter. This is primitive TeX,
not LaTeX or Context or even plain. So I don't know a way aorund
it. 

Your editor should be able to do a mass change like 
:%s/STREET1/STREETONE/g

(in Vim).

You don't have to do everything in TeX. 
-- 
John Culleton
Able Indexing and Typesetting
Precision typesetting (tm) at reasonable cost.
Satisfaction guaranteed. 
http://wexfordpress.com




More information about the texhax mailing list