home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / text / tex / 14637 < prev    next >
Encoding:
Internet Message Format  |  1993-01-05  |  1.2 KB

  1. Path: sparky!uunet!usc!elroy.jpl.nasa.gov!swrinde!emory!cs.utk.edu!cs.utk.edu!eijkhout
  2. From: eijkhout@cupid.cs.utk.edu (Victor Eijkhout)
  3. Newsgroups: comp.text.tex
  4. Subject: Re: Forcing expansions in Tex
  5. Date: 5 Jan 93 16:54:07
  6. Organization: /pearl/homes/eijkhout/.organization
  7. Lines: 24
  8. Message-ID: <EIJKHOUT.93Jan5165407@cupid.cs.utk.edu>
  9. References: <MANDAL.93Jan5124200@rose.cis.ohio-state.edu>
  10.     <EIJKHOUT.93Jan5155258@cupid.cs.utk.edu>
  11. NNTP-Posting-Host: cupid.cs.utk.edu
  12. In-reply-to: eijkhout@cupid.cs.utk.edu's message of 5 Jan 93 15:52:58
  13.  
  14. In article <EIJKHOUT.93Jan5155258@cupid.cs.utk.edu> eijkhout@cupid.cs.utk.edu (me, in other words) writes:
  15.  
  16.    The best I can come up with right now is the following:
  17.        \edef\tmp{\noexpand\typeout{\thechapter}}
  18.        \uppercase\expandafter{\tmp}
  19.    which you hide of course in a macro because it's ugly.
  20.  
  21. I'm so embarrassed. I forgot to say that you have to define
  22.     \def\thechapter{\roman{chapter}}
  23. that is, lowercase, because this is fully expandable.
  24.  
  25. Evidence (from interactive run):
  26.  
  27. *\setcounter{chapter}3
  28. *\def\thechapter{\roman{chapter}}
  29. *\edef\tmp{\noexpand\typeout{\thechapter}}
  30. *\uppercase\expandafter{\tmp}
  31. III
  32.  
  33. See?
  34.  
  35. --
  36. Victor
  37. ``I have seen this funny quote, if only I could find it back.''
  38.