🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #6225

Re: def numbering in LaTeX

#6225
From: Byron Rakitzis
Date: Fri, 21 Apr 1989 13:02
50 lines
2318 bytes
In article <838@mv03.ecf.toronto.edu> apollo@ecf.toronto.edu (Vince Pugliese) writes:
>
> i was wondering if it is possible to make def's unique by simply
> appending a number to the macro definition, e.g.
>                \def\dummy_macro{..... 
>                 \def\dummy_macro2{......
>
>   LaTeX  does not seem to like the second def when it used  in the
>   body of the text arguing that the definition of  dummy_macro2 does
>   not exist. any suggestions or ideas?
>                                        thanks
>                                         vince

This is in the TeXbook.... but hey, I'll give it a shot anyway.
Here's the full answer:

Control sequence names have to be made up of characters with category
code 11 (letter). Plain TeX is set up so that only [a-Z] satisfy
this condition. You'll notice, however, that certain plain TeX macros
contain an @ in them. This is because at the beginning of the plain
TeX macros, the command

\catcode`\@=11            

is executed.

SO, if you want anything but letters appearing in your control
sequence names, all you have to do is \catcode them to 11. 

HOWEVER, I would suggest that you didn't do that for the characters
0-9, since you're setting yourself up for trouble e.g. \vskip10pt 
will flag an "undefined control sequence" error. 

It just takes a bit of getting used to, but you CAN get used to naming
your control sequences with letters only 

       \def\dummymacrowithdescriptivename
       \def\newdummymacrowithdescriptivename

Control sequence names can be as long as you like. (well, pretty long, anyway)


Ok?


-- 
"I've found it much easier on my ulcer to stop trying to clean out the Augean
stables of the net." 
				Chuq Von Rospach
Byron Rakitzis. (tbrakitz@phoenix.princeton.edu ---- tbrakitz@pucc.bitnet)
Technical Details
Message-ID: <7878@phoenix.Princeton.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!rutgers!njin!princeton!phoenix!tbrakitz
References: <838@mv03.ecf.toronto.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!rutgers!njin!princeton!phoenix!tbrakitz
From: tbrakitz@phoenix.Princeton.EDU (Byron Rakitzis)
Newsgroups: comp.text
Subject: Re: def numbering in LaTeX
Keywords: uniqueness
Message-ID: <7878@phoenix.Princeton.EDU>
Date: 21 Apr 89 13:02:10 GMT
References: <838@mv03.ecf.toronto.edu>
Reply-To: tbrakitz@phoenix.Princeton.EDU (Byron Rakitzis)
Organization: Princeton University, NJ
Lines: 50