;
draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled
1.2pt ;
\stopuniqueMPgraphic
\defineoverlay[borderline][\uniqueMPgraphic{borderline}]
\placefigure[right,none]{}{
\start
\switchtobodyfont[7pt]
\startMPcode
numeric u;
u=0.7cm;
z0=(0,0) ;
z1=(2.5u,0) ;
z2=(2.5u,2.5u) ;
z3
Hi,
I discovered some macro Metafun particular.
I then wanted to outline, but it does not fit with the boundary of the
quadrant.
Can I have some explanation ?
Best regards,
Fabrice
\starttext
\startMPcode
u:=1cm ;
pickup pencircle scaled 1pt ;
fill ulcircle scaled 8u withcolor lightgray ;
fill
On 1/9/2015 8:07 PM, Fabrice Couvreur wrote:
Hi,
I discovered some macro Metafun particular.
I then wanted to outline, but it does not fit with the boundary of the
quadrant.
Can I have some explanation?
Best regards,
Fabrice
\starttext
\startMPcode
u:=1cm ;
pickup pencircle scaled 1pt ;
fill
is extremely ugly to see in
ConTeXt).
I see,
\tikzpicture
..
\endtikzpicture
looks nicer ;-)
No, but
\startMPcode
draw origin--(1,1) scaled 30mm ;
\stopMPcode
DOES look nicer ;-)
___
If your question
Am 22.11.2014 um 21:32 schrieb John Kitzmiller:
Given rectangles with text:
\starttext
Before:\\
\startMPcode
draw unitsquare xscaled 2cm yscaled 1cm;
\stopMPcode
\\
After:\\
\startMPcode
for i=0 upto 1:
draw unitsquare scaled 1cm
Am 22.11.2014 um 21:32 schrieb John Kitzmiller:
Given rectangles with text:
\starttext
Before:\\
\startMPcode
draw unitsquare xscaled 2cm yscaled 1cm;
\stopMPcode
\\
After:\\
\startMPcode
for i=0 upto 1:
draw unitsquare scaled 1cm
Am 22.11.2014 um 21:32 schrieb John Kitzmiller k...@inradius.net:
Given rectangles with text:
\starttext
Before:\\
\startMPcode
draw unitsquare xscaled 2cm yscaled 1cm;
\stopMPcode
\\
After:\\
\startMPcode
for i=0 upto 1:
draw unitsquare scaled 1cm xshifted i*cm
Given rectangles with text:
\starttext
Before:\\
\startMPcode
draw unitsquare xscaled 2cm yscaled 1cm;
\stopMPcode
\\
After:\\
\startMPcode
for i=0 upto 1:
draw unitsquare scaled 1cm xshifted i*cm;
endfor;
\stopMPcode
\stoptext
How can a line be drawn connecting the right edges
\bTR
\bTD $X$ prend la valeur $7$ \eTD \bTD \dontleavehmode
\startMPcode
input hvdm;
l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
defineDefaultArrow (l, r, alfa, beta, gamma); pickup pencircle scaled
0.4mm; arrowline (0cm,0cm)--(3cm,0cm) withcolor blue ;\stopMPcode \eTD
\bTD On affecte à $X
\bTD \eTD \bTD \color[orange]{\tfa Valeur
de la
variable $X$ après l'exécution de chaque instruction :} \eTD \eTR
\bTR
\bTD $X$ prend la valeur $7$ \eTD \bTD \dontleavehmode
\startMPcode
input hvdm;
l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
defineDefaultArrow (l, r, alfa, beta
\bTD \color[orange]{\tfa Suite d'instructions correspondant au
programme de calcul :} \eTD \bTD \eTD \bTD \color[orange]{\tfa Valeur de la
variable $X$ après l'exécution de chaque instruction :} \eTD \eTR
\bTR
\bTD $X$ prend la valeur $7$ \eTD \bTD \dontleavehmode \startMPcode
input hvdm
Hi again,
I tried my example from yesterday in context with metapost format, but
the output still differs from what mptopdf produces.
While doing that, I noticed that the mpost format is currently not usable out of
the box:
\startMPcode{metapost}
draw (0,0) -- (1cm,0) ;
\stopMPcode
produces
On 10/31/2014 9:58 AM, Tobias Columbus wrote:
Hi again,
I tried my example from yesterday in context with metapost format, but
the output still differs from what mptopdf produces.
While doing that, I noticed that the mpost format is currently not usable out of
the box:
\startMPcode{metapost
is currently not usable
out of
the box:
\startMPcode{metapost}
draw (0,0) -- (1cm,0) ;
\stopMPcode
produces the error message
\startMPcode
draw (0,0) -- (1cm,0) ;
\stopMPcode
why the {metapost}
I wanted to know if the impact of clipping is caused by the metafun format
doing that, I noticed that the mpost format is currently not usable out of
the box:
\startMPcode{metapost}
draw (0,0) -- (1cm,0) ;
\stopMPcode
produces the error message
\startMPcode
draw (0,0) -- (1cm,0) ;
\stopMPcode
why the {metapost}
I wanted to know if the impact of clipping
\bTD \eTD
\bTD $\frac{\left(2\sqrt{3}\right)^2}{12}$\eTD
\bTD \eTD
\dontleavehmode \bTD
\startMPcode
defaultscale:=0.8;
angle_radius:=4pt;
def mark_rt_angle(expr a, b, c)=
draw((1,0)--(1,1)--(0,1))
zscaled (angle_radius*unitvector(a-b))
shifted b
enddef;
def midpoint(expr
to
have my cake and eat it too ;)
You can test if the layers are hidden when you print the following example, I
tried the Adobe Reader on my Mac and they where still visible.
\setupinteraction[state=start]
\defineoverlay[PageBackground] [\startMPcode fill fullsquare
xyscaled(OverlayWidth
Hello,
Why curve drawn is not that expected ?
Fabrice
\starttext
\startMPcode
input hvdm;
l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
defineDefaultArrow (l, r, alfa, beta, gamma);
numeric xmin, xmax, ymin, ymax;
xmin :=-2; xmax := 4; ymax :=5 ;ymin:=-1; u := 1cm
On 5/27/2014 10:19 PM, Fabrice Couvreur wrote:
Hello,
Why curve drawn is not that expected ?
Fabrice
use /20
\starttext
\startMPcode
input hvdm;
l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
defineDefaultArrow (l, r, alfa, beta, gamma);
numeric xmin, xmax, ymin
\midaligned{%
\startcombination[4*1]
{%
\startMPcode
input hvdm;
l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0;
defineDefaultArrow (l, r, alfa, beta, gamma);
numeric xmin, xmax, ymin, ymax;
xmin := -2; xmax :=4; ymax :=5 ;ymin:=-1; u := 0.7cm;
pickup pencircle scaled 1pt
Hi,
As PSTricks (which I prefer) is not yet well integrated, I decided to learn
Metapost starting with a simple code.
\starttext
\startMPcode
numeric xmin, xmax, ymin, ymax;
xmin := -2.5; xmax := 2.5; ymax :=2.5 ;ymin:=-2.5; u := 2cm;
vardef f(expr x) = -x*x+1 enddef;
xinc := 0.001;
path pts_f
On 5/21/2014 7:55 PM, Fabrice Couvreur wrote:
Hi,
As PSTricks (which I prefer) is not yet well integrated, I decided to
learn Metapost starting with a simple code.
\starttext
\startMPcode
numeric xmin, xmax, ymin, ymax;
xmin := -2.5; xmax := 2.5; ymax :=2.5 ;ymin:=-2.5; u := 2cm;
vardef f(expr
/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?) ;
\stopMPcode
\stoptext
It fails
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 minimal example:
\defineMPinstance
[important]
[metafun]
[textcolor=red]
\starttext
\startMPcode{important}
draw textext(Am I red
minimal example:
\defineMPinstance
[important]
[metafun]
[textcolor=red]
\starttext
\startMPcode{important}
draw textext(Am I red?) ;
\stopMPcode
\stoptext
Aditya
___
If your question is of interest
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 also with the default instance
]
\defineMPinstance
[veryimportant]
[important]
[textstyle=bold]
\starttext
% normal black text
\startMPcode
draw textext(some text) ;
\stopMPcode
% red text
\startMPcode{important}
draw textext(some text) ;
\stopMPcode
% red bold text
\startMPcode{veryimportant}
draw textext(some text
someone has a suggestion; my
life doesn’t depend on it!
\starttext
\startMPcode
draw
externalfigure(mill.png)
xysized(10cm,4cm) ;
draw
textext(\bf LOOK THROUGH)
xysized(10cm,4cm)
shifted center currentpicture
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
;
enddef;
\stopMPinclusions
\starttext
\startMPcode
picture finalpicture ; finalpicture := nullpicture ;
numeric avanco ; avanco := 0 ; bboxmargin := 0pt ;
%% first call is OK
SoundEnergy;
%% second call loss the gradient
SoundEnergy;
currentpicture := finalpicture ;
\stopMPcode
\stoptext
of as a bug.
% You might want and try the following example: it doesn't work if you
have a MetaPost variable
% whose name is text.
\starttext
\startMPcode
% numeric text; %% Try and uncomment this line
drawarrow (0,0)--(3cm,1cm);
\stopMPcode
. But this conteXt file works:
```
\starttext
\startMPcode
dotlabel.ulft(A, origin);
\stopMPcode
\stoptext
```
As with any metapostfile which does not contain labels. But as soon as there is
label, their is no figure.
Two last things:
if I compile the metapost file with standalone
```
The resulting pdf file contains no figure. But this conteXt file works:
```
\starttext
\startMPcode
dotlabel.ulft(A, origin);
\stopMPcode
\stoptext
```
As with any metapostfile which does not contain labels. But as soon as there is
label, their is no figure.
Two last things:
if I compile
Also thanks from my side. Just what I needed for further tests (graphics
with multiple paths).
Peter
Am 22.12.2013 19:10, schrieb Hans Hagen:
\starttext
% \enabletrackers[metapost.variables]
\startMPcode
numeric n[] ; for i=1 upto 10: n[i] := 1/i ; endfor ;
pathp
On 12/23/2013 7:55 PM, DesdeChaves wrote:
I'm trying play with the statistical package** for metapost from Anthony
Phan. I found this strange problem:
This code runs fine:
\startMPcode
label.bot(btex Metapost and Statistics etex,(5mm,0)) ;
\stopMPcode
Also, this code run fine
Thanks a lot.
Merry Christmas
Jorge
2013/12/24 Hans Hagen pra...@wxs.nl
On 12/23/2013 7:55 PM, DesdeChaves wrote:
I'm trying play with the statistical package** for metapost from Anthony
Phan. I found this strange problem:
This code runs fine:
\startMPcode
label.bot(btex Metapost
variable can't pass. It will be very usefull if metapost can
send a array to context.
\startMPcode
numeric x[];
for i = 1 upto 10: x[i]:=random; endfor
passvariable(array,x);
passvariable(version,1.0) ;
passvariable(number,x[1]) ;
passvariable(string,whatever
I'm trying play with the statistical package** for metapost from Anthony
Phan. I found this strange problem:
This code runs fine:
\startMPcode
label.bot(btex Metapost and Statistics etex,(5mm,0)) ;
\stopMPcode
Also, this code run fine:
\startMPcode
input mps-core.mp;
draw fullcircle scaled
On 12/21/2013 12:50 PM, DesdeChaves wrote:
I know that metapost can send the variables version, number,
string, point, quad, boolean and path to Context.
triplet variable can't pass. It will be very usefull if metapost can
send a array to context.
\startMPcode
numeric x[];
for i = 1 upto 10
.
\startMPcode
numeric x[];
for i = 1 upto 10: x[i]:=random; endfor
passvariable(array,x);
passvariable(version,1.0) ;
passvariable(number,x[1]) ;
passvariable(string,whatever) ;
passvariable(point,(1,2)) ;
passvariable(triplet,(1,2,3)) ;
passvariable(quad,(1,2,3,4
I know that metapost can send the variables version, number, string,
point, quad, boolean and path to Context.
triplet variable can't pass. It will be very usefull if metapost can send
a array to context.
\startMPcode
numeric x[];
for i = 1 upto 10: x[i]:=random; endfor
passvariable(array,x
Am 21.10.2013 um 18:28 schrieb Pablo Rodriguez oi...@gmx.es:
I want the text flow to avoid the layer avoidasfloat as it avoids the
figures.
\definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm,
voffset=101mm,location={right,bottom}, state=start]
\setlayer[avoidasfloat]{\startMPcode
draw
)
but you have to place the layer with a float to reserve the necessary space.
% engine=pdftex
\definelayer[avoidasfloat][position=yes]
\setupbackgrounds[page][background=avoidasfloat]
\starttext
\placefigure[right,none]{}{\setlayer[avoidasfloat]{\startMPcode draw
unitsquare scaled 4cm
]{}{\setlayer[avoidasfloat]{\startMPcode draw
unitsquare scaled 4cm ; \stopMPcode}}
\input knuth
\stoptext
Many thanks for your reply, Wolfgang.
Is there no way to place that layer exactly 8mm from left page border
and 110mm from top page border?
I really need the layer in that position
={right,bottom}, state=start]
\setlayer[avoidasfloat]{\startMPcode
draw (0mm,0mm)--(55mm,0mm) ;
draw (0mm,0mm)--(0mm,-86mm) ;
draw (0mm,-86mm)--(55mm,-86mm) ;
draw (55mm,-86mm)--(55mm,0mm) ;
\stopMPcode
}
\setupbackgrounds[page][background={avoidasfloat}]
\starttext
\dorecurse{40}{\input knuth\par
]
\definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm, voffset=101mm,
location={right,bottom}, state=start]
\setlayer[avoidasfloat]{\startMPcode
draw (0mm,0mm)--(55mm,0mm) ;
draw (0mm,0mm)--(0mm,-86mm) ;
draw (0mm,-86mm)--(55mm,-86mm) ;
draw (55mm,-86mm)--(55mm,0mm) ;
\stopMPcode
,location={right,bottom}, state=start]
\setlayer[avoidasfloat]{\startMPcode
draw (0mm,0mm)--(55mm,0mm) ;
draw (0mm,0mm)--(0mm,-86mm) ;
draw (0mm,-86mm)--(55mm,-86mm) ;
draw (55mm,-86mm)--(55mm,0mm) ;
\stopMPcode
}
\setupbackgrounds[page][background={avoidasfloat}]
\starttext
\dorecurse{40
seems to be called twice and what can be done
to ensure that it is only called once?
Don’t use text ;-) That’s a known issue: as soon as your Metapost
code contains text, it will be processed twice. E.g.:
\starttext
\setMPtext{heading:title}{foo}
\startMPcode
show This gets
why the code seems to be called twice and what can be done
to ensure that it is only called once?
Don’t use text ;-) That’s a known issue: as soon as your Metapost
code contains text, it will be processed twice. E.g.:
\starttext
\setMPtext{heading:title}{foo}
\startMPcode
code contains text, it will be processed twice. E.g.:
\starttext
\setMPtext{heading:title}{foo}
\startMPcode
show This gets printed twice.;
draw textext( \MPstring{heading:title} );
\stopMPcode
\stoptext
Same for labels, {b,e}tex. See also
On 10/07/2013 10:48 PM, Hans Hagen wrote:
On 10/7/2013 10:04 PM, Pablo Rodríguez wrote:
[...]
I need to insist on this sample, because the layer doesn’t behave as such:
\definelayer[wrongpositioned][x=5000cm, y=5000cm, state=start]
\setuplayer[wrongpositioned]{\startMPcode draw
(0mm,0mm
]{\startMPcode draw
(0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode}
\setupbackgrounds[page][background={wrongpositioned}]
\starttext
\input knuth
\stoptext
x and y are outside the page in the layer definition (50 meters).
It should be a stupid error, but I
Dear list,
I have the following sample:
\definelayer[wrongpositioned][x=0mm, y=0mm, hoffset=0mm,
voffset=48mm, state=start]
\setuplayer[wrongpositioned]{\startMPcode draw
(0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode}
\setupbackgrounds[page][background
On Mon, Oct 7, 2013 at 5:56 PM, Pablo Rodríguez oi...@gmx.es wrote:
Dear list,
I have the following sample:
\definelayer[wrongpositioned][x=0mm, y=0mm, hoffset=0mm,
voffset=48mm, state=start]
\setuplayer[wrongpositioned]{\startMPcode draw
(0mm,0mm)--(8mm,0mm)--(8mm,38mm
=5000cm, y=5000cm, state=start]
\setuplayer[wrongpositioned]{\startMPcode draw
(0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode}
\setupbackgrounds[page][background={wrongpositioned}]
\starttext
\input knuth
\stoptext
x and y are outside the page in the layer definition (50 meters
behave as such:
\definelayer[wrongpositioned][x=5000cm, y=5000cm, state=start]
\setuplayer[wrongpositioned]{\startMPcode draw
(0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode}
\setupbackgrounds[page][background={wrongpositioned}]
\starttext
\input knuth
\stoptext
x and y are outside
on this sample, because the layer doesn’t behave as such:
\definelayer[wrongpositioned][x=5000cm, y=5000cm, state=start]
\setuplayer[wrongpositioned]{\startMPcode draw
(0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode}
\setupbackgrounds[page][background={wrongpositioned}]
\starttext
\input knuth
Hi,
I played around with the new passvariable() option and ran into errors
when passing a path. Used the latest beta (01.10.2013). Can someone
confirm this?
Peter
\starttext
\startMPcode
passvariable(path,fullcircle scaled 1cm) ;
\stopMPcode
\stoptext
results in perfectly valid code producing wrong
results, which might not be hard to spot. Example:
\setuplayout [width=10cm]
\showframe
\starttext
\startMPcode
fill unitsquare xyscaled (\the\textwidth, 2cm);
\stopMPcode
\startMPcode
fill unitsquare xyscaled (TextWidth, 2cm
, TextWidth. Forgetting to use
LoadPageState easily results in perfectly valid code producing wrong
results, which might not be hard to spot. Example:
sure, but a 'many' versus 'some' distinction is too fuzzy
\setuplayout [width=10cm]
\showframe
\starttext
\startMPcode
fill unitsquare xyscaled
Indeed a challenge!
Alan
On Tue, 10 Sep 2013 18:11:13 +0200
Hans Hagen pra...@wxs.nl wrote:
Hi,
There's now a convenient way to pass data back from an mprun to the
tex instance:
\starttext
\startMPcode
passvariable(version,1.0) ;
passvariable(number,123
Hi,
There's now a convenient way to pass data back from an mprun to the tex
instance:
\starttext
\startMPcode
passvariable(version,1.0) ;
passvariable(number,123) ;
passvariable(string,whatever) ;
passvariable(point,(1,2)) ;
passvariable(triplet,(1,2,3
example I would like to first
have a clear understanding of the functioning of textext in relation to
metapost. It seems that as yet I do not have a clear enough picture of
that process.
The example below illustrates what is happening:
\starttext
\startMPcode
newpicture p;
drawoptions
on traditional MetaPost.
Is this prefix required? It breaks old code and required a branch in
every new project. And I don't really see a reason for this
incompatibility. Here is an example defining a new direction “foo”:
\starttext
\startMPcode
label(first, origin);
%% MkIV
%% pair
“foo”:
The MpIV code has namespace protection. Why run traditional in MkIV?
\starttext
\startMPcode
label(first, origin);
%% MkIV
%% pair mfun_laboff.foo ; mfun_laboff.foo := (.5,-1) ;
%% mfun_labxf.foo := mfun_labyf.foo := 1 ;
%% MkII
pair laboff.foo
in MkIV?
\starttext
\startMPcode
label(first, origin);
%% MkIV
%% pair mfun_laboff.foo ; mfun_laboff.foo := (.5,-1) ;
%% mfun_labxf.foo := mfun_labyf.foo := 1 ;
%% MkII
pair laboff.foo ; laboff.foo := (.5,-1) ;
labxf.foo := labyf.foo := 1
namespace protection. Why run traditional in MkIV?
\starttext
\startMPcode
label(first, origin);
%% MkIV
%% pair mfun_laboff.foo ; mfun_laboff.foo := (.5,-1) ;
%% mfun_labxf.foo := mfun_labyf.foo := 1 ;
%% MkII
pair laboff.foo ; laboff.foo := (.5,-1
containing just MP graphics work?
\starttext
\startMPcode
draw fullcircle scaled 1cm;
\stopMPcode
\stoptext
Aditya
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist
know. It has been more than five years since I used MkII.
Does a minimal file containing just MP graphics work?
\starttext
\startMPcode
draw fullcircle scaled 1cm;
\stopMPcode
\stoptext
Aditya
___
If your
by testfig.mp
Any particular reason that you are compiling metapost files using mp and
then including them in ConTeXt rather than directly using any one of the
inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic,
\processMPbuffer, etc.)
beginfig(1)
label(btex $\Omega$ etex, (0,0
of the
inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic,
\processMPbuffer, etc.)
Mostly conservatism. I cannot quite figure out the canonical
replacement for btex ... etex (textext, sometext?), and then I get
confused by the many possible environments.
What do you
in ConTeXt rather than directly using any one of the
inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic,
\processMPbuffer, etc.)
Mostly conservatism. I cannot quite figure out the canonical
replacement for btex ... etex (textext, sometext?), and then I get
confused by the many
Hi,
why is the second line right-aligned in the following example?
\definetextext
[foo]
[#1]#2{\switchtobodyfont[#1]#2}
\starttext
\dorecurse{5}{
\startMPcode
draw \sometxt[foo][sans]{FooBar};
\stopMPcode
\startMPcode
draw \sometxt[foo][iwona]{FooBar
};
\stopMPextensions
\def\abc{3cm}
\starttext
\startcolor[blue]
\startMPcode
fill fullcircle scaled a withcolor b;
\stopMPcode
\stopcolor
\stoptext
The old ConTeXt draws a blue circle with diameter 3cm and the new
ConTeXt draws a black circle with diameter 1cm. Which one is right
\startMPcode wrapper works, e.g.:
beginfig(1);
draw origin--(100,100);
endfig;
end
works with command line mpost %
This is MetaPost, version 1.801 (kpathsea
\startMPcode wrapper works, e.g.:
beginfig(1);
draw origin--(100,100);
endfig;
end
if you have context installed you
\startMPcode wrapper works, e.g
On Wed, 10 Apr 2013, Tristan Lorino wrote:
\starttext
\setMPtext {1} {C'est le titre}
\startMPcode
pickup pencircle scaled .5mm ;
pair a; a :=(0.2cm,.5cm);
label.rt(\MPtext {1},a);
In MkIV, this should be label.rt(btex \MPtext{1} etex, a);
In MkII, you'd have to use label.rt(texttext(\MPtext
titre}
\startMPcode
pickup pencircle scaled .5mm ;
pair a; a :=(0.2cm,.5cm);
label.rt(\MPtext {1},a);
draw (0cm,0cm)--(8cm,0cm);
draw (8cm,0cm)..(8.15cm,0.08cm)..(8.2cm,0.18cm);
draw (8.2cm,0.18cm)--(8.7cm,1.7cm);
\stopMPcode
\stoptext
How can I
Am 10.04.2013 15:29, schrieb ntg-context-requ...@ntg.nl:
\setupbodyfont[11pt]
\enableregime[utf-8]
\mainlanguage[fr]
\starttext
\setMPtext {1} {C'est le titre}
\startMPcode
pickup pencircle scaled .5mm ;
pair a; a :=(0.2cm,.5cm);
label.rt(\MPtext {1},a);
draw (0cm,0cm)--(8cm,0cm);
draw
example:
\def\abc{1cm}
\startMPextensions
a := \abc;
color b;
b := \MPcolor{currentcolor};
\stopMPextensions
\def\abc{3cm}
\starttext
\startcolor[blue]
\startMPcode
fill fullcircle scaled a withcolor b;
\stopMPcode
\stopcolor
\stoptext
The old ConTeXt draws a blue circle with diameter 3cm and the new
\startMPinclusions{doublefun}
def DoWhatever = draw textext(Y) ; enddef ;
\stopMPinclusions
\startMPinclusions[+]{doublefun}
def DoWhatever = draw textext(YY) ; enddef ;
\stopMPinclusions
\startMPcode{metafun}
draw fullcircle scaled 1cm withcolor ColorOne withpen pencircle
scaled
a := \abc;
color b;
b := \MPcolor{currentcolor};
\stopMPextensions
\def\abc{3cm}
\starttext
\startcolor[blue]
\startMPcode
fill fullcircle scaled a withcolor b;
\stopMPcode
\stopcolor
\stoptext
The old ConTeXt draws a blue circle with diameter 3cm and the new
ConTeXt draws a black circle
\startMPinitializations [foo]
numeric n; n=4cm;
\stopMPinitializations
I tried
\startMPcode{foo}
numeric n; n=4cm;
\stopMPcode
but this adds some vertical space and doesn't seem to be the right
solution given the face that there are already three other
environments to include MetaPost code. Maybe I'm
Hello,
why the MP code doesn't draw % and # when it uses TeX's \U - inside MP
block?:
\def\T{TTT}
\def\U{UUU \letterpercent\letterhash}
\starttext
\letterpercent
\letterhash
\par
\startMPcode
draw btex AAA etex;
draw textext(\T);
% draw btex \T etex; % Err
draw
On 1/27/2013 10:05 PM, Procházka Lukáš wrote:
Hello,
why the MP code doesn't draw % and # when it uses TeX's \U - inside
MP block?:
\def\T{TTT}
\def\U{UUU \letterpercent\letterhash}
\starttext
\letterpercent
\letterhash
\par
\startMPcode
draw btex AAA etex;
draw
\startMPcode
picture T ;
T := thelabel(textext(I'm seeing double),origin) ;
draw T withcolor green ;
draw T shifted (-1mm,1mm) withcolor blue ;
\stopMPcode
\stoptext
Alan
___
If your question is of interest to others
. Is this a bug or a
feature?
\starttext
\startMPcode
picture T ;
T := thelabel(textext(I'm seeing double),origin) ;
draw T withcolor green ;
draw T shifted (-1mm,1mm) withcolor blue ;
\stopMPcode
\stoptext
Since the beginning of MkIV, colors in metapost labels need to be set at
the ConTeXt
, but I am most likely wrong.
Indeed \blue text has worked, but 'draw T withcolor blue;' *should* work as
well.
The processing of textext() has changed recently, it seems.
\startMPcode
label(textext(I'm seeing double),origin) withcolor green ;
label(textext(I'm seeing double),(-1mm,1mm)) withcolor
withcolor blue;' *should* work as
well.
The processing of textext() has changed recently, it seems.
\startMPcode
label(textext(I'm seeing double),origin) withcolor green ;
label(textext(I'm seeing double),(-1mm,1mm)) withcolor blue ;
\stopMPcode
DOES work.
Of course, these are much simplified
Hello!
1. How does a metapost figure (\startMPcode) becomes a node?
2. When does it become a node?
3. What type of node it becomes?
4. Can I change its attributes?
5. Can I change its colors or transparency levels?
André Caldas
On 1/10/2013 5:15 PM, Andre Caldas wrote:
Hello!
1. How does a metapost figure (\startMPcode) becomes a node?
never, that is: it's turned into whatsit nodes with pdf operators and
mixed with regular nodes when text is used
2. When does it become a node?
sometime in the mp converter
3
\blue text has worked, but 'draw T withcolor blue;' *should*
work as well.
The processing of textext() has changed recently, it seems.
The mkiv implementation has always been rather different from the mkii
one: text handling as well as dealing with colors.
\startMPcode
label(textext(I'm seeing
expandable yet).
\usemodule[animation]
\setupinteraction[state=start]
\starttext
\startanimation[menu=yes]
\dorecurse{7}{\expanded
{\startframe
\startMPcode
path p;
numeric n, u;
u := 1cm;
n:=\recurselevel*u;
p := fullcircle scaled n;
draw p;
\stopMPcode
\stopframe
to foresee all bordercases).
Hans
(Already reported directly, but I forgot to put the list on copy.)
There is a problem with the new beta.
Minimal example:
\starttext
\startMPcode
draw fullcircle scaled 1cm ;
\stopMPcode
\stoptext
metapost initializing instance 'metafun
On 12/11/2012 09:05 AM, Alan BRASLAU wrote:
(Already reported directly, but I forgot to put the list on copy.)
There is a problem with the new beta.
Minimal example:
\starttext
\startMPcode
draw fullcircle scaled 1cm ;
\stopMPcode
\stoptext
This example works for me
.)
There is a problem with the new beta.
Minimal example:
\starttext
\startMPcode
draw fullcircle scaled 1cm ;
\stopMPcode
\stoptext
metapost initializing instance 'metafun' using format 'metafun'
metapost loading
'metafun':
/home/local/context/beta/tex/texmf
On Tue, Dec 11, 2012 at 9:36 AM, Taco Hoekwater t...@elvenkind.com wrote:
On 12/11/2012 09:05 AM, Alan BRASLAU wrote:
(Already reported directly, but I forgot to put the list on copy.)
There is a problem with the new beta.
Minimal example:
\starttext
\startMPcode
draw
Hans has be playing with MetaPost instances which got broken.
\startMPpage\stopMPpage got the wrong instance
whereas \startTEXpage\startMPcode\stopMPcode\stopMPpage correctly got
the default instance.
Normally, this was fixed, but your minimal example still does not
work for me either. Something
=nx/2,1,-1 do
c[#c+1] = format(%02x,j*s*255)
end
c = table.concat(c,,1,nx)
r[#r+1] = c
end
r = table.concat(r,\r,1,ny)
print(r)
context(r)
end
\stopluacode
\startMPcode
draw
textext(\bitmapimage[x=100,y=100
501 - 600 of 940 matches
Mail list logo