://wiki.contextgarden.net
>
> ___
>
% Metafun
% filename: moons.tex
% Boede 2021
% \setupbodyfont[plex,ss,14pt]
\defineMPinstance
[Moon]
[metafun]
[]
\startMPinclusions[]{Moon}
numeric w,h;
path p[];
pai
;being defined and doesn't occur in the old version where the file is input.
>"boxrow.mp" is not in the same directory as the document but is in the
>configured through the usepath/usesubpath interface from an environment file.
I can put together and share a runnable MWE set of files
directory as the document but is in the
>configured through the usepath/usesubpath interface from an environment file.
I can put together and share a runnable MWE set of files if this information is
not complete enough to identify the problem.
Here is the MWE that I used for the inpu
boxrow.mp" is not in the same directory as the
document but is in the configured through the usepath/usesubpath
interface from an environment file.
I can put together and share a runnable MWE set of files if this
information is not complete enough to identify the problem.
Here is the MWE that
directory as the document but is in the
>configured through the usepath/usesubpath interface from an environment file.
I can put together and share a runnable MWE set of files if this information is
not complete enough to identify the problem.
Here is the MWE that I used for the input fi
or your help: Otared
PS: Here is my definition of GridAxis (I guess many parts of it could be better
written…)
\defineMPinstance[GridAxis]
[
format=metafun,
extensions=yes,
initializations=yes,
method=double,
]
;
> > as can line widths, etc.
>
> Shouldn't we use a dedicated MP instance for stackers?
MPinitializations are shared by all instances (normally), that is if
initializations=yes is set in \defineMPinstance.
Alan
__
are rotated 45) scaled 1cm;
draw textext("2");
);
\stopMPinitializations
\defineMPinstance[foo][initializations=yes]
\startMPcode{foo}
picture q;
q := image(
draw fullcircle scaled 1cm;
draw textext("3");
);
;
>> picture p;
>>
>> p := image(
>>
>> draw fullsquare scaled 1cm;
>>
>> draw textext("1");
>>
>> );
>>
>> \stopMPinitializations
>>
>> \startMPinitializations
>>
>> picture s;
>>
>> s := ima
uare rotated 45) scaled 1cm;
draw textext("2");
);
\stopMPinitializations
\defineMPinstance[foo][initializations=yes]
\startMPcode{foo}
picture q;
q := image(
draw fullcircle scaled 1cm;
draw textext("3");
);
draw q;
\stopMPcode
\startMPcode{foo}
draw p;
draw q shi
1cm;
draw textext("2");
);
\stopMPinitializations
\defineMPinstance[foo][initializations=yes]
\startMPcode{foo}
picture q;
q := image(
draw fullcircle scaled 1cm;
draw textext("3");
);
draw q;
\stopMPcode
\startMPcode{foo}
draw p;
draw q shifted (2cm, 0);
draw s shifted (4cm
Alan Braslau wrote:
For example, I work with a "3D" instance of MP:
\defineMPinstance
[three]
[format=metafun,
extensions=yes,
initializations=yes,
method=double]
\startMPdefinitions{three}
input three ;
\stopMPdefinitions
Where three.mp contains my 3D projection macros.
U
me
> > format metafun mpost
> > etc.
> >
> > I read this as:
> > in the first argument one can specify a name presumably a name
> > specified on \defineMPinstance. in the second argument
> > [format=metafun] specifies the format. But then the example under
&
a name specified on
\defineMPinstance.
in the second argument [format=metafun] specifies the format.
But then the example under Usage gives:
\setupMPinstance[metafun][...]
Why metafun in the first instead of the second argument as implied in the
syntax description?
I get confused here.
Also in
I do not understand the info in the ConTeXt wiki on setupMPinstance.
The syntax is specified as \setupMPinstance[...][...,...=...,...0
[...] name
format metafun mpost
etc.
I read this as:
in the first argument one can specify a name presumably a name specified on
\defineMPinstance.
in the
his complicated, but it works for me and I would rather like
not having to change may things all over the place.
Now I learn from the ConTeXtgarden that startMPenvironment is
deprecated and that I should use defineMPinstance and
setupMPinstance instead.
Thus I tried
\defineMPinstance[mp
ge may things all over
the place.
Now I learn from the ConTeXtgarden that startMPenvironment is deprecated and
that I should use defineMPinstance and setupMPinstance instead.
Thus I tried
\defineMPinstance[mp:local][metafun][setups=mp:smallfont,textcolor=red]
\startsetups mp:smallfont
\switchtobo
startMPenvironment is deprecated and
that I should use defineMPinstance and setupMPinstance instead.
Thus I tried
\defineMPinstance[mp:local][metafun][setups=mp:smallfont,textcolor=red]
\startsetups mp:smallfont
\switchtobodyfont[small]
\stopsetups
\startMPpage and also \startMPpage[mp:local
use defineMPinstance and setupMPinstance instead.
Thus I tried
\defineMPinstance[mp:local][metafun][setups=mp:smallfont,textcolor=red]
\startsetups mp:smallfont
\switchtobodyfont[small]
\stopsetups
\startMPpage and also \startMPpage[mp:local]
% metafont code
\stopMPpage
\stoptext
\endinput
caused by the metafun format.
According to the wiki page
http://wiki.contextgarden.net/Command/defineMPinstance the instances "metapost"
and "metafun" are predefined and can be used by
\startMPcode{instance}
...
\stopMPcode
where metafun is the default instance, i.e. u
gt; draw (0,0) -- (1cm,0) ;
> \stopMPcode
>
> why the {metapost}
I wanted to know if the impact of clipping is caused by the metafun format.
According to the wiki page
http://wiki.contextgarden.net/Command/defineMPinstance the instances "metapost"
and "metafun" are predefi
://wiki.contextgarden.net/Command/defineMPinstance
Is there any update on this? This bug breaks the visualcounter module.
I am including a smaller minimal example:
\defineMPinstance
[important]
[metafun]
[textcolor=red]
\starttext
\startMPcode{important}
draw textext("Am I red?") ;
\
/defineMPinstance
Is there any update on this? This bug breaks the visualcounter module.
I am including a smaller minimal example:
\defineMPinstance
[important]
[metafun]
[textcolor=red]
\starttext
\startMPcode{important}
draw textext("Am I red?") ;
\stopMPcode
\stoptext
It fails als
Am 21.04.2014 um 22:18 schrieb Aditya Mahajan :
> On Tue, 15 Apr 2014, Aditya Mahajan wrote:
>
>> textcolor does not work any longer with MPinstance. Consider the following
>> example from the wiki: http://wiki.contextgarden.net/Command/defineMPinstance
>
> Is there
On Tue, 15 Apr 2014, Aditya Mahajan wrote:
textcolor does not work any longer with MPinstance. Consider the following
example from the wiki: http://wiki.contextgarden.net/Command/defineMPinstance
Is there any update on this? This bug breaks the visualcounter module.
I am including a smaller
Hi,
textcolor does not work any longer with MPinstance. Consider the following
example from the wiki:
http://wiki.contextgarden.net/Command/defineMPinstance
\defineMPinstance
[important]
[metafun] % needs to be inherited from the global metafun instance
[textcolor=red
els
Or maybe even a higher-level switch:
\defineMPinstance
[fun-with-old-MP]
[metafun]
[compatibility=plain] %% default* | plain
As I wouldn't be surprised if there were more differences we need
to handle.
maybe later
We will
plain_compatibity_data ;
enddef ;
Or maybe even a higher-level switch:
\defineMPinstance
[fun-with-old-MP]
[metafun]
[compatibility=plain] %% default* | plain
> As I wouldn't be surprised if there were more differences we need
> to handle.
We will find out
test idea how to
>> account for this in the module without a major rewrite. In case that
>> Hans wants to keep the new functionality, I either need [quite some]
>> help with the module or I'll simply stick to TeX Live 2012 for the
>> foreseeable future ;)
>
>
> For the
iable. The setups key from \defineMPinstance seems to to the job, but
it's TeX, not MetaPost. What comes to mind is a \processMPbuffer before
every MPgraphic:
\startbuffer[foo]
size := \somesize ;
\stopbuffer
\startuseMPgraphic{alpha}
fill unitcircle scaled size;
\stopuseMPgraphic
;
\stopuseMPgraphic
\starttext
\def\somesize{1cm}
\useMPgraphic{alpha} %% diameter = 1cm
\def\somesize{2cm}
\useMPgraphic{alpha} %% diameter = 1cm
\stoptext
I looked into \setupMPvariables, but I couldn't manage to assign them to an
MP variable. The setups key from \defineMPinstance seems
On 2/23/2013 9:03 PM, Marco Patzer wrote:
\defineMPinstance
[myinstance]
[metafun]
[textcolor=green]
\starttext
\startMPpage
draw textext("Foo") scaled 1cm;
\stopMPpage
\stoptext
You can add this to cont-new.mkiv:
\unprotect
\def\c!instance{instance}
\unex
Hi,
how to specify a particular MP instance for a MPpage?
\defineMPinstance
[myinstance]
[metafun]
[textcolor=green]
\starttext
\startMPpage
draw textext("Foo") scaled 1cm;
\stopMPpage
\stoptext
Marco
signature.asc
Description: Digital
t for this in the module without a major rewrite. In case that
Hans wants to keep the new functionality, I either need [quite some]
help with the module or I'll simply stick to TeX Live 2012 for the
foreseeable future ;)
For the (not texlive) module use:
\defineMPinstance[gnuplot]
I am glad to see that I am not alone being confused...
We have:
\defineMPinstance
[name]
[\s!format=metafun,
\s!extensions=\v!yes,
\s!initializations=\v!yes,
\c!method=\s!default,
\c!textstyle=,
\c!textcolor=]
also, \setupMPinstance
So that extensions=yes|no and
On 12/6/2012 8:10 PM, Marco Patzer wrote:
On 2012–11–25 Marco Patzer wrote:
in one of the last few betas the MetaPost instance
mechanism broke.
Did the interface change again? The following does not work on
today's beta, only “alpha” and “gamma” are printed.
\defineMPinstance
[myins
On 2012–11–25 Marco Patzer wrote:
> in one of the last few betas the MetaPost instance
> mechanism broke.
Did the interface change again? The following does not work on
today's beta, only “alpha” and “gamma” are printed.
\defineMPinstance
[myinstance]
[metafun]
\startuseMPgr
On Sun, 25 Nov 2012, Marco Patzer wrote:
Hi,
in one of the last few betas the MetaPost instance
mechanism broke.
\defineMPinstance
[myinstance]
[metafun]
\startuseMPgraphic{mympgraphic}
fill fullsquare scaled 1cm withcolor blue;
\stopuseMPgraphic
\starttext\null
\useMPgraphic{myinstance
Am 25.11.2012 um 18:11 schrieb Marco Patzer :
> Hi,
>
> in one of the last few betas the MetaPost instance
> mechanism broke.
>
> \defineMPinstance
> [myinstance]
> [metafun]
>
> \startuseMPgraphic{mympgraphic}
> fill fullsquare scaled 1cm wi
Hi,
in one of the last few betas the MetaPost instance
mechanism broke.
\defineMPinstance
[myinstance]
[metafun]
\startuseMPgraphic{mympgraphic}
fill fullsquare scaled 1cm withcolor blue;
\stopuseMPgraphic
\starttext\null
\useMPgraphic{myinstance::mympgraphic}
\stoptext
Marco
\starttext
\defineMPinstance
[myfun-a]
[format=metafun]
\defineMPinstance
[myfun-b]
[format=metafun]
\startMPdefinitions{myfun-a}
color MyColor ; MyColor := (1,0,0) ;
\stopMPdefinitions
\startMPdefinitions{myfun-b}
color MyColor ; MyColor := (0,1,0) ;
\stopMPdefinitions
\startus
nt -name, size, etc- inside a startuseMPgraphic
> environment?
> >
> > \startuseMPgraphic{map}
> >
> > \stopuseMPgraphic
>
> - http://wiki.contextgarden.net/Command/defineMPinstance
> - http://wiki.contextgarden.net/Command/setupMPinstance
>
> Wolfgang
>
>
&
}
\stopuseMPgraphic
- http://wiki.contextgarden.net/Command/defineMPinstance
- http://wiki.contextgarden.net/Command/setupMPinstance
Wolfgang
___
If your question is of interest to others as well, please add an entry to
Am 10.06.2012 um 16:25 schrieb Alfredo Catalina:
> How can I setup a font -name, size, etc- inside a startuseMPgraphic
> environment?
>
> \startuseMPgraphic{map}
>
> \stopuseMPgraphic
- http://wiki.contextgarden.net/Command/defineMPinstance
- http://wiki.context
Hello,
many thanks Marco for wikifying.
On Tue, 08 May 2012 21:57:04 +0200, Marco wrote:
Thanks a lot Hans for implementing this.
Wikified:
http://wiki.contextgarden.net/Command/defineMPinstance
http://wiki.contextgarden.net/Command/setupMPinstance
Best wishes
Marco
With the
gt; As I've used that patch for quite a while now I could probably
> move it to the core.
Since you use it for a while it seems to work ⇒ into the core
Thanks a lot Hans for implementing this.
Wikified:
http://wiki.contextgarden.net/Command/defineMPinstance
http://wiki.contextgarden.net/C
On 8-5-2012 19:19, Marco wrote:
On 2012-05-08 Hans Hagen wrote:
On 8-5-2012 19:01, Marco wrote:
On 2012-05-05 Hans Hagen wrote:
Did I?
My bad ;)
This code fails:
\defineMPinstance [mympinstance] [metafun] [textcolor=red]
\starttext
\startMPcode
draw textext("some
On 2012-05-08 Hans Hagen wrote:
> On 8-5-2012 19:01, Marco wrote:
> > On 2012-05-05 Hans Hagen wrote:
>
> Did I?
My bad ;)
> > This code fails:
> >
> > \defineMPinstance [mympinstance] [metafun] [textcolor=red]
> >
> > \starttext
> &g
On 8-5-2012 19:01, Marco wrote:
On 2012-05-05 Hans Hagen wrote:
Did I?
This code fails:
\defineMPinstance [mympinstance] [metafun] [textcolor=red]
\starttext
\startMPcode
draw textext("some text") ;
\stopMPcode
\startMPcode{mympinstance}
draw textext(
On 2012-05-05 Hans Hagen wrote:
This code fails:
\defineMPinstance [mympinstance] [metafun] [textcolor=red]
\starttext
\startMPcode
draw textext("some text") ;
\stopMPcode
\startMPcode{mympinstance}
draw textext("some text") ;
\stopMPco
tafun]
[textstyle=bold,
textcolor=darkgreen,
setups=mp:instance:one]
\defineMPinstance
[mympinstance]
[metafun]
[textcolor=red]
\starttext
\startMPcode
draw textext("some text") ;
\stopMPcode
\startMPcode{mympinstance}
draw textext("some text
2011/5/23 Wolfgang Schuster
>
> Am 23.05.2011 um 17:37 schrieb Vedran Miletić:
>
> 2011/5/23 Wolfgang Schuster
>
>> Please send a complete example!
>>
>
> Sure:
>
> […]
>
>
> Add
>
> \defineMPinstance
> [solvers]
> [format=metafu
Am 23.05.2011 um 17:37 schrieb Vedran Miletić:
> 2011/5/23 Wolfgang Schuster
> Please send a complete example!
>
> Sure:
>
> […]
Add
\defineMPinstance
[solvers]
[format=metafun,
extensions=yes,
initializations=yes]
before \startMPdefintions or omit the argume
raw btex B etex shifted (5cm,0) ;
boundary := (boundingbox currentpicture) enlarged 3mm ;
flag := true ;
\stopMPpage
\stoptext
So, perhaps, we can have a `reset` key to \defineMPinstance, and let the
user
choose whether to reset after each graphic or not. If `reset=yes` is
chosen,
then such e
color white ;
draw A ; draw btex A etex ;
draw B ; draw btex B etex shifted (5cm,0) ;
boundary := (boundingbox currentpicture) enlarged 3mm ;
flag := true ;
\stopMPpage
\stoptext
So, perhaps, we can have a `reset` key to \defineMPinstance, and let the user
choose wh
luigi scarso wrote:
On Tue, Nov 17, 2009 at 4:30 PM, Hans Hagen wrote:
fyi:
you can define extra mp instances in order avoid clashes:
\defineMPinstance[whatever1][format=metafun,extensions=yes,initializations=yes]
\defineMPinstance[whatever2][format=mpost]
\startMPdefinitions{whatever1
On Tue, Nov 17, 2009 at 4:30 PM, Hans Hagen wrote:
> fyi:
>
> you can define extra mp instances in order avoid clashes:
>
> \defineMPinstance[whatever1][format=metafun,extensions=yes,initializations=yes]
> \defineMPinstance[whatever2][format=mpost]
>
> \startMPdefini
luigi scarso wrote:
On Tue, Nov 17, 2009 at 3:29 PM, Curiouslearn wrote:
Also I like them :
google search
Metapost metaobj
Metapost metagraph
Metapost UML
Metapost melusine
fyi:
you can define extra mp instances in order avoid clashes:
\defineMPinstance[whatever1][format=metafun,extensions
Color ;
\stopMPcode
new instances, like the predefined extrafun, are defined as
\defineMPinstance[extrafun][format=metafun,extensions=yes,initializations=yes]
so, if you use tricky mp code, you can create your own instance
(predefined are metafun, extrafun, nofun and metapost)
you can redirect to an ins
59 matches
Mail list logo