Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!cernvax!chx400!ugun2b!ugsc2a!plaut From: plaut@sc2a.unige.ch (Olivier PLAUT) Newsgroups: comp.text.tex Subject: Another problem with INDEX and /newcommand (was: Need help with Message-ID: <289@sc2a.unige.ch> Date: 7 Nov 90 11:41:01 GMT References: <1990Nov5.220343.1298@dayton.saic.com> Organization: University of Geneva, Switzerland Lines: 37 In article <1990Nov5.220343.1298@dayton.saic.com>, fac2@dayton.saic.com (Earle Ake) writes: > I am trying to put out a '\index' command from within a '\newcommand' > defined command. A problem arises when there is a '_' within the text I am > trying to use. Using a '_' directly with the '\index' command produces the > desired results. Using it from within the newcommand defined gives me: > ... I have the same type of problem with \index in a \newcommand: If I use a newcommand, LaTeX transforms accents, as shown below. That transformation will cause a mistake in the alphabetical order: \'{e}thane will appear normally in lettre 'e' whereas {\accent 19 e}thane will appear before 'a' in the index. Is there a possibility to avoid this ? FILE TEST.TEX \documentstyle {rapport} \makeindex \newcommand{\idxtest}[1]{\index{_#1}} \begin{document} text page 1 \idxtest{\'{e}thane} \index{_\'{e}thane} \end{document} FILE TEST.IDX \indexentry{_{\accent 19 e}thane}{1} \indexentry{_\'{e}thane}{1} -- ----------------------------------------------------------------- | Olivier Plaut. University of Geneva. Geneva, Switzerland | | INTERNET: plaut@sc2a.unige.ch BITNET: plaut@cgeuge52 | -----------------------------------------------------------------