for typesetting, an
example pixel map with clut, and the output. I would be obliged to get some
comments.
As you're doing a lot of calculations, you can consider using bitmaps
\starttext
\startMPpage
draw
bitmapimage(2,2,334455 667788 99aabb ccddee)
scaled 3cm
, but the upcoming beta can handle it
\starttext
[…]
Thanks a lot. But I'm still a bit lost in all the
new commands. I can't figure out how to shade from a
particular colour to transparent.
\starttext
\definecolor [trans-t] [t=1, a=normal]
\startMPpage
path p; p:=fullsquare scaled 5cm
]
\definemultitonecolor [somecolor-4] [blueish=0.9,yellow=0.1]
\definemultitonecolor [somecolor-5]
[blueish=0.1,magenta=0.9,yellow=0.75,cyan=0.8] % [c=1]
\definemultitonecolor [somecolor-6]
[blueish=0.9,magenta=0.1,yellow=0.25,cyan=0.8] % [m=1]
\startMPpage
path p ; p := fullcircle scaled 10cm shifted (0cm,0) ;
fill
it or is it unlikely?
\starttext
\definecolor [red-t] [r=1, t=.6, a=normal]
\definecolor [blue-t] [b=1, t=.4, a=normal]
\startMPpage
% Works
path p; p:=fullsquare scaled 5cm;
fill p
withshading(linear, llcorner p, urcorner p)
withcolor \MPcolor{red} shadedinto \MPcolor{blue};
% The entire
] [r=1,t=.6,a=1]
\definecolor [blue-t] [b=1,t=.4,a=1]
\startMPpage
path p ; p := fullsquare scaled 6cm ;
fill p ;
path p ; p := fullsquare scaled 6cm shifted (-4cm,-4cm);
fill p
withshading(linear, llcorner p, urcorner p)
withcolor \MPcolor{red} shadedinto \MPcolor{blue} ;
path p ; p
] [serif] [times] [default] [encoding=ec]
\definetypeface [times] [mm] [math] [times] [default] [encoding=ec]
\setupbodyfont [times,10pt]
\startMPpage
label(btex A $a_i$ etex,origin);
\stopMPpage
I believe that the code in the verbatimtex ... etex environment should
switch the major font
...
Thanks!!
Matthieu
\starttext
\setupMPpage[offset=1pt]
\switchtobodyfont[10pt]
% Beginning MetaPost graphic
\startMPpage
label.top(btex 1.4 etex scaled 1.00, (10, 10));
label.top(btex $\sigma_t$ etex scaled 1.00, (0, 10));
label.top(btex $\displaystyle \frac{\sigma_t}{a}$ etex scaled
=1pt]
\switchtobodyfont[10pt]
% Beginning MetaPost graphic
\startMPpage
label.top(btex 1.4 etex scaled 1.00, (10, 10));
label.top(btex $\sigma_t$ etex scaled 1.00, (0, 10));
label.top(btex $\displaystyle \frac{\sigma_t}{a}$ etex scaled 1.00, (0, 10));
\stopMPpage
\stoptext
Error
\starttext is seen
(try with \setupbodyfont[palatino] at the top of your file)
this does not work neither I still get error message with this code:
\usemodule[newmat]
\setupbodyfont[palatino]
\starttext
\startMPpage
label.top(textext($ \frac{\sigma_t}{a}$) scaled 1.00, (1, 1));
%label.top
\startMPpage
label.top(textext($ \frac{\sigma_t}{a}$) scaled 1.00, (1, 1));
%label.top(btex $ \frac{\sigma_t}{a}$ etex, (0, 10));
%label.top(textext( $\displaystyle \frac{\sigma_t}{a}$ ) scaled 1.00, (1,
1));
\stopMPpage
\stoptext
Hi,
this works for me.
\setupbodyfont[palatino
\startMPpage
label.top(textext($ \frac{\sigma_t}{a}$) scaled 1.00, (1, 1));
%label.top(btex $ \frac{\sigma_t}{a}$ etex, (0, 10));
%label.top(textext( $\displaystyle \frac{\sigma_t}{a}$ ) scaled 1.00, (1, 1));
\stopMPpage
\stoptext
Hi,
this works for me.
\setupbodyfont[palatino
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
Hi Wolfgang,
Thanks a lot, it works.
Best regards,
Joshua
On Mon, 25 Apr 2011, Wolfgang Schuster wrote:
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
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
System environment:
* ConTeXt ver: 2011.04.13 09:23 MKIV fmt: 2011.4.19 int:
english/english
--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
that in metapost).
\setupcolors
[state=start]
\starttext
\startMPpage
save wx, wy;
wx = 15cm;
wy = 10cm;
draw unitsquare shifted (0,-0.5) xyscaled (wx,wy);
save val; numeric val;
save tmp; numeric tmp;
save p; path p;
save c; color c[];
c[1] = red;
c[2] = .5[red,yellow];
c[3] = .6green;
c[4
I just tested luatex rev 4090:
--
\starttext
\startMPpage
externalfigure blblogo.pdf scaled .4 ;
%label(textext(Test),origin);
\stopMPpage
\stoptext
--
gives no error message and an empty pdf 1mmx5mm
--
\starttext
\startMPpage
%externalfigure blblogo.pdf scaled
On 02/21/2011 03:52 AM, Reviczky, Adam wrote:
As for the path of the difference, how do you mean that? Example?
\startMPpage
path p ;
p := fullcircle scaled 1cm ;
path q ;
q := fullcircle scaled .5cm ;
path r ;
r := p -- reverse q -- cycle ;
drawarrow r withcolor green ;
fill r withcolor red
\startMPpage
path p ;
p := fullcircle scaled 1cm ;
path q ;
q := fullcircle scaled .5cm ;
path r ;
r := p -- reverse q -- cycle ;
drawarrow r withcolor green ;
fill r withcolor red ;
\stopMPpage
This works here.
Based on this I can now cut out the smaller one from a fullcircle
better otf/ttf suffix mixup checking
- small datefix for willi
New feature of the day:
\starttext
\startMPpage
draw
bitmapimage(2,2,334455 667788 99aabb ccddee)
scaled 3cm
rotated 15 ;
draw
bitmapimage(2,2,33 55 77 99)
scaled 2cm
rotated 30
\startMPinclusions? I did not find documentation for that on
the wiki.
Best regards,
Stefan.
\startMPinclusions
input metaobj;
boolean flag; flag := false;
\stopMPinclusions
\starttext
\startMPpage
vardef newSegment@\#=
assignObj(@\#,Segment
:
assignObj(@\#,Segment);
ObjPoint a,b;
ObjCode @\#b-@\#a=(1cm,2cm);
fi ;
enddef;
def drawSegment(suffix n)=
draw n.a--n.b;
draw btex \tt \overbar{E} etex shifted n.a; % 1
enddef;
\stopMPdefinitions
\starttext
\startMPpage
newSegment.s;
ObjLabel.s(btex hello
\starttext
\startMPpage
if flag :
fill boundary withcolor 0.5[blue,white] ;
else :
path boundary ;
fi ;
path A, B;
A := fullsquare scaled 3cm ;
B := fullsquare scaled 3cm shifted (5cm,0) ;
fill A withcolor white ;
fill B withcolor
;ObjCode@##b...
===
\startMPinclusions
input metaobj;
\stopMPinclusions
\startMPpage
vardef newSegment@#=
assignObj(@#,Segment);
ObjPoint a,b;
ObjCode @#b-@#a=(1cm,2cm);
enddef;
def
2011/1/12 Michal Kvasnička:
Hallo.
Can you tell me how to solve it? I will really need mptopdf in two or three
weeks painfully. Many thanks.
You can always use
\starttext\startMPpage
your metapost code
\stopMPpage\stoptext
but the problem needs to be resolved.
Mojca
Hi,
Using the following code
\useMPlibrary[txt]
\startMPpage
graphictext FOO;
\stopMPpage
results in
! Undefined control sequence.
\douseMPlibrary ...stprefix #1}\makeshortfilename
[\truefilename
{\f!metapos...
\next1 #1,-\douseMPlibrary {#1
because of a change in ConTeXts metapost, you can use
\startMPpage
Your MP Code here
\stopMPpage
MetaPost from ConTeXt is not able without big changes to run standalone,
so you might need to load the MetaPost version from TeXlive, the way how
to do so depends on your OS...
Greetings
\startMPpage
Your MP Code here
\stopMPpage
MetaPost from ConTeXt is not able without big changes to run standalone,
so you might need to load the MetaPost version from TeXlive, the way how
to do so depends on your OS...
Greetings
--
Martin 'golodhrim' Scholz
Auf dem Sattler 4
34516 Ederbringhausen
, you can use
\startMPpage
Your MP Code here
\stopMPpage
MetaPost from ConTeXt is not able without big changes to run standalone,
so you might need to load the MetaPost version from TeXlive, the way how
to do so depends on your OS...
Greetings
Hi Martin,
Okay, thanks for your answer!
Embedding
Hi,
Really bad things happen if the variable name in metapost contains an
underscore. It took me quite a while to isolate this problem.
Minimal example:
\startMPinclusions
input rboxes ;
\stopMPinclusions
\starttext
\startMPpage
rboxit.A (textext(A)) ;
rboxit.B_1 (textext(B
On Mon, 20 Sep 2010, Aditya Mahajan wrote:
Hi,
Really bad things happen if the variable name in metapost contains an
underscore. It took me quite a while to isolate this problem.
This is getting weirder. The bug is triggered even for the following
example:
\startMPpage
rboxit.A
,144pt]
\stopMPenvironment
\starttext
\startMPpage[offset=0pt]
color darkblue,textcolor;
darkblue := (0.0625,0,.412); % 0f006b =
textcolor := (1,1,1);
def rect (expr xl,yl,r) =
pickup pencircle scaled 1;
draw (xl-.5r,yl-.5r) -- (xl+.5r,yl-.5r)--
(xl+.5r,yl+.5r) -- (xl-.5r,yl+.5r) -- cycle
crosshair;
crosshair := image(draw fullcircle scaled 2pt;
draw (0,-2pt)--(0,2pt);
draw (-2pt,0)--(2pt,0);
);
bboxmargin := 0;
\stopMPinclusions
\startMPpage
for item within rawtextext($(h,g)$):
draw
;
crosshair := image(draw fullcircle scaled 2pt;
draw (0,-2pt)--(0,2pt);
draw (-2pt,0)--(2pt,0);
);
bboxmargin := 0;
\stopMPinclusions
\startMPpage
for item within rawtextext($(h,g)$):
draw bbox item withcolor
, but
the label seems to be at 0,0. It seems to happen whenever the boxes are
drawn from within a loop - at least all of my problems with boxes show
similar symptoms and only occur within loops.
Any ideas what goes wrong here?\startMPinclusions
input boxes;
\stopMPinclusions
\startMPpage
u
Hi,
there is a problem with color shading in combination with color
conversion. Short example is attached.
MTXrun | current version: 2010.07.30 11:35
This is LuaTeX, Version beta-0.62.0-2010080307 (rev 3794)
Best wishes, Peter
\setupcolors[state=stop]
\startMPpage
linear_shade(unitsquare
Hello all,
What is the recommended method for creating multi-line labels in MetaPost in
MKIV, please?
I have the following code:
\definetextext[mplabel]{\framed[frame=off,align=middle]}
\starttext
\startMPpage
input mp-tool;
draw fullcircle scaled 5cm;
label(\sometxt[mplabel]{One\\Two}, (0,0
Am 28.07.10 10:03, schrieb Richard Stephens:
Hello all,
What is the recommended method for creating multi-line labels in
MetaPost in MKIV, please?
I have the following code:
\definetextext[mplabel]{\framed[frame=off,align=middle]}
\starttext
\startMPpage
input mp-tool;
draw fullcircle
Am 28.07.10 10:03, schrieb Richard Stephens:
Hello all,
What is the recommended method for creating multi-line labels in MetaPost
in MKIV, please?
I have the following code:
\definetextext[mplabel]{\framed[frame=off,align=middle]}
\starttext
\startMPpage
input mp-tool;
draw
\startMPpage
input mp-tool;
draw fullcircle scaled 5cm;
label(\sometxt[mplabel]{One\\Two}, (0,0));
\stopMPpage
\stoptext
which gives a line feed between One and Two using MKII, but no line feed
in MKIV.
\defineframed[mplabel][frame=off,align=middle]
\starttext
\startMPpage
draw fullcircle scaled
What is the recommended method for creating multi-line labels in MetaPost
in MKIV, please?
I have the following code:
\definetextext[mplabel]{\framed[frame=off,align=middle]}
\starttext
\startMPpage
input mp-tool;
draw fullcircle scaled 5cm;
label(\sometxt[mplabel]{One\\Two}, (0,0
mptopdf or another one I've seen references to
fmtutil?
Thanks,
Stu
context mkiv of minimals uses mplib which is integrated in luatex, so
it's the fastest way to produce a pdf :
for example
%%save as
%%test-0001.tex
\starttext
\startMPpage
path p; p := fullcircle scaled 1 cm;
draw p scaled 4
;
beginfig(2);
label(decimal(a),origin);
endfig;
end
and both figures have the value of 'a' available to them because 'a'
was defined before each figure. What is the ConTeXt way of doing
this?
Do you mean something like this?
\starttext
\startMPpage
a := 4;
label(decimal a, origin
On 9-3-2010 15:24, Wolfgang Schuster wrote:
Am 09.03.10 15:17, schrieb Andreas Harder:
Hi all,
I can't find a solution for the following example:
\starttext
\startMPpage
draw origin for i=0 step 10 until 100 : ..{down}(i,0) endfor ;
\stopMPpage
\startluacode
context.startMPpage()
context
Am 09.03.2010 um 15:59 schrieb Hans Hagen:
On 9-3-2010 15:24, Wolfgang Schuster wrote:
Am 09.03.10 15:17, schrieb Andreas Harder:
Hi all,
I can't find a solution for the following example:
\starttext
\startMPpage
draw origin for i=0 step 10 until 100 : ..{down}(i,0) endfor
Am 09.03.2010 um 15:24 schrieb Wolfgang Schuster:
Am 09.03.10 15:17, schrieb Andreas Harder:
Hi all,
I can't find a solution for the following example:
\starttext
\startMPpage
draw origin for i=0 step 10 until 100 : ..{down}(i,0) endfor ;
\stopMPpage
\startluacode
Am 09.03.10 15:17, schrieb Andreas Harder:
Hi all,
I can't find a solution for the following example:
\starttext
\startMPpage
draw origin for i=0 step 10 until 100 : ..{down}(i,0) endfor ;
\stopMPpage
\startluacode
context.startMPpage()
context(draw origin..for i=0,100,10 do{down
Hi all,
I can't find a solution for the following example:
\starttext
\startMPpage
draw origin for i=0 step 10 until 100 : ..{down}(i,0) endfor ;
\stopMPpage
\startluacode
context.startMPpage()
context(draw origin..for i=0,100,10 do{down}(..i..,0)..end..;)
context.stopMPpage
]
\ctxlua{metapost.showlog=true}
\startMPpage
draw begingraph(1in,1in);
setrange((0,0),(1,1));
for n=auto.x:
show format(%g,n);
endfor;
endgraph;
\stopMPpage
See foo.log (attached).
Thoughts?
Troy
(foo.tex
ConTeXt ver: 2010.03.02 12:34 MKIV fmt: 2010.3.6 int: english
=true}
\startMPpage
draw begingraph(1in,1in);
setrange((0,0),(1,1));
for n=auto.x:
show Scvnum n; % This is the line that is failing
endfor;
endgraph;
\stopMPpage
___
If your question
MetaPost
graphics where the graphic is the only thing in the ConTeXt output.
\startTEXpage
arbitrary tex code
\stopTEXpage
\startMPpage
arbitrary mp code
\stopMPpage
both commands take the same arguments as \framed, so you can say
\setupMPpage[offset=3mm]
..
\stopMPpage
to get a slightly loose
\startMPpage
arbitrary mp code
\stopMPpage
Beautiful. Thanks!
Troy
___
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
just do
\startMPpage
code
\stopMPpage
and process that with context
Hans
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69
input metaobj;
\stopMPinclusions
\starttext
\startMPpage
save a;
newBox.a(\sometxt{hello world});
a.c = origin;
drawObj(a);
\stopMPpage
\stoptext
Perhaps this is even slightly more elegant.
Gr.
Matthijs
signature.asc
Description: Digital signature
add a clearObj line to your code
makes it work for me:
\startMPinclusions
input metaobj;
\stopMPinclusions
\starttext
\startMPpage
newBox.a(\sometxt{hello world});
a.c = origin;
drawObj(a);
clearObj a;
\stopMPpage
\stoptext
I'm not completely sure why this is clearObj a (and not clearObj
: problems with 'metafun.mp' from
'/home/mbana/context.beta/tex/texmf-cache/luatex-cache/context/d8cd2a1ce6fae081c3517d1b1e100ec3/formats/cont-en-metafun
.mem'
Does a simple example with mplib work at your end?
\starttext
\startMPpage
draw fullcircle scaled 3cm ;
\stopMPpage
\stoptext
On Fri, 11 Sep 2009, Mohamed Bana wrote:
Does a simple example with mplib work at your end?
\starttext
\startMPpage
draw fullcircle scaled 3cm ;
\stopMPpage
\stoptext
You can try to regenerate the metafun format.
no that results in an empty page. aren't the formats generated when i run
'/home/mbana/context.beta/tex/texmf-cache/luatex-cache/context/d8cd2a1ce6fae081c3517d1b1e100ec3/formats/cont-en-metafun
.mem'
Does a simple example with mplib work at your end?
\starttext
\startMPpage
draw fullcircle scaled 3cm ;
\stopMPpage
\stoptext
You can try to regenerate
with 'metafun.mp' from
'/home/mbana/context.beta/tex/texmf-cache/luatex-cache/context/d8cd2a1ce6fae081c3517d1b1e100ec3/formats/cont-en-metafun
.mem'
Does a simple example with mplib work at your end?
\starttext
\startMPpage
draw fullcircle scaled 3cm ;
\stopMPpage
\stoptext
You can try to regenerate
with 'metafun.mp' from
'/home/mbana/context.beta/tex/texmf-cache/luatex-cache/context/d8cd2a1ce6fae081c3517d1b1e100ec3/formats/cont-en-metafun
.mem'
Does a simple example with mplib work at your end?
\starttext
\startMPpage
draw fullcircle scaled 3cm ;
\stopMPpage
\stoptext
You can try
are confidential and may be
privileged. If you are not a named recipient, please notify the sender
immediately and do not disclose the contents to another person, use it for any
purpose or store or copy the information in any medium.
\starttext
\startMPpage
draw
?
Thanks,
Richard
\starttext
\startMPpage
draw fullcircle scaled 10cm ;
\stopMPPage
\stoptext
please wikify this
Thanks. I have added it to the Wiki under Sharing
graphics.
Richard
Converteam UK Ltd. Registration Number: 5571739 and Converteam Ltd. Registration
Am 12.08.2009 um 07:40 schrieb Aditya Mahajan:
On Tue, 11 Aug 2009, Andreas Harder wrote:
Hi,
I am trying to achieve the following:
\setMPtext{1}{ABC}
\setMPtext{2}{DEF}
\setMPtext{3}{GHI}
\starttext
\startMPpage[offset=1ex,width=\paperwidth,height=\paperheight]
for i=1 upto 3:
draw
On Wed, 12 Aug 2009, Andreas Harder wrote:
Am 12.08.2009 um 07:40 schrieb Aditya Mahajan:
On Tue, 11 Aug 2009, Andreas Harder wrote:
Hi,
I am trying to achieve the following:
\setMPtext{1}{ABC}
\setMPtext{2}{DEF}
\setMPtext{3}{GHI}
\starttext
\startMPpage[offset=1ex,width=\paperwidth
}
\starttext
\startMPpage[offset=1ex,width=\paperwidth,height=\paperheight]
for i=1 upto 3:
draw textext(\MPstring{i}) shifted(i*cm,i*cm) ;
endfor;
\stopMPpage
\stoptext
There is no error but no content either. What's wrong?
Another way to do this is to use
\TeXtext{1}{ABC} etc.
and then call
draw sometxt(i
Aditya Mahajan wrote:
On Wed, 12 Aug 2009, Andreas Harder wrote:
Am 12.08.2009 um 07:40 schrieb Aditya Mahajan:
On Tue, 11 Aug 2009, Andreas Harder wrote:
Hi,
I am trying to achieve the following:
\setMPtext{1}{ABC}
\setMPtext{2}{DEF}
\setMPtext{3}{GHI}
\starttext
\startMPpage[offset
Hi,
I am trying to achieve the following:
\setMPtext{1}{ABC}
\setMPtext{2}{DEF}
\setMPtext{3}{GHI}
\starttext
\startMPpage[offset=1ex,width=\paperwidth,height=\paperheight]
for i=1 upto 3:
draw textext(\MPstring{i}) shifted(i*cm,i*cm) ;
endfor;
\stopMPpage
\stoptext
Andreas Harder wrote:
Hi,
I am trying to achieve the following:
\setMPtext{1}{ABC}
\setMPtext{2}{DEF}
\setMPtext{3}{GHI}
\starttext
\startMPpage[offset=1ex,width=\paperwidth,height=\paperheight]
for i=1 upto 3:
draw textext(\MPstring{i}) shifted(i*cm,i*cm) ;
endfor;
\stopMPpage
On Tue, 11 Aug 2009, Andreas Harder wrote:
Hi,
I am trying to achieve the following:
\setMPtext{1}{ABC}
\setMPtext{2}{DEF}
\setMPtext{3}{GHI}
\starttext
\startMPpage[offset=1ex,width=\paperwidth,height=\paperheight]
for i=1 upto 3:
draw textext(\MPstring{i}) shifted(i*cm,i*cm) ;
endfor
of the older luatex version for windows was recently noted on
another thread.
So, I installed 0.42.0 and remade the formats.
This minimal example works with texexec example.tex but fails with context
example.tex.
\startMPinclusions
input metaobj;
\stopMPinclusions
\starttext
\startMPpage
newBox.a
Taco Hoekwater wrote:
Matthew Claus wrote:
This minimal example works with texexec example.tex but fails with
context
example.tex.
\startMPinclusions input metaobj; \stopMPinclusions
\starttext \startMPpage newBox.a(\sometxt{hello world}); a.c = origin;
drawObj(a);
\stopMPpage \stoptext
%
{\obeyMPlines\dostartGNUPLOTpage}
\long\def\dostartGNUPLOTpage#1\stopGNUPLOTpage%
{\startMPpage#1\stopMPpage}
\starttext
\startGNUPLOTpage
draw fullcircle scaled 3cm;
\stopGNUPLOTpage
\stoptext
do you reset the color afterwards?
What color(s)? (I'm not sure that I understood
\startMPpage#1\stopMPpage}
Thanks a lot!!! The magic apparently works. I don't understand what
exactly the obeylines macro does (it seems that it just makes sure
that none of line endings get lost, not even inside definition
itself).
it is not relevant here i think; there was a time when mp could
On Mon, Jul 13, 2009 at 09:50, Hans Hagen wrote:
Mojca Miklavec wrote:
\def\startGNUPLOTpage
{\begingroup\obeyMPlines\dostartGNUPLOTpage}
\long\def\dostartGNUPLOTpage#1\stopGNUPLOTpage
{\endgroup\startMPpage#1\stopMPpage}
Thanks a lot!!! The magic apparently works. I don't understand
%
{\startMPpage#1\stopMPpage}
\starttext
\startGNUPLOTpage
draw fullcircle scaled 3cm;
\stopGNUPLOTpage
\stoptext
Thanks,
Mojca
___
If your question is of interest to others as well, please add an entry to the
Wiki
\stopGNUPLOTpage%
{\startMPpage#1\stopMPpage}
\starttext
\startGNUPLOTpage
draw fullcircle scaled 3cm;
\stopGNUPLOTpage
\stoptext
do you reset the color afterwards?
-
Hans Hagen
%
{\obeyMPlines\dostartGNUPLOTpage}
\long\def\dostartGNUPLOTpage#1\stopGNUPLOTpage%
{\startMPpage#1\stopMPpage}
\starttext
\startGNUPLOTpage
draw fullcircle scaled 3cm;
\stopGNUPLOTpage
\stoptext
do you reset the color afterwards?
What color(s)? (I'm not sure that I understood the question
{\begingroup\obeyMPlines\dostartGNUPLOTpage}
\long\def\dostartGNUPLOTpage#1\stopGNUPLOTpage
{\endgroup\startMPpage#1\stopMPpage}
Wolfgang
___
If your question is of interest to others as well, please add an entry
don't you use grouping then?
I guess because I don't understand what's going on in the first place :)
\def\startGNUPLOTpage
{\begingroup\obeyMPlines\dostartGNUPLOTpage}
\long\def\dostartGNUPLOTpage#1\stopGNUPLOTpage
{\endgroup\startMPpage#1\stopMPpage}
Thanks a lot!!! The magic apparently
=FF]% same as HEX (currently transformed to
RGB(223,222,226) )
\startMPpage
path p;
p:= unitsquare xyscaled(5cm,5cm);
fill (point 0 of p -- point 1 of p -- point 2 of p --cycle)
withcolor \MPcolor{testcolorHEX}; % bottom right part of the square
fill (point 0 of p -- point 3
*65536= 257.004
%\newdimen\hexcolorfraction \hexcolorfraction=\dimexpr1pt/255\relax% = 257sp
\definecolor[testcolor] [r=0.87843,g=0.87451,b=0.89020] % RGB(224,223,227))
\definecolor[testcolorHEX] [h=E0DFE3]% same as HEX (currently transformed to
RGB(223,222,226) )
\startMPpage
path p;
p
is a simple ConTeXt metafun demo file:
\starttext
\setupcolors[state=start]
\startMPpage
path p ; color c[] ;
p := fullsquare scaled 4cm ;
c[0] := transparent(1,.5,red) ;
c[1] := transparent(1,.5,green) ;
c[2] := transparent(1,.5,blue) ;
for i = 0 upto 2 :
fill p rotated (i*30) withcolor white
Hi, Hans and Jin-Hwan:
Here is a simple ConTeXt metafun demo file:
\starttext
\setupcolors[state=start]
\startMPpage
path p ; color c[] ;
p := fullsquare scaled 4cm ;
c[0] := transparent(1,.5,red) ;
c[1] := transparent(1,.5,green) ;
c[2] := transparent(1,.5,blue) ;
for i = 0 upto 2
\starttext
\startMPpage[offset=0pt]
color darkblue,textcolor;
darkblue := (0.0625,0,.412); % 0f006b =
textcolor := (1,1,1);
def rect (expr xl,yl,r) =
pickup pencircle scaled 1;
draw (xl-.5r,yl-.5r) -- (xl+.5r,yl-.5r)--
(xl+.5r,yl+.5r) -- (xl-.5r,yl+.5r) -- cycle
withcolor textcolor
\startMPpage[offset=0pt]
color darkblue,textcolor;
darkblue := (0.0625,0,.412); % 0f006b =
textcolor := (1,1,1);
def rect (expr xl,yl,r) =
pickup pencircle scaled 1;
draw (xl-.5r,yl-.5r) -- (xl+.5r,yl-.5r)--
(xl+.5r,yl+.5r) -- (xl-.5r,yl+.5r) -- cycle
withcolor textcolor;
enddef;
f
[helvetica,120pt]
\starttext
\startMPpage[offset=0pt]
color darkblue,textcolor;
darkblue := (0.0625,0,.412); % 0f006b =
textcolor := (1,1,1);
def rect (expr xl,yl,r) =
pickup pencircle scaled 1;
draw (xl-.5r,yl-.5r) -- (xl+.5r,yl-.5r)--
(xl+.5r,yl+.5r) -- (xl-.5r,yl+.5r) -- cycle
]
\usetypescript[helvetica]
\setupbodyfont[helvetica,120pt]
\starttext
\startMPpage[offset=0pt]
color darkblue,textcolor;
darkblue := (0.0625,0,.412); % 0f006b =
textcolor := (1,1,1);
def rect (expr xl,yl,r) =
pickup pencircle scaled 1;
draw (xl-.5r,yl-.5r) -- (xl+.5r,yl-.5r)--
(xl+.5r,yl+.5r
can
\setupcolors[state=start,textcolor=white]
\startMPenvironment
\usetypescript[postscript][ec]
\setupbodyfont[postscript,ss,120pt]
\stopMPenvironment
\usetypescript[postscript][ec]
\setupbodyfont[postscript,ss,120pt]
\starttext
\startMPpage[offset=0pt]
color darkblue,textcolor;
darkblue
are free to use this code any way you can
\setupcolors[state=start,textcolor=white]
\startMPenvironment
\usetypescript[postscript][ec]
\setupbodyfont[postscript,ss,120pt]
\stopMPenvironment
\usetypescript[postscript][ec]
\setupbodyfont[postscript,ss,120pt]
\starttext
\startMPpage[offset=0pt]
color
are free to use this code any way you can
\setupcolors[state=start,textcolor=white]
\startMPenvironment
\usetypescript[postscript][ec]
\setupbodyfont[postscript,ss,120pt]
\stopMPenvironment
\usetypescript[postscript][ec]
\setupbodyfont[postscript,ss,120pt]
\starttext
\startMPpage[offset=0pt]
color
hi:
it seems that mpfigure will be in the wrong position using the xetex engine.
here is the sample file:
% engine=xetex
\starttext
\setupcolors
[state=start]
\startMPpage
path p ; color c[] ;
p := fullsquare scaled 4cm ;
c[0] := transparent(1,.5,red) ;
c[1] := transparent(1,.5
Am 26.11.2008 um 10:04 schrieb Yue Wang:
hi:
it seems that mpfigure will be in the wrong position using the xetex
engine.
here is the sample file:
% engine=xetex
\starttext
\setupcolors
[state=start]
\startMPpage
path p ; color c[] ;
p := fullsquare scaled 4cm ;
c[0
using the xetex
engine.
here is the sample file:
% engine=xetex
\starttext
\setupcolors
[state=start]
\startMPpage
path p ; color c[] ;
p := fullsquare scaled 4cm ;
c[0] := transparent(1,.5,red) ;
c[1] := transparent(1,.5,green) ;
c[2] := transparent(1,.5,blue) ;
for i = 0 upto
\startMPpage[offset=1cm]
for i=1 upto 5000:
v := uniformdeviate(100) + 1 ;
h := uniformdeviate(v) / 5 * normaldeviate ;
l := uniformdeviate(5) ;
draw ((-l,0)--(l,0)) rotated uniformdeviate(180) shifted (h,-v)
withcolor transparent(1,.5,green) ;
endfor
\stopMPpage
\stoptext
Wolfgang
) ;
forget about sometxt ... that's mojca's personal hack
\starttext
\startMPpage
numeric value ; value = 123 ;
label.top(textext(decimal value),origin) ;
\stopMPpage
\stoptext
maybe i should patch the label macro
And how could one change the font/style for the number?
Wolfgang
\starttext
\startMPpage
numeric value ; value = 123 ;
label.top(textext(decimal value),origin) ;
\stopMPpage
\stoptext
maybe i should patch the label macro
Hans
-
Hans Hagen | PRAGMA ADE
interface=en
\starttext
\startMPpage
externalfigure cow.pdf scaled 2cm ;
clip currentpicture to boundingbox currentpicture -- reverse
unitsquare scaled 1cm shifted (.5cm,.5cm) -- cycle ;
\stopMPpage
\stoptext
have no clue (nor time to look into it in detail) but this seems to
work ok:
% engine=luatex interface=en
\starttext
\startMPpage
externalfigure cow.pdf scaled 2cm ;
clip currentpicture to boundingbox currentpicture -- reverse
unitsquare scaled 1cm shifted (.5cm,.5cm) -- cycle
)) ;
\stopMPcode
\stoptext
well, white is not the best test example
\unprotected\definetextext[parbox]
{\framed
[ width=2cm,
height=.85cm,
autowidth=no,
align={middle,middle},
background=color,
backgroundcolor=white]}
\startMPpage[background=color
601 - 700 of 819 matches
Mail list logo