Dear Gavin,
I have managed to create an implementation for these operations which I
think I can convert into functions and put in startMPinclusions and then
use them from. there.
On Fri, Jan 12, 2024 at 9:42 PM Gavin via ntg-context
wrote:
> Hi Shiv,
>
> > Do we have a geom
rentpicture to TheFrame ;
desiredformat := 1080;% In pixels (will be converted by default at 72dpi)
currentpicture := currentpicture xysized (desiredformat ,desiredformat );
\stopMPpage
}
\stoptext
On Dez. 2 2023, at 7:46 pm, Mikael Sundqvist wrote:
> Hi,
>
> I don't know if \startMPinclusions
e
> position should be visible, and the text "Mot 2" in position p2 should be
> added. And so on.
>
> \startMPinclusions
>
> picture p[];
> path TheFrame ;
> TheFrame := fullsquare scaled 5in ;
>
> z1 = (60,40);
> z2 = (40,90);
> z3 = (10
Thank you Mikael,
this works!
Emanuel
On Dez. 2 2023, at 7:46 pm, Mikael Sundqvist wrote:
> Hi,
>
> I don't know if \startMPinclusions \stopMPinclusions shall work with
> \startMPpage and \stopMPpage. In this case, one can use a separate
> graphics:
>
> \startuseMPgrap
Hi,
I don't know if \startMPinclusions \stopMPinclusions shall work with
\startMPpage and \stopMPpage. In this case, one can use a separate
graphics:
\startuseMPgraphic{base}
picture p[];
path TheFrame ;
TheFrame := fullsquare scaled 5in ;
z1 = (60,40);
z2 = (40,90);
z3 = (10,70);
p1:=image
Hi Mikael,
here's a very simple mwe for the label(textext()) issue. On page 1, the text
"Word 1" should be drawn in position z1. On page 2, the same text in the same
position should be visible, and the text "Mot 2" in position p2 should be
added. And so on.
\startMPinclusio
serif][fallback]
>> \definefontsynonym [Serif] [notonaskharabic-Light]
>>[features=fea]
>> \definefontsynonym [SerifItalic] [notonaskharabic-Italic]
>>[features=fea]
>> \definefontsynonym [SerifBold]
=fea]
> \definefontsynonym [SerifItalic]
> [notonaskharabic-Italic] [features=fea]
> \definefontsynonym [SerifBold]
> [notonaskharabic-Bold][features=fea]
> \definefontsynonym [SerifBoldItalic]
> [notonaskharabic-Bold-Italic] [features=fea]
> \stoptypescri
notonaskharabic-Italic] [features=fea]
> \definefontsynonym [SerifBold] [notonaskharabic-Bold] [features=fea]
> \definefontsynonym [SerifBoldItalic] [notonaskharabic-Bold-Italic]
> [features=fea]
> \stoptypescript
>
> \starttypescript [notonaskharabic]
> \definetypeface [notona
fea]
\stoptypescript
\starttypescript [notonaskharabic]
\definetypeface [notonaskharabic] [rm] [serif] [notonaskharabic] [default]
\stoptypescript
\usetypescript[notonaskharabic]
\setupbodyfont [RomanFont]
\usecolors[crayola]
\startMPinclusions
picture p[];
path TheFrame ;
TheFrame := fullsquare scaled 5
nce
\starttext
% We can put in the inclusions the material we will use at each page, to
declare things only one time.
\startMPinclusions
% the frame of the video ;
path TheFrame ;
TheFrame := fullsquare scaled 5in ;
randomseed := 53 ;
path TheBrownianMotion ;
pair Coordinate[];
Coordinat
vconnect ("photon", __v1, __v2);
vfreeze;
vdraw;
endsubgraph;
endchar;
% the end.
end.
endinput;
So, I created a context file:
\startMPinclusions
input feynmp;
require_RCS_revision "1.30";
\stopMPinclusions
\starttext
\sta
, these annotations are not translated.
I have to prepare a set of pictures for every language.
Well, that changed last week.
Here is my first try (actually the 4th iteration):
%%%
\setupexternalfigures[location=default]
\starttext
\startMPinclusions
%draft := 0
e the position of all objects ;
>> % File second2.pdf
>> Read (access) the position of all objects from second 1(after frame 30);
>> for frame =31 to 60 :
>> simulate position of objects ;
>> draw the frame ;
>> endfor;
>> save the position of al
0);
>> for frame =31 to 60 :
>> simulate position of objects ;
>> draw the frame ;
>> endfor;
>> save the position of all objects ;
>> Etc...
>> Does someone has an idea of how to do such a thing ? I can read text file in
>> Context with no problem a
in the animation process with
\startMPinclusions (…) \stopMPinclusions, but I did not find a way to write
information from MetaFun to a text file. Is Lua the solution ?
there's always an idea ...
\starttext
\startMPpage
runscript("metapost.setparameterset('test',
table.load('mydat
with no problem and integrate them in the animation
process with \startMPinclusions (…) \stopMPinclusions, but I did not
find a way to write information from MetaFun to a text file. Is Lua
the solution ?
Lua is always the solution ;) but I don’t understand enough of both Lua
and MetaFun...
Maybe
with
\startMPinclusions (…) \stopMPinclusions, but I did not find a way to write
information from MetaFun to a text file. Is Lua the solution ?
Lua is always the solution ;) but I don’t understand enough of both Lua
and MetaFun...
Maybe there’s something in luametafun.pdf*?
*) Hans, this is one
to 60 :
simulate position of objects ;
draw the frame ;
endfor;
save the position of all objects ;
Etc...
Does someone has an idea of how to do such a thing ? I can read text file in
Context with no problem and integrate them in the animation process with
\startMPinclusions
}
\def\numB{4}
\def\numC{8}
\def\numD{14}
\def\mygap{0.001pt}
%===
\startMPinclusions
path pleft ; path pright ;
numeric LA ; LA := (\numA-1)*LineHeight + StrutHeight + StrutDepth + \mygap ;
numeric LB ; LB := \numB *LineHeight
On Thu, 2022-05-19 at 14:23 +0530, śrīrāma wrote:
> On 5/19/22 1:53 PM Vincent Hennebert via ntg-context wrote:
> > Looking at the wiki, it seems that \startMPinclusions is not meant
> > to
> > actually render any content, just to include MetaPost code like
> > func
On 5/19/22 1:53 PM Vincent Hennebert via ntg-context wrote:
> Looking at the wiki, it seems that \startMPinclusions is not meant to
> actually render any content, just to include MetaPost code like
> function definitions. I guess I would have expected \startMPpage
> instead.
>
scaled 10cm;
Whether I run
context metapost.mp
or
mtxrun --script metapost metapost.mp
I get a PDF document that contains no page.
The mtxrun version generates the following temp file:
mptopdf-temp.tex
\starttext
\startMPinclusions
fill fullcircle scaled 10cm;
\stopMPinclusions
Hi list,
I realized that circleit throws an error.
It works fine if I replace boxes_generic_declare by boxes_declare in line 244
in mp-xbox.mpxl
rboxit is probably affected as well, but I did not test that.
MWE:
\startMPinclusions
input boxes;
\stopMPinclusions
\startMPpage
circleit.a(textext
hadow" macro that produces a shadow of any picture with an adjustable
gray.
I’m having lots of metafun!
Gavin
\startMPinclusions
picture ball;
ball := image(
fill fullcircle scaled 1cm
withshademethod "circular"
withshadecenter (.25,.25)
withshadeco
uot; macro that produces a shadow of any picture with an adjustable gray.I’m having lots of metafun!Gavin\startMPinclusions picture ball; ball := image( fill fullcircle scaled 1cm withshademethod "circular" withshadecenter (.25,.25) withshadecolors (.8white, black); draw f
the fade. It works great with a picture that is
made with fill and draw, but it doesn’t work with shading. The example below
has a flat disk and a round ball. The disk looks fine, but the shaded ball is
not surviving the application of inverted / uncolored.
\startMPinclusions
picture disk
the fade. It works great with a picture that is
made with fill and draw, but it doesn’t work with shading. The example below
has a flat disk and a round ball. The disk looks fine, but the shaded ball is
not surviving the application of inverted / uncolored.
\startMPinclusions
picture disk
Hi list,
I’m trying to produce figures like this, showing motion as a series of
snap-shots, with the earlier moments more faint.
PastedGraphic-1.pdf
Description: Adobe PDF document
Here are three examples of metafun code using transparency and “decorated".
\startMPinclusions
picture
m/questions/617597/how-can-i-use-luas-string-len-inside-a-metapost-function
> > <
> https://tex.stackexchange.com/questions/617597/how-can-i-use-luas-string-len-inside-a-metapost-function
> >):
> >
> > \startMPinclusions
> >
> > vardef MotMystere(e
can-i-use-luas-string-len-inside-a-metapost-function>):
\startMPinclusions
vardef MotMystere(expr taille, speciale, index) =
save avant,apres,case;
numeric avant,apres;
path case;
case := fullsquare scaled 13;
avant := speciale-1;
%For Unicode, use "utflen" instead
apres
Hi, list. The following works for MkIV, but not LMTX (adapted from here:
https://tex.stackexchange.com/questions/617597/how-can-i-use-luas-string-len-inside-a-metapost-function
):
\startMPinclusions
vardef MotMystere(expr taille, speciale, index) =
save avant,apres,case;
numeric avant,apres
and not if the color is in a Lua variable. Any suggestions?
Thanks!
Gavin
The code below produces four pie shape wedges to show the different results of
handling the color. They should all be red, but the last two are black.
\startMPinclusions
color rouge; % To avoid changing the data
Dear list,
I’m experimenting LuaMetaFun. The following MWE example works as expected, but
stop to work as soon as I uncomment the « doublefun » commands, like :
\startMPinclusions{doublefun} (… )
\startMPpage[instance=doublefun]
% MWE ——
\startMPinclusions%{doublefun}
vardef
Here is the MWE that I used for the input figure file that demonstrates the
problem.
\defineMPinstance[ns_hier]
[
format=metafun,
extensions=yes,
initializations=yes,
method=double,
]
\startMPinclusions{ns_hier}
input boxrow
\stopMPinclusions
\startMPdefinitions{ns_hier}
%
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 figure file that demonstrates the
problem.
\defineMP
le that demonstrates
the problem.
\defineMPinstance[ns_hier]
[
format=metafun,
extensions=yes,
initializations=yes,
method=double,
]
\startMPinclusions{ns_hier}
input boxrow
\stopMPinclusions
\startMPdefinitions{ns_hier}
% nothing to see here
\stopMPdefi
e
problem.
\defineMPinstance[ns_hier]
[
format=metafun,
extensions=yes,
initializations=yes,
method=double,
]
\startMPinclusions{ns_hier}
input boxrow
\stopMPinclusions
\startMPdefinitions{ns_hier}
% nothing to see here
\stopMPdefinitions
\startMPcode{ns_hier}
make_B
eter;
endfig;
end
But what you are proposing unfortunately does not work.
Fabrice
Le mar. 1 sept. 2020 à 14:25, Taco Hoekwater a écrit :
> Hi,
>
> I think you need this:
>
> \startMPinclusions
> input mp-scratch;
> \stopMPinclusions
>
> \startMPcode
> Scra
Hi,
I think you need this:
\startMPinclusions
input mp-scratch;
\stopMPinclusions
\startMPcode
Scratchversion:=3;
….
If that also doesn’t work, perhaps attach the log file / terminal output to a
new message.
Best wishes,
Taco
> On 1 Sep 2020, at 13:07, Fabrice Couvreur wr
elString(
> labelString))
> labelString = "4. {Label} [Text]! MISSING curly braces"
> warnAndConTeXt( "pic := Foo( 0, -225, 150, 50, \"%s\");", mpLabelString(
> labelString))
> labelString = "5. {Label} \"a\" [Text]! MISSING curly braces"
> warnAndCon
uot;4. {Label} [Text]! MISSING curly braces" warnAndConTeXt( "pic := Foo( 0, -225, 150, 50, \"%s\");", mpLabelString( labelString)) labelString = "5. {Label} \"a\" [Text]! MISSING curly braces" warnAndConTeXt( "pic := Foo( 0, -300, 150, 50, \&
ditya Mahajan wrote:
>> On Fri, 13 Mar 2020, Taco Hoekwater wrote:
>>> Hi,
>>>
>>>
>>>
>>>> On 13 Mar 2020, at 12:53, Gerben Wierda wrote:
>>>>
>>>> Suppose I have this code:
>>>>
>>>>
&
t;
>>>> Suppose I have this code:
>>>>
>>>>
>>>> Can I reuse that varied across follow-up MPPages?
>>>
>>> Sure, put the vardef inside \startMPinclusions:
>> or \startMPdefinitions ... \stopMPdefinitions (don't remembe
On 3/13/2020 2:33 PM, Aditya Mahajan wrote:
On Fri, 13 Mar 2020, Taco Hoekwater wrote:
Hi,
On 13 Mar 2020, at 12:53, Gerben Wierda wrote:
Suppose I have this code:
Can I reuse that varied across follow-up MPPages?
Sure, put the vardef inside \startMPinclusions
gt;
>> Can I reuse that varied across follow-up MPPages?
>
> Sure, put the vardef inside \startMPinclusions:
>
> \startMPinclusions
> vardef MyShape(expr w, h) =
> ...
> enddef ;
> \stopMPinclusions
> \startMPpage
> picture s ; s := MyShape(4cm, 2cm);
>
On Fri, 13 Mar 2020, Taco Hoekwater wrote:
Hi,
On 13 Mar 2020, at 12:53, Gerben Wierda wrote:
Suppose I have this code:
Can I reuse that varied across follow-up MPPages?
Sure, put the vardef inside \startMPinclusions:
or \startMPdefinitions ... \stopMPdefinitions (don't remember
Hi,
> On 13 Mar 2020, at 12:53, Gerben Wierda wrote:
>
> Suppose I have this code:
>
>
> Can I reuse that varied across follow-up MPPages?
Sure, put the vardef inside \startMPinclusions:
\startMPinclusions
vardef MyShape(expr w, h) =
...
enddef ;
\stopMPinclusions
\s
, everything works as expected (no color-filled page, no header
in the start-chapter page).
MWE:
%% START MWE
\definecolor[rojo][h=ED553B]
\definehighlight[rojo][color=rojo]
\startMPinclusions
numeric u ; u := 1.125pt ;
numeric i ; i := 0.125in ;
string
:
%% START MWE
\definecolor[rojo][h=ED553B]
\definehighlight[rojo][color=rojo]
\startMPinclusions
numeric u ; u := 1.125pt ;
numeric i ; i := 0.125in ;
string prevChapterTitle, currentChapterTitle;
prevChapterTitle := "";
currentCh
;>
>> FIRST EXAMPLE (No labels are displayed)
>> -----
>> \starttext
>>
>> \startMPinclusions
>>input makecirc;
>> \stopMPinclusions
>>
>>
>> \startstaticMPfigure{circ1}
>> u:= 1cm ;
>>
\startMPinclusions
input makecirc;
\stopMPinclusions
\startstaticMPfigure{circ1}
u:= 1cm ;
source.e((0,0u),DC,90,"\Delta V","2V") ;
resistor.a((2u,1u),normal,90,"R_1","1$\Omega$") ;
resistor.b((2u,-1u),normal,90,"
I'm trying to use with Context makecirc a metapost library to draw
electric circuits, but I have problems with the labels of the circuits
element that are not displayed correctly.
FIRST EXAMPLE (No labels are displayed)
-
\starttext
\startMPinclusions
input makecirc
usions store path and not pairs.
>
>
> (1) %%
> \setuppapersize[A4,landscape]
>
> \startMPinclusions
> u:=1mm ;
> %fond
> path p ;
> p:= (0,0) -- (150u,0) -- (150u,95u) -- (0,95u) -- cycle ;
> pair x[] ;
> x[0]:= (20u,
On 2/21/2019 10:03 AM, Damien Thiriet wrote:
Hi,
Why does (1) compile, whereas (2) doesn't?
I can't understand why can MPinclusions store path and not pairs.
(1) %%
\setuppapersize[A4,landscape]
\startMPinclusions
u:=1mm ;
%fond
path p ;
p:= (0,0
Hi,
Why does (1) compile, whereas (2) doesn't?
I can't understand why can MPinclusions store path and not pairs.
(1) %%
\setuppapersize[A4,landscape]
\startMPinclusions
u:=1mm ;
%fond
path p ;
p:= (0,0) -- (150u,0) -- (150u,95u) -- (0,95u) -- cycle
text
This is not much different from:
\starttext
\startMPinclusions
string t;
t := "foo";
\stopMPinclusions
\startMPcode
draw textext(t);
\stopMPcode
\startMPcode
draw textext(t) rotated 45;
\stopMPcode
\stoptext
but the problem was not with passing just text, b
t
This is not much different from:
\starttext
\startMPinclusions
string t;
t := "foo";
\stopMPinclusions
\startMPcode
draw textext(t);
\stopMPcode
\startMPcode
draw textext(t) rotated 45;
\stopMPcode
\stoptext
but the problem was not with passing just text
be performed (color=vacuous).
Minimal example would be:
\startMPinclusions
picture p;
p := image(
draw textext("Foo");
);
\stopMPinclusions
\startMPcode
\stopMPcode
tested on http://live.contextgarden.net/
you can use
\startMPinitializations
\stopMPinitializations
as these are expanded ea
be:
\startMPinclusions
picture p;
p := image(
draw textext("Foo");
);
\stopMPinclusions
\startMPcode
\stopMPcode
tested on http://live.contextgarden.net/
___
If your question is of interest to others as well,
Hello,
I have some documents that contain:
\startMPinclusions
input "mycode";
\stopMPinclusions
where mycode.mp is somewhere in my project's directory. Is there a way
to tell ConTeXt how to find it
I guess the code I am looking for is the below to hatch the cut-out
section. How can I load the MetaPost hatching package in Context minimals
so it understands the hatchfill command?
Thanks
Jeroen
\startMPinclusions
input hatching;
\stopMPinclusions
\starttext
\placefigure[here,force
On 10/5/2015 6:28 PM, Fabrice Couvreur wrote:
Hi,
I tried to write a loop to display the title, but it does not. How to do ?
Thank you,
Fabrice
\setuppagenumbering[location=]
\setupcolors
[state=start]
\definecolor[pagecolor][s=.6]
\definecolor[textcolor][r=.6]
\startMPinclusions
oop to display the title, but it does not. How to do ?
>> Thank you,
>> Fabrice
>>
>> \setuppagenumbering[location=]
>>
>> \setupcolors
>>[state=start]
>>
>> \definecolor[pagecolor][s=.6]
>> \definecolor[textcolor][r=.6]
>>
>&
reur wrote:
>>>
>>>> Hi,
>>>> I tried to write a loop to display the title, but it does not. How to
>>>> do ?
>>>> Thank you,
>>>> Fabrice
>>>>
>>>> \setuppagenumbering[location=]
>>>>
>>>&g
; \setuppagenumbering[location=]
>>>
>>> \setupcolors
>>>[state=start]
>>>
>>> \definecolor[pagecolor][s=.6]
>>> \definecolor[textcolor][r=.6]
>>>
>>>
>>> \startMPinclusions
>>>color pagecolor ; pagec
Hi,
I tried to write a loop to display the title, but it does not. How to do ?
Thank you,
Fabrice
\setuppagenumbering[location=]
\setupcolors
[state=start]
\definecolor[pagecolor][s=.6]
\definecolor[textcolor][r=.6]
\startMPinclusions
color pagecolor ; pagecolor := \MPcolor{pagecolor
\setuppagenumbering[location=]
\setupcolors
[state=start]
\definecolor[maincolor][g=.6]
\definecolor[pagecolor][s=.6]
\definecolor[darkcolor][s=.2]
\definecolor[textcolor][r=.6]
\startMPinclusions
color maincolor ; maincolor := \MPcolor{maincolor} ;
color pagecolor ; pagecolor := \MPcolor
centimeter, objects are cut off after you reach that
'invisible' border around the boundingbox.
I would use uniqueMPgraphic with proper parameters for the graphics.
Using overlays is also possible (urcorner OverlayBox), but I see no real
need or benefit to do so.
HTH, Peter
\startMPinclusions
int:
english/english
# with mpcirc.mp ##
With this code:
\startMPinclusions
input mpcirc;
\stopMPinclusions
\starttext
%\forceMPTEXgraphictrue %%% command don't work
\startMPcode
u:=10bp; % unit of length
prepare(L,C,Vac); % mention your elements
z0=(10u,10u); % lower right
loading 'metafun' as
'R:/tex/texmf-context/metapost/context/base/metafun.mpiv' using method 'default'
metapost initializing number mode 'scaled'
mtx-context | fatal error: return code: -1073741819
\startMPinclusions
fontmapfile =lm-ec.map;
\stopMPinclusions
\startuniqueMPgraphic
. What
am I doing wrong?
Thanks in advance
Jorge
\startMPinclusions
def SoundEnergy =
path pr ; pr := unitsquare xscaled .3cm yscaled 2cm ;
currentpicture:=nullpicture;
for i=0 step 2 until 10:
linear_shade(pr shifted (i*.3cm,0),0,white,black);
linear_shade(pr shifted ((i+1)*.3cm,0),0
}
\setMPpositiongraphic{three}{mypos:circle}{mypos:circleradius=1cm,mypos:circlecolor=red}
\setMPpositiongraphic{three}{mypos:circle}{mypos:circleradius=.5cm,mypos:circlecolor=green}
\stoppositionoverlay
\startMPinclusions
if unknown context_apos : input mp-apos.mpiv ; fi ;
if unknown
-core.mp that
interfere with Metapost labels?
If it's a big subsystem there might be conflicts; anyway, better load
like this:
\startMPinclusions
input mps-core.mp ;
\stopMPinclusions
\startMPcode
label.bot(btex Metapost and Statistics etex,(5mm,0)) ;
\stopMPcode
because you only want
a ; on the input line so it could be some read-ahead issue.
What can coming from the module mps-core.mp that
interfere with Metapost labels?
If it's a big subsystem there might be conflicts; anyway, better load like
this:
\startMPinclusions
input mps-core.mp ;
\stopMPinclusions
equations.
[^2]: You also need to keep in mind that all metapost graphics are
processed in a single run (think of a single mp file with multiple
beginfigs). So you have to be careful with initializing and resetting
variables (\startMPinclusions, \startMPinitializations,
\startMPdefinitions, see
Hi,
You know the price you have to pay: wikifying ..
\setuplayout
[header=0cm,
topspace=1.625cm,
footer=0cm,
width=fit,
height=fit]
\startMPinclusions
numeric MyTitlePageDone[] ;
\stopMPinclusions
\startuseMPgraphic{background:normal}
StartPage ;
fill
; ColorThree := blue ;
\stopMPextensions
\startMPextensions{doublefun}
color ColorThree ; ColorThree := magenta ;
\stopMPextensions
\startMPinclusions
def DoWhatever = draw textext(N) ; enddef ;
\stopMPinclusions
\startMPinclusions
def DoWhatever = draw textext(Y) ; enddef ;
\stopMPinclusions
, already,
to which the user may wish to add his own MPinclusions (eventually
several times using the [+] argument).
\startMPinclusions{myinstance} does not work.
Alan
___
If your question is of interest to others
)
\edef\N{10} % Number of frames in animation per hypocycloid branch
\edef\K{1}\doloop{\ctxlua{commands.doifelse(math.abs(\K*\r -
math.floor(\K*\r+0.5))0.01)}{\exitloop}{\edef\K{\luaexpr{\K+1
\startMPinclusions[+]
r:=\r; % Radius of smaller circle (larger circle has radius 1)
u:=70
The following code produces the letter J on the first page, but does not
draw that same picture on the second page. I would appreciate some advice
on how to save and redraw this label in subsequence figures.
Thanks,
Troy Henderson
\starttext
\startMPinclusions[+]
picture J
\startMPinclusions[+]
picture J;
\stopMPinclusions
\startMPpage
J:=thelabel(btex J etex scaled 2,origin);
draw J;
\stopMPpage
\startMPpage
draw J;
\stopMPpage
\stoptext
\startMPinclusions[+]
picture J;
\stopMPinclusions
\startMPpage
J:=thelabel(btex J etex scaled 2,origin);
draw J;
\stopMPpage
\startMPpage
draw J;
\stopMPpage
\stoptext
\starttext
\startMPinclusions[+]
vardef J = thelabel
That works great. Now I have defined a global numeric
N:=8;
in \startMPinclusions ... \stopMPinclusions at the be beginning of my
document. All of my \startMPpage ... \stopMPpage environments understand
this N, but how do I reference this value as the start value for
\dostepwiserecurse
That works great. Now I have defined a global numeric
N:=8;
in \startMPinclusions ... \stopMPinclusions at the be beginning of my
document. All of my \startMPpage ... \stopMPpage environments understand
this N, but how do I reference this value as the start value for
\dostepwiserecurse
. And on the whole I'd prefer to make sure I apply
the fill only locally per each half-loop and not all over the place...
donno what is the shortest way, but this looks at least handy...
\startMPinclusions
patternsize:= 20mm;
def lhl(expr ca,cb,sx,sy) =
picture lefthandloop;
lefthandloop
stoptext in the attached test-file.
patch:
\startMPinclusions
def graphictext primary t =
hide (
if mfun_trial_run :
let mfun_graphic_text = mfun_no_graphic_text ;
else :
let mfun_graphic_text = mfun_do_graphic_text
in the attached test-file.
patch:
\startMPinclusions
def graphictext primary t =
hide (
if mfun_trial_run :
let mfun_graphic_text = mfun_no_graphic_text ;
else :
let mfun_graphic_text = mfun_do_graphic_text ;
fi
Finding the file works with \ReadFile{} works. But is generates another problem
because
\input ../../../metapost-setup
and
\ReadFile{metapost-setup}
behave differently! The \input process my \startMPinclusions correctly but the
ReadFile does not, because the following metapost has
Am 29.09.2011 um 21:10 schrieb Meer, H. van der:
Finding the file works with \ReadFile{} works. But is generates another
problem because
\input ../../../metapost-setup
and
\ReadFile{metapost-setup}
behave differently! The \input process my \startMPinclusions correctly
the
example from [1] works fine with the added boolean flag, but the
following example (which means basically all built-in MetaObj objects
with text) does not. It compiles well but there is no text.
--8start8--
\startMPinclusions[+]
input metaobj
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
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
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
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
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
Am 25.04.2011 um 05:00 schrieb Joshua Lee:
Hi All,
Here's a little file that hang up the system and exhaust the
memory.
\starttext
\startMPpage
input boxes;
boxit a(btex Hello etex);
a.c = (0, 0);
drawboxed(a);
\stopMPpage
\stoptext
\startMPinclusions[+]
input boxes
Hello etex);
a.c = (0, 0);
drawboxed(a);
\stopMPpage
\stoptext
\startMPinclusions[+]
input boxes;
\stopMPinclusions
\starttext
\startMPpage[offset=1ex]
boxit a(btex Hello etex);
a.c = (0, 0);
drawboxed(a);
\stopMPpage
\stoptext
Wolfgang
--generate
But it run into compiling error. For you convenience, append the
sources for mpost and context.
joshua@josh-dev ~/tmp $ cat activity.tex
\startMPinclusions
input metauml;
\stopMPinclusions
\startMPpage
Activity.A(Learn MetaUML
activity.tex
\startMPinclusions
input metauml;
\stopMPinclusions
\startMPpage
Activity.A(Learn MetaUML -,
the MetaPost UML library);
drawObject(A);
\stopMPpage
\stoptext
I don't know the internal details
1 - 100 of 253 matches
Mail list logo