Article View: comp.text.tex
Article #10951Re: Forcing expansions in Tex
From: Victor Eijkhout
Date: Tue, 05 Jan 1993 16:54
Date: Tue, 05 Jan 1993 16:54
24 lines
1286 bytes
1286 bytes
In article <EIJKHOUT.93Jan5155258@cupid.cs.utk.edu> eijkhout@cupid.cs.utk.edu (me, in other words) writes:
The best I can come up with right now is the following:
\edef\tmp{\noexpand\typeout{\thechapter}}
\uppercase\expandafter{\tmp}
which you hide of course in a macro because it's ugly.
I'm so embarrassed. I forgot to say that you have to define
\def\thechapter{\roman{chapter}}
that is, lowercase, because this is fully expandable.
Evidence (from interactive run):
*\setcounter{chapter}3
*\def\thechapter{\roman{chapter}}
*\edef\tmp{\noexpand\typeout{\thechapter}}
*\uppercase\expandafter{\tmp}
III
See?
--
Victor
``I have seen this funny quote, if only I could find it back.''
Technical Details
Message-ID:
<EIJKHOUT.93Jan5165407@cupid.cs.utk.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!elroy.jpl.nasa.gov!swrinde!emory!cs.utk.edu!cs.utk.edu!eijkhoutReferences:
<MANDAL.93Jan5124200@rose.cis.ohio-state.edu> <EIJKHOUT.93Jan5155258@cupid.cs.utk.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!elroy.jpl.nasa.gov!swrinde!emory!cs.utk.edu!cs.utk.edu!eijkhout From: eijkhout@cupid.cs.utk.edu (Victor Eijkhout) Newsgroups: comp.text.tex Subject: Re: Forcing expansions in Tex Date: 5 Jan 93 16:54:07 Organization: /pearl/homes/eijkhout/.organization Lines: 24 Message-ID: <EIJKHOUT.93Jan5165407@cupid.cs.utk.edu> References: <MANDAL.93Jan5124200@rose.cis.ohio-state.edu> <EIJKHOUT.93Jan5155258@cupid.cs.utk.edu> NNTP-Posting-Host: cupid.cs.utk.edu In-reply-to: eijkhout@cupid.cs.utk.edu's message of 5 Jan 93 15:52:58