* using \doifmodeelse the right way
@ 2006-04-19 16:14 Peter Münster
2006-04-19 17:39 ` Hans Hagen
0 siblings, 1 reply; 2+ messages in thread
From: Peter Münster @ 2006-04-19 16:14 UTC (permalink / raw)
Hello,
\externalfigure[prefix-\doifmodeelse{blub}{blub}{notblub}][width=0.5\textwidth]
does not work.
I tried some combination of \expanded, \unexpanded, \expandafter etc but
without success. In the end, I write:
\doifmodeelse{blub}{%
\externalfigure[prefix-blub][width=0.5\textwidth]}{%
\externalfigure[prefix-notblub][width=0.5\textwidth]}
Is this the most elegant way, or do you know better?
(I would prefer less redundancy)
Cheers, Peter
--
http://pmrb.free.fr/contact/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: using \doifmodeelse the right way
2006-04-19 16:14 using \doifmodeelse the right way Peter Münster
@ 2006-04-19 17:39 ` Hans Hagen
0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2006-04-19 17:39 UTC (permalink / raw)
� wrote:
> Hello,
>
> \externalfigure[prefix-\doifmodeelse{blub}{blub}{notblub}][width=0.5\textwidth]
> does not work.
>
> I tried some combination of \expanded, \unexpanded, \expandafter etc but
> without success. In the end, I write:
> \doifmodeelse{blub}{%
> \externalfigure[prefix-blub][width=0.5\textwidth]}{%
> \externalfigure[prefix-notblub][width=0.5\textwidth]}
>
you can use prefixes in the figuremechanism (see documentation about
resource libs etc); it's part of a mechanism for runtime conversion
(like downsampling) in combination with caching and such
> Is this the most elegant way, or do you know better?
> (I would prefer less redundancy)
>
like
\doifmodeelse{blub} {
\useexternalfigure[blub][prefix-blub]
} {
\useexternalfigure[blub][prefix-noblub]
}
\externalfigure[blub][width=0.5\textwidth]
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-19 17:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-19 16:14 using \doifmodeelse the right way Peter Münster
2006-04-19 17:39 ` 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).