[NTG-context] Bug in latest beta, shifted metapost (possibly with drawarrow)

2016-11-03 Thread Mikael P. Sundqvist
Dear list, the example below has shifted axes. I updated to the latest standalone earlier today. The problem was not present some weeks ago. In particular look at the red line that should start from the origin... \starttext \startMPpage ut:=1.0cm; ux:=0.6cm; vardef diffp(expr riktn) = ((-1,0

Re: [NTG-context] buffers inside startMPpage

2016-10-14 Thread Jan Willem Flamma
>> >> The below MWE represent my MetaFun drawings file. >> The idea is that by uncommenting the \enablemode[makepdf] I can create the >> pdf file with drawings. It seems however that startMPpage does not accept >> buffers (I also tried processbuffer and process

Re: [NTG-context] buffers inside startMPpage

2016-10-14 Thread Wolfgang Schuster
below MWE represent my MetaFun drawings file. The idea is that by uncommenting the \enablemode[makepdf] I can create the pdf file with drawings. It seems however that startMPpage does not accept buffers (I also tried processbuffer and processMPbuffer). Is it possible to somehow make this work? Y

[NTG-context] buffers inside startMPpage

2016-10-14 Thread Jan Willem Flamma
the \enablemode[makepdf] I can create the pdf file with drawings. It seems however that startMPpage does not accept buffers (I also tried processbuffer and processMPbuffer). Is it possible to somehow make this work? Thanks and regards, Jan Willem Flamma %\enablemode[makepdf] \startbuffer[fig1] draw

Re: [NTG-context] Dotted characters

2016-08-16 Thread Procházka Lukáš Ing .
Hello Hans, On Tue, 16 Aug 2016 09:54:26 +0200, Hans Hagen <pra...@wxs.nl> wrote: the best one can expect without too much work is \startMPpage draw outlinetext.f ("A") () ; currentpicture := currentpicture shifted (-bbwidth currentpictur

Re: [NTG-context] Dotted characters

2016-08-16 Thread Hans Hagen
you need to make sure that the dots in the crossbar of an ‘A’ line up nicely with the dots in the diagonal outer strokes, which is quite hard to do. the best one can expect without too much work is \startMPpage draw outlinetext.f ("A") () ; currentpicture := currentpictur

Re: [NTG-context] vectors instead of embedding fonts

2016-08-15 Thread Hans Hagen
://tex.stackexchange.com/a/127902/10995 Cheers, Henri Hi Henri, many thanks for your reply. I really need the vectors to create an SVG cover from the PDF cover. Nothing to do with obfuscation at all. \startMPpage draw outlinetext.d ("\ConTeXt\ is awesome!") (withpen pencircle s

Re: [NTG-context] drawpathoptions and drawoptions

2016-08-08 Thread Mikael P. Sundqvist
On Mon, Aug 8, 2016 at 2:45 PM, Hans Hagen <pra...@wxs.nl> wrote: > On 8/8/2016 2:29 PM, Mikael P. Sundqvist wrote: > >> \startMPpage >> drawoptions(withcolor darkred); >> path p; >> p:= (0,0)--(1cm,1cm)--(1cm,0)--(0,1cm); >> draw image ( >>

Re: [NTG-context] drawpathoptions and drawoptions

2016-08-08 Thread Hans Hagen
On 8/8/2016 2:29 PM, Mikael P. Sundqvist wrote: \startMPpage drawoptions(withcolor darkred); path p; p:= (0,0)--(1cm,1cm)--(1cm,0)--(0,1cm); draw image ( draw p; draw p xshifted 2cm withcolor darkyellow; ); \stopMPpage This gives me two red paths (result attached). I would like

Re: [NTG-context] drawpathoptions and drawoptions

2016-08-08 Thread Mikael P. Sundqvist
I have two questions: >>> >>> 1) In the metafun manual I found (p 57 in the version I browse) a >>> setting drawpathoptions. >>> >>> I tried with >>> >>> \startMPpage >>> drawpathoptions(withcolor darkred); >>> path p;

Re: [NTG-context] drawpathoptions and drawoptions

2016-08-08 Thread Hans Hagen
On 8/5/2016 7:54 AM, Mikael P. Sundqvist wrote: On Tue, Aug 2, 2016 at 5:48 PM, Mikael P. Sundqvist <mic...@gmail.com> wrote: Hi, I have two questions: 1) In the metafun manual I found (p 57 in the version I browse) a setting drawpathoptions. I tried with \startMPpage drawpatho

Re: [NTG-context] drawpathoptions and drawoptions

2016-08-04 Thread Mikael P. Sundqvist
On Tue, Aug 2, 2016 at 5:48 PM, Mikael P. Sundqvist <mic...@gmail.com> wrote: > Hi, > > I have two questions: > > 1) In the metafun manual I found (p 57 in the version I browse) a > setting drawpathoptions. > > I tried with > > \startMPpage > drawpathop

[NTG-context] drawpathoptions and drawoptions

2016-08-02 Thread Mikael P. Sundqvist
Hi, I have two questions: 1) In the metafun manual I found (p 57 in the version I browse) a setting drawpathoptions. I tried with \startMPpage drawpathoptions(withcolor darkred); path p; p:= (0,0)--(1cm,1cm)--(1cm,0)--(0,1cm); draw p; \stopMPpage but the result turned out to be black. Isn't

Re: [NTG-context] Randomize control points in metapost/metafun?

2016-08-01 Thread Mikael P. Sundqvist
gt;> The reason is the following: I want to draw (for example) a circle >> with a triangle inside, and I want them to look slightly randomized. >> If I do (see attached pdf for a typical result of this) >> >> \startMPpage >> draw fullcircle scaled 2cm randomized 0.

Re: [NTG-context] Randomize control points in metapost/metafun?

2016-08-01 Thread Hans Hagen
do (see attached pdf for a typical result of this) \startMPpage draw fullcircle scaled 2cm randomized 0.1cm; draw ((1cm,0)--(0,1cm)--(-1cm,0)--cycle) randomized 0.1cm; \stopMPpage then the corners of the triangle does not stay on the circle (and I want them to). [I dont want the triangle

[NTG-context] Randomize control points in metapost/metafun?

2016-08-01 Thread Mikael P. Sundqvist
of this) \startMPpage draw fullcircle scaled 2cm randomized 0.1cm; draw ((1cm,0)--(0,1cm)--(-1cm,0)--cycle) randomized 0.1cm; \stopMPpage then the corners of the triangle does not stay on the circle (and I want them to). [I dont want the triangle to consist of perfectly straight lines, so I cannot

Re: [NTG-context] Remove files that are not needed (Metafun)

2016-07-12 Thread Aditya Mahajan
On Tue, 12 Jul 2016, Fabrice Couvreur wrote: this is more modern (the method, not the font): How filling the number ? \starttext \startMPpage draw outlinetext.d ("Hello") (withpen pencircle scaled 0.1bp withcolor red) ysized 60pt ; \

Re: [NTG-context] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2016-06-30 Thread Hans Hagen
oesn't work, that's fine, I can still add "-mem=metafun", but ... input metafun.mpiv ; How should one properly compile that file then to get the SVG? some mp directive (but i never tried) as i always just use \startMPpage .. \stopMPpage so that fonts etc work ok too Using just

Re: [NTG-context] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2016-06-29 Thread Mojca Miklavec
, right? >> >> (3) Is there any way to convince the SVG output mode to generate something >> like >> >> rather than >> >> because the program I use to convert SVG to DXF has troubles >> interpreting "points" properly. I read some

Re: [NTG-context] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2016-06-29 Thread Hans Hagen
use to convert SVG to DXF has troubles interpreting "points" properly. I read somewhere that they assume 90 points per inch because that's Inkskape's default. why not just \startMPpage whatever you want \stopMPpage and then use mudraw (mutools) to go from pdf to svg (that's what i do

Re: [NTG-context] next beta

2016-06-27 Thread Meer, Hans van der
> On 27 Jun 2016, at 10:38, Hans Hagen <pra...@wxs.nl> wrote: > > The next beta will support this (for mp lovers) > > \definecolor[maincolor] [r=.5] > \startMPpage >fill fullcircle scaled 10cm withcolor "maincolor" ; >... > \stopMPpage

[NTG-context] next beta

2016-06-27 Thread Hans Hagen
Hi, The next beta will support this (for mp lovers) \definecolor[maincolor] [r=.5] \definecolor[extracolor] [g=.5] \definecolor[anothercolor][b=.5] \definecolor[morecolor] [s=.8] \startMPpage fill fullcircle scaled 10cm withcolor "maincolor" ; fill fullcircle scaled 9cm

Re: [NTG-context] \startuseMPgraphic

2016-04-11 Thread Alan BRASLAU
are two way to define colors for a metapost graphics, the first > is to define it with metapost itself. > > %% begin example > \startMPpage > color myred ; myred := (1,0,0) ; > fill fullcircle scaled 3cm withcolor myred ; > \stopMPpage > %% end example > > The disadv

Re: [NTG-context] deprecated startMPenvironment

2016-04-04 Thread Wolfgang Schuster
]\switchtobodyfont[small]\stopMPenvironment \startMPpage % metafont code \stopMPpage \stoptext \endinput This is called by context --run --once etc. producing the figure and in this case modifying the font to a smaller size. Note, the context call occurs on the fly inside a \directlua{{os.execute(.

Re: [NTG-context] deprecated startMPenvironment

2016-04-04 Thread Meer, Hans van der
On 04 Apr 2016, at 00:12, Hans Hagen <pra...@wxs.nl<mailto:pra...@wxs.nl>> wrote: On 4/3/2016 4:07 PM, Meer, Hans van der wrote: Previously I could do the following \starttext \startMPenvironment[+]\switchtobodyfont[small]\stopMPenvironment \startMPpage % metafont code \stopMPpa

Re: [NTG-context] deprecated startMPenvironment

2016-04-03 Thread Hans Hagen
On 4/3/2016 4:07 PM, Meer, Hans van der wrote: Previously I could do the following \starttext \startMPenvironment[+]\switchtobodyfont[small]\stopMPenvironment \startMPpage % metafont code \stopMPpage \stoptext \endinput This is called by context --run --once etc. producing the figure

[NTG-context] deprecated startMPenvironment

2016-04-03 Thread Meer, Hans van der
Previously I could do the following \starttext \startMPenvironment[+]\switchtobodyfont[small]\stopMPenvironment \startMPpage % metafont code \stopMPpage \stoptext \endinput This is called by context --run --once etc. producing the figure and in this case modifying the font to a smaller size

[NTG-context] next beta

2016-02-25 Thread Hans Hagen
Hi, The next beta will have a more efficient metafun filldraw option named 'fillup' (flaw and drill were rejected as operator names): \starttext \startMPpage fill fullsquare scaled 4cm withpen pencircle scaled 1cm; draw fullsquare scaled 4cm withpen pencircle scaled

Re: [NTG-context] new error in Context-Metapost

2016-02-17 Thread Hans Hagen
,0)(0,B)&\cr} $ \stopsetups \startMPpage label("\setup[dif-1]",origin); \stopMPpage \stoptext tex error > tex error on line 9 in file /Users/hansm/Documents/TeX/Test-tex/cases/cases.tex: ! Missing $ inserted $ \endgroup \math_fenced_fenced_

[NTG-context] new error in Context-Metapost

2016-02-17 Thread Meer, Hans van der
r} $ \stopsetups \startMPpage label("\setup[dif-1]",origin); \stopMPpage \stoptext tex error > tex error on line 9 in file /Users/hansm/Documents/TeX/Test-tex/cases/cases.tex: ! Missing $ inserted $ \endgroup \math_fenced_fenced_

Re: [NTG-context] anglestriped shifts path

2016-02-04 Thread Marco Patzer
On Wed, 3 Feb 2016 15:27:36 -0500 John Kitzmiller <k...@inradius.net> wrote: > I expect anglestriped to work more like fill, but it shifts the path. > Is it intended behavior? > > \startMPpage[offset=2mm] > path p; > p = unitsquare scaled 4cm ; p = fullsq

[NTG-context] anglestriped shifts path

2016-02-03 Thread John Kitzmiller
I expect anglestriped to work more like fill, but it shifts the path. Is it intended behavior? \startMPpage[offset=2mm] path p; p = unitsquare scaled 4cm ; filldraw p withcolor blue; draw p; draw p anglestriped(0,0,0) withcolor blue; \stopMPpage Thanks, John

Re: [NTG-context] Shading to transparent using withshademethod

2016-01-28 Thread Hans Hagen
On 1/28/2016 2:02 PM, Marco Patzer wrote: On Thu, 28 Jan 2016 12:29:46 +0100 Hans Hagen <pra...@wxs.nl> wrote: How to make transparent shadings work with the new mechanism? withtransparency (1,.5) next beta \definecolor [trans] [a=multiply, t=.5, g=.5] \startMPpage

Re: [NTG-context] Shading to transparent using withshademethod

2016-01-28 Thread Marco Patzer
On Thu, 28 Jan 2016 12:29:46 +0100 Hans Hagen <pra...@wxs.nl> wrote: > >> How to make transparent shadings work with the new mechanism? > > > >withtransparency (1,.5) > > next beta > > \definecolor [trans] [a=multiply, t=.5, g=.5] > > \s

Re: [NTG-context] Shading to transparent using withshademethod

2016-01-28 Thread Hans Hagen
toptext How to make transparent shadings work with the new mechanism? withtransparency (1,.5) next beta \definecolor [trans] [a=multiply, t=.5, g=.5] \startMPpage fill fullcircle scaled 12cm withcolor \MPcoloronly{trans}; fill fullcircle scaled 10cm withcolor \MPcolor{trans};

Re: [NTG-context] Rotating an image

2015-10-15 Thread Wolfgang Schuster
el.top("A", A) ; label.lrt("C", z2) ; label.llft("B", origin) ; label.ulft("I", I) ; label.urt("J", J) ; label.ulft("$x$", L) ; draw pic rotated 15 ; \startMPpage picture pic ; u := 0.5cm ; z1 = origin ; z2 = (9u, 0) ; path p ; p := fullci

Re: [NTG-context] Rotating an image

2015-10-15 Thread Fabrice Couvreur
; > L := point 0.8 of b ; > label.top("A", A) ; > label.lrt("C", z2) ; > label.llft("B", origin) ; > label.ulft("I", I) ; > label.urt("J", J) ; > label.ulft("$x$", L) ; > draw pic rotated 15 ; > > \star

Re: [NTG-context] About graphictext macro (Metafun)

2015-08-27 Thread Fabrice Couvreur
) (draw options) (fill options) transformations ; % outlinetext.r (text) (fill options) (draw options) transformations ; \starttext \startMPdefinitions let graphictext = new_graphictext ; \stopMPdefinitions \startMPpage draw outlinetext.b (\framed[align=normal]{\input

Re: [NTG-context] About graphictext macro (Metafun)

2015-08-27 Thread Hans Hagen
) transformations ; % outlinetext.r (text) (fill options) (draw options) transformations ; \starttext \startMPdefinitions let graphictext = new_graphictext ; \stopMPdefinitions \startMPpage draw outlinetext.b (\framed[align=normal]{\input{tufte}}) (withcolor .5white) (withcolor

Re: [NTG-context] About graphictext macro (Metafun)

2015-08-27 Thread Fabrice Couvreur
options) (fill options) transformations ; % outlinetext.r (text) (fill options) (draw options) transformations ; \starttext \startMPdefinitions let graphictext = new_graphictext ; \stopMPdefinitions \startMPpage draw outlinetext.b (\framed[align=normal]{\input{tufte

Re: [NTG-context] m-graph read data and plot

2015-08-13 Thread Hans Hagen
] \startMPpage[instance=graph,offset=2mm] draw begingraph(3cm,5cm); numeric a[]; gdata(read1.tex, v, setrange(0,0,3,4); ); closefrom read1.tex; autogrid(,grid.lft) withcolor .7white; gdata(read1.tex,v, for j = 1 upto 3: a[j] := scantokens v[j

Re: [NTG-context] m-graph read data and plot

2015-08-13 Thread John Kitzmiller
, but it works to read data from the top of the .tex file and then plot on the autogrid. % 1 0.5 2.5 % 2 1 3.5 \usemodule[graph] \startMPpage[instance=graph,offset=2mm] draw begingraph(3cm,5cm); numeric a[]; gdata(read1.tex, v, setrange(0,0,3,4); ); closefrom read1.tex

Re: [NTG-context] m-graph read data and plot

2015-08-13 Thread Hans Hagen
be rendered and then drawn over The following may not be the best way, but it works to read data from the top of the .tex file and then plot on the autogrid. % 1 0.5 2.5 % 2 1 3.5 \usemodule[graph] \startMPpage[instance=graph,offset=2mm] draw begingraph(3cm,5cm); numeric a[]; gdata(read1

Re: [NTG-context] m-graph read data and plot

2015-08-09 Thread Alan BRASLAU
to work using m-graph? http://ctan.org/tex-archive/systems/doc/metapost/source-manual http://ctan.org/tex-archive/systems/doc/metapost/source-manual Thanks again, John \usemodule [graph] \startMPpage [instance=graph] draw begingraph(3in,2in); glabel.lft(btex \vbox{\hbox{Quadrillions}\hbox

Re: [NTG-context] m-graph read data and plot

2015-08-07 Thread Alan BRASLAU
do need to declare that a is an array, as in numeric a[]; Here is a MWE \enabletrackers[metapost.showlog] \usemodule[graph] \startMPpage[instance=graph,offset=3mm] draw begingraph(5cm,5cm); numeric a[]; gdata(data.d, v, for j=1 upto 3: a[j]:=scantokens v[j

Re: [NTG-context] m-graph read data and plot

2015-08-07 Thread John Kitzmiller
[graph] \startMPpage[instance=graph,offset=3mm] draw begingraph(5cm,5cm); numeric a[]; gdata(data.d, v, for j=1 upto 3: a[j]:=scantokens v[j]; endfor ; ); setrange (whatever,0,whatever,2); gdraw (a2,a1)--(a3,a1); endgraph; \stopMPpage Alan

Re: [NTG-context] m-graph read data and plot

2015-08-06 Thread John Kitzmiller
] \startMPpage[instance=graph,offset=3mm] draw begingraph(5cm,5cm); gdata(data.d, v, for n = 1 upto 3: a[n] = scantokens v[n]; endfor; show a1; show a2; show a3; % numeric show v1; show v2; show v3; % string gdraw (a2,a1)—(a3,a1); % same problem

Re: [NTG-context] m-graph read data and plot

2015-08-06 Thread Hans Hagen
On 8/6/2015 5:30 PM, John Kitzmiller wrote: Given a file, data.d, containing 1 4 7 I expected the following code to draw a line from (4,1) to (7,1)… \enabletrackers[metapost.showlog] \usemodule[m-graph] \startMPpage[instance=graph,offset=3mm] draw begingraph(5cm,5cm); gdata(data.d, v

[NTG-context] m-graph read data and plot

2015-08-06 Thread John Kitzmiller
Given a file, data.d, containing 1 4 7 I expected the following code to draw a line from (4,1) to (7,1)… \enabletrackers[metapost.showlog] \usemodule[m-graph] \startMPpage[instance=graph,offset=3mm] draw begingraph(5cm,5cm); gdata(data.d, v, for n = 1 upto 3: a[n

Re: [NTG-context] TikZ and wrong drawing order

2015-06-15 Thread Hans Hagen
at predefined distances, but it's all a single shading (a single function), not a composition of multiple sections). Ok, as I suppose you need it for you thesis ... a new beta ... I didn't play with values for the circular one but here's a linear: \startMPpage fill fullsquare scaled 50pt

Re: [NTG-context] TikZ and wrong drawing order

2015-06-15 Thread Mojca Miklavec
): \startMPpage fill fullcircle scaled 10cm withshademethod circular withshadevector (5cm,1cm) withshadecenter (.1,.5) withshadedomain (.2,.6) withshadefactor 1.2 withshadecolors (red,green) ; \stopMPage Great, I love the new syntax

Re: [NTG-context] new beta

2015-06-15 Thread Alan BRASLAU
) (fill options) (draw options) transformations ; \starttext \startMPpage draw outlinetext.b (\framed[align=normal]{\input{tufte}}) (withcolor .5white) (withcolor red withpen pencircle scaled 1/10) xsized 10cm ; \stopMPpage

Re: [NTG-context] TikZ and wrong drawing order

2015-06-15 Thread Hans Hagen
On 6/14/2015 11:26 PM, Mojca Miklavec wrote: On Fri, Jun 12, 2015 at 12:45 AM, Hans Hagen wrote: Most shades look ugly and useless to me anyway but you have more control than you think (always had but nicer interfaced in mpiv): \startMPpage fill fullcircle scaled 10cm

Re: [NTG-context] new beta

2015-06-14 Thread Mojca Miklavec
) (fill options) transformations ; % outlinetext.b (text) (draw options) (fill options) transformations ; % outlinetext.r (text) (fill options) (draw options) transformations ; \starttext \startMPpage draw outlinetext.b (\framed[align=normal]{\input{tufte}}) (withcolor

Re: [NTG-context] TikZ and wrong drawing order

2015-06-14 Thread Mojca Miklavec
On Fri, Jun 12, 2015 at 12:45 AM, Hans Hagen wrote: Most shades look ugly and useless to me anyway but you have more control than you think (always had but nicer interfaced in mpiv): \startMPpage fill fullcircle scaled 10cm withshademethod circular withshadevector (5cm

[NTG-context] new beta

2015-06-13 Thread Hans Hagen
(text) (draw options) (fill options) transformations ; % outlinetext.r (text) (fill options) (draw options) transformations ; \starttext \startMPpage draw outlinetext.b (\framed[align=normal]{\input{tufte}}) (withcolor .5white) (withcolor red withpen pencircle scaled 1/10

Re: [NTG-context] TikZ and wrong drawing order

2015-06-11 Thread Hans Hagen
think (always had but nicer interfaced in mpiv): \startMPpage fill fullcircle scaled 10cm withshademethod circular withshadevector (5cm,1cm) withshadecenter (.1,.5) withshadedomain (.2,.6) withshadefactor 1.2 withshadecolors (red,green

Re: [NTG-context] MetaPost, specifiy max width of a text?

2015-03-18 Thread Hans Hagen
=2.5cm,align=center] {Start new Game}; \stoptikzpicture \startMPcode draw Start new Game infont defaultfont scaled defaultscale; \stopMPcode \stoptext \startMPpage draw textext(\framed[width=6cm,align={normal,tolerant}]{\input tufte\relax}) ; \stopMPpage

Re: [NTG-context] Hatch an area with Metapost (Metafun)

2015-02-17 Thread John Kitzmiller
On Feb 16, 2015, at 3:21 PM, Fabrice Couvreur wrote: This does not work with : labeloffset := 2mm; On Feb 09, 2015, Hans Hagen wrote: \startMPpage[offset=2pt] path p, q, r ; pair z ; p := unitsquare scaled 4cm ; z := point 3.6 of p ; q := z--urcorner p ; r := q

Re: [NTG-context] Hatch an area with Metapost (Metafun)

2015-02-11 Thread John Kitzmiller
?) There is also anglestriped in mp-tool with some examples. The second argument changes the angle. \startMPpage[offset=2mm] path p, q ; p := unitsquare scaled 4cm ; z1 = point 3.6 of p ; q := subpath (0,2) of p -- z1 -- cycle; q := q shifted(-4cm,-4cm); draw q anglestriped(1,180,6) withcolor blue

Re: [NTG-context] Hatch an area with Metapost (Metafun)

2015-02-09 Thread Hans Hagen
) ; label.ulft(btex A etex,ulcorner p) ; label.urt(btex D etex, urcorner p) ; label.lft(btex M etex, z) ; \stopMPcode \stoptext \startMPpage[offset=2pt] path p, q, r ; pair z ; p := unitsquare scaled 4cm ; z := point 3.6 of p ; q := z--urcorner p ; r := q -- reverse bottomboundary p

Re: [NTG-context] Hatch an area with Metapost (Metafun)

2015-02-09 Thread John Kitzmiller
to a path. Here is a way to do your task with (almost) only MetaPost: \startMPpage[offset=2mm] path p, q ; p := unitsquare scaled 4cm ; z1 = point 3.6 of p ; q := z1 -- urcorner p -- lrcorner p -- llcorner p -- cycle; for i = 8 step -.5 until 0: draw (i,0)*cm -- (i-4,4)*cm withpen pencircle

Re: [NTG-context] Where is error in my code?

2015-01-28 Thread Mojca Miklavec
On Wed, Jan 28, 2015 at 5:49 AM, Van Dung Tang nguyen...@gmail.com wrote: I edit 1 file metafun with follow: \startMPenvironment \usetypescript[times][texnansi] \switchtobodyfont[times,10pt] \stopMPenvironment \startMPpage fill fullcircle scaled 2cm withcolor red; label(\sometxt{Cn

[NTG-context] Where is error in my code?

2015-01-28 Thread Van Dung Tang
I edit 1 file metafun with follow: \startMPenvironment \usetypescript[times][texnansi] \switchtobodyfont[times,10pt] \stopMPenvironment \startMPpage fill fullcircle scaled 2cm withcolor red; label(\sometxt{Cn},origin) withcolor white; \stopMPpage After run context and recieve 1 picture

[NTG-context] Where is error in my code?

2015-01-28 Thread Van Dung Tang
I edit 1 file metafun follow: \startMPenvironment \usetypescript[times][texnansi] \switchtobodyfont[times,10pt] \stopMPenvironment \startMPpage fill fullcircle scaled 2cm withcolor red; label(\sometxt{Cn},origin) withcolor white; \stopMPpage Ngu-Hanh.pdf Description: Adobe PDF document

Re: [NTG-context] Where is error in my code?

2015-01-28 Thread Hans Hagen
On 1/28/2015 5:49 AM, Van Dung Tang wrote: I edit 1 file metafun with follow: \startMPenvironment \usetypescript[times][texnansi] \switchtobodyfont[times,10pt] \stopMPenvironment \startMPpage fill fullcircle scaled 2cm withcolor red; label(\sometxt{Cn},origin) withcolor white; \stopMPpage

Re: [NTG-context] Where is error in my code?

2015-01-28 Thread Keith Schultz
Hi, From the looks of it you are using legacy code! For one ConTeXt uses UTF you no need texansi encoding. In Mkiv all you need is \startext \startMPpage fill fullcircle scaled 2cm withcolor red; label(\sometxt{Cn},origin) withcolor white; \stopMPpage \stoptext If you want

Re: [NTG-context] Center horizontally and vertically a table with a graphic in a paragraph environment

2015-01-09 Thread Pablo Rodriguez
] \starttext \startxtable \startxrow \startxcell \start \switchtobodyfont[small] \startMPpage[instance=graph] drawoptions(withpen pencircle scaled 1pt); w := 10cm; h := 8cm; ahlength := .25cm; draw begingraph (w,h) numeric xmin, xmax, ymin, ymax; xmin := 0; xmax :=100

[NTG-context] Center horizontally and vertically a table with a graphic in a paragraph environment

2015-01-09 Thread Fabrice Couvreur
,style=small] \setupTABLE[row][first][background=color,backgroundcolor=lightgray] \stopsetups \usemodule[graph] \definecolor[mycolor][c=.4,m=0,y=0,k=0] \starttext \startTwoColumns \start \switchtobodyfont[small] \startMPpage[instance=graph] drawoptions(withpen pencircle scaled 1pt); w

Re: [NTG-context] Pass a lua table to metapost

2014-12-08 Thread Hans Hagen
, } } \stopluacode \startMPpage numeric dx, dy; dx = 4.4cm; dy = 0.53cm; path b[]; for i=1 upto lua(mp.print(\#document.variables.labels)) : b[i] = unitsquare xscaled dx yscaled dy shifted (0, (i-1)*dy); draw b[i]; label(lua(mp.quoted(document.variables.labels

Re: [NTG-context] Pass a lua table to metapost

2014-12-08 Thread DesdeChaves
= { one, two, three, } } \stopluacode \startMPpage numeric dx, dy; dx = 4.4cm; dy = 0.53cm; path b[]; for i=1 upto lua(mp.print(\#document.variables.labels)) : b[i] = unitsquare xscaled dx yscaled dy shifted (0, (i-1)*dy

Re: [NTG-context] MP/Lua binding (was: Pass a lua table to metapost)

2014-12-08 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello Hans, it's possible to ask values from within mp: \starttext \startluacode document.variables = { labels = { one, two, three, } } \stopluacode \startMPpage numeric dx, dy; dx = 4.4cm; dy = 0.53cm; path b[]; for i=1 upto lua

Re: [NTG-context] MP/Lua binding

2014-12-08 Thread Hans Hagen
On 12/8/2014 1:45 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello Hans, it's possible to ask values from within mp: \starttext \startluacode document.variables = { labels = { one, two, three, } } \stopluacode \startMPpage numeric dx, dy

[NTG-context] new mp feature: eofill

2014-10-18 Thread Hans Hagen
\starttext \startMPpage fill fullcircle scaled 10cm -- fullcircle scaled 8cm -- fullcircle scaled 4cm -- cycle withcolor red/4 withtransparency (1,.5) ; currentpicture := currentpicture shifted (-5cm,0) ; fill

[NTG-context] Metafun standalone and fonts

2014-09-27 Thread Pol Stra
the TFM file either. I know I can use the: \startMPpage \input myfigure.mp \stopMPpage But the point is I want to generate an svg file, not a pdf. (mpost -s 'outputformat=svg;prologues:=3' --mem=metafun myfigure.mp) Note that with mpost command, it use metafun.mpii, while with mprun

Re: [NTG-context] Metafun standalone and fonts

2014-09-27 Thread Hans Hagen
myfigure.mp or do: \starttext \startMPpage mp code \stopMPpage \stoptext and run that. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt

Re: [NTG-context] Metafun standalone and fonts

2014-09-27 Thread Pol Stra
that will never work with metafun in mkiv as we have extensions just run context myfigure.mp or do: \starttext \startMPpage mp code \stopMPpage \stoptext and run that. Hans

Re: [NTG-context] internal mptopdf converter skips some glyphs in labels

2014-06-05 Thread Hans Hagen
. Alternatively, you can consider making your mp graphics like this: \startMPpage some code \stopMPpage This will use the regular font system, gives access to everything context as well, and makes it possible to opentype fonts. The resulting (cropped) graphic can of course be included. One can also

Re: [NTG-context] internal mptopdf converter skips some glyphs in labels

2014-06-05 Thread Sanjoy Mahajan
Hans Hagen pra...@wxs.nl writes: Alternatively, you can consider making your mp graphics like this: \startMPpage some code \stopMPpage This will use the regular font system, gives access to everything context as well, and makes it possible to opentype fonts. The resulting (cropped

Re: [NTG-context] internal mptopdf converter skips some glyphs in labels

2014-06-05 Thread Hans Hagen
On 6/5/2014 11:27 PM, Sanjoy Mahajan wrote: Hans Hagen pra...@wxs.nl writes: Alternatively, you can consider making your mp graphics like this: \startMPpage some code \stopMPpage This will use the regular font system, gives access to everything context as well, and makes it possible

Re: [NTG-context] Metapost and Metafun

2014-05-21 Thread Hans Hagen
-- (0,ymax)*u; drawarrow axe_x; drawarrow axe_y; draw pts_f withpen pencircle scaled 1; clip currentpicture to screen; \stopMPcode \stoptext Are there any routines with Metafun to improve this code? define 'improve' .. anyway: \starttext \startMPpage numeric xmin, xmax, ymin, ymax; xmin

Re: [NTG-context] ConTeXt minimal on chromebook

2014-02-19 Thread John Kitzmiller
-509039343) and then apt-get context which gave a texlive version for armhf; also got vim and evince. From terminal under Ubuntu, which runs on top of ChromeOS, context foo.tex compiled a Hello World and a \startMPpage figure. That much worked. This made me think the link for armhf-linux above

Re: [NTG-context] Calling \followtokens from with in metapost

2013-10-14 Thread Magnus J
; \stopuseMPgraphic \followtokens{{\hskip1em}some text{\hskip1em}} \stopsetups \startMPpage draw textext(\setups{text-a}) ; draw textext(\setups{text-b}) shifted (0,-.5cm); % equal to RotPath in text-b path RotPath ; RotPath := reverse halfcircle xyscaled 3cm ; draw

Re: [NTG-context] Calling \followtokens from with in metapost

2013-10-13 Thread Hans Hagen
text-b \startuseMPgraphic{followtokens} path RotPath ; RotPath := reverse halfcircle xyscaled 3cm ; draw RotPath ; \stopuseMPgraphic \followtokens{{\hskip1em}some text{\hskip1em}} \stopsetups \startMPpage draw textext(\setups{text-a}) ; draw textext(\setups{text-b

Re: [NTG-context] Calling \followtokens from with in metapost

2013-10-13 Thread Marco Patzer
{\hskip1em}} \stopsetups \startMPpage draw textext(\setups{text-a}) ; draw textext(\setups{text-b}) shifted (0,-.5cm); \stopMPpage \stoptext This stretches the text. One has to use \hskip to squeeze the text back to its normal inter character space, but I assume that's what you meant

[NTG-context] nested mp

2013-10-07 Thread Hans Hagen
; \stopuniqueMPgraphic \defineoverlay[mytest][\uniqueMPgraphic{mytest}] \startMPpage[offset=1pt] fill fullcircle scaled 10cm withcolor red ; draw textext(\framed[background=mytest]{bla}) ; draw textext(test 1.1) xsized 8cm rotated 45 withcolor white/2 ; draw

Re: [NTG-context] passvariable(); path problem

2013-10-06 Thread Peter Rolf
Am 06.10.2013 00:37, schrieb Hans Hagen: On 10/5/2013 5:52 PM, Peter Rolf wrote: I played around with it, but I have problems to understand the format of the returned path. Example: % \setuppagenumber[state=stop] \starttext \nopdfcompression \startMPpage path p; p

Re: [NTG-context] passvariable(); path problem

2013-10-05 Thread Peter Rolf
I played around with it, but I have problems to understand the format of the returned path. Example: % \setuppagenumber[state=stop] \starttext \nopdfcompression \startMPpage path p; p:= (20,20){up} .. {down}(200,100); passvariable(path,p); draw p ; \stopMPpage \ctxlua{inspect

Re: [NTG-context] passvariable(); path problem

2013-10-05 Thread Hans Hagen
On 10/5/2013 5:52 PM, Peter Rolf wrote: I played around with it, but I have problems to understand the format of the returned path. Example: % \setuppagenumber[state=stop] \starttext \nopdfcompression \startMPpage path p; p:= (20,20){up} .. {down}(200,100); passvariable(path

Re: [NTG-context] textext sync problem?

2013-08-28 Thread Hans Hagen
and drawoptions are also applied (part of the draw definition) i made a patch that also carries some extra color info but i'm not sure how robust it is (i also did some further optimization) btw, we do have a 'named properties' feature in metafun: \startMPpage property p[] ; p1

Re: [NTG-context] Metapost labels

2013-08-07 Thread Alan BRASLAU
. Yesterday, before an Update, all worked as expected. Minimal not working example: \starttext \startMPpage draw fullcircle scaled 5cm withcolor red; label(textext(\CONTEXT),origin); \stopMPpage \stoptext Or am I missing something happened in the last four weeks? Something seems wrong

Re: [NTG-context] Metapost labels

2013-08-07 Thread Hans Hagen
. Minimal not working example: \starttext \startMPpage draw fullcircle scaled 5cm withcolor red; label(textext(\CONTEXT),origin); \stopMPpage \stoptext Or am I missing something happened in the last four weeks? some playing with transformations and keeping properties at the same time ... new

Re: [NTG-context] Metapost labels

2013-08-07 Thread Lutz Haseloff
/english Context seems not to be able to typeset Labels anymore. Yesterday, before an Update, all worked as expected. Minimal not working example: \starttext \startMPpage draw fullcircle scaled 5cm withcolor red; label(textext(\CONTEXT),**origin); \stopMPpage \stoptext Or am I missing

[NTG-context] Metapost labels

2013-08-06 Thread Lutz Haseloff
\startMPpage draw fullcircle scaled 5cm withcolor red; label(textext(\CONTEXT),origin); \stopMPpage \stoptext Or am I missing something happened in the last four weeks? Thanks Greetings Lutz ___ If your question

Re: [NTG-context] bar graphs, m-graph, sarith

2013-07-08 Thread John Kitzmiller
) seems to augment.p(v1 Sadd 0.4,v2);Sadd instead. An mwe of a bar graph: (data1 is a separate file containing 01 02 02 03) \usemodule[m-graph] \startMPpage[instance=graph] input sarith; draw begingraph(5cm,5cm); gdata(data1, v, path p; augment.p(v1,0

Re: [NTG-context] bar graphs, m-graph, sarith

2013-07-07 Thread Alan BRASLAU
03) \usemodule[m-graph] \startMPpage[instance=graph] input sarith; draw begingraph(5cm,5cm); gdata(data1, v, path p; augment.p(v1,0); augment.p(v1,v2) augment.p(v1 Sadd 0.4,v2); augment.p(v1 Sadd 0.4,0); gfill p--cycle

[NTG-context] bar graphs, m-graph, sarith

2013-07-06 Thread John Kitzmiller
When trying to make a bar graph with m-graph.mkiv and sarith, the command Ssub (string subtract) seems to Sadd instead. An mwe of a bar graph: (data1 is a separate file containing 01 02 02 03) \usemodule[m-graph] \startMPpage[instance=graph] input sarith; draw begingraph(5cm,5cm); gdata

[NTG-context] [***SPAM***] Scaling large (annotated) MetaFun drawing

2013-06-18 Thread Pavneet Arora
(and where I stand right now) is to simply use \startMPpage and \stopMPpage to scale to the page. Thera are a couple of issues, though, with this approach. First, I want to add additional information to the page, other than what would be handled by MetaPost, e.g., some tables, etc. Even without

Re: [NTG-context] [***SPAM***] Scaling large (annotated) MetaFun drawing

2013-06-18 Thread Hans Hagen
x 11).. My first successful approach (and where I stand right now) is to simply use \startMPpage and \stopMPpage to scale to the page. Thera are a couple of issues, though, with this approach. First, I want to add additional information to the page, other than what would be handled by MetaPost

Re: [NTG-context] mptopdf in minimals

2013-04-18 Thread John Kitzmiller
, Your idea did help for minimal examples. I get conflicts with more elaborate files (even the dreaded 'cannot make .mpx file') sometimes using either suggestions so... retraining my fingers to put MP code in \startMPpage is the direction I will take because it gives the best looking forward result

<    1   2   3   4   5   6   7   8   9   >