ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* useMPgraphic scaling
@ 2016-04-25 11:11 Meer, Hans van der
  2016-04-25 11:22 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Meer, Hans van der @ 2016-04-25 11:11 UTC (permalink / raw)
  To: NTG ConTeXt

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




___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: useMPgraphic scaling
  2016-04-25 11:11 useMPgraphic scaling Meer, Hans van der
@ 2016-04-25 11:22 ` Hans Hagen
  2016-04-25 13:46   ` Meer, Hans van der
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2016-04-25 11:22 UTC (permalink / raw)
  To: ntg-context

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: useMPgraphic scaling
  2016-04-25 11:22 ` Hans Hagen
@ 2016-04-25 13:46   ` Meer, Hans van der
  2016-04-25 14:34     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Meer, Hans van der @ 2016-04-25 13:46 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 819 bytes --]

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 <pragma@wxs.nl<mailto:pragma@wxs.nl>> wrote:

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 van der Meer





[-- Attachment #1.2: Type: text/html, Size: 2257 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: useMPgraphic scaling
  2016-04-25 13:46   ` Meer, Hans van der
@ 2016-04-25 14:34     ` Hans Hagen
  2016-04-26  6:50       ` Meer, Hans van der
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2016-04-25 14:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: useMPgraphic scaling
  2016-04-25 14:34     ` Hans Hagen
@ 2016-04-26  6:50       ` Meer, Hans van der
  2016-04-26  7:15         ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Meer, Hans van der @ 2016-04-26  6:50 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 825 bytes --]


On 25 Apr 2016, at 16:34, Hans Hagen <pragma@wxs.nl<mailto:pragma@wxs.nl>> wrote:

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?

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.

Hans van der Meer





[-- Attachment #1.2: Type: text/html, Size: 3869 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: useMPgraphic scaling
  2016-04-26  6:50       ` Meer, Hans van der
@ 2016-04-26  7:15         ` Wolfgang Schuster
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2016-04-26  7:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 578 bytes --]

> 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

[-- Attachment #1.2: Type: text/html, Size: 1990 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-04-26  7:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-25 11:11 useMPgraphic scaling Meer, Hans van der
2016-04-25 11:22 ` Hans Hagen
2016-04-25 13:46   ` Meer, Hans van der
2016-04-25 14:34     ` Hans Hagen
2016-04-26  6:50       ` Meer, Hans van der
2016-04-26  7:15         ` Wolfgang Schuster

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).