Re: [NTG-context] More table questions

2020-09-22 Thread Aditya Mahajan
e data row :-) A better solution is to create a dedicate framehandler which draws the bottom frame at half the thickness: \startuseMPgraphic{booktabs_bottom} draw bottomboundary OverlayBox withpen pencircle scaled (OverlayLineWidth/2) withcolor OverlayColor; setbounds curr

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

2020-09-18 Thread Geert Verhaag
: \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: \startuseMPgraphic{

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::lbl

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 := (3cm

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) ; \stopuseMPgraphic

[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 The a

Re: [NTG-context] Combining modes and MetaFun

2020-09-06 Thread Jan Willem Flamma
ometxt{lengte},  (0.5u,-0.4u)) ;}> >      %\doifmode{en}{label(\sometxt{width},   (1.6u, 0.5u)) ;}> >      %\doifmode{nl}{label(\sometxt{breedte}, (1.6u, 0.5u)) ;}> > \stopbuffer> > \placefigure> >      [here,none][]{}> >      {\scale[width=0.5\textwidth]{\processMPb

Re: [NTG-context] Combining modes and MetaFun

2020-09-04 Thread Hans Hagen
, 0.5u)) ;}     %\doifmode{nl}{label(\sometxt{breedte}, (1.6u, 0.5u)) ;} \stopbuffer \placefigure     [here,none][]{}     {\scale[width=0.5\textwidth]{\processMPbuffer[square]}} \stoptext You need to compensate these solutions by "wikifying" them: \starttext \startuseMPgraphic{w

[NTG-context] Chapter number with Luametafun

2020-08-18 Thread Fabrice Couvreur
Hello, How to get the number of the current chapter ? How to get the label "Chapitre" ? Thanks for your help. Fabrice %%% Begin example \mainlanguage[fr] \setcharacterspacing [frenchpunctuation] \setuplabeltext[fr][chapter=Chapitre~] \startuseMPgraphic{fun} definecolor[name=&q

[NTG-context] Two questions about color in MetaFun

2020-08-13 Thread Jairo A. del Rio
something interesting happens. The following: \setuplayout[width=middle] \setuppagenumbering[state=stop] \setuppapersize[A10,landscape][A10,landscape] \starttext \startuseMPgraphic{cornystuff} draw outlinetext.f ("\framedtext[frame=off,width=fit,align=middle]{I love you \\ \CONTEXT}") %\CONTEXT

Re: [NTG-context] Code lua in a table

2020-07-21 Thread Fabrice Couvreur
Thank you Fabrice \usecolors[X11] \startuseMPgraphic{DiagonalRule} rulethickness := \frameddimension{rulethickness}; drawoptions( withpen pencircle scaled rulethickness withcolor \MPcolor{\framedparameter{framecolor}}); pair leftcorner, rightcorner; leftcorner := (rulethickness

[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

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

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

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
. Is there 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

Re: [NTG-context] Fwd: Adding optional enumeration text to framed enumeration header

2020-04-19 Thread Aditya Mahajan
works out of the box but you have to enable enumeration titles using `title=yes` key while defining the enumeration... \startuseMPgraphic{FunnyFrame} picture p ; numeric w, h, o ; p := textext.rt("\wrappedcurrentconstruction"); w := OverlayWidth ; h := OverlayHeight ; o :=

[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] offset for background overlay

2020-04-13 Thread mf
Or maybe a method in MP to set the bounding box of the resulting overlay? setbounds in combination with leftenlarged, topenlarged etc. Thanks Wolfgang, this is the kind of solution I was looking for: \startuseMPgraphic{cell:triangle} path p ; p := unittriangle rotated 90 xscaled 2.5

Re: [NTG-context] offset for background overlay

2020-04-11 Thread Wolfgang Schuster
already a backgroundoffset option, whose value can be: - a DIMENSION (an offset that is both horizontal and vertical) - a "frame": what does it mean? (I looked into pack-rul.mkiv, with no results) ConTeXt uses the value from the frameoffset key for backgroundoffset. \startus

Re: [NTG-context] offset for background overlay

2020-04-11 Thread mf
, this MWE is a simplified version of a real case: \startuseMPgraphic{cell:triangle}    path p ; p := unittriangle rotated 90 xscaled 2.5 OverlayWidth yscaled 2.5 OverlayHeight ;    draw p withcolor red ; \stopuseMPgraphic \defineoverlay[triangle][{\uniqueMPgraphic{cell:triangle}}] \starttext \bTABLE[frame=of

Re: [NTG-context] offset for background overlay

2020-04-11 Thread Wolfgang Schuster
Hans Hagen schrieb am 11.04.2020 um 19:41: On 4/11/2020 4:15 PM, mf wrote: Hello list, this MWE is a simplified version of a real case: \startuseMPgraphic{cell:triangle}    path p ; p := unittriangle rotated 90 xscaled 2.5 OverlayWidth yscaled 2.5 OverlayHeight ;    draw p withcolor red

Re: [NTG-context] offset for background overlay

2020-04-11 Thread Hans Hagen
On 4/11/2020 4:15 PM, mf wrote: Hello list, this MWE is a simplified version of a real case: \startuseMPgraphic{cell:triangle}   path p ; p := unittriangle rotated 90 xscaled 2.5 OverlayWidth yscaled 2.5 OverlayHeight ;   draw p withcolor red ; \stopuseMPgraphic \defineoverlay[triangle

[NTG-context] offset for background overlay

2020-04-11 Thread mf
Hello list, this MWE is a simplified version of a real case: \startuseMPgraphic{cell:triangle} path p ; p := unittriangle rotated 90 xscaled 2.5 OverlayWidth yscaled 2.5 OverlayHeight ; draw p withcolor red ; \stopuseMPgraphic \defineoverlay[triangle][{\uniqueMPgraphic{cell:triangle

Re: [NTG-context] startcombination place reference left of images instead below

2020-03-23 Thread Wolfgang Schuster
is not possible at all I tired to ammend your above example as follows \placetable[] [fig:somefig] {some caption} { \startuseMPgraphic{heap_add_start_with_3} input images/heap; \stopuseMPgraphic \startitemize[a][stopper=)] \starttabulate \NI { \useMPgraphic{heap_add_start_with_3

Re: [NTG-context] write a subtitle under the title of a chapter using outlined font

2020-03-19 Thread Hans Hagen
them in two lines? draw outlinetext.b ("\framed[align=normal]{" & ditto & \MPvar{tt} & ditto & "}") Thanks. Best regards, Dalyoung ** \startuseMPgraphic{outlineT}   draw outlinetext.b (\MPvar{tt})   (withcolor .75white)   (withcolor .72

[NTG-context] write a subtitle under the title of a chapter using outlined font

2020-03-19 Thread Jeong Dal
, Dalyoung ** \startuseMPgraphic{outlineT} draw outlinetext.b (\MPvar{tt}) (withcolor .75white) (withcolor .725blue withpen pencircle scaled .75pt); \stopuseMPgraphic \define[1]\outlineFill{\useMPgraphic{outlineT}{tt="#1"}}% \setuphead[cha

Re: [NTG-context] Tent style cards

2019-12-22 Thread Pavneet Arora
, as well as using \startuseMPgraphic for direct compilation from ConTeXt. Many thanks for all the help. >>> SNIPPET <<< \startbuffer[tblcard] \strut \definelayer[tblplacecard] \setlayer[tblplacecard][x=-1em,y=1em]{% \externalfigure[figures/apollonius/apo

[NTG-context] Problem with the bottom line of a header

2019-10-22 Thread Fabrice Couvreur
, topframe=off, bottomframe=on, framecolor=, rulethickness=1pt] \defineframed [headerframed] [frame=off, height=fit, width=fit] \startuseMPgraphic{framewithshadow} path p; p:=origin--(1.05*OverlayWidth,0)--(1.05*OverlayWidth,1.05*OverlayHeight

Re: [NTG-context] Problem inserting image within MP

2019-10-10 Thread Aditya Mahajan
On Thu, 10 Oct 2019, cont...@vivaldi.net wrote: Hello, this is a probably basic question, but the following code doesn't compile: \setupbackgrounds[page][background={Bkg}] \defineoverlay[Bkg][\useMPgraphic{Bkg}] \startuseMPgraphic{Bkg} externalfigure "hacker.png"; \stopus

Re: [NTG-context] Problem inserting image within MP

2019-10-10 Thread Taco Hoekwater
> On 10 Oct 2019, at 13:23, cont...@vivaldi.net wrote: > > Hello, > > this is a probably basic question, but the following code doesn't compile: > > > \setupbackgrounds[page][background={Bkg}] > > \defineoverlay[Bkg][\useMPgraphic{Bkg}] > > \star

[NTG-context] Problem inserting image within MP

2019-10-10 Thread context
Hello, this is a probably basic question, but the following code doesn't compile: \setupbackgrounds[page][background={Bkg}] \defineoverlay[Bkg][\useMPgraphic{Bkg}] \startuseMPgraphic{Bkg} externalfigure "hacker.png"; \stopuseMPgraphic \starttext Ahoj

Re: [NTG-context] Problem of displaying a date with a macro

2019-09-09 Thread Hans Hagen
    \stopframed}] > >  \stopsetups > >  \setvariable{headertext}{set}{\directsetup{headertext}} > > \startuseMPgraphic{framewithshadow} > path p; > p:=origin--(OverlayWidth,0)--(OverlayWidth,OverlayHeight)--(0,OverlayHeight)--cycle;

Re: [NTG-context] Problem of displaying a date with a macro

2019-09-09 Thread Fabrice Couvreur
d] > > [align=flushright,foregroundstyle=] > > > > > \date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},y=\getvariable{headertext}{year}] > > \stopframed}] > > > > \stopsetups > > > > \setvariable{headertext}{set

Re: [NTG-context] Strange pagebreaks in LMTX

2019-09-05 Thread Aditya Mahajan
, ] \startuseMPgraphic{mpos:region:leftbar} draw_multi_pars; draw_multi_side; \stopuseMPgraphic then when there is a footnote the leftbartext runs into the footnote, between the number and the footnote itself, and the result is not nice. I did not find a way to push the footnote and its number a little

Re: [NTG-context] Strange pagebreaks in LMTX

2019-09-05 Thread Duncan Hothersall
bar, > width=broad, > frame=off, > framecolor=darkred, > rulethickness=.5pt, > leftoffset=2ex, > %rightoffset=2.25ex, > %topoffset=2.25ex, > %bottomoffset=2.25ex, > background=color, > backgroundcolor=white, > ] > > \s

Re: [NTG-context] Strange pagebreaks in LMTX

2019-09-04 Thread Otared Kavian
, mp=mpos:region:leftbar, width=broad, frame=off, framecolor=darkred, rulethickness=.5pt, leftoffset=2ex, %rightoffset=2.25ex, %topoffset=2.25ex, %bottomoffset=2.25ex, background=color, backgroundcolor=white, ] \startuseMPgraphic{mpos:region:leftbar

Re: [NTG-context] Problem of displaying a date with a macro

2019-08-28 Thread Aditya Mahajan
}] \stopsetups \setvariable{headertext}{set}{\directsetup{headertext}} \startuseMPgraphic{framewithshadow} path p; p:=origin--(OverlayWidth,0)--(OverlayWidth,OverlayHeight)--(0,OverlayHeight)--cycle; fill p shifted (2,-2); fill p withcolor 0.8white; draw p; setbounds currentpicture to p; \stopuseMPgraphic

[NTG-context] Problem of displaying a date with a macro

2019-08-28 Thread Fabrice Couvreur
{headertext}{set}{\directsetup{headertext}} \startuseMPgraphic{framewithshadow} path p; p:=origin--(OverlayWidth,0)--(OverlayWidth,OverlayHeight)--(0,OverlayHeight)--cycle; fill p shifted (2,-2); fill p withcolor 0.8white; draw p; setbounds currentpicture to p; \stopuseMPgraphic \defineoverlay

Re: [NTG-context] Frame with shadow for header

2019-08-27 Thread Fabrice Couvreur
}] \stopsetups \setvariable{headertext}{set}{\directsetup{headertext}} \startuseMPgraphic{framewithshadow} path p; p:=origin--(OverlayWidth,0)--(OverlayWidth,OverlayHeight)--(0,OverlayHeight)--cycle; fill p shifted (2,-2); fill p withcolor 0.8white; draw p; setbounds currentpicture to p

Re: [NTG-context] Frame with shadow for header

2019-08-26 Thread Mikael P. Sundqvist
//www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > Hi, maybe something like this co

Re: [NTG-context] Some macros (Metafun)

2019-08-11 Thread Fabrice Couvreur
like drawpath p ; > > drawcontrollines p ; drawpoints p ; drawcontrolpoints p ... > > How to use them in a document ? > > Where to find source codes ? > > For example, the following code does not work : > > > > \starttext > > \startuseMPgraphic{path} > &g

Re: [NTG-context] Some macros (Metafun)

2019-08-09 Thread Hans Hagen
\startuseMPgraphic{path}    path p ; p := (1cm,1cm)--(1.5cm,1.5cm)..(2cm,0cm)..cycle ; \stopuseMPgraphic \startMPcode   p := p .. cycle ; swappointlabels := true ;   drawpath p ; \stopMPcode \stoptext \starttext \startMPcode path p ; p := (1cm,1cm)--(1.5cm,1.5cm)..(2cm,0cm)..cycle

[NTG-context] Some macros (Metafun)

2019-08-09 Thread Fabrice Couvreur
Hello, In the Metafun manual, Hans uses macros like drawpath p ; drawcontrollines p ; drawpoints p ; drawcontrolpoints p ... How to use them in a document ? Where to find source codes ? For example, the following code does not work : \starttext \startuseMPgraphic{path} path p ; p := (1cm,1cm

[NTG-context] Strange behavior in somewhat complex layout (again)

2019-06-27 Thread Andres Conrado Montoya
prevChapterTitle, currentChapterTitle; prevChapterTitle := ""; currentChapterTitle := ""; \stopMPinclusions \startuseMPgraphic{page:background} StartPage; currentChapterTitle := "\namedstructurevariable{chapter}{title}"; if currentCh

[NTG-context] Strange behavior in somewhat complex layout

2019-06-23 Thread Andres Conrado Montoya
apterTitle := ""; \stopMPinclusions \startuseMPgraphic{page:background} StartPage; currentChapterTitle := "\namedstructurevariable{chapter}{title}"; if currentChapterTitle <> prevChapterTitle : fill (topboundary Page -- cycle) enlar

Re: [NTG-context] Left frame on a block of text

2019-04-21 Thread Otared Kavian
ound: > > \showframe > \showboxes > \defineframedtext[leftbartext][ >width=broad, >frame=off, > rulethickness=.5ex, >background=mp:offsetframe, >offset=overlay, > ] > > \defineoverlay[mp:offsetframe][\useMPgraphic{mp:offsetframe}] >

Re: [NTG-context] Left frame on a block of text

2019-04-20 Thread Gilles Waeber
offsetframe, > offset=overlay, > ] > > \defineoverlay[mp:offsetframe][\useMPgraphic{mp:offsetframe}] > \startuseMPgraphic{mp:offsetframe} linecap:=butt; draw leftboundary OverlayBox xshifted -(LeftMarginDistance + 0.5OverlayLineWidth) withpen pe

Re: [NTG-context] Left frame on a block of text

2019-04-20 Thread Aditya Mahajan
, rulethickness=.5ex, background=mp:offsetframe, offset=overlay, ] \defineoverlay[mp:offsetframe][\useMPgraphic{mp:offsetframe}] \startuseMPgraphic{mp:offsetframe} draw leftboundary OverlayBox xshifted -(LeftMarginDistance + 0.5OverlayLineWidth) withpen pencircle scaled

[NTG-context] Fwd: Meptapost Drawing not showing-up in Context Letter Style

2019-03-12 Thread Jeroen
Eventually, these two options worked. Firstly changing \setupbackgrounds % BEGIN MP LOGO SETUP \startuseMPgraphic{mpglogo} path p; p := (0,0)--(100,0)--(100,100)--(0,100)--cycle; path q; q := p cornered 30pt; draw q withcolor black withpen pencircle scaled 7pt; \stopuseMPgraphic

Re: [NTG-context] Meptapost Drawing not showing-up in Context Letter Style

2019-03-11 Thread Wolfgang Schuster
=dinb] \startuseMPgraphic{mpglogo} path p; p := (0,0)--(100,0)--(100,100)--(0,100)--cycle ; path q; q := p cornered 30pt; draw q withcolor black withpen pencircle scaled 7pt ; \stopuseMPgraphic \startsetups[letter:layer:lettermain] \scale[width=25mm,height=25mm]{\useMPgraphic{mpglogo

[NTG-context] Meptapost Drawing not showing-up in Context Letter Style

2019-03-10 Thread Context NTG
I am trying to get a metapost drawing as logo added to right upper corner of a DIN B style letterhead, but it does not show up, just the letter itself. Is there anything to change to the layers for the MP toe reveal itself? Thanks, Jeroen % BEGIN MP LOGO SETUP \startuseMPgraphic{mpglogo} path

Re: [NTG-context] baseline of outlined font

2019-02-16 Thread Wolfgang Schuster
[BigFontOne][NotoSansCJKkr-Bold sa 4] \definecolor[BigColorOne][r=.86,g=.850,b=.54] \startuseMPgraphic{outlineT} draw outlinetext.b (\MPvar{tt}) (withcolor .75white) (withcolor .725blue withpen pencircle scaled .75pt);%\MPvar{thick}); \stopuseMPgraphic \define[1]\titleOutline{\useMPgraphic

[NTG-context] baseline of outlined font

2019-02-16 Thread Jeong Dal
] \definecolor[BigColorOne][r=.86,g=.850,b=.54] \startuseMPgraphic{outlineT} draw outlinetext.b (\MPvar{tt}) (withcolor .75white) (withcolor .725blue withpen pencircle scaled .75pt);%\MPvar{thick}); \stopuseMPgraphic \define[1]\titleOutline{\useMPgraphic{outlineT}{tt="#1"}} \setuphead[cha

[NTG-context] index problem: [entry not flushed]

2019-02-11 Thread Jeong Dal
code? %% \defineframed [MyFramed] [frame=off, loffset=1ex, roffset=1ex, foregroundstyle=\ssbf] \startuseMPgraphic{MyFrame} picture p ; numeric o ; path a, b ; pair c ; %p := textext.rt("\FunnyFramed{\enumerationparameter{text} \convertedcounter[Theorem]

Re: [NTG-context] outlined font using MetaFun

2019-02-08 Thread Wolfgang Schuster
Jeong Dal schrieb am 08.02.19 um 17:18: Dear all, The following code which is borrowed from MetaFun manual is working nicely. %% \setupMPvariables[outlineT][tt="Hello"] \startuseMPgraphic{outlineT} draw outlinetext.b (\MPvar{tt}) (withcolor .5white) (withcolor .625bl

[NTG-context] outlined font using MetaFun

2019-02-08 Thread Jeong Dal
Dear all, The following code which is borrowed from MetaFun manual is working nicely. %% \setupMPvariables[outlineT][tt="Hello"] \startuseMPgraphic{outlineT} draw outlinetext.b (\MPvar{tt}) (withcolor .5white) (withcolor .625blue withpen pencircle scaled .2pt)

Re: [NTG-context] Metapost graphic in setupbackground

2019-02-08 Thread Jan U. Hasecke
s to a Metapost graphic. >> >> But only the first page has the defined background. >> >> I also tried with >> >> \startuseMPgraphic >> >> with no success >> >> --- mwe --- >> >> \startreusableMPgraphic{kreis} >> draw fullcircle

Re: [NTG-context] Metapost graphic in setupbackground

2019-02-08 Thread Wolfgang Schuster
Jan U. Hasecke schrieb am 08.02.19 um 12:36: Hi all, I make my first steps with Metapost. I would like to set the background of all pages to a Metapost graphic. But only the first page has the defined background. I also tried with \startuseMPgraphic with no success --- mwe

[NTG-context] Metapost graphic in setupbackground

2019-02-08 Thread Jan U. Hasecke
Hi all, I make my first steps with Metapost. I would like to set the background of all pages to a Metapost graphic. But only the first page has the defined background. I also tried with \startuseMPgraphic with no success --- mwe --- \startreusableMPgraphic{kreis} draw fullcircle scaled

Re: [NTG-context] Color a column (xtable, lua)

2019-01-26 Thread Fabrice Couvreur
4 \startuseMPgraphic{tablebackground}{i,j} 5 if (\MPvar{i} = 1) or (\MPvar{j} = 1): 6 fill OverlayBox withcolor \MPcolor{fondpaille} ; 7 fi; 8 \stopuseMPgraphic 9 10 \defineoverlay 11 [tablebackground] 12 13 >> [\useMPgraphic{tablebackground}{i=\current

Re: [NTG-context] Color a column (xtable, lua)

2019-01-26 Thread Henri Menke
uate the conditional purely in MetaPost. I don't know if that would be faster, but it's a bit more readable to me. \startuseMPgraphic{tablebackground}{i,j} if (\MPvar{i} = 1) or (\MPvar{j} = 1): fill OverlayBox withcolor \MPcolor{fondpaille} ; fi; \stopuseMPgraphic \defineoverlay [table

Re: [NTG-context] Color a column (xtable, lua)

2019-01-26 Thread Henri Menke
On 1/27/19 12:08 PM, Fabrice Couvreur wrote: > Hi, > How to color the first column as I did for the first line ? Stolen from Wolfgang's answer on TeX.SX. https://tex.stackexchange.com/a/464771 \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] \startuseMPgraphic {tablebackground} fill Over

[NTG-context] placing an MPGraphic/Lines over multiple table cells

2019-01-05 Thread Martin Althoff
les on a page, several pages, that seems error prone. Any suggestions, corrections, hints are most welcome! Kindly, Martin Working example with some comments: % Graphic that draws the "Z", that works fine in a single table cell as seen in the example \startuseMPgraphic{

Re: [NTG-context] double followtokens?

2019-01-01 Thread Hans van der Meer
Dear list, >>>> >>>> I have the following sample: >>>> >>>>\useMPlibrary[txt] >>>> >>>>\starttext >>>> >>>>\startuseMPgraphic{followtokens} >>>> path RotPath ; RotPath := reverse halfcircle

[NTG-context] latest beta (october 18th): likely bug in \mirror

2018-11-23 Thread mf
) \startuseMPgraphic{accolade} z1 = (-233,0) ; z2 = (-220,22) ; z3 = (-155,211) ; z4 = (-200,690) ; z5 = (-142,1033) ; z6 = (-97,1106) ; z7 = (-71,1125) ; z8 = (-61,1104) ; z9 = (-80,1077) ; z10 = (-108,1002) ; z11 = (-129,666) ; z12 = (-117,207) ; z13 = (-197,19) ; z14 = (-208,0) ; z15 = (-197

Re: [NTG-context] Implicit plots/level curves possible?

2018-10-09 Thread Alan Braslau
mp.path(userdata.contour) end function mp.ContourX() mp.pair(userdata.xlim) end function mp.ContourY() mp.pair(userdata.ylim) end \stopluacode \startuseMPgraphic{doublefun::ContourPlot}{width} save xmin, xmax, ymin, ymax ; (xmin, xmax) = lua.mp.ContourX() ;

Re: [NTG-context] Implicit plots/level curves possible?

2018-10-08 Thread Aditya Mahajan
1], ylim[2], (ylim[2] - ylim[1])/length do if abs(f(x,y)) < eps*x then n = n + 1 data[n] = {x, y} end end end end function mp.ContourPath() mp.path(data) end \stopluacode \startuseMPgraphic{doublefun

Re: [NTG-context] MetaFun: nofmultipars wrong?

2018-09-25 Thread Hans Hagen
multilocs[i], ulcorner multipars[i]) withcolor red ; Cheers, Henri --- \startuseMPgraphic{pageframe} for i=1 upto nofmultipars : draw (ulcorner multipars[i] -- urcorner multipars[i]) withcolor red ; draw (llcorner multipars[i] -- lrcorner multipars[i]) withcolor red ; label.lft

[NTG-context] MetaFun: nofmultipars wrong?

2018-09-24 Thread Henri Menke
is that the frame containing the page break has a stray blank line at the end. Is this something that changed recently when switching to the one-pass processing? I have attached the output of beta 2018.09.24 14:11 (which I believe is the latest). Cheers, Henri --- \startuseMPgraphic{pageframe} for i=1 upto

Re: [NTG-context] Creating flyers with ConTeXt

2018-09-21 Thread Marco Patzer
\defineoverlay [pagedecoration] [\useMPgraphic{pagedecoration}] \setupbackgrounds [page] [background=pagedecoration, backgroundcolor=lightblue] \startuseMPgraphic{pagedecoration} distanceSmall := 3mm; distanceBig := distanceSmall; bleed := 3mm; if PageNumber==1: path pageOne; pageOn

Re: [NTG-context] Bug in newest ConTeXt with anglebetween?

2018-09-01 Thread Hans Hagen
, the file compiles. use textext("$\alpha$") %%% \starttext \startuseMPgraphic{testfig} u:=1cm; z0=origin; z1=(4u,3u); z2=(4u,0); draw z0--z1--z2--cycle; draw anglebetween(z0--z2,z0--z1,btex $\alpha$ etex); \stopuseMPgraphic \startplacefigure \useMPgraphic{testfig} \stopplacefigure

[NTG-context] Bug in newest ConTeXt with anglebetween?

2018-09-01 Thread Mikael P. Sundqvist
Hi! The document below compiled before, but not since upgrading to the new version of standalone (current version: 2018.08.30 18:41). I'm running linux if that matters. The problem seem to be anglebetween, since if that line is commented out, the file compiles. %%% \starttext \startuseMPgraphic

Re: [NTG-context] Problems with letter module

2018-07-20 Thread Lutz Haseloff
\startsetups letter:head >> \rightaligned{Seite \correspagenumber\ von \numberofcorrespages} >> \stopsetups >> % correspondence.pdf, p. 71 >> \startuseMPgraphic{dactylus} >> draw unitsquare xyscaled (OverlayWidth-2cm,OverlayHeight-2cm) >> smoothed 1cm withpen penc

Re: [NTG-context] Problems with letter module

2018-07-20 Thread Henri Menke
\startuseMPgraphic{dactylus} draw unitsquare xyscaled (OverlayWidth-2cm,OverlayHeight-2cm) smoothed 1cm withpen pencircle scaled 2 ; fill fullcircle scaled 1.5cm shifted (1cm,1cm) withcolor \MPcolor{orange} ; \stopuseMPgraphic \setupletterstyle[background=\useMPgraphic{dactylus}] \setupletteroptions

[NTG-context] Problems with letter module

2018-07-19 Thread Lutz Haseloff
={Unterschrift}, fromname={Absender}, fromaddress={Straße\\Ort}, toname={An}, toaddress={Adresse}] % correspondence.pdf, p. 73 \startsetups letter:head \rightaligned{Seite \correspagenumber\ von \numberofcorrespages} \stopsetups % correspondence.pdf, p. 71 \startuseMPgraphic{dactylus} draw unitsquare

Re: [NTG-context] btex ... etex within MP with 1 letter ignored?

2018-07-17 Thread Hans Hagen
t;, "22")   context.setMPtext("Pare3", "333") \stopluacode % \startuseMPgraphic{Pare}   draw thelabel(btex \switchtobodyfont[20mm]\sans\bold TTT etex, (0, 150))     withcolor red     ;   draw thelabel(btex \switchtobodyfont[20mm]\sans\bold U etex, (0, 100))     with

[NTG-context] btex ... etex within MP with 1 letter ignored?

2018-07-17 Thread Procházka Lukáš Ing .
Hello, I encountered a weird thing - words of 1 letter inside btex ... etex within MP are not shown - check: \setuplayout[page] \startluacode context.setMPtext("Pare", "1") context.setMPtext("Pare2", "22") context.setMPtext("Pare3"

Re: [NTG-context] Strange behavior !

2018-07-16 Thread Otared Kavian
Frame, > width=\textwidth, > location=right] > > \defineoverlay >[MyFrame] >[\useMPgraphic{MyFrame}] > > \definelabel >[Définition] >[headstyle=\bf\smallcaps] > > > \startuseMPgraphic{MyFrame} > picture p ; > p := texte

Re: [NTG-context] Strange behavior !

2018-07-15 Thread Alan Braslau
phic{MyFrame}] > > \definelabel >[Définition] >[headstyle=\bf\smallcaps] > > > \startuseMPgraphic{MyFrame} > picture p ; > p := textext.rt(\MPstring{MyFrame}) ; > p := p shifted (0,OverlayHeight-ypart center p) ; > fill OverlayBox lef

[NTG-context] Strange behavior !

2018-07-15 Thread Fabrice Couvreur
=\textwidth, location=right] \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \definelabel [Définition] [headstyle=\bf\smallcaps] \startuseMPgraphic{MyFrame} picture p ; p := textext.rt(\MPstring{MyFrame}) ; p := p shifted (0,OverlayHeight-ypart center p

Re: [NTG-context] Shading and transparency

2018-07-12 Thread Marco Patzer
; \setupbackgrounds [page] [background=color, backgroundcolor=lightgray] > > \starttext > > \startuseMPgraphic{test} > graycolor white; white := 1 ; > fill OverlayBox > withshademethod "linear" > withshadedirection shadedup > withshadef

Re: [NTG-context] Shading and transparency

2018-07-12 Thread Hans Hagen
reference) anyway, it helps to be in the same color space \setupbackgrounds [page] [background=color, backgroundcolor=lightgray] \starttext \startuseMPgraphic{test} graycolor white; white := 1 ; fill OverlayBox withshademethod "linear" withsha

[NTG-context] Shading and transparency

2018-07-11 Thread Marco Patzer
the external file works. Just wondering if there's a better - more integrated - way. Marco \definecolor [transparent] [a=multiply, t=1, s=1] \startuseMPgraphic{trans} fill OverlayBox withshademethod "linear" withshadevector (3, 0) %% (white, "transparent"

Re: [NTG-context] Table generator : Issues with borders and rotated cells

2018-06-27 Thread Wolfgang Schuster
le where I show how this can be done. Wolfgang begin meta-imp-mpframe.mkiv \startuseMPgraphic{mp_frame_left} draw leftboundary OverlayBox withpen pensquare scaled \frameddimension{leftrulethickness} withcolor \MPcolor{\framedparameter{leftframecolor}} ; setbounds currentpictu

[NTG-context] \startplacetable in \startcolumnset

2018-04-19 Thread Jeong Dal
if I comment out either \startcolumnset or \placetable. Is “\definecolumnset, \startcolumnset” still a good command? I couldn’t find it in the list of commands. Thank you for reading. Best regards, Dalyoung % \startuseMPgraphic{verticalrule} if CurrentColumn < NOfColumns : d

Re: [NTG-context] double followtokens?

2018-04-08 Thread Hans Hagen
{~this way~}} Many thanks for the reply, Hans. I don’t know what I’m missing here, but I cannot get your code working. Here you have the full sample: \useMPlibrary[txt] \starttext \startuseMPgraphic{followtokens} path p ; p := reverse halfcircle scaled 5cm ; path q ; q

Re: [NTG-context] double followtokens?

2018-04-08 Thread Pablo Rodriguez
way~} > \followtokens{\reversedtext{~this way~}} Many thanks for the reply, Hans. I don’t know what I’m missing here, but I cannot get your code working. Here you have the full sample: \useMPlibrary[txt] \starttext \startuseMPgraphic{followtokens} path p ; p := reverse halfc

Re: [NTG-context] double followtokens?

2018-04-08 Thread Hans Hagen
On 4/8/2018 12:11 AM, Pablo Rodriguez wrote: On 04/07/2018 11:25 PM, Hans Hagen wrote: On 4/7/2018 11:04 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \useMPlibrary[txt] \starttext \startuseMPgraphic{followtokens} path RotPath ; RotPath := reverse

Re: [NTG-context] double followtokens?

2018-04-07 Thread Pablo Rodriguez
On 04/07/2018 11:25 PM, Hans Hagen wrote: > On 4/7/2018 11:04 PM, Pablo Rodriguez wrote: >> Dear list, >> >> I have the following sample: >> >>\useMPlibrary[txt] >> >>\starttext >> >>\startuseMPgraphic{followtokens} >>

Re: [NTG-context] double followtokens?

2018-04-07 Thread Hans Hagen
On 4/7/2018 11:04 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \useMPlibrary[txt] \starttext \startuseMPgraphic{followtokens} path RotPath ; RotPath := reverse halfcircle ; % path RotPath ; RotPath := halfcircle rotatedaround (origin, 180

[NTG-context] double followtokens?

2018-04-07 Thread Pablo Rodriguez
Dear list, I have the following sample: \useMPlibrary[txt] \starttext \startuseMPgraphic{followtokens} path RotPath ; RotPath := reverse halfcircle ; % path RotPath ; RotPath := halfcircle rotatedaround (origin, 180) ; \stopuseMPgraphic \followtokens{Just follow the tokens

[NTG-context] Fatal error with followtokens (metapost)

2018-04-07 Thread Gerhard Kugler
, height=400pt] \startuseMPgraphic{followtokens} path RotPath, q , cp; RotPath := halfcircle scaled 14cm rotated 180 ; \stopuseMPgraphic \followtokens{Voranbringen struktureller Politik-Veränderungen} \startuseMPgraphic{followtokens} path RotPath, q , cp; RotPath := quartercircle scaled

  1   2   3   4   5   6   7   8   9   >