ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* colors in MPgraphic
@ 2006-01-06 12:14 Hans van der Meer
  2006-01-06 12:58 ` Mojca Miklavec
  2006-01-06 14:19 ` Taco Hoekwater
  0 siblings, 2 replies; 8+ messages in thread
From: Hans van der Meer @ 2006-01-06 12:14 UTC (permalink / raw)


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

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

* Re: colors in MPgraphic
  2006-01-06 12:14 colors in MPgraphic Hans van der Meer
@ 2006-01-06 12:58 ` Mojca Miklavec
  2006-01-06 14:08   ` Hans Hagen
  2006-01-06 14:19 ` Taco Hoekwater
  1 sibling, 1 reply; 8+ messages in thread
From: Mojca Miklavec @ 2006-01-06 12:58 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 699 bytes --]

> 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

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

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

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

* Re: colors in MPgraphic
  2006-01-06 12:58 ` Mojca Miklavec
@ 2006-01-06 14:08   ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2006-01-06 14:08 UTC (permalink / raw)


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

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

* Re: colors in MPgraphic
  2006-01-06 12:14 colors in MPgraphic Hans van der Meer
  2006-01-06 12:58 ` Mojca Miklavec
@ 2006-01-06 14:19 ` Taco Hoekwater
  2006-01-06 16:27   ` Hans van der Meer
  2006-01-06 17:56   ` Hans Hagen
  1 sibling, 2 replies; 8+ messages in thread
From: Taco Hoekwater @ 2006-01-06 14:19 UTC (permalink / raw)




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

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

* Re: colors in MPgraphic
  2006-01-06 14:19 ` Taco Hoekwater
@ 2006-01-06 16:27   ` Hans van der Meer
  2006-01-06 17:56   ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Hans van der Meer @ 2006-01-06 16:27 UTC (permalink / raw)




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

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

* Re: colors in MPgraphic
  2006-01-06 14:19 ` Taco Hoekwater
  2006-01-06 16:27   ` Hans van der Meer
@ 2006-01-06 17:56   ` Hans Hagen
  2006-01-06 20:43     ` Hans van der Meer
  1 sibling, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2006-01-06 17:56 UTC (permalink / raw)


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

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

* Re: colors in MPgraphic
  2006-01-06 17:56   ` Hans Hagen
@ 2006-01-06 20:43     ` Hans van der Meer
  2006-01-06 22:08       ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Hans van der Meer @ 2006-01-06 20:43 UTC (permalink / raw)



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_beginfig&"drawoptions(withcolor green)";?

yours sincerely,
dr. H. van der Meer

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

* Re: colors in MPgraphic
  2006-01-06 20:43     ` Hans van der Meer
@ 2006-01-06 22:08       ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2006-01-06 22:08 UTC (permalink / raw)


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_beginfig&"drawoptions(withcolor green)";?

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

Hans

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

end of thread, other threads:[~2006-01-06 22:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-06 12:14 colors in MPgraphic Hans van der Meer
2006-01-06 12:58 ` Mojca Miklavec
2006-01-06 14:08   ` Hans Hagen
2006-01-06 14:19 ` Taco Hoekwater
2006-01-06 16:27   ` Hans van der Meer
2006-01-06 17:56   ` Hans Hagen
2006-01-06 20:43     ` Hans van der Meer
2006-01-06 22:08       ` 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).