Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!hsdndev!cmcl2!uupsi!sunic!chalmers.se!cs.chalmers.se!jeffrey From: jeffrey@cs.chalmers.se (Alan Jeffrey) Newsgroups: comp.text.tex Subject: Gripe about _ and ^ Message-ID: <4377@undis.cs.chalmers.se> Date: 23 Feb 91 17:38:36 GMT Sender: news@cs.chalmers.se Organization: Dept. of CS, Chalmers, Sweden Lines: 44 Why oh why oh why do ^ and _ in TeX not take their arguments in the `standard' way? For example, if you say \def\nil{[]} $a_\nil$ you get `a ]' and not `a '. [ [] In this case we're OK, because \nil should be an ord, so we can just say \def\nil{{[]}} instead, and we're all right. But if we want to define a bin, rel, op, or whatever, we're in real trouble, for example \def\may{\mathrel{\it may}} $a_\may$ produces the error message ! Missing { inserted. \mathrel \may ->\mathrel {\it may} <*> $a_\may $ because TeX interprets this as $a_\mathrel{\it may}$, and `obviously' a_\mathrel is rubbish. As far as I can see, the only options are a) either type _\foo or _{\foo} depending on what the definition of \foo is, which rather spoils the point of logical markup, or b) consistently type _{\foo}, which is a right pain, or c) redefine _ and ^. Has anyone any better suggestions? Cheers, Alan. Alan Jeffrey Tel: +46 31 72 10 98 jeffrey@cs.chalmers.se Department of Computer Sciences, Chalmers University, Gothenburg, Sweden