Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!dali.cs.montana.edu!milton!charlie From: charlie@milton.u.washington.edu (Charles Geyer) Newsgroups: comp.text Subject: Re: Why is there no seperator in TeX/LaTeX Message-ID: <6433@milton.u.washington.edu> Date: 17 Aug 90 01:55:42 GMT References: <1990Aug16.214657.16764@sctc.com> Reply-To: charlie@stat.washington.edu (Charlie Geyer) Distribution: comp Organization: UW Statistics, Seattle Lines: 64 Summary: Expires: Sender: Followup-To: In article <1990Aug16.214657.16764@sctc.com> herndon@sctc.com (William R. Herndon) writes: > I am curious as to why, in the design of TeX/LaTeX, no character > exists that can be used as a seperator in the names of macros. Because that's the way it is. The reason might have been to make $\alpha-z$ make sense. Or it might not. > After reading the TeXBook section on character codes and classes, I > thought that the hypen would be the character to use. After all it > can be used in labels ( using the \label \ref commands ), and is not > called out as a reserved character. But \label and \ref are LaTeX, not plain TeX. Why would you expect TeX command sequences to obey the rules that are allowed for LaTeX labels? > Well, I was wrong. After defining about 500 macros, all of which had > hyphens in them to help improve the readability of the names, I discovered > much to my dismay that TeX obviously does accord some special meaning to > the hyphen character and won't allow definitions with the hyphen in > them. It didn't occur to test one of these macros before you typed 500 of them? > So now what am I to do. There appearantly exists no character that can > be used as a seperator, and I need one for clarity. I guess that I've > learned my lesson and will no longer take anything that the TeXBook > states at face value again. The TeXbook is the most accurate computer manual I know. Generally far more accurate that commercial software manuals. From page 7 of the TeXbook. Control sequences come in two flavors. The first kind, like {\tt\char`\\input}, is called a {\it control word;} it consists of an escape character followed by one or more {\it letters,} followed by a space of by something besides a letter. (\TeX\ has to know where the control sequence ends, so you must put a space after a control word if the next character is a letter. For example, if you type `{\tt\char`\\inputMS}', \TeX\ will naturally interpret this as a control word with seven letters.) In case you're wondering what a ``letter'' is, the answer is that \TeX\ normally regards the 52 symbols {\tt A...Z} and {\tt a...z} as letters. The digits {\tt 0...9} are {\it not\/} considered to be letters, so they don't appear in control sequences of the first kind. A control sequence of the other kind, like {\tt\char`\\'}, is called a {\it control symbol;} it consists of the escape character followed by a single nonletter. That's it. A backslash and one or more upper or lower case letters or a backslash and a single character. Nothing else can be a control sequence. How could it be stated any clearer? > Arrrggggghhhhhhh!!!!! Indeed. -- charlie@stat.washington.edu (Charlie Geyer) Department of Statistics, University of Washington