Re: [NTG-context] CMYK colors not as expected

2011-06-29 Thread Hans Hagen
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

Re: [NTG-context] shading

2011-05-19 Thread Marco
, 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

[NTG-context] shading

2011-05-18 Thread Hans Hagen
] \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

Re: [NTG-context] shading

2011-05-18 Thread Marco
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

Re: [NTG-context] shading

2011-05-18 Thread Hans Hagen
] [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

Re: [NTG-context] mtxrun --script metapost and fonts?

2011-05-10 Thread Hans Hagen
] [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

[NTG-context] Context and metapost: using \frac

2011-04-26 Thread mat
... 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

Re: [NTG-context] Context and metapost: using \frac

2011-04-26 Thread Matthieu Stigler
=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

Re: [NTG-context] Context and metapost: using \frac

2011-04-26 Thread Matthieu Stigler
\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

Re: [NTG-context] Context and metapost: using \frac

2011-04-26 Thread Andreas Harder
\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

Re: [NTG-context] Context and metapost: using \frac

2011-04-26 Thread Matthieu Stigler
\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

Re: [NTG-context] boxes package exhaust the system memory

2011-04-25 Thread Wolfgang Schuster
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

Re: [NTG-context] boxes package exhaust the system memory??

2011-04-25 Thread Joshua Lee
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

[NTG-context] boxes package exhaust the system memory

2011-04-24 Thread 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 System environment: * ConTeXt ver: 2011.04.13 09:23 MKIV fmt: 2011.4.19 int: english/english

Re: [NTG-context] How to add metapost 3rd party modules????

2011-04-20 Thread Joshua Lee
--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

Re: [NTG-context] How to add metapost 3rd party modules??

2011-04-19 Thread Aditya Mahajan
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

Re: [NTG-context] OT: drawing graphs: Asymptote, Gnuplot, MetaFun, …

2011-04-18 Thread Mojca Miklavec
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

Re: [NTG-context] Metafun Label and externalfigure Problem

2011-03-01 Thread Lutz Haseloff
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

Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Hongwen Qiu
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

Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Reviczky, Adam
\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

[NTG-context] korean (was Re: ntg-context Digest, Vol 80, Issue 49)

2011-02-14 Thread Hans Hagen
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

Re: [NTG-context] Labels in MetaPost (MetaObj)

2011-01-22 Thread Stefan Müller
\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

Re: [NTG-context] Labels in MetaPost (MetaObj)

2011-01-22 Thread Aditya Mahajan
: 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

Re: [NTG-context] Labels in MetaPost (MetaObj)

2011-01-21 Thread Aditya Mahajan
\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

[NTG-context] Labels in MetaPost (MetaObj)

2011-01-18 Thread Stefan Müller
;ObjCode@##b... === \startMPinclusions input metaobj; \stopMPinclusions \startMPpage vardef newSegment@#= assignObj(@#,Segment); ObjPoint a,b; ObjCode @#b-@#a=(1cm,2cm); enddef; def

Re: [NTG-context] mptopdf (broken again)

2011-01-12 Thread Mojca Miklavec
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

[NTG-context] beta: graphictext (mkiv)

2011-01-03 Thread Peter Rolf
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

Re: [NTG-context] How to get graph module (metapost) to work with ConTeXt minimals?

2010-12-31 Thread Alan BRASLAU
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

Re: [NTG-context] How to get graph module (metapost) to work with ConTeXt minimals?

2010-12-30 Thread Martin 'golodhrim' Scholz
\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

Re: [NTG-context] How to get graph module (metapost) to work with ConTeXt minimals?

2010-12-30 Thread Verhaag, G.C.H.M.
, 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

[NTG-context] Metapost and underscore

2010-09-20 Thread Aditya Mahajan
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

Re: [NTG-context] Metapost and underscore

2010-09-20 Thread Aditya Mahajan
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

Re: [NTG-context] Renaming file breaks texexec

2010-08-30 Thread Cecil Westerhof
,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

Re: [NTG-context] textext vs. btex ... etex

2010-08-22 Thread Oliver Buerschaper
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

Re: [NTG-context] textext vs. btex ... etex

2010-08-21 Thread Oliver Buerschaper
; 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

[NTG-context] Issues with MetaPost boxes

2010-08-14 Thread Andreas Schneider
, 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

[NTG-context] color shading/conversion (mkiv)

2010-08-03 Thread Peter Rolf
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

[NTG-context] Multi-line labels in MetaPost MKIV

2010-07-28 Thread 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 scaled 5cm; label(\sometxt[mplabel]{One\\Two}, (0,0

Re: [NTG-context] Multi-line labels in MetaPost MKIV

2010-07-28 Thread Wolfgang Schuster
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

Re: [NTG-context] Multi-line labels in MetaPost MKIV

2010-07-28 Thread Richard Stephens
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

Re: [NTG-context] Multi-line labels in MetaPost MKIV

2010-07-28 Thread Hans Hagen
\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

Re: [NTG-context] Multi-line labels in MetaPost MKIV

2010-07-28 Thread Richard Stephens
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

Re: [NTG-context] [metapost] mptopdf from the command line in ConTeXt minimals?...

2010-06-30 Thread luigi scarso
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

Re: [NTG-context] MetaPost Animation

2010-04-16 Thread Boštjan Vesnicer
; 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

Re: [NTG-context] Lua-loop inside MetaPost

2010-03-09 Thread 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 ; \stopMPpage \startluacode context.startMPpage() context

Re: [NTG-context] Lua-loop inside MetaPost

2010-03-09 Thread Andreas Harder
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

Re: [NTG-context] Lua-loop inside MetaPost

2010-03-09 Thread Andreas Harder
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

Re: [NTG-context] Lua-loop inside MetaPost

2010-03-09 Thread 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 context.startMPpage() context(draw origin..for i=0,100,10 do{down

[NTG-context] Lua-loop inside MetaPost

2010-03-09 Thread 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}(..i..,0)..end..;) context.stopMPpage

[NTG-context] MetaPost + format(%g,n)

2010-03-07 Thread Troy Henderson
] \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

Re: [NTG-context] MetaPost + format(%g,n)

2010-03-07 Thread Troy Henderson
=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

Re: [NTG-context] Crop Output

2010-03-06 Thread Aditya Mahajan
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

Re: [NTG-context] Crop Output

2010-03-06 Thread Troy Henderson
\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

Re: [NTG-context] metapost

2010-02-17 Thread Hans Hagen
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

Re: [NTG-context] metaobj and luatex 0.42.0

2009-09-23 Thread Matthijs Kooijman
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

Re: [NTG-context] metaobj and luatex 0.42.0

2009-09-16 Thread Matthijs Kooijman
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

Re: [NTG-context] status of minimals

2009-09-11 Thread Mohamed Bana
: 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

Re: [NTG-context] status of minimals

2009-09-11 Thread Aditya Mahajan
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

Re: [NTG-context] status of minimals

2009-09-10 Thread Mohamed Bana
'/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

Re: [NTG-context] status of minimals

2009-09-08 Thread Aditya Mahajan
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

Re: [NTG-context] status of minimals

2009-09-08 Thread Mohamed Bana
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

Re: [NTG-context] Exporting figures

2009-08-14 Thread Hans Hagen
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

Re: [NTG-context] Exporting figures

2009-08-14 Thread richard . stephens
? 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

Re: [NTG-context] loop textext and \MPstring{… }

2009-08-12 Thread Andreas Harder
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

Re: [NTG-context] loop textext and \MPstring{…}

2009-08-12 Thread Aditya Mahajan
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

Re: [NTG-context] loop textext and \MPstring{… }

2009-08-12 Thread Andreas Harder
} \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

Re: [NTG-context] loop textext and \MPstring{… }

2009-08-12 Thread Hans Hagen
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

[NTG-context] loop textext and \MPstring{… }

2009-08-11 Thread Andreas Harder
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

Re: [NTG-context] loop textext and \MPstring{… }

2009-08-11 Thread Hans Hagen
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

Re: [NTG-context] loop textext and \MPstring{…}

2009-08-11 Thread 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 textext(\MPstring{i}) shifted(i*cm,i*cm) ; endfor

[NTG-context] metaobj and luatex 0.42.0

2009-08-06 Thread Matthew Claus
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

Re: [NTG-context] metaobj and luatex 0.42.0

2009-08-06 Thread Hans Hagen
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

Re: [NTG-context] How to prevent empty page after MPpage?

2009-07-13 Thread 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

Re: [NTG-context] How to prevent empty page after MPpage?

2009-07-13 Thread Hans Hagen
\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

Re: [NTG-context] How to prevent empty page after MPpage?

2009-07-13 Thread Mojca Miklavec
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

[NTG-context] How to prevent empty page after MPpage?

2009-07-12 Thread Mojca Miklavec
% {\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

Re: [NTG-context] How to prevent empty page after MPpage?

2009-07-12 Thread Hans Hagen
\stopGNUPLOTpage% {\startMPpage#1\stopMPpage} \starttext \startGNUPLOTpage draw fullcircle scaled 3cm; \stopGNUPLOTpage \stoptext do you reset the color afterwards? - Hans Hagen

Re: [NTG-context] How to prevent empty page after MPpage?

2009-07-12 Thread Mojca Miklavec
%        {\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

Re: [NTG-context] How to prevent empty page after MPpage?

2009-07-12 Thread Wolfgang Schuster
{\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

Re: [NTG-context] How to prevent empty page after MPpage?

2009-07-12 Thread Mojca Miklavec
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

[NTG-context] colo-hex

2009-07-09 Thread Peter Rolf
=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

Re: [NTG-context] colo-hex

2009-07-09 Thread Peter Rolf
*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

Re: [NTG-context] XeConTeXt bug report II: MetaPost Graphics

2009-05-12 Thread Jin-Hwan Cho
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

[NTG-context] XeConTeXt bug report II: MetaPost Graphics

2009-05-11 Thread Yue Wang
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

Re: [NTG-context] Context logo (was ConTeXt T-shirts?)

2009-03-14 Thread Xan
\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

Re: [NTG-context] ConTeXt T-shirts?

2009-03-13 Thread Xan
\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

Re: [NTG-context] ConTeXt T-shirts?

2009-03-12 Thread Wolfgang Schuster
[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

Re: [NTG-context] ConTeXt T-shirts?

2009-03-12 Thread Xan
] \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

Re: [NTG-context] ConTeXt T-shirts?

2009-03-12 Thread Wolfgang Schuster
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

Re: [NTG-context] ConTeXt T-shirts?

2009-03-12 Thread Xan
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

Re: [NTG-context] ConTeXt T-shirts?

2009-03-12 Thread Xan
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

[NTG-context] bug in mkii xetex: mp figure is not in the right position

2008-11-26 Thread 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] := transparent(1,.5,red) ; c[1] := transparent(1,.5

Re: [NTG-context] bug in mkii xetex: mp figure is not in the right position

2008-11-26 Thread Wolfgang Schuster
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

Re: [NTG-context] bug in mkii xetex: mp figure is not in the right position

2008-11-26 Thread Yue Wang
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

Re: [NTG-context] How to randomize points in a given area?

2008-11-15 Thread Wolfgang Schuster
\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

Re: [NTG-context] small problem with minimals

2008-11-11 Thread Wolfgang Schuster
) ; 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

Re: [NTG-context] small problem with minimals

2008-11-10 Thread Hans Hagen
\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

Re: [NTG-context] Clipping bug in MetaPost with MkIV

2008-10-30 Thread Hans Hagen
interface=en \starttext \startMPpage externalfigure cow.pdf scaled 2cm ; clip currentpicture to boundingbox currentpicture -- reverse unitsquare scaled 1cm shifted (.5cm,.5cm) -- cycle ; \stopMPpage \stoptext

Re: [NTG-context] Clipping bug in MetaPost with MkIV

2008-10-30 Thread luigi scarso
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

Re: [NTG-context] Background color of sometxt ignored

2008-08-31 Thread Hans Hagen
)) ; \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

<    2   3   4   5   6   7   8   9   >