[NTG-context] Center two frames

2015-01-13 Thread Fabrice Couvreur
; draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled 1.2pt ; \stopuniqueMPgraphic \defineoverlay[borderline][\uniqueMPgraphic{borderline}] \placefigure[right,none]{}{ \start \switchtobodyfont[7pt] \startMPcode numeric u; u=0.7cm; z0=(0,0) ; z1=(2.5u,0) ; z2=(2.5u,2.5u) ; z3

[NTG-context] About the macro ulcircle

2015-01-09 Thread Fabrice Couvreur
Hi, I discovered some macro Metafun particular. I then wanted to outline, but it does not fit with the boundary of the quadrant. Can I have some explanation ? Best regards, Fabrice \starttext \startMPcode u:=1cm ; pickup pencircle scaled 1pt ; fill ulcircle scaled 8u withcolor lightgray ; fill

Re: [NTG-context] About the macro ulcircle

2015-01-09 Thread Hans Hagen
On 1/9/2015 8:07 PM, Fabrice Couvreur wrote: Hi, I discovered some macro Metafun particular. I then wanted to outline, but it does not fit with the boundary of the quadrant. Can I have some explanation? Best regards, Fabrice \starttext \startMPcode u:=1cm ; pickup pencircle scaled 1pt ; fill

Re: [NTG-context] PSTricks in Context

2014-12-15 Thread Alan BRASLAU
is extremely ugly to see in ConTeXt). I see, \tikzpicture .. \endtikzpicture looks nicer ;-) No, but \startMPcode draw origin--(1,1) scaled 30mm ; \stopMPcode DOES look nicer ;-) ___ If your question

Re: [NTG-context] overlay

2014-11-24 Thread Peter Rolf
Am 22.11.2014 um 21:32 schrieb John Kitzmiller: Given rectangles with text: \starttext Before:\\ \startMPcode draw unitsquare xscaled 2cm yscaled 1cm; \stopMPcode \\ After:\\ \startMPcode for i=0 upto 1: draw unitsquare scaled 1cm

Re: [NTG-context] overlay

2014-11-24 Thread John Kitzmiller
Am 22.11.2014 um 21:32 schrieb John Kitzmiller: Given rectangles with text: \starttext Before:\\ \startMPcode draw unitsquare xscaled 2cm yscaled 1cm; \stopMPcode \\ After:\\ \startMPcode for i=0 upto 1: draw unitsquare scaled 1cm

Re: [NTG-context] overlay

2014-11-24 Thread Wolfgang Schuster
Am 22.11.2014 um 21:32 schrieb John Kitzmiller k...@inradius.net: Given rectangles with text: \starttext Before:\\ \startMPcode draw unitsquare xscaled 2cm yscaled 1cm; \stopMPcode \\ After:\\ \startMPcode for i=0 upto 1: draw unitsquare scaled 1cm xshifted i*cm

[NTG-context] overlay

2014-11-22 Thread John Kitzmiller
Given rectangles with text: \starttext Before:\\ \startMPcode draw unitsquare xscaled 2cm yscaled 1cm; \stopMPcode \\ After:\\ \startMPcode for i=0 upto 1: draw unitsquare scaled 1cm xshifted i*cm; endfor; \stopMPcode \stoptext How can a line be drawn connecting the right edges

Re: [NTG-context] Strange behavior with the command \color[]{}

2014-11-06 Thread Hans Hagen
\bTR \bTD $X$ prend la valeur $7$ \eTD \bTD \dontleavehmode \startMPcode input hvdm; l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0; defineDefaultArrow (l, r, alfa, beta, gamma); pickup pencircle scaled 0.4mm; arrowline (0cm,0cm)--(3cm,0cm) withcolor blue ;\stopMPcode \eTD \bTD On affecte à $X

Re: [NTG-context] Strange behavior with the command \color[]{}

2014-11-05 Thread Fabrice
\bTD \eTD \bTD \color[orange]{\tfa Valeur de la variable $X$ après l'exécution de chaque instruction :} \eTD \eTR \bTR \bTD $X$ prend la valeur $7$ \eTD \bTD \dontleavehmode \startMPcode input hvdm; l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0; defineDefaultArrow (l, r, alfa, beta

[NTG-context] Strange behavior with the command \color[]{}

2014-11-02 Thread Fabrice Couvreur
\bTD \color[orange]{\tfa Suite d'instructions correspondant au programme de calcul :} \eTD \bTD \eTD \bTD \color[orange]{\tfa Valeur de la variable $X$ après l'exécution de chaque instruction :} \eTD \eTR \bTR \bTD $X$ prend la valeur $7$ \eTD \bTD \dontleavehmode \startMPcode input hvdm

Re: [NTG-context] clipping in metafun has weird side effects

2014-10-31 Thread Tobias Columbus
Hi again, I tried my example from yesterday in context with metapost format, but the output still differs from what mptopdf produces. While doing that, I noticed that the mpost format is currently not usable out of the box: \startMPcode{metapost} draw (0,0) -- (1cm,0) ; \stopMPcode produces

Re: [NTG-context] clipping in metafun has weird side effects

2014-10-31 Thread Hans Hagen
On 10/31/2014 9:58 AM, Tobias Columbus wrote: Hi again, I tried my example from yesterday in context with metapost format, but the output still differs from what mptopdf produces. While doing that, I noticed that the mpost format is currently not usable out of the box: \startMPcode{metapost

Re: [NTG-context] clipping in metafun has weird side effects

2014-10-31 Thread Tobias Columbus
is currently not usable out of the box: \startMPcode{metapost} draw (0,0) -- (1cm,0) ; \stopMPcode produces the error message \startMPcode draw (0,0) -- (1cm,0) ; \stopMPcode why the {metapost} I wanted to know if the impact of clipping is caused by the metafun format

Re: [NTG-context] clipping in metafun has weird side effects

2014-10-31 Thread Hans Hagen
doing that, I noticed that the mpost format is currently not usable out of the box: \startMPcode{metapost} draw (0,0) -- (1cm,0) ; \stopMPcode produces the error message \startMPcode draw (0,0) -- (1cm,0) ; \stopMPcode why the {metapost} I wanted to know if the impact of clipping

[NTG-context] Change linewidth of a table

2014-09-17 Thread Fabrice Couvreur
\bTD \eTD \bTD $\frac{\left(2\sqrt{3}\right)^2}{12}$\eTD \bTD \eTD \dontleavehmode \bTD \startMPcode defaultscale:=0.8; angle_radius:=4pt; def mark_rt_angle(expr a, b, c)= draw((1,0)--(1,1)--(0,1)) zscaled (angle_radius*unitvector(a-b)) shifted b enddef; def midpoint(expr

Re: [NTG-context] Support for Optional Content Groups

2014-07-03 Thread Wolfgang Schuster
to have my cake and eat it too ;) You can test if the layers are hidden when you print the following example, I tried the Adobe Reader on my Mac and they where still visible. \setupinteraction[state=start] \defineoverlay[PageBackground] [\startMPcode fill fullsquare xyscaled(OverlayWidth

[NTG-context] Strange behavior with Metapost

2014-05-27 Thread Fabrice Couvreur
Hello, Why curve drawn is not that expected ? Fabrice \starttext \startMPcode input hvdm; l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0; defineDefaultArrow (l, r, alfa, beta, gamma); numeric xmin, xmax, ymin, ymax; xmin :=-2; xmax := 4; ymax :=5 ;ymin:=-1; u := 1cm

Re: [NTG-context] Strange behavior with Metapost

2014-05-27 Thread Hans Hagen
On 5/27/2014 10:19 PM, Fabrice Couvreur wrote: Hello, Why curve drawn is not that expected ? Fabrice use /20 \starttext \startMPcode input hvdm; l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0; defineDefaultArrow (l, r, alfa, beta, gamma); numeric xmin, xmax, ymin

Re: [NTG-context] Strange behavior with Metapost

2014-05-27 Thread Fabrice
\midaligned{% \startcombination[4*1] {% \startMPcode input hvdm; l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0; defineDefaultArrow (l, r, alfa, beta, gamma); numeric xmin, xmax, ymin, ymax; xmin := -2; xmax :=4; ymax :=5 ;ymin:=-1; u := 0.7cm; pickup pencircle scaled 1pt

[NTG-context] Metapost and Metafun

2014-05-21 Thread Fabrice Couvreur
Hi, As PSTricks (which I prefer) is not yet well integrated, I decided to learn Metapost starting with a simple code. \starttext \startMPcode numeric xmin, xmax, ymin, ymax; xmin := -2.5; xmax := 2.5; ymax :=2.5 ;ymin:=-2.5; u := 2cm; vardef f(expr x) = -x*x+1 enddef; xinc := 0.001; path pts_f

Re: [NTG-context] Metapost and Metafun

2014-05-21 Thread Hans Hagen
On 5/21/2014 7:55 PM, Fabrice Couvreur wrote: Hi, As PSTricks (which I prefer) is not yet well integrated, I decided to learn Metapost starting with a simple code. \starttext \startMPcode numeric xmin, xmax, ymin, ymax; xmin := -2.5; xmax := 2.5; ymax :=2.5 ;ymin:=-2.5; u := 2cm; vardef f(expr

Re: [NTG-context] textcolor not working with MPinstance

2014-04-24 Thread Hans Hagen
/Command/defineMPinstance Is there any update on this? This bug breaks the visualcounter module. I am including a smaller minimal example: \defineMPinstance [important] [metafun] [textcolor=red] \starttext \startMPcode{important} draw textext(Am I red?) ; \stopMPcode \stoptext It fails

Re: [NTG-context] textcolor not working with MPinstance

2014-04-24 Thread Aditya Mahajan
the wiki: http://wiki.contextgarden.net/Command/defineMPinstance Is there any update on this? This bug breaks the visualcounter module. I am including a smaller minimal example: \defineMPinstance [important] [metafun] [textcolor=red] \starttext \startMPcode{important} draw textext(Am I red

Re: [NTG-context] textcolor not working with MPinstance

2014-04-21 Thread Aditya Mahajan
minimal example: \defineMPinstance [important] [metafun] [textcolor=red] \starttext \startMPcode{important} draw textext(Am I red?) ; \stopMPcode \stoptext Aditya ___ If your question is of interest

Re: [NTG-context] textcolor not working with MPinstance

2014-04-21 Thread Wolfgang Schuster
on this? This bug breaks the visualcounter module. I am including a smaller minimal example: \defineMPinstance [important] [metafun] [textcolor=red] \starttext \startMPcode{important} draw textext(Am I red?) ; \stopMPcode \stoptext It fails also with the default instance

[NTG-context] textcolor not working with MPinstance

2014-04-15 Thread Aditya Mahajan
] \defineMPinstance [veryimportant] [important] [textstyle=bold] \starttext % normal black text \startMPcode draw textext(some text) ; \stopMPcode % red text \startMPcode{important} draw textext(some text) ; \stopMPcode % red bold text \startMPcode{veryimportant} draw textext(some text

Re: [NTG-context] quick and shallow question about layers

2014-03-26 Thread Hans Hagen
someone has a suggestion; my life doesn’t depend on it! \starttext \startMPcode draw externalfigure(mill.png) xysized(10cm,4cm) ; draw textext(\bf LOOK THROUGH) xysized(10cm,4cm) shifted center currentpicture

[NTG-context] Draw eletrical circuits in ConTeXt (Circuitikz or mpcirc.mp)

2014-03-25 Thread DesdeChaves
int: english/english # with mpcirc.mp ## With this code: \startMPinclusions input mpcirc; \stopMPinclusions \starttext %\forceMPTEXgraphictrue %%% command don't work \startMPcode u:=10bp; % unit of length prepare(L,C,Vac); % mention your elements z0=(10u,10u); % lower right

[NTG-context] Strange output from linear_shade (METAPOST)

2014-02-14 Thread DesdeChaves
; enddef; \stopMPinclusions \starttext \startMPcode picture finalpicture ; finalpicture := nullpicture ; numeric avanco ; avanco := 0 ; bboxmargin := 0pt ; %% first call is OK SoundEnergy; %% second call loss the gradient SoundEnergy; currentpicture := finalpicture ; \stopMPcode \stoptext

[NTG-context] Colored text's background, which the more lcd-mkiv?

2014-01-17 Thread Elspeth McGullicuddy
of as a bug. % You might want and try the following example: it doesn't work if you have a MetaPost variable % whose name is text. \starttext \startMPcode % numeric text; %% Try and uncomment this line drawarrow (0,0)--(3cm,1cm); \stopMPcode

[NTG-context] [metapost] troubles with labels

2013-12-29 Thread Pol Stra
. But this conteXt file works: ``` \starttext \startMPcode dotlabel.ulft(A, origin); \stopMPcode \stoptext ``` As with any metapostfile which does not contain labels. But as soon as there is label, their is no figure. Two last things: if I compile the metapost file with standalone

Re: [NTG-context] [metapost] troubles with labels

2013-12-29 Thread Hans Hagen
``` The resulting pdf file contains no figure. But this conteXt file works: ``` \starttext \startMPcode dotlabel.ulft(A, origin); \stopMPcode \stoptext ``` As with any metapostfile which does not contain labels. But as soon as there is label, their is no figure. Two last things: if I compile

Re: [NTG-context] Request for metapost

2013-12-25 Thread Peter Rolf
Also thanks from my side. Just what I needed for further tests (graphics with multiple paths). Peter Am 22.12.2013 19:10, schrieb Hans Hagen: \starttext % \enabletrackers[metapost.variables] \startMPcode numeric n[] ; for i=1 upto 10: n[i] := 1/i ; endfor ; pathp

Re: [NTG-context] Statistical module for Metapost

2013-12-24 Thread Hans Hagen
On 12/23/2013 7:55 PM, DesdeChaves wrote: I'm trying play with the statistical package** for metapost from Anthony Phan. I found this strange problem: This code runs fine: \startMPcode label.bot(btex Metapost and Statistics etex,(5mm,0)) ; \stopMPcode Also, this code run fine

Re: [NTG-context] Statistical module for Metapost

2013-12-24 Thread DesdeChaves
Thanks a lot. Merry Christmas Jorge 2013/12/24 Hans Hagen pra...@wxs.nl On 12/23/2013 7:55 PM, DesdeChaves wrote: I'm trying play with the statistical package** for metapost from Anthony Phan. I found this strange problem: This code runs fine: \startMPcode label.bot(btex Metapost

Re: [NTG-context] Request for metapost

2013-12-23 Thread DesdeChaves
variable can't pass. It will be very usefull if metapost can send a array to context. \startMPcode numeric x[]; for i = 1 upto 10: x[i]:=random; endfor passvariable(array,x); passvariable(version,1.0) ; passvariable(number,x[1]) ; passvariable(string,whatever

[NTG-context] Statistical module for Metapost

2013-12-23 Thread DesdeChaves
I'm trying play with the statistical package** for metapost from Anthony Phan. I found this strange problem: This code runs fine: \startMPcode label.bot(btex Metapost and Statistics etex,(5mm,0)) ; \stopMPcode Also, this code run fine: \startMPcode input mps-core.mp; draw fullcircle scaled

Re: [NTG-context] Request for metapost

2013-12-22 Thread Hans Hagen
On 12/21/2013 12:50 PM, DesdeChaves wrote: I know that metapost can send the variables version, number, string, point, quad, boolean and path to Context. triplet variable can't pass. It will be very usefull if metapost can send a array to context. \startMPcode numeric x[]; for i = 1 upto 10

Re: [NTG-context] Request for metapost

2013-12-22 Thread Hans Hagen
. \startMPcode numeric x[]; for i = 1 upto 10: x[i]:=random; endfor passvariable(array,x); passvariable(version,1.0) ; passvariable(number,x[1]) ; passvariable(string,whatever) ; passvariable(point,(1,2)) ; passvariable(triplet,(1,2,3)) ; passvariable(quad,(1,2,3,4

[NTG-context] Request for metapost

2013-12-21 Thread DesdeChaves
I know that metapost can send the variables version, number, string, point, quad, boolean and path to Context. triplet variable can't pass. It will be very usefull if metapost can send a array to context. \startMPcode numeric x[]; for i = 1 upto 10: x[i]:=random; endfor passvariable(array,x

Re: [NTG-context] issue with layers and layouts

2013-10-22 Thread Wolfgang Schuster
Am 21.10.2013 um 18:28 schrieb Pablo Rodriguez oi...@gmx.es: I want the text flow to avoid the layer avoidasfloat as it avoids the figures. \definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm, voffset=101mm,location={right,bottom}, state=start] \setlayer[avoidasfloat]{\startMPcode draw

Re: [NTG-context] issue with layers and layouts

2013-10-22 Thread Pablo Rodriguez
) but you have to place the layer with a float to reserve the necessary space. % engine=pdftex \definelayer[avoidasfloat][position=yes] \setupbackgrounds[page][background=avoidasfloat] \starttext \placefigure[right,none]{}{\setlayer[avoidasfloat]{\startMPcode draw unitsquare scaled 4cm

Re: [NTG-context] issue with layers and layouts

2013-10-22 Thread Wolfgang Schuster
]{}{\setlayer[avoidasfloat]{\startMPcode draw unitsquare scaled 4cm ; \stopMPcode}} \input knuth \stoptext Many thanks for your reply, Wolfgang. Is there no way to place that layer exactly 8mm from left page border and 110mm from top page border? I really need the layer in that position

[NTG-context] issue with layers and layouts

2013-10-21 Thread Pablo Rodriguez
={right,bottom}, state=start] \setlayer[avoidasfloat]{\startMPcode draw (0mm,0mm)--(55mm,0mm) ; draw (0mm,0mm)--(0mm,-86mm) ; draw (0mm,-86mm)--(55mm,-86mm) ; draw (55mm,-86mm)--(55mm,0mm) ; \stopMPcode } \setupbackgrounds[page][background={avoidasfloat}] \starttext \dorecurse{40}{\input knuth\par

Re: [NTG-context] issue with layers and layouts

2013-10-21 Thread luigi scarso
] \definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm, voffset=101mm, location={right,bottom}, state=start] \setlayer[avoidasfloat]{\startMPcode draw (0mm,0mm)--(55mm,0mm) ; draw (0mm,0mm)--(0mm,-86mm) ; draw (0mm,-86mm)--(55mm,-86mm) ; draw (55mm,-86mm)--(55mm,0mm) ; \stopMPcode

Re: [NTG-context] issue with layers and layouts

2013-10-21 Thread Pablo Rodriguez
,location={right,bottom}, state=start] \setlayer[avoidasfloat]{\startMPcode draw (0mm,0mm)--(55mm,0mm) ; draw (0mm,0mm)--(0mm,-86mm) ; draw (0mm,-86mm)--(55mm,-86mm) ; draw (55mm,-86mm)--(55mm,0mm) ; \stopMPcode } \setupbackgrounds[page][background={avoidasfloat}] \starttext \dorecurse{40

Re: [NTG-context] Code Called Twice?

2013-10-11 Thread Philipp Gesang
seems to be called twice and what can be done to ensure that it is only called once? Don’t use text ;-) That’s a known issue: as soon as your Metapost code contains text, it will be processed twice. E.g.: \starttext \setMPtext{heading:title}{foo} \startMPcode show This gets

Re: [NTG-context] Code Called Twice?

2013-10-11 Thread Hans Hagen
why the code seems to be called twice and what can be done to ensure that it is only called once? Don’t use text ;-) That’s a known issue: as soon as your Metapost code contains text, it will be processed twice. E.g.: \starttext \setMPtext{heading:title}{foo} \startMPcode

Re: [NTG-context] Code Called Twice?

2013-10-11 Thread Philipp Gesang
code contains text, it will be processed twice. E.g.: \starttext \setMPtext{heading:title}{foo} \startMPcode show This gets printed twice.; draw textext( \MPstring{heading:title} ); \stopMPcode \stoptext Same for labels, {b,e}tex. See also

Re: [NTG-context] wrong positioning of MP graphic in layer

2013-10-08 Thread Pablo Rodríguez
On 10/07/2013 10:48 PM, Hans Hagen wrote: On 10/7/2013 10:04 PM, Pablo Rodríguez wrote: [...] I need to insist on this sample, because the layer doesn’t behave as such: \definelayer[wrongpositioned][x=5000cm, y=5000cm, state=start] \setuplayer[wrongpositioned]{\startMPcode draw (0mm,0mm

Re: [NTG-context] wrong positioning of MP graphic in layer

2013-10-08 Thread Pablo Rodríguez
]{\startMPcode draw (0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode} \setupbackgrounds[page][background={wrongpositioned}] \starttext \input knuth \stoptext x and y are outside the page in the layer definition (50 meters). It should be a stupid error, but I

[NTG-context] wrong positioning of MP graphic in layer

2013-10-07 Thread Pablo Rodríguez
Dear list, I have the following sample: \definelayer[wrongpositioned][x=0mm, y=0mm, hoffset=0mm, voffset=48mm, state=start] \setuplayer[wrongpositioned]{\startMPcode draw (0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode} \setupbackgrounds[page][background

Re: [NTG-context] wrong positioning of MP graphic in layer

2013-10-07 Thread luigi scarso
On Mon, Oct 7, 2013 at 5:56 PM, Pablo Rodríguez oi...@gmx.es wrote: Dear list, I have the following sample: \definelayer[wrongpositioned][x=0mm, y=0mm, hoffset=0mm, voffset=48mm, state=start] \setuplayer[wrongpositioned]{\startMPcode draw (0mm,0mm)--(8mm,0mm)--(8mm,38mm

Re: [NTG-context] wrong positioning of MP graphic in layer

2013-10-07 Thread Pablo Rodríguez
=5000cm, y=5000cm, state=start] \setuplayer[wrongpositioned]{\startMPcode draw (0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode} \setupbackgrounds[page][background={wrongpositioned}] \starttext \input knuth \stoptext x and y are outside the page in the layer definition (50 meters

Re: [NTG-context] wrong positioning of MP graphic in layer

2013-10-07 Thread Hans Hagen
behave as such: \definelayer[wrongpositioned][x=5000cm, y=5000cm, state=start] \setuplayer[wrongpositioned]{\startMPcode draw (0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode} \setupbackgrounds[page][background={wrongpositioned}] \starttext \input knuth \stoptext x and y are outside

Re: [NTG-context] wrong positioning of MP graphic in layer

2013-10-07 Thread luigi scarso
on this sample, because the layer doesn’t behave as such: \definelayer[wrongpositioned][x=5000cm, y=5000cm, state=start] \setuplayer[wrongpositioned]{\startMPcode draw (0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode} \setupbackgrounds[page][background={wrongpositioned}] \starttext \input knuth

[NTG-context] passvariable(); path problem

2013-10-04 Thread Peter Rolf
Hi, I played around with the new passvariable() option and ran into errors when passing a path. Used the latest beta (01.10.2013). Can someone confirm this? Peter \starttext \startMPcode passvariable(path,fullcircle scaled 1cm) ; \stopMPcode \stoptext

[NTG-context] Automatically loading the page state, LoadPageState

2013-10-01 Thread Marco Patzer
results in perfectly valid code producing wrong results, which might not be hard to spot. Example: \setuplayout [width=10cm] \showframe \starttext \startMPcode fill unitsquare xyscaled (\the\textwidth, 2cm); \stopMPcode \startMPcode fill unitsquare xyscaled (TextWidth, 2cm

Re: [NTG-context] Automatically loading the page state, LoadPageState

2013-10-01 Thread Hans Hagen
, TextWidth. Forgetting to use LoadPageState easily results in perfectly valid code producing wrong results, which might not be hard to spot. Example: sure, but a 'many' versus 'some' distinction is too fuzzy \setuplayout [width=10cm] \showframe \starttext \startMPcode fill unitsquare xyscaled

Re: [NTG-context] new mp trickery / next challenge for alan and mari

2013-09-10 Thread Alan BRASLAU
Indeed a challenge! Alan On Tue, 10 Sep 2013 18:11:13 +0200 Hans Hagen pra...@wxs.nl wrote: Hi, There's now a convenient way to pass data back from an mprun to the tex instance: \starttext \startMPcode passvariable(version,1.0) ; passvariable(number,123

[NTG-context] new mp trickery / next challenge for alan and mari

2013-09-10 Thread Hans Hagen
Hi, There's now a convenient way to pass data back from an mprun to the tex instance: \starttext \startMPcode passvariable(version,1.0) ; passvariable(number,123) ; passvariable(string,whatever) ; passvariable(point,(1,2)) ; passvariable(triplet,(1,2,3

Re: [NTG-context] textext sync problem?

2013-08-28 Thread Aditya Mahajan
example I would like to first have a clear understanding of the functioning of textext in relation to metapost. It seems that as yet I do not have a clear enough picture of that process. The example below illustrates what is happening: \starttext \startMPcode newpicture p; drawoptions

[NTG-context] MetaPost label direction prefix

2013-08-23 Thread Marco Patzer
on traditional MetaPost. Is this prefix required? It breaks old code and required a branch in every new project. And I don't really see a reason for this incompatibility. Here is an example defining a new direction “foo”: \starttext \startMPcode label(first, origin); %% MkIV %% pair

Re: [NTG-context] MetaPost label direction prefix

2013-08-23 Thread Hans Hagen
“foo”: The MpIV code has namespace protection. Why run traditional in MkIV? \starttext \startMPcode label(first, origin); %% MkIV %% pair mfun_laboff.foo ; mfun_laboff.foo := (.5,-1) ; %% mfun_labxf.foo := mfun_labyf.foo := 1 ; %% MkII pair laboff.foo

Re: [NTG-context] MetaPost label direction prefix

2013-08-23 Thread Marco Patzer
in MkIV? \starttext \startMPcode label(first, origin); %% MkIV %% pair mfun_laboff.foo ; mfun_laboff.foo := (.5,-1) ; %% mfun_labxf.foo := mfun_labyf.foo := 1 ; %% MkII pair laboff.foo ; laboff.foo := (.5,-1) ; labxf.foo := labyf.foo := 1

Re: [NTG-context] MetaPost label direction prefix

2013-08-23 Thread Hans Hagen
namespace protection. Why run traditional in MkIV? \starttext \startMPcode label(first, origin); %% MkIV %% pair mfun_laboff.foo ; mfun_laboff.foo := (.5,-1) ; %% mfun_labxf.foo := mfun_labyf.foo := 1 ; %% MkII pair laboff.foo ; laboff.foo := (.5,-1

Re: [NTG-context] Undefined \continueifinputfile on presentation

2013-08-14 Thread Aditya Mahajan
containing just MP graphics work? \starttext \startMPcode draw fullcircle scaled 1cm; \stopMPcode \stoptext Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist

Re: [NTG-context] Undefined \continueifinputfile on presentation

2013-08-14 Thread Pau
know. It has been more than five years since I used MkII. Does a minimal file containing just MP graphics work? \starttext \startMPcode draw fullcircle scaled 1cm; \stopMPcode \stoptext Aditya ___ If your

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

2013-08-09 Thread Aditya Mahajan
by testfig.mp Any particular reason that you are compiling metapost files using mp and then including them in ConTeXt rather than directly using any one of the inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic, \processMPbuffer, etc.) beginfig(1) label(btex $\Omega$ etex, (0,0

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

2013-08-09 Thread Sanjoy Mahajan
of the inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic, \processMPbuffer, etc.) Mostly conservatism. I cannot quite figure out the canonical replacement for btex ... etex (textext, sometext?), and then I get confused by the many possible environments. What do you

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

2013-08-09 Thread Aditya Mahajan
in ConTeXt rather than directly using any one of the inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic, \processMPbuffer, etc.) Mostly conservatism. I cannot quite figure out the canonical replacement for btex ... etex (textext, sometext?), and then I get confused by the many

[NTG-context] Offset MP text with font change

2013-04-28 Thread Marco Patzer
Hi, why is the second line right-aligned in the following example? \definetextext [foo] [#1]#2{\switchtobodyfont[#1]#2} \starttext \dorecurse{5}{ \startMPcode draw \sometxt[foo][sans]{FooBar}; \stopMPcode \startMPcode draw \sometxt[foo][iwona]{FooBar

Re: [NTG-context] gnuplot module broken

2013-04-19 Thread Mojca Miklavec
}; \stopMPextensions \def\abc{3cm} \starttext \startcolor[blue] \startMPcode fill fullcircle scaled a withcolor b; \stopMPcode \stopcolor \stoptext The old ConTeXt draws a blue circle with diameter 3cm and the new ConTeXt draws a black circle with diameter 1cm. Which one is right

[NTG-context] mptopdf in minimals

2013-04-17 Thread John Kitzmiller
\startMPcode wrapper works, e.g.: beginfig(1); draw origin--(100,100); endfig; end works with command line mpost % This is MetaPost, version 1.801 (kpathsea

Re: [NTG-context] mptopdf in minimals

2013-04-17 Thread Hans Hagen
\startMPcode wrapper works, e.g.: beginfig(1); draw origin--(100,100); endfig; end if you have context installed you

Re: [NTG-context] mptopdf in minimals

2013-04-17 Thread John Kitzmiller
\startMPcode wrapper works, e.g

Re: [NTG-context] New user of ConTeXt

2013-04-15 Thread Aditya Mahajan
On Wed, 10 Apr 2013, Tristan Lorino wrote: \starttext \setMPtext {1} {C'est le titre} \startMPcode pickup pencircle scaled .5mm ; pair a; a :=(0.2cm,.5cm); label.rt(\MPtext {1},a); In MkIV, this should be label.rt(btex \MPtext{1} etex, a); In MkII, you'd have to use label.rt(texttext(\MPtext

[NTG-context] New user of ConTeXt

2013-04-10 Thread Tristan Lorino
titre} \startMPcode pickup pencircle scaled .5mm ; pair a; a :=(0.2cm,.5cm); label.rt(\MPtext {1},a); draw (0cm,0cm)--(8cm,0cm); draw (8cm,0cm)..(8.15cm,0.08cm)..(8.2cm,0.18cm); draw (8.2cm,0.18cm)--(8.7cm,1.7cm); \stopMPcode \stoptext How can I

Re: [NTG-context] New user of ConTeXt

2013-04-10 Thread H. Özoguz
Am 10.04.2013 15:29, schrieb ntg-context-requ...@ntg.nl: \setupbodyfont[11pt] \enableregime[utf-8] \mainlanguage[fr] \starttext \setMPtext {1} {C'est le titre} \startMPcode pickup pencircle scaled .5mm ; pair a; a :=(0.2cm,.5cm); label.rt(\MPtext {1},a); draw (0cm,0cm)--(8cm,0cm); draw

Re: [NTG-context] gnuplot module broken

2013-02-19 Thread Hans Hagen
example: \def\abc{1cm} \startMPextensions a := \abc; color b; b := \MPcolor{currentcolor}; \stopMPextensions \def\abc{3cm} \starttext \startcolor[blue] \startMPcode fill fullcircle scaled a withcolor b; \stopMPcode \stopcolor \stoptext The old ConTeXt draws a blue circle with diameter 3cm and the new

[NTG-context] mp inclusions etc

2013-02-18 Thread Hans Hagen
\startMPinclusions{doublefun} def DoWhatever = draw textext(Y) ; enddef ; \stopMPinclusions \startMPinclusions[+]{doublefun} def DoWhatever = draw textext(YY) ; enddef ; \stopMPinclusions \startMPcode{metafun} draw fullcircle scaled 1cm withcolor ColorOne withpen pencircle scaled

Re: [NTG-context] gnuplot module broken

2013-02-18 Thread Mojca Miklavec
a := \abc; color b; b := \MPcolor{currentcolor}; \stopMPextensions \def\abc{3cm} \starttext \startcolor[blue] \startMPcode fill fullcircle scaled a withcolor b; \stopMPcode \stopcolor \stoptext The old ConTeXt draws a blue circle with diameter 3cm and the new ConTeXt draws a black circle

Re: [NTG-context] MPinclusions, MPextensions, MPinitializations and MPinstances

2013-02-13 Thread Marco Patzer
\startMPinitializations [foo] numeric n; n=4cm; \stopMPinitializations I tried \startMPcode{foo} numeric n; n=4cm; \stopMPcode but this adds some vertical space and doesn't seem to be the right solution given the face that there are already three other environments to include MetaPost code. Maybe I'm

[NTG-context] MP \letterpercent

2013-01-27 Thread Procházka Lukáš
Hello, why the MP code doesn't draw % and # when it uses TeX's \U - inside MP block?: \def\T{TTT} \def\U{UUU \letterpercent\letterhash} \starttext \letterpercent \letterhash \par \startMPcode draw btex AAA etex; draw textext(\T); % draw btex \T etex; % Err draw

Re: [NTG-context] MP \letterpercent

2013-01-27 Thread Hans Hagen
On 1/27/2013 10:05 PM, Procházka Lukáš wrote: Hello, why the MP code doesn't draw % and # when it uses TeX's \U - inside MP block?: \def\T{TTT} \def\U{UUU \letterpercent\letterhash} \starttext \letterpercent \letterhash \par \startMPcode draw btex AAA etex; draw

[NTG-context] Metafun textext()

2013-01-10 Thread Alan BRASLAU
\startMPcode picture T ; T := thelabel(textext(I'm seeing double),origin) ; draw T withcolor green ; draw T shifted (-1mm,1mm) withcolor blue ; \stopMPcode \stoptext Alan ___ If your question is of interest to others

Re: [NTG-context] Metafun textext()

2013-01-10 Thread Aditya Mahajan
. Is this a bug or a feature? \starttext \startMPcode picture T ; T := thelabel(textext(I'm seeing double),origin) ; draw T withcolor green ; draw T shifted (-1mm,1mm) withcolor blue ; \stopMPcode \stoptext Since the beginning of MkIV, colors in metapost labels need to be set at the ConTeXt

Re: [NTG-context] Metafun textext()

2013-01-10 Thread Alan BRASLAU
, but I am most likely wrong. Indeed \blue text has worked, but 'draw T withcolor blue;' *should* work as well. The processing of textext() has changed recently, it seems. \startMPcode label(textext(I'm seeing double),origin) withcolor green ; label(textext(I'm seeing double),(-1mm,1mm)) withcolor

Re: [NTG-context] Metafun textext()

2013-01-10 Thread Aditya Mahajan
withcolor blue;' *should* work as well. The processing of textext() has changed recently, it seems. \startMPcode label(textext(I'm seeing double),origin) withcolor green ; label(textext(I'm seeing double),(-1mm,1mm)) withcolor blue ; \stopMPcode DOES work. Of course, these are much simplified

[NTG-context] Metapost nodes.

2013-01-10 Thread Andre Caldas
Hello! 1. How does a metapost figure (\startMPcode) becomes a node? 2. When does it become a node? 3. What type of node it becomes? 4. Can I change its attributes? 5. Can I change its colors or transparency levels? André Caldas

Re: [NTG-context] Metapost nodes.

2013-01-10 Thread Hans Hagen
On 1/10/2013 5:15 PM, Andre Caldas wrote: Hello! 1. How does a metapost figure (\startMPcode) becomes a node? never, that is: it's turned into whatsit nodes with pdf operators and mixed with regular nodes when text is used 2. When does it become a node? sometime in the mp converter 3

Re: [NTG-context] Metafun textext()

2013-01-10 Thread Hans Hagen
\blue text has worked, but 'draw T withcolor blue;' *should* work as well. The processing of textext() has changed recently, it seems. The mkiv implementation has always been rather different from the mkii one: text handling as well as dealing with colors. \startMPcode label(textext(I'm seeing

Re: [NTG-context] MetaPost Animations

2012-12-31 Thread Wolfgang Schuster
expandable yet). \usemodule[animation] \setupinteraction[state=start] \starttext \startanimation[menu=yes] \dorecurse{7}{\expanded {\startframe \startMPcode path p; numeric n, u; u := 1cm; n:=\recurselevel*u; p := fullcircle scaled n; draw p; \stopMPcode \stopframe

Re: [NTG-context] beta (MP)

2012-12-11 Thread Alan BRASLAU
to foresee all bordercases). Hans (Already reported directly, but I forgot to put the list on copy.) There is a problem with the new beta. Minimal example: \starttext \startMPcode draw fullcircle scaled 1cm ; \stopMPcode \stoptext metapost initializing instance 'metafun

Re: [NTG-context] beta (MP)

2012-12-11 Thread Taco Hoekwater
On 12/11/2012 09:05 AM, Alan BRASLAU wrote: (Already reported directly, but I forgot to put the list on copy.) There is a problem with the new beta. Minimal example: \starttext \startMPcode draw fullcircle scaled 1cm ; \stopMPcode \stoptext This example works for me

Re: [NTG-context] beta (MP)

2012-12-11 Thread Otared Kavian
.) There is a problem with the new beta. Minimal example: \starttext \startMPcode draw fullcircle scaled 1cm ; \stopMPcode \stoptext metapost initializing instance 'metafun' using format 'metafun' metapost loading 'metafun': /home/local/context/beta/tex/texmf

Re: [NTG-context] beta (MP)

2012-12-11 Thread luigi scarso
On Tue, Dec 11, 2012 at 9:36 AM, Taco Hoekwater t...@elvenkind.com wrote: On 12/11/2012 09:05 AM, Alan BRASLAU wrote: (Already reported directly, but I forgot to put the list on copy.) There is a problem with the new beta. Minimal example: \starttext \startMPcode draw

Re: [NTG-context] Save/Redraw labels as pictures

2012-12-08 Thread Alan BRASLAU
Hans has be playing with MetaPost instances which got broken. \startMPpage\stopMPpage got the wrong instance whereas \startTEXpage\startMPcode\stopMPcode\stopMPpage correctly got the default instance. Normally, this was fixed, but your minimal example still does not work for me either. Something

Re: [NTG-context] drops module (draft)

2012-12-06 Thread Hans Hagen
=nx/2,1,-1 do c[#c+1] = format(%02x,j*s*255) end c = table.concat(c,,1,nx) r[#r+1] = c end r = table.concat(r,\r,1,ny) print(r) context(r) end \stopluacode \startMPcode draw textext(\bitmapimage[x=100,y=100

<    1   2   3   4   5   6   7   8   9   10   >