plaut@sc2a.unige.ch (Olivier PLAUT) (11/07/90)
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 | -----------------------------------------------------------------