home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / text / tex / 11091 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  1.3 KB

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