[NTG-context] colors in MPgraphic

2006-01-06 Thread Hans van der Meer

In MPgrapic I do want my own colors for drawing lines etc.
These are set up in plain.mf's (_op_ and background).
In \startMPinclusions I just do that in order to get the drawing  
color I want.
But then \startMPgraphic appears to reset colors (both _op_ and  
background I suspect).
Can this be changed? In plain.mf there is already a setup, so there  
seems no reason for \startMPgraphic to interfere.
It would be nice if the color setup done in \startMPinclusions would  
be honored.
It is a nuisance to have them set up in a special initalization file  
and then being forced to repeat this at the start of every graphic.


Question: what tinkering with metapost parameters is done in  
\startMPgraphic exactly? (I could not find out readily from the  
ConTeXt sources)
Which of these can be removed without danger for its operation,  
leaving settings in \startMPinclusions unchanged -- and will that be  
done?


yours sincerely,
dr. H. van der Meer



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] colors in MPgraphic

2006-01-06 Thread Mojca Miklavec
 Question: what tinkering with metapost parameters is done in
 \startMPgraphic exactly? (I could not find out readily from the
 ConTeXt sources)
 Which of these can be removed without danger for its operation,
 leaving settings in \startMPinclusions unchanged -- and will that be
 done?

Hans will probably answer you better, but in
http://source.contextgarden.net/metafun.mp
there are files with metafun macros included which may set their own
colors. See those files.

I doubt that any definitions can be removed without breaking anything
(otherwise they wouldn't be there), but I agree that MPinclusions
could/should be included AFTER metafun macros if they're not (I didn't
check).

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] colors in MPgraphic

2006-01-06 Thread Hans Hagen

Mojca Miklavec wrote:


Question: what tinkering with metapost parameters is done in
\startMPgraphic exactly? (I could not find out readily from the
ConTeXt sources)
Which of these can be removed without danger for its operation,
leaving settings in \startMPinclusions unchanged -- and will that be
done?
   



Hans will probably answer you better, but in
http://source.contextgarden.net/metafun.mp
there are files with metafun macros included which may set their own
colors. See those files.

I doubt that any definitions can be removed without breaking anything
(otherwise they wouldn't be there), but I agree that MPinclusions
could/should be included AFTER metafun macros if they're not (I didn't
check).
 



(1) metafun is a format and will be loaded first
(2) inclusion scome after loading the format
(3) context only sets a bunch of variables which tell metafun certain 
things


i'm not sure what you mean with tinkering

what parameters give you problems?

concerning backgrounds  and plain.mf ... metafont has bacckgrounds, 
metapost doesn't ; in mp the background is used for unfilling


if you want to set the background / add own stuff you can probably best 
append the relevant settings / definitions to the extra_beginfig string 
(grep for that one)


Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] colors in MPgraphic

2006-01-06 Thread Taco Hoekwater



Hans van der Meer wrote:

In MPgrapic I do want my own colors for drawing lines etc.
These are set up in plain.mf's (_op_ and background).
In \startMPinclusions I just do that in order to get the drawing  color 
I want.
But then \startMPgraphic appears to reset colors (both _op_ and  
background I suspect).


The resetfig() macro from metafun clears _op_ and background.
I don't know why, but there''' be a reason for it, I am sure ;-)

There almost certainly is an 'official' way to add some statements to
the beginning of each figure, but, in any case, it works if you store
your settings in extra_beginfig:

  \startMPinclusions
  extra_beginfig := drawoptions(withcolor green);
  \stopMPinclusions


Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] colors in MPgraphic

2006-01-06 Thread Hans Hagen

Taco Hoekwater wrote:




Hans van der Meer wrote:


In MPgrapic I do want my own colors for drawing lines etc.
These are set up in plain.mf's (_op_ and background).
In \startMPinclusions I just do that in order to get the drawing  
color I want.
But then \startMPgraphic appears to reset colors (both _op_ and  
background I suspect).



The resetfig() macro from metafun clears _op_ and background.
I don't know why, but there''' be a reason for it, I am sure ;-)


sure -) [i need to think a bit]



There almost certainly is an 'official' way to add some statements to
the beginning of each figure, but, in any case, it works if you store
your settings in extra_beginfig:

  \startMPinclusions
  extra_beginfig := drawoptions(withcolor green);
  \stopMPinclusions


maybe best is to append instead of assign

Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] colors in MPgraphic

2006-01-06 Thread Hans van der Meer



On Jan 6, 2006, at 15:19, Taco Hoekwater wrote:


There almost certainly is an 'official' way to add some statements to
the beginning of each figure, but, in any case, it works if you store
your settings in extra_beginfig:

  \startMPinclusions
  extra_beginfig := drawoptions(withcolor green);
  \stopMPinclusions


Didn't know about extra_beginfig but that did the trick.
Thanks!

yours sincerely,
dr. H. van der Meer


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] colors in MPgraphic

2006-01-06 Thread Hans van der Meer


On Jan 6, 2006, at 18:56, Hans Hagen wrote:



There almost certainly is an 'official' way to add some statements to
the beginning of each figure, but, in any case, it works if you store
your settings in extra_beginfig:

  \startMPinclusions
  extra_beginfig := drawoptions(withcolor green);
  \stopMPinclusions


maybe best is to append instead of assign



I am not sure about the exact syntax of that append.
Is there a special macro in the context/metafun package or is it
extra_beginfig := extra_beginfigdrawoptions(withcolor green);?

yours sincerely,
dr. H. van der Meer


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] colors in MPgraphic

2006-01-06 Thread Hans Hagen

Hans van der Meer wrote:



I am not sure about the exact syntax of that append.
Is there a special macro in the context/metafun package or is it
extra_beginfig := extra_beginfigdrawoptions(withcolor green);?


that's indeed an append (or actually a concat)

Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context