* \stretched{foo \bar} problems with expansion of \bar
@ 2001-12-06 14:11 Tobias Burnus
2001-12-06 16:16 ` Christopher Creutzig
2001-12-06 22:31 ` Taco Hoekwater
0 siblings, 2 replies; 4+ messages in thread
From: Tobias Burnus @ 2001-12-06 14:11 UTC (permalink / raw)
Hi,
First I'd like to thank Taco for the calculation work, it works
like a charm :-)
I have a seemingly simple problem (which is probably simple, but I don't
have access to the TeXbook at the moment).
I have:
\def\Semester{Wintersemester 2001/2002}
\stretcheduppercase{VORLESUNGSKRITIK ZUM \Semester}
\bye
Well, the \Semester is not expanded before the stretching is done.
Thus I have
V O R L E S U N G S K R I T I K Z U M Wintersemester 2001/2002
instead of
V O R L E S U N G S K R I T I K Z U M W I N T E R S E M E S T E R ...
Using \stretched instead of \stretcheduppercase produces error messages
(grouping). I experimented a bit with \expandafter, but I failed.
Tobias
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: \stretched{foo \bar} problems with expansion of \bar
2001-12-06 14:11 \stretched{foo \bar} problems with expansion of \bar Tobias Burnus
@ 2001-12-06 16:16 ` Christopher Creutzig
2001-12-06 22:31 ` Taco Hoekwater
1 sibling, 0 replies; 4+ messages in thread
From: Christopher Creutzig @ 2001-12-06 16:16 UTC (permalink / raw)
Tobias Burnus <tobias.burnus@physik.fu-berlin.de> writes:
> I have:
> \def\Semester{Wintersemester 2001/2002}
> \stretcheduppercase{VORLESUNGSKRITIK ZUM \Semester}
> \bye
Probably not the ConTeXt way to go, but for me it works to do:
\def\Semester{Wintersemester 2001/2002}
\edef\text{VORLESUNGSKRITIK ZUM \Semester}
\expandafter\stretcheduppercase\expandafter{\text}
\bye
--
+--+
+--+|
|+-|+ Christopher Creutzig (ccr@mupad.de)
+--+ Tel.: 05251-60-5525
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: \stretched{foo \bar} problems with expansion of \bar
2001-12-06 14:11 \stretched{foo \bar} problems with expansion of \bar Tobias Burnus
2001-12-06 16:16 ` Christopher Creutzig
@ 2001-12-06 22:31 ` Taco Hoekwater
2001-12-10 8:53 ` Hans Hagen
1 sibling, 1 reply; 4+ messages in thread
From: Taco Hoekwater @ 2001-12-06 22:31 UTC (permalink / raw)
Cc: ntg-context
Tobias Burnus wrote:
>
> Hi,
>
> First I'd like to thank Taco for the calculation work, it works
> like a charm :-)
You're welcome :)
> I have:
> \def\Semester{Wintersemester 2001/2002}
> \stretcheduppercase{VORLESUNGSKRITIK ZUM \Semester}
> \bye
\expanded{\stretcheduppercase{VORLESUNGSKRITIK ZUM \Semester}}
Should work.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: \stretched{foo \bar} problems with expansion of \bar
2001-12-06 22:31 ` Taco Hoekwater
@ 2001-12-10 8:53 ` Hans Hagen
0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2001-12-10 8:53 UTC (permalink / raw)
Cc: Tobias Burnus, ntg-context
At 11:31 PM 12/6/2001 +0100, Taco Hoekwater wrote:
>Tobias Burnus wrote:
> >
> > Hi,
> >
> > First I'd like to thank Taco for the calculation work, it works
> > like a charm :-)
>
>You're welcome :)
>
> > I have:
> > \def\Semester{Wintersemester 2001/2002}
> > \stretcheduppercase{VORLESUNGSKRITIK ZUM \Semester}
> > \bye
>
>\expanded{\stretcheduppercase{VORLESUNGSKRITIK ZUM \Semester}}
this is indeed the way to go; for those unfamiliar with the \expanded macro
(not a primitive): the first thing encountered is *not* expanded, which is
what one often wants, like in
\expanded{\somekindofcommand{the stuff to be expanded}
it even works well in cases like:
\expanded{\somecommand[first not yet expanded arg]}[second already
expanded arg]
which is more unreadable but faster than
\expanded{\somecommand[....][...]}
i something should not be expanded inside \expanded, precede it by
\noexpand (except for the first token)
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-12-10 8:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-06 14:11 \stretched{foo \bar} problems with expansion of \bar Tobias Burnus
2001-12-06 16:16 ` Christopher Creutzig
2001-12-06 22:31 ` Taco Hoekwater
2001-12-10 8:53 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).