With images one can scale them on placement, for example \externalfigure[][scale=250,height=..] etc. Is such a scaling or separate height,width setting also possible with the placement of useMPgraphic? Or needs all scaling of thesebe done within the metapost/metafun code? Hans van der Meer
On 4/25/2016 1:11 PM, Meer, Hans van der wrote:
With images one can scale them on placement, for example \externalfigure[][scale=250,height=..] etc. Is such a scaling or separate height,width setting also possible with the placement of useMPgraphic? Or needs all scaling of thesebe done within the metapost/metafun code?
\scale[...]{} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Thanks,
Your reply popped up here exactly the moment I saw the light! Must be something
Messed up the order things:
Was:
\scale[\scalesetting]{%
\expanded{\useMPgraphic{\xmlatt{#1}{name}}{\xmlatt{#1}{parameters}}}}%
And of course had to be:
\expanded{\scale[\scalesetting]{%
\useMPgraphic{\xmlatt{#1}{name}}{\xmlatt{#1}{parameters}}}}%
On 25 Apr 2016, at 13:22, Hans Hagen
On 4/25/2016 3:46 PM, Meer, Hans van der wrote:
Thanks,
Your reply popped up here exactly the moment I saw the light! Must be something Messed up the order things:
Was: \scale[\scalesetting]{% \expanded{\useMPgraphic{\xmlatt{#1}{name}}{\xmlatt{#1}{parameters}}}}%
And of course had to be: \expanded{\scale[\scalesetting]{% \useMPgraphic{\xmlatt{#1}{name}}{\xmlatt{#1}{parameters}}}}%
is the \expanded really needed? ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 25 Apr 2016, at 16:34, Hans Hagen
Meer, Hans van der mailto:H.vanderMeer@uva.nl 26. April 2016 um 08:50
Sure, is needed. Checked it again. I define \scalesetting as \edef\scalesetting{scale=\xmlattdef{#1}{scale}{1000}} But I am not sure why this needs the expansion..
The enclosing \rotate[rotation=\xmlattdef{#1}{rotation}{0}]{...} does not need the\expanded.
The exapnsion is need for this part only: \scale[\scalesetting] ConTeXt checks if the argument contains an assignment which isn't the case unless you expand \scalesetting and it sees the = in the argument. Wolfgang
participants (3)
-
Hans Hagen
-
Meer, Hans van der
-
Wolfgang Schuster