Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!agate!bionet!csd4.milw.wisc.edu!mailrus!cornell!rochester!uhura.cc.rochester.edu!rbr4 From: rbr4@uhura.cc.rochester.edu (Roland Roberts) Newsgroups: comp.text Subject: TeX macro for Nuclear Physics symbols Summary: macro \Ni58 becomes ${}^{58}\rm{Ni}$ Message-ID: <676@ur-cc.UUCP> Date: 19 Jan 89 23:44:06 GMT Reply-To: rbr4@uhura.cc.rochester.edu (Roland Roberts) Followup-To: comp.text Distribution: na Organization: University of Rochester Lines: 26 I'm trying to write a macro that will output nuclear physics symbols as shown in the summary line, namely a superscript mass number followed by the letter abbreviation. What I use now is \def\Ni#1 {\ifmmode {}^{#1}\rm{Ni} \else ${}^{#1}\rm{Ni}$ \fi} which is fine when typing a symbol in the middle of text, e.g. "... one of the interesting properties of \Ni64 lies in ..." but is a nuissance when writing a reaction in the standard form "... We have examined the reaction \Ni64(\O16,\O18)\Ni62 at ..." Note that TeX chokes on the above line (the \O macro is defined the same way as the \Ni). Admittedly, the extra spaces that have to be added to the above line for it to work are only a nuissance, but I'm wondering if there is a way to avoid needing them. I'm thinking of playing around with changing the catcode for the digits to be able to distinguish them from the `(' and `)', but am not sure if it will get me anywhere. Any help is appreciated! -- Roland Roberts BITNET: roberts@uornsrl Nuclear Structure Research Lab INTERNET: rbr4@uhura.cc.rochester.edu 271 East River Road UUCP: rochester!ur-cc!rbr4 Rochester, NY 14267 AT&T: (716) 275-8962