Re: [NTG-context] useMPgraphic scaling

2016-04-26 Thread Wolfgang Schuster

Meer, Hans van der 
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
___
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
___

Re: [NTG-context] useMPgraphic scaling

2016-04-26 Thread Meer, Hans van der

On 25 Apr 2016, at 16:34, Hans Hagen <pra...@wxs.nl<mailto:pra...@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




___
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
___

Re: [NTG-context] useMPgraphic scaling

2016-04-25 Thread 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
-
___
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
___

Re: [NTG-context] useMPgraphic scaling

2016-04-25 Thread Meer, Hans van der
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 <pra...@wxs.nl<mailto:pra...@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




___
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
___

Re: [NTG-context] useMPgraphic scaling

2016-04-25 Thread Hans Hagen

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
___

[NTG-context] useMPgraphic scaling

2016-04-25 Thread Meer, Hans van der
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
___

Re: [NTG-context] How to box \useMPgraphic?

2008-11-14 Thread Oliver Buerschaper
 I'd like to insert a little MetaPost square into the running text and
 properly align it vertically. So I tried:

 ---

 \startuseMPgraphic{square}
 draw unitsquare scaled StrutHeight;
 \stopuseMPgraphic

 \starttext

 I want a square \raisebox{-\strutdepth}{\useMPgraphic{square}} in my
 running text.

 \stoptext

 ---

 Unfortunately, to no avail. TeX seems to be asking for some boxed
 content, so I tried to wrap the figure inclusion into a box:
 \hbox{\useMPgraphic{square}}. It doesn't solve the problem either.

 \inframed[frame=off]{\useMPgraphic{square}}

Thanks!

So is this the preferred command for all (horizontal) boxing related  
tasks in ConTeXt (over hbox)?

Oliver
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to box \useMPgraphic?

2008-11-14 Thread Oliver Buerschaper

Am 13.11.2008 um 18:14 schrieb Wolfgang Schuster:


 Am 13.11.2008 um 17:18 schrieb Oliver Buerschaper:

 Hello all,

 I'd like to insert a little MetaPost square into the running text and
 properly align it vertically. So I tried:

 ---

 \startuseMPgraphic{square}
draw unitsquare scaled StrutHeight;
 \stopuseMPgraphic

 \starttext

 I want a square \raisebox{-\strutdepth}{\useMPgraphic{square}} in my
 running text.

 I want a square \raisebox{-.5\strutdp}\hbox{\useMPgraphic{square}}  
 in my
 running text.

Thanks!

I was close: if I had only left out the outer braces in  
{\hbox{\useMPgraphic{square}}} ...

Oliver
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to box \useMPgraphic?

2008-11-14 Thread Hans Hagen
Oliver Buerschaper wrote:

 So is this the preferred command for all (horizontal) boxing related  
 tasks in ConTeXt (over hbox)?

if you want to position yes .. howeler, take a look in supp-box for more 
low level stuff

Hans

-
   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
-
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] How to box \useMPgraphic?

2008-11-13 Thread Oliver Buerschaper
Hello all,

I'd like to insert a little MetaPost square into the running text and  
properly align it vertically. So I tried:

---

\startuseMPgraphic{square}
 draw unitsquare scaled StrutHeight;
\stopuseMPgraphic

\starttext

I want a square \raisebox{-\strutdepth}{\useMPgraphic{square}} in my  
running text.

\stoptext

---

Unfortunately, to no avail. TeX seems to be asking for some boxed  
content, so I tried to wrap the figure inclusion into a box:  
\hbox{\useMPgraphic{square}}. It doesn't solve the problem either.

What do I need to change?

Oliver
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to box \useMPgraphic?

2008-11-13 Thread Wolfgang Schuster

Am 13.11.2008 um 17:18 schrieb Oliver Buerschaper:

 Hello all,

 I'd like to insert a little MetaPost square into the running text and
 properly align it vertically. So I tried:

 ---

 \startuseMPgraphic{square}
 draw unitsquare scaled StrutHeight;
 \stopuseMPgraphic

 \starttext

 I want a square \raisebox{-\strutdepth}{\useMPgraphic{square}} in my
 running text.

I want a square \raisebox{-.5\strutdp}\hbox{\useMPgraphic{square}} in my
running text.

 \stoptext

 ---

 Unfortunately, to no avail. TeX seems to be asking for some boxed
 content, so I tried to wrap the figure inclusion into a box:
 \hbox{\useMPgraphic{square}}. It doesn't solve the problem either.

Wolfgang

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Recomputing useMPgraphic in footers

2005-05-09 Thread David Antos

Hello,

I have

\defineoverlay[Wave][\useMPgraphic{Wave}]

\startuseMPgraphic{Wave}
...
\stopuseMPgraphic

\setupbackgrounds[footer][text][background={Wave}]

The problem is that the graphics is not re-computed on every page,
although I pretty convinced it should.

On the opposite, when I set
\setupbackgrounds[text][text][background={Wave}]
it works perfectly well. (The difference is in [footer] vs. [text].)

An ugly workaround is to call \setupbackgrounds on every page, but it's
not nice at all. What went wrong?

Thanks,
D.A.

-- 
Trust no man, not even your brother
With hair one colour and beard another
-- Ty Semaka (The Plaid Tongued Devils): never drown a cat
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Recomputing useMPgraphic in footers

2005-05-09 Thread Hans Hagen
David Antos wrote:
Hello,
I have
\defineoverlay[Wave][\useMPgraphic{Wave}]
\startuseMPgraphic{Wave}
...
\stopuseMPgraphic
\setupbackgrounds[footer][text][background={Wave}]
The problem is that the graphics is not re-computed on every page,
although I pretty convinced it should.
On the opposite, when I set
\setupbackgrounds[text][text][background={Wave}]
it works perfectly well. (The difference is in [footer] vs. [text].)
An ugly workaround is to call \setupbackgrounds on every page, but it's
not nice at all. What went wrong?
as already mentioned (by taco): \setupbackgrounds[state=repeat]
only page and text area backgrounds are recalculated each page (otherwise the 
speed penalty is too big]

an option is to do something:
\setupbackgrounds[page][background=PageBackground]
\defineoverlay[PageBackground][\reuseMPgraphic{PageBackground}]
\startreusableMPgraphic{PageBackground}
  StartPage ;
fill Field[Text][Footer] withcolor red ;
  StopPage ;
\stopreusableMPgraphic
(see metafun manual for details on the page stuff)
Hans
-
  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


[NTG-context] semicolon in \useMPgraphic btex ... etex

2004-10-16 Thread Laurent Chéno
(* Please excuse my poor english *)
Semicolon usage in btex ... etex seems weird to me. Can you help me ?
The following source don't produce the expected result :
% WRONG
\startuseMPgraphic{test}

dotlabel.top(btex 2;3 etex, (0,0)) ;
\stopuseMPgraphic
\starttext
\midaligned{\useMPgraphic{test}}
\stoptext
\end
%-
But the following is ok :
%-- OK
\startuseMPgraphic{test}

dotlabel.top(btex 2,3 etex, (0,0)) ;
\stopuseMPgraphic
\starttext
\midaligned{\useMPgraphic{test}}
\stoptext
\end
%-
I have the same problem withbtex $2;3$ etex
Thank you for any help,
best regards,
Laurent Chéno
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] semicolon in \useMPgraphic btex ... etex

2004-10-16 Thread Taco Hoekwater

Hi there,

Weird, I thought this was fixed in 1999 somewhere?

Anyway, try adding 

\longMPlinestrue

in your preamble.

Greetings, Taco

On Sat, 16 Oct 2004 08:33:31 +0200
Laurent Chéno [EMAIL PROTECTED] wrote:

 (* Please excuse my poor english *)
 
 Semicolon usage in btex ... etex seems weird to me. Can you help me ?
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context