home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!ames!network.ucsd.edu!mvb.saic.com!info-tex
- From: "Erik Thaysen, Dev.Dept." <ERIKT@odin.uniras.dk>
- Newsgroups: comp.text.tex
- Subject: Macros as arguments for \index.
- Message-ID: <01GOMJH5EFGW9KM4OH@odin.uniras.dk>
- Date: Thu, 10 Sep 1992 16:24 GMT
- Organization: Info-Tex<==>Comp.Text.Tex Gateway
- X-Gateway-Source-Info: Mailing List
- Lines: 25
-
- Is it possible to use macros inside the argument of an \index command?
-
- My problem:
- I have a macro (\XP) which, depending on a flag, expands to one of two
- possible texts, e.g., the call:
-
- \XP{IMAGE}
-
- will produce either the text "FGL/IMAGE" or the text "agX/IMAGE". What
- I would like is:
-
- \index{\XP{IMAGE}}
-
- which should create an index entry under "F" or "A" depending on the
- flag. As you might have guessed, it puts it under "X"! Telling IdxTex
- to ignore the \XP macro works fine, but then it puts it under "I"!!!
- I've tried using \expandafter, but came up with nothing new.
-
- So, is there any way of making the \index command above work?
-
- ----------------------------------------------------------------------
- Erik Thaysen | Email: Erik.Thaysen@Odin.Uniras.DK
- UNIRAS A/S | Phone: +45 31 67 22 88
- Soeborg, Denmark | Fax: +45 31 67 22 80
- ----------------------------------------------------------------------
-