* metafun shared code
@ 2011-09-19 15:01 Marcin Borkowski
2011-09-19 15:19 ` Meer, H. van der
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Marcin Borkowski @ 2011-09-19 15:01 UTC (permalink / raw)
To: ConTeXt mailing list
Hi all,
I'd like to have some MP code shared between unique graphics (in MkIV).
One example: I'd like to have drawoptions <something> for all graphics.
Another one: I'd like to have two similar (but different) unique
graphics, and I'd like them to share some code.
How to do these two things?
Best
--
Marcin Borkowski
http://mbork.pl
___________________________________________________________________________________
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] 7+ messages in thread
* Re: metafun shared code
2011-09-19 15:01 metafun shared code Marcin Borkowski
@ 2011-09-19 15:19 ` Meer, H. van der
2011-09-19 15:19 ` Aditya Mahajan
2011-09-19 15:21 ` Peter Rolf
2 siblings, 0 replies; 7+ messages in thread
From: Meer, H. van der @ 2011-09-19 15:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
I am using code between \startMPinclusions .. \stopMPinclusions while later additions can be accumulated with \startMPinclusions[+] .. \stopMPinclusions
Hans van der Meer
On 19 sep. 2011, at 17:01, Marcin Borkowski wrote:
> Hi all,
>
> I'd like to have some MP code shared between unique graphics (in MkIV).
>
> One example: I'd like to have drawoptions <something> for all graphics.
>
> Another one: I'd like to have two similar (but different) unique
> graphics, and I'd like them to share some code.
>
> How to do these two things?
>
> Best
>
> --
> Marcin Borkowski
> http://mbork.pl
>
___________________________________________________________________________________
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] 7+ messages in thread
* Re: metafun shared code
2011-09-19 15:01 metafun shared code Marcin Borkowski
2011-09-19 15:19 ` Meer, H. van der
@ 2011-09-19 15:19 ` Aditya Mahajan
2011-09-19 15:29 ` Marcin Borkowski
2011-09-19 15:21 ` Peter Rolf
2 siblings, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2011-09-19 15:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Mon, 19 Sep 2011, Marcin Borkowski wrote:
> I'd like to have some MP code shared between unique graphics (in MkIV).
>
> One example: I'd like to have drawoptions <something> for all graphics.
\startMPinclusions
drawoptions(...) ;
\stopMPinclusions
> Another one: I'd like to have two similar (but different) unique
> graphics, and I'd like them to share some code.
\startuseMPgraphic{common}
...
\stopuseMPgraphic
\startuseMPgraphic{one}
\includeMPgraphic{common}
....
\stopuseMPgraphic
\startuseMPgraphic{two}
\includeMPgraphic{common}
....
\stopuseMPgraphic
Aditya
___________________________________________________________________________________
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] 7+ messages in thread
* Re: metafun shared code
2011-09-19 15:01 metafun shared code Marcin Borkowski
2011-09-19 15:19 ` Meer, H. van der
2011-09-19 15:19 ` Aditya Mahajan
@ 2011-09-19 15:21 ` Peter Rolf
2 siblings, 0 replies; 7+ messages in thread
From: Peter Rolf @ 2011-09-19 15:21 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 19.09.2011 17:01, schrieb Marcin Borkowski:
> Hi all,
>
> I'd like to have some MP code shared between unique graphics (in MkIV).
>
> One example: I'd like to have drawoptions <something> for all graphics.
>
> Another one: I'd like to have two similar (but different) unique
> graphics, and I'd like them to share some code.
>
> How to do these two things?
>
\startMPinitializations
<global defs here>
\stopMPinitializations
Can be used multiple times (no reset of previous data).
> Best
>
___________________________________________________________________________________
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] 7+ messages in thread
* Re: metafun shared code
2011-09-19 15:19 ` Aditya Mahajan
@ 2011-09-19 15:29 ` Marcin Borkowski
2011-09-19 21:43 ` Aditya Mahajan
0 siblings, 1 reply; 7+ messages in thread
From: Marcin Borkowski @ 2011-09-19 15:29 UTC (permalink / raw)
To: ntg-context
Dnia 2011-09-19, pon o godzinie 11:19 -0400, Aditya Mahajan pisze:
> On Mon, 19 Sep 2011, Marcin Borkowski wrote:
>
> > I'd like to have some MP code shared between unique graphics (in MkIV).
> >
> > One example: I'd like to have drawoptions <something> for all graphics.
>
> \startMPinclusions
> drawoptions(...) ;
> \stopMPinclusions
Thanks!
>
> > Another one: I'd like to have two similar (but different) unique
> > graphics, and I'd like them to share some code.
>
> \startuseMPgraphic{common}
> ...
> \stopuseMPgraphic
>
> \startuseMPgraphic{one}
> \includeMPgraphic{common}
> ....
> \stopuseMPgraphic
>
> \startuseMPgraphic{two}
> \includeMPgraphic{common}
> ....
> \stopuseMPgraphic
And what about *unique* graphics?
>
> Aditya
Best,
--
Marcin Borkowski
http://mbork.pl
___________________________________________________________________________________
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] 7+ messages in thread
* Re: metafun shared code
2011-09-19 15:29 ` Marcin Borkowski
@ 2011-09-19 21:43 ` Aditya Mahajan
2011-09-19 23:37 ` Marcin Borkowski
0 siblings, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2011-09-19 21:43 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Mon, 19 Sep 2011, Marcin Borkowski wrote:
> Dnia 2011-09-19, pon o godzinie 11:19 -0400, Aditya Mahajan pisze:
>> On Mon, 19 Sep 2011, Marcin Borkowski wrote:
>>
>>> I'd like to have some MP code shared between unique graphics (in MkIV).
>>>
>>> One example: I'd like to have drawoptions <something> for all graphics.
>>
>> \startMPinclusions
>> drawoptions(...) ;
>> \stopMPinclusions
>
> Thanks!
>
>>
>>> Another one: I'd like to have two similar (but different) unique
>>> graphics, and I'd like them to share some code.
>>
>> \startuseMPgraphic{common}
>> ...
>> \stopuseMPgraphic
>>
>> \startuseMPgraphic{one}
>> \includeMPgraphic{common}
>> ....
>> \stopuseMPgraphic
>>
>> \startuseMPgraphic{two}
>> \includeMPgraphic{common}
>> ....
>> \stopuseMPgraphic
>
> And what about *unique* graphics?
\includeMPgraphics should also work inside unique graphics. In any case,
in MkIV, MP processing is extremely fast, so uniqueMPgraphics is not
really needed.
Aditya
___________________________________________________________________________________
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] 7+ messages in thread
* Re: metafun shared code
2011-09-19 21:43 ` Aditya Mahajan
@ 2011-09-19 23:37 ` Marcin Borkowski
0 siblings, 0 replies; 7+ messages in thread
From: Marcin Borkowski @ 2011-09-19 23:37 UTC (permalink / raw)
To: ntg-context
Dnia 2011-09-19, o godz. 17:43:29
Aditya Mahajan <adityam@umich.edu> napisał(a):
> On Mon, 19 Sep 2011, Marcin Borkowski wrote:
>
> > Dnia 2011-09-19, pon o godzinie 11:19 -0400, Aditya Mahajan pisze:
> >> On Mon, 19 Sep 2011, Marcin Borkowski wrote:
> >>
> >>> I'd like to have some MP code shared between unique graphics (in
> >>> MkIV).
> >>>
> >>> One example: I'd like to have drawoptions <something> for all
> >>> graphics.
> >>
> >> \startMPinclusions
> >> drawoptions(...) ;
> >> \stopMPinclusions
> >
> > Thanks!
> >
> >>
> >>> Another one: I'd like to have two similar (but different) unique
> >>> graphics, and I'd like them to share some code.
> >>
> >> \startuseMPgraphic{common}
> >> ...
> >> \stopuseMPgraphic
> >>
> >> \startuseMPgraphic{one}
> >> \includeMPgraphic{common}
> >> ....
> >> \stopuseMPgraphic
> >>
> >> \startuseMPgraphic{two}
> >> \includeMPgraphic{common}
> >> ....
> >> \stopuseMPgraphic
> >
> > And what about *unique* graphics?
>
> \includeMPgraphics should also work inside unique graphics. In any
> case, in MkIV, MP processing is extremely fast, so uniqueMPgraphics
> is not really needed.
I see, I'll check it tomorrow (it's 1:36am here now;)). One question,
though: isn't unique graphic better than "useMPgraphic" in terms of the
resulting pdf file size?
> Aditya
Best,
--
Marcin Borkowski
___________________________________________________________________________________
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] 7+ messages in thread
end of thread, other threads:[~2011-09-19 23:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-19 15:01 metafun shared code Marcin Borkowski
2011-09-19 15:19 ` Meer, H. van der
2011-09-19 15:19 ` Aditya Mahajan
2011-09-19 15:29 ` Marcin Borkowski
2011-09-19 21:43 ` Aditya Mahajan
2011-09-19 23:37 ` Marcin Borkowski
2011-09-19 15:21 ` Peter Rolf
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).