[NTG-context] Re: what are the interaction between \showframe and \realpageno in \startuseMPgraphic ?

2024-04-24 Thread Wolfgang Schuster
garu...@azules.eu schrieb am 20.04.2024 um 23:00: I can not figure out why this progress bar only works when \showframe is activated. When you comment on \showframe, it's as if \realpageno is at zero. (current version: 2024.04.01 08:59) \showframe \startuseMPgraphic{MonGraphis

[NTG-context] what are the interaction between \showframe and \realpageno in \startuseMPgraphic ?

2024-04-20 Thread garulfo
I can not figure out why this progress bar only works when \showframe is activated. When you comment on \showframe, it's as if \realpageno is at zero. (current version: 2024.04.01 08:59) \showframe \startuseMPgraphic{MonGraphisme_MP} numeric n ; n := \number\realpageno ; numeric

Re: [NTG-context] Struggling with startuseMPgraphic and string argument!

2020-09-18 Thread Geert Verhaag
ke so: \startuseMPgraphic{name}{s::lbl}    def mymacro (text lb) = pair a ; a := (3cm,3cm) ;label.top("String: " & str lb,a) ;    enddef ;    mymacro(\MPvariable{lbl}) ; \stopuseMPgraphic and this works too, but what if I introduce another text argument like: \startuseMPgra

Re: [NTG-context] Struggling with startuseMPgraphic and string argument!

2020-09-18 Thread Hans Hagen
On 9/17/2020 9:41 PM, Geert Verhaag wrote: Hi ConTeXt users, That's indeed magic and it works! Hans, thanks for your prompt answer! But I would like to take this a step further, by introducing a macro within the start/stopuseMPgraphic structure like so: \startuseMPgraphic{name}{s

Re: [NTG-context] Struggling with startuseMPgraphic and string argument!

2020-09-17 Thread Geert Verhaag
Hi ConTeXt users, That's indeed magic and it works! Hans, thanks for your prompt answer! But I would like to take this a step further, by introducing a macro within the start/stopuseMPgraphic structure like so: \startuseMPgraphic{name}{s::lbl}   def mymacro (text lb) =     pair a ; a :=

Re: [NTG-context] Struggling with startuseMPgraphic and string argument!

2020-09-17 Thread Hans Hagen
On 9/16/2020 4:32 PM, Geert Verhaag wrote: Hi, I'm trying to pass a string argument value to an MPgraphic but it doesn't seem to work: Tried the following: \startuseMPgraphic{name}{lbl}   pair a ; a := (3cm,3cm) ;label.top("\MPvariable{lbl}",a) ; \stopuseM

[NTG-context] Struggling with startuseMPgraphic and string argument!

2020-09-16 Thread Geert Verhaag
Hi, I'm trying to pass a string argument value to an MPgraphic but it doesn't seem to work: Tried the following: \startuseMPgraphic{name}{lbl}   pair a ; a := (3cm,3cm) ;label.top("\MPvariable{lbl}",a) ; \stopuseMPgraphic \starttext   \useMPgraphic{name}{lbl=1} \stoptext

[NTG-context] Can someone explain the \startuseMPgraphic interface to me?

2020-05-19 Thread Gerben Wierda
In details.pdf, I encounter \startuseMPgraphic{mpos:par:columnset:shade} numeric h ; for i=1 upto nofmultipars : h := bbheight(p) ; if multikind[i] = "single" : fill multipars[i] topenlarged -.5h When I encounter that, I wonder: - where do nofmu

Re: [NTG-context] Using \startuseMPgraphic inside a textext() in METAPOST?

2020-04-27 Thread Hans Hagen
("\startuseMPgraphic[instance=doublefun]{followtokens}path RotPath ; RotPath := fullcircle ;\stopuseMPgraphic\followtokens{I am creating a line of text here}"); draw pic; \stopMPpage \stoptext But that does not work. Is there a way I can from within my METAPOST code get  string (TeX code) to follo

[NTG-context] Using \startuseMPgraphic inside a textext() in METAPOST?

2020-04-27 Thread Gerben Wierda
I am in METAPOST which is inside TeX and I’d like (in METAPOST, not in TeX) to let a string follow a path. Adapting from the MetaFun manual around page 250, I tried this: \starttext \startMPpage[instance=doublefun] pic p; p := textext("\startuseMPgraphic[instance=doublefun]{followtokens

Re: [NTG-context] animation using \startuseMPgraphic

2020-04-21 Thread Jeong Dal
Dear Hans, I have not experienced a bottleneck when running ConTeXt. It is stable and fast. I am satisfied with ConTeXt except there are many features and commands which are not explained. Frankly speaking, I don’t need that much commands for my job. Also it is not the problem because there ar

Re: [NTG-context] animation using \startuseMPgraphic

2020-04-20 Thread Hans Hagen
On 4/20/2020 4:40 PM, Jeong Dal wrote: Of course, it runs so fast that it is meaningless to shorten the runtime. It is my old habit to check the algorithmic efficiency. We share the same habit ... unfortunately there is not much performance to gain after all these years. Of course users are i

Re: [NTG-context] animation using \startuseMPgraphic

2020-04-20 Thread Jeong Dal
Dear Hans, Of course, it runs so fast that it is meaningless to shorten the runtime. It is my old habit to check the algorithmic efficiency. It is just my interest. Thank you for your concern. Best regards, Dalyoung __

Re: [NTG-context] animation using \startuseMPgraphic

2020-04-19 Thread Jeong Dal
Dear Aditya, Thank you for your link. It is good to see your nice code. I’ll see how to apply \startMPanimation … \stopMPanimation to my sample. Thank you again. Best regards, Dalyoung ___ If your question is of i

Re: [NTG-context] animation using \startuseMPgraphic

2020-04-19 Thread Hans Hagen
On 4/19/2020 9:02 PM, Jeong Dal wrote: Dear Wolfgang, I’d like to ask you one more. To make an animation, almost same graphics are drawn repeatedly. In my code, for example, The base figure(two circles, line, boundingbox) is fixed and only points are moved. But it draws the base figure every

Re: [NTG-context] animation using \startuseMPgraphic

2020-04-19 Thread Jeong Dal
a way to draw the base figure once, and draw the points only at each frame? Thank you. Best regards, Dalyoung \startuseMPgraphic{inversionPoint}{n} vardef findPointD(expr C, Q, r) = numeric dist, ang; pair X, Y; dist := r**2/sqrt((xpart Q - xpart C)**2 + (ypart Q - ypart C)**2

Re: [NTG-context] animation using \startuseMPgraphic

2020-04-19 Thread Aditya Mahajan
\startuseMPgraphic{inversionPoint}{n} vardef findPointD(expr C, Q, r) = numeric dist, ang; pair X, Y; dist := r**2/sqrt((xpart Q - xpart C)**2 + (ypart Q - ypart C)**2); ang := angle(Q - C); Y := C + dir(ang)*dist; Y enddef; numeric radius, now, move; pair A,B,C,P,Q; path p,q; radius

Re: [NTG-context] animation using \startuseMPgraphic

2020-04-19 Thread Jeong Dal
Dear Wolfgang, Thank you for your help. It works fine. As you said, I need to use boundingbox for stable animation. Thank you again. Best regards, Dalyoung > 2020. 4. 19. 오후 4:19, Wolfgang Schuster > 작성: > > Jeong Dal schrieb am 19.04.2020 um 07:08: >> Dear all, >> I am trying to make an

Re: [NTG-context] animation using \startuseMPgraphic

2020-04-19 Thread Wolfgang Schuster
Jeong Dal schrieb am 19.04.2020 um 07:08: Dear all, I am trying to make an animation using the animation module. But it draws 10 figures instead of creating animation. Is there anything I have to do more? You have to put each animation step in a frame environment. I recommend also to set the

[NTG-context] animation using \startuseMPgraphic

2020-04-18 Thread Jeong Dal
Dear all, I am trying to make an animation using the animation module. But it draws 10 figures instead of creating animation. Is there anything I have to do more? Or, is there a better way to do this? Thank you for reading. Best regards, Dalyoung \startuseMPgraphic{inversionPoint}{n} vardef

Re: [NTG-context] \startuseMPgraphic

2016-04-11 Thread Aditya Mahajan
On Mon, 11 Apr 2016, Alan BRASLAU wrote: By the way, we added colo-imp-crayola having some funky, hallucinogenic names (according to Hans) as well as colo-imp-ral. (The first might be of interest to Americans and the second to Europeans ;-) These are nice colors. For anyone interested, you can

Re: [NTG-context] \startuseMPgraphic

2016-04-11 Thread Alan BRASLAU
rtMPpage > fill fullcircle scaled 3cm withcolor \MPcolor{myred} ; > \stopMPpage > %% end example > > > The second part of the questions concerns metapost variables. > > %% begin example > \startuseMPgraphic{mycircle}{diameter,color} > fill fullcircle scaled \MPvariable{

Re: [NTG-context] \startuseMPgraphic

2016-04-11 Thread Wolfgang Schuster
scaled 3cm withcolor \MPcolor{myred} ; \stopMPpage %% end example The second part of the questions concerns metapost variables. %% begin example \startuseMPgraphic{mycircle}{diameter,color} fill fullcircle scaled \MPvariable{diameter} withcolor \MPvariable{color} ; \stopuseMPgraphic \s

Re: [NTG-context] \startuseMPgraphic

2016-04-11 Thread Meer, Hans van der
ith MPcolor and the >> wanted red with \MPvar. Thus? >> >> Hans van der Meer >> >> \starttext >> \startuseMPgraphic{example1}{color} >> pickup pencircle scaled 1mm; >> draw unitsquare scaled 1cm >>withcolor \MPcolor{color}; > &

Re: [NTG-context] \startuseMPgraphic

2016-04-11 Thread Aditya Mahajan
d with \MPvar. Thus? Hans van der Meer \starttext \startuseMPgraphic{example1}{color} pickup pencircle scaled 1mm; draw unitsquare scaled 1cm withcolor \MPcolor{color}; This is looking for a color named 'color'. You need \MPcolor{\MPvar{color}}. \

Re: [NTG-context] \startuseMPgraphic

2016-04-11 Thread Meer, Hans van der
rttext \startuseMPgraphic{example1}{color} pickup pencircle scaled 1mm; draw unitsquare scaled 1cm withcolor \MPcolor{color}; \stopuseMPgraphic \startuseMPgraphic{example2}{color} pickup pencircle scaled 1mm; draw unitsquare scaled 1cm withcolor \MPvar

Re: [NTG-context] \startuseMPgraphic

2016-04-11 Thread Alan BRASLAU
On Mon, 11 Apr 2016 22:10:02 +0900 Jeong Dal wrote: > BTW, if I change “orange” to “red” or “green”, it is working fine. I > think that “orange” is not the predefined color. There is no color > “orange” in the MetaFun manual either. Defined MP colors are: color black, white, red, green, blue,

Re: [NTG-context] \startuseMPgraphic

2016-04-11 Thread Wolfgang Schuster
Meer, Hans van der <mailto:h.vanderm...@uva.nl> 11. April 2016 um 15:30 Thanks Wolfgang. It appears my memory did some "wishful thinking" in wanting \startuseMPgraphic{name}{key=value}. Although that would have been nice. You get a document with the syntax of metapost related c

Re: [NTG-context] \startuseMPgraphic

2016-04-11 Thread Meer, Hans van der
Thanks Wolfgang. It appears my memory did some "wishful thinking" in wanting \startuseMPgraphic{name}{key=value}. Although that would have been nice. Hans van der Meer On 11 Apr 2016, at 14:42, Wolfgang Schuster mailto:schuster.wolfg...@gmail.com>> wrote: Meer, Hans van der&

[NTG-context] \startuseMPgraphic

2016-04-11 Thread Jeong Dal
. Best regards, Dalyoung > \starttext > \startuseMPgraphic{myname1}{color} > pickup pencircle scaled 1mm; > draw unitsquare scaled 1cm withcolor \MPvar{color}; > \stopuseMPgraphic > > \startuseMPgraphic{myname2}{color=red} > pickup pencircle scaled 1mm; > draw unit

Re: [NTG-context] \startuseMPgraphic

2016-04-11 Thread Wolfgang Schuster
Meer, Hans van der <mailto:h.vanderm...@uva.nl> 11. April 2016 um 10:35 I seem to remember the following variations in \startuseMPgraphic. (1) \startuseMPgraphic{name}{comma separated list of variables} (2) \startuseMPgraphic{name}{comma separated list of key=value pairs} In the second ca

[NTG-context] \startuseMPgraphic

2016-04-11 Thread Meer, Hans van der
I seem to remember the following variations in \startuseMPgraphic. (1) \startuseMPgraphic{name}{comma separated list of variables} (2) \startuseMPgraphic{name}{comma separated list of key=value pairs} In the second case one is able to set a default value to that variable, possibly to be

Re: [NTG-context] parameters in startuseMPgraphic

2013-05-01 Thread Wolfgang Schuster
Am 01.05.2013 um 11:48 schrieb "Meer, H. van der" : > I used to pass (color) parameters to \startuseMPgraphic with: > > \startuseMPgraphic{square}{acolor} >draw unitsquare withcolor \MPvar{acolor}; % or \MPcolor{acolor} > > In both cases I get the fo

[NTG-context] parameters in startuseMPgraphic

2013-05-01 Thread Meer, H. van der
I used to pass (color) parameters to \startuseMPgraphic with: \startuseMPgraphic{square}{acolor} draw unitsquare withcolor \MPvar{acolor}; % or \MPcolor{acolor} In both cases I get the following error: metapost> initializing instance 'metafun' using format '

Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-11 Thread Alfredo Catalina
I've run first-setup.bat --modules=all and now it works. Thanks Wolfgang and Aditya!! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://ww

Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Alfredo Catalina
On Sun, Jun 10, 2012 at 9:29 PM, Wolfgang Schuster < schuster.wolfg...@googlemail.com> wrote: > > Do you use TeXLive or the ConTeXt Suite (installation from the context > wiki)? > > ConTeXt Suite ___ If your question

Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Wolfgang Schuster
Am 10.06.2012 um 20:07 schrieb Alfredo Catalina: > > > On Sun, Jun 10, 2012 at 7:14 PM, Aditya Mahajan wrote > > You need to upgrade your ConTeXt installation. > > > I installed context two weeks ago. I've just run > > mtxrun --selfupdate > mtxrun --generate > luatools --generate > conte

Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Alfredo Catalina
On Sun, Jun 10, 2012 at 7:14 PM, Aditya Mahajan wrote > > > You need to upgrade your ConTeXt installation. > > > I installed context two weeks ago. I've just run mtxrun --selfupdate mtxrun --generate luatools --generate context --make and I've got the same error. Any ideas? _

Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Aditya Mahajan
On Sun, 10 Jun 2012, Alfredo Catalina wrote: \setupbodyfont[pagella,11pt] %\setupMPinstance[metafun][textstyle=sans] \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,14pt]}] \starttext \input knuth \startMPcode draw textext("I’m different!") ; \stopMPcode \stoptext It give

Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Alfredo Catalina
> \setupbodyfont[pagella,11pt] > > %\setupMPinstance[metafun][textstyle=sans] > \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,14pt]}] > > \starttext > > \input knuth > > \startMPcode > draw textext("I’m different!") ; > \stopMPcode > > \stoptext > > > It gives an error: ! Undefine

Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Wolfgang Schuster
Am 10.06.2012 um 18:56 schrieb Alfredo Catalina: > 1. Do you use MkII or MkIV? > > 2. Do you want Palatino only for the metapost labels or also for the main > font in the document? > > I am using MkIV. Whether it is possible I would like to use a different font > for the metapost labels. \

Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Alfredo Catalina
> > 1. Do you use MkII or MkIV? > > 2. Do you want Palatino only for the metapost labels or also for the main > font in the document? > > > I am using MkIV. Whether it is possible I would like to use a different font for the metapost labels.

Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Wolfgang Schuster
Am 10.06.2012 um 18:40 schrieb Alfredo Catalina: > I'm sorry but I don't know how to use them. I've tried > > \setupMPinstance [metafun] [textcolor=red] > > and got an "undefined control sequence" error. > > I've also tried > > \startMPenvironment [global] > \usetypescript[palatino][e

Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Alfredo Catalina
pMPenvironment and it changed the font size but the font type is not "palatino". thanks On Sun, Jun 10, 2012 at 5:25 PM, Wolfgang Schuster < schuster.wolfg...@googlemail.com> wrote: > > Am 10.06.2012 um 16:25 schrieb Alfredo Catalina: > > > How can I setup a fo

Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Wolfgang Schuster
Am 10.06.2012 um 18:23 schrieb Meer, H. van der: > Being interested I looked up these links in the garden. > The information given there is scarce, however. > The parameters 'extensions' and 'initializations' with values yes/no > especially. What are they for? What is the effect of yes/no? What

Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Meer, H. van der
initializations? Is there documentation somewhere? Thanks in advance, Hans van der Meer On 10 jun. 2012, at 17:25, Wolfgang Schuster wrote: Am 10.06.2012 um 16:25 schrieb Alfredo Catalina: How can I setup a font -name, size, etc- inside a startuseMPgraphic environment? \startuseMPgraphic{map

Re: [NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Wolfgang Schuster
Am 10.06.2012 um 16:25 schrieb Alfredo Catalina: > How can I setup a font -name, size, etc- inside a startuseMPgraphic > environment? > > \startuseMPgraphic{map} > > \stopuseMPgraphic - http://wiki.contextgarden.net/Command/defineMPinstance - http://wiki.context

[NTG-context] Change font in \startuseMPgraphic

2012-06-10 Thread Alfredo Catalina
How can I setup a font -name, size, etc- inside a startuseMPgraphic environment? \startuseMPgraphic{map} \stopuseMPgraphic ___ If your question is of interest to others as well, please add an entry to the Wiki

Re: [NTG-context] mfun-004.tex \startuseMPgraphic

2005-12-19 Thread Hans Hagen
David Arnold wrote: Hans, In mfun-004.tex, I find: \startuseMPgraphic{axis} tickstep := 1cm ; ticklength := 2mm ; drawticks unitsquare xscaled 4cm yscaled 3cm shifted (-1cm,-1cm) ; tickstep := tickstep/2 ; ticklength := ticklength/2 ; drawticks unitsquare xscaled 4cm yscaled 3cm

[NTG-context] mfun-004.tex \startuseMPgraphic

2005-12-18 Thread David Arnold
Hans, In mfun-004.tex, I find: \startuseMPgraphic{axis} tickstep := 1cm ; ticklength := 2mm ; drawticks unitsquare xscaled 4cm yscaled 3cm shifted (-1cm,-1cm) ; tickstep := tickstep/2 ; ticklength := ticklength/2 ; drawticks unitsquare xscaled 4cm yscaled 3cm shifted (-1cm,-1cm

Re: [NTG-context] special characters and \startuseMPgraphic{FunnyFrame}

2004-05-03 Thread Mikael Persson
> Hello, > > the following example does not work if the text in the > \FrameTitle{Blockflötenspielen} contains special characters like öäßé etc. > > Has someone a solution for this problem? > > Thanks a lot, > > Helmut > > I had a similar problem some time ago. But I used the utf regime. The solut

Re: [NTG-context] special characters and \startuseMPgraphic{FunnyFrame}

2004-05-03 Thread Willi Egger
] \pdfcompresslevel=0 \runMPgraphicstrue \usetypescript[palatino][texnansi] \setupbodyfont[palatino,rm,12pt] \startMPenvironment \usetypescript[palatino][texnansi] \setupbodyfont[palatino,rm,14pt] \stopMPenvironment \setupcolors[state=start] \startuseMPgraphic{FunnyFrame} picture p; numeric w, h, o; p

[NTG-context] special characters and \startuseMPgraphic{FunnyFrame}

2004-05-03 Thread Helmut Schwertner
] \enableregime[windows] \setuppapersize[a4][a4] \setupoutput[pdftex] \pdfcompresslevel=0 \runMPgraphicstrue \setupcolors[state=start] \startuseMPgraphic{FunnyFrame} picture p; numeric w, h, o; p:=textext.rt(\MPstring{FunnyFrame}); w:=OverlayWidth; h:=OverlayHeight; o:=BodyFontSize; p:=p shifted (2o,h