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

2020-09-18 Thread Geert Verhaag
MPvariable{lbl}",a) ; \stopuseMPgraphic \starttext   \useMPgraphic{name}{lbl=1} \stoptext The above works as expected! But the following doesn't: \startuseMPgraphic{name}{lbl}   pair a ; a := (3cm,3cm) ;label.top("\MPvariable{lbl}",a) ; \stopuseMPgraphic \starttext   \useMPgraphic{name}{l

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

2020-09-18 Thread Hans Hagen
Regards, Gerard On 16-09-2020 16:32, 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) ; \stopuseMPgr

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

2020-09-17 Thread Geert Verhaag
haag 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 \starttext   \useMPgraphic{name}{lbl=1} \stoptext

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

2020-09-17 Thread Hans Hagen
\starttext   \useMPgraphic{name}{lbl=1} \stoptext The above works as expected! But the following doesn't: \startuseMPgraphic{name}{lbl}   pair a ; a := (3cm,3cm) ;label.top("\MPvariable{lbl}",a) ; \stopuseMPgraphic \starttext   \useMPgraphic{name}{lbl=abc} \stoptext It yields:  1 \startuseMPgr

[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
r{mode}" = "en" : label("e", (0.5u,-0.4u)) ; label("n", (1.6u, 0.5u)) ; else : label("n", (0.5u,-0.4u)) ; label("l", (1.6u, 0.5u)) ; fi ;\stopuseMPgraphic \useMPgraphic{whatever}{mode=en} \blank\useMPgr

Re: [NTG-context] Combining modes and MetaFun

2020-09-04 Thread Hans Hagen
label("n", (0.5u,-0.4u)) ; label("l", (1.6u, 0.5u)) ; fi ; \stopuseMPgraphic \useMPgraphic{whatever}{mode=en} \blank \useMPgraphic{whatever}{mode=nl} \blank \startuseMPgraphic{whatever} u := 2cm ; draw unitsquare scaled u ; drawdblarrow (0,-0.2u)..

[NTG-context] Chapter number with Luametafun

2020-08-18 Thread Fabrice Couvreur
uot;Mycolor", s = 0.85 ] draw lmt_outline [ text = "1", kind = "fillup", fillcolor = "Mycolor", rulethickness = 1, ] xsized 1cm; \stopuseMPgraphic \unexpanded\def\MyNumber#1{\useMPgraphic{fun}#1} \unexpanded\def\Tit

[NTG-context] Two questions about color in MetaFun

2020-08-13 Thread Jairo A. del Rio
is not my girlfriend, it's just for the example (withcolor (normaldeviate,normaldeviate,normaldeviate) withpen pencircle scaled 1/5) scaled 1 ; \stopuseMPgraphic \dorecurse{20}{% \startplacefigure[location=force,number=no] \useMPgraphic{cornystuff} \stopplacefigure \page[yes] } \stoptext change

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

2020-07-21 Thread Fabrice Couvreur
, \overlayheight-rulethickness); rightcorner := (\overlaywidth-rulethickness, rulethickness); draw leftcorner -- rightcorner; \stopuseMPgraphic \defineoverlay [DiagonalRule] [\useMPgraphic{DiagonalRule}] \define[2]\DiagonalLabel{% \setuptabulate [after={\blank[\frameddimension{offset

Re: [NTG-context] Using \defineoverlay for a framed text

2020-06-16 Thread Willi Egger
a background to a framed text. — >>> I can not make it working though… >>> >>> \startuniqueMPgraphic{Markings} >>> %{Markings:\overlaywidth:\overlayheight} fill OverlayBox enlarged >>> 5mm withcolor blue; \stopuniqueMPgraphic >>> >>&

Re: [NTG-context] Using \defineoverlay for a framed text

2020-06-16 Thread Marco Patzer
ngs} > > %{Markings:\overlaywidth:\overlayheight} fill OverlayBox enlarged > > 5mm withcolor blue; \stopuniqueMPgraphic > > > > \defineoverlay[Marks]{\useMPgraphic{Markings}} > > \defineoverlay[Marks][{\useMPgraphic{Markings}}]

Re: [NTG-context] Using \defineoverlay for a framed text

2020-06-16 Thread Marco Patzer
gt; withcolor blue; \stopuniqueMPgraphic > > \defineoverlay[Marks]{\useMPgraphic{Markings}} \defineoverlay[Marks][{\useMPgraphic{Markings}}] Marco ___ If your question is of interest to others as well, please add an entry

[NTG-context] Using \defineoverlay for a framed text

2020-06-16 Thread Willi Egger
]{\useMPgraphic{Markings}} \setupframed[background=Marks] \setupframedtexts [frame=on, background=Marks] \starttext \framedtext{Hello World!} \blank \framed{Hello World!} \stoptext What is wrong with this code? Kind regards Willi

Re: [NTG-context] animation using \startuseMPgraphic

2020-04-19 Thread Aditya Mahajan
t %\startplacefigure[] \startanimation[menu=yes] \dorecurse{10}{ \useMPgraphic{inversionPoint}{n=\recurselevel} } \stopanimation %\stopplacefigure \stoptext Also see my simple wrapper around this: https://adityam.github.io/context-blog/post/metapos

Re: [NTG-context] animation using \startuseMPgraphic

2020-04-19 Thread Jeong Dal
the same size for each frame, otherwise your > graphic jumps around. > > When you use \recurselevel you have to use this: > > \startanimation[menu=yes] > \dorecurse{10} >{\startexpanded > \startframe > \useMPgraphic{inversionPoint}{n=\recurselevel}%

Re: [NTG-context] animation using \startuseMPgraphic

2020-04-19 Thread Wolfgang Schuster
the boundingbox to the same size for each frame, otherwise your graphic jumps around. When you use \recurselevel you have to use this: \startanimation[menu=yes] \dorecurse{10} {\startexpanded \startframe \useMPgraphic{inversionPoint}{n=\recurselevel}% \stopframe

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

2020-04-19 Thread Aditya Mahajan
icture to OverlayBox ; \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext [FunnyFramedText] [ frame=off, background=FunnyFrame, offset=\bodyfontsize, width=\textwidth, ] \defineenumeration[Counter] [ title=yes, alternati

[NTG-context] animation using \startuseMPgraphic

2020-04-18 Thread Jeong Dal
rtanimation[menu=yes] \dorecurse{10}{ \useMPgraphic{inversionPoint}{n=\recurselevel} } \stopanimation %\stopplacefigure \stoptext ___ If your question is of interest to others as well, please add an entry to

Re: [NTG-context] offset for background overlay

2020-04-11 Thread Wolfgang Schuster
eMPgraphic{frameborder} draw OverlayBox withcolor blue ; \stopuseMPgraphic \defineoverlay[frameborder][\useMPgraphic{frameborder}] \setupheader[state=high] \setupfooter[state=high] \starttext \setupframed [width=4cm, height=4cm, offset=1cm] \framed{} \framed[frame=off,background=f

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
5blue withpen pencircle scaled .75pt); \stopuseMPgraphic \define[1]\outlineFill{\useMPgraphic{outlineT}{tt="#1"}}% \setuphead[chapter,title]  [textcommand=\outlineFill,   color=.625Blue,   numbercommand=\outlineFill,   number=yes] \setupbodyfont[rm, 12pt] \starttext \start

[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

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

2019-10-22 Thread Fabrice Couvreur
)-- (0,1.05*OverlayHeight)--cycle; fill p shifted (3,-3); fill p withcolor 0.8white; draw p; setbounds currentpicture to p; \stopuseMPgraphic \defineoverlay[framewithshadow][\useMPgraphic{framewithshadow}] \definecolor[ColorA][0.8(white)] \startsetups [headertext

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

[NTG-context] colors in MetaPost

2019-09-11 Thread Henning Hraban Ramm
n shadedup withshadecolors ("VerlaufVon", "VerlaufNach") ; \stopuniqueMPgraphic \defineoverlay[verlaufen][\useMPgraphic{Verlauf}] \setupbackgrounds[paper][background={verlaufen}] \starttext \strut \stoptext The background consists of a blue and a green area instead of a shade. While test

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

2019-09-09 Thread Hans Hagen
> fill p shifted (2,-2); > fill p withcolor 0.8white; > draw p; > setbounds currentpicture to p; > \stopuseMPgraphic > > \defineoverlay[framewithshadow][\useMPgraphic{framewithshadow}] > > \starttext > \setvariables >   [headert

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

2019-09-09 Thread Fabrice Couvreur
}{\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;

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

2019-08-28 Thread Aditya Mahajan
\defineoverlay[framewithshadow][\useMPgraphic{framewithshadow}] \starttext \setvariables [headertext] [title={Devoir maison}, number={6}, day={02}, month={09}, year={2019}, location={Seconde B}, time={}] \input knuth \stoptext There was a bug with the \date macro which I

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

2019-08-28 Thread Fabrice Couvreur
[framewithshadow][\useMPgraphic{framewithshadow}] \starttext \setvariables [headertext] [title={Devoir maison}, number={6}, day={02}, month={09}, year={2019}, location={Seconde B}, time={}] \input knuth \stoptext

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

2019-08-27 Thread Fabrice Couvreur
; \stopuseMPgraphic \defineoverlay[framewithshadow][\useMPgraphic{framewithshadow}] \starttext \setvariables [headertext] [title={Devoir maison}, number={6}, day={22}, month={08}, year={2019}, location={Seconde B}, time={}] \framed[background=framewithshadow,offset=4bp]{\bf DM

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

2019-08-26 Thread Mikael P. Sundqvist
uld work for you: \startuseMPgraphic{framewithshadow} path p; p:=origin--(OverlayWidth,0)--(OverlayWidth,OverlayHeight)--(0,OverlayHeight)--cycle; fill p shifted (2,-2); fill p withcolor 0.7white; draw p; setbounds currentpicture to p; \stopuseMPgraphic \defineoverlay[framewithshadow][\useMPgraphic{framewithsh

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

2019-06-27 Thread Andres Conrado Montoya
cycle) enlarged(0,0.25u) shifted (0,6i) withcolor \MPcolor{rojo} ; fi; StopPage; \stopuseMPgraphic \defineoverlay [chapter:background] [\useMPgraphic{page:background}] \setupbackgrounds[page][background=chapter:background] \definepagebreak[first

[NTG-context] Strange behavior in somewhat complex layout

2019-06-23 Thread Andres Conrado Montoya
fi; StopPage; \stopuseMPgraphic \defineoverlay [chapter:background] [\useMPgraphic{page:background}] \setupbackgrounds[page][background=chapter:background] \definepagebreak[firstpagebreak][yes,header] \startsetups [chapter:before] \doifoddpageelse {} {\pushbackground[page]

Re: [NTG-context] about \startMPanimation

2019-05-13 Thread Jeong Dal
mation}\def\use_meta_animation[#1]#2%{\edef\c_MP_animation_frames{\getvalue{\MPanimationvariables#2:n}}%\startanimation[#1]\dorecurse{\c_MP_animation_frames}{\expanded{\frame{\useMPgraphic{animation:#2}{n=\c_MP_animation_frames,t=\recurselevel\stopanimation}\protect| >> In the code, t

Re: [NTG-context] about \startMPanimation

2019-05-13 Thread Hans Hagen
}{n,t}{#3}}}\let\stopMPanimation\relax\unexpanded\def\useMPanimation%{\dosingleargument\use_meta_animation}\def\use_meta_animation[#1]#2%{\edef\c_MP_animation_frames{\getvalue{\MPanimationvariables#2:n}}%\startanimation[#1]\dorecurse{\c_MP_animation_frames}{\expanded{\frame{\useMPgraphic

[NTG-context] about \startMPanimation

2019-05-13 Thread Jeong Dal
ion[#1] \dorecurse{\c_MP_animation_frames} {\expanded{\frame{\useMPgraphic{animation:#2}{n=\c_MP_animation_frames,t=\recurselevel \stopanimation} \protect In the code, there are many “”.(\MPanimationvariables#1, {\??mpgraphic animation:#1}) I wonder it is c

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
\definelayer [logo] [repeat=no] \setlayer [logo] [hoffset=160mm,voffset=17mm] {\scale[width=25mm,height=25mm]{\useMPgraphic{mpglogo}}} \setupbackgrounds[paper][background=logo] % END MP LOGO SETUP, BEGIN LETTER SETUP \usemodule [letter] [style=dinb] \setupletterlayer [reference

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
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 \definelayer [logo] [repeat=no] \setlayer [logo] [hoffset=160mm,voffset=17mm] {\scale[width=25mm,height=25mm]{\useMPgraphic

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
enter p) ; drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; b := a superellipsed .95 ; draw b ; b := (boundingbox p) superellipsed .95 ; fill b withcolor .85white ; draw b ; draw p withcolor black ; setbounds currentpicture to a ; \stopuseMPgraphic \d

Re: [NTG-context] outlined font using MetaFun

2019-02-08 Thread Wolfgang Schuster
ue withpen pencircle scaled .2pt) scaled 3 ; \stopuseMPgraphic \starttext \useMPgraphic{outlineT} \stoptext However, the next example is not working(without \setupMPvariables[]). %%% \startuseMPgraphic{outlineT}{tt} draw outlinetext.b (\MPvar{tt}) (withcolor .5white)

[NTG-context] outlined font using MetaFun

2019-02-08 Thread Jeong Dal
scaled 3 ; \stopuseMPgraphic \starttext \useMPgraphic{outlineT} \stoptext However, the next example is not working(without \setupMPvariables[]). %%% \startuseMPgraphic{outlineT}{tt} draw outlinetext.b (\MPvar{tt}) (withcolor .5white) (withcolor .625blue withpen pencircle scaled .2pt)

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
layBox withcolor \MPcolor{fondpaille} ; \stopuseMPgraphic \defineoverlay [tablebackground] [\ifnum\currentxtablerow=1 \useMPgraphic{tablebackground}% \else\ifnum\currentxtablecolumn=1 \useMPgraphic{tablebackground}% \fi\fi] \setupxtable[background=tablebackground] \sta

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

2019-01-05 Thread Martin Althoff
rightcorner; draw toprightcorner -- lowerleftcorner; \stopuseMPgraphic \defineoverlay[ZRule][\useMPgraphic{ZRule}] \starttext \setupTABLE[c][each][width=30mm] \setupTABLE[r][each][width=6mm] % in an attempt to place the table at known positions, I put it into a layer. Though it is not really "backg

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

2018-11-23 Thread mf
z[j] endfor .. z1 & cycle ; \stopuseMPgraphic % braces are scaled to fit the box \defineoverlay[leftbrace] [\middlealigned{\scale[height=\overlayheight,width=\dimexpr 3pt+.015\dimexpr\overlayheight\relax\relax]{\useMPgraphic{accolade}}}] \defineoverlay[rightbrace][\middlealigned{\mirror{\scal

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

2018-10-09 Thread Alan Braslau
a.contourplot( function(x,y) return \getvariable{ContourPlot}{function} end, {\getvariable{ContourPlot}{x}},{\getvariable{ContourPlot}{y}}, \getvariable{ContourPlot}{n}, function(x,y) return \getvariable{ContourPlot}{e} end )}% \useMPgraphic{doublefun::Contour

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

2018-10-08 Thread Aditya Mahajan
ourPlot[#1]% {\setvariables[ContourPlot][#1]% \ctxlua{userdata.contourplot( function(x,y) return \getvariable{ContourPlot}{function} end, {\getvariable{ContourPlot}{x}}, {\getvariable{ContourPlot}{y}}, \getvariable{ContourPlot}{n})}% \useMPgraphic{doublefun::C

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
{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 \stoptext %%% The error is something like: tex error > tex error on line 7 in f

Re: [NTG-context] Emacs + latest beta

2018-08-30 Thread Fabrice Couvreur
> > I then tested the vladimir.tex file > > > > \setupsynctex[state=start] > > > > \startusableMPgraphic{NumberHead} > > draw outlinetext.f > > ("\bf\namedheadnumber{chapter}") > > (withcolor "blue") > > ysiz

Re: [NTG-context] Emacs + latest beta

2018-08-29 Thread Vladimir Lomov
ext.f > ("\bf\namedheadnumber{chapter}") > (withcolor "blue") > ysized 50pt ; > \stopusableMPgraphic > > \unexpanded\def\processMPheadnumber#1% > {\useMPgraphic{NumberHead}} > > \setuphead% > [chapter]% > [command=\HeadTitle,% > head

Re: [NTG-context] Emacs + latest beta

2018-08-29 Thread Fabrice Couvreur
nux/context [aragorn@fab ~]$ I then tested the vladimir.tex file \setupsynctex[state=start] \startusableMPgraphic{NumberHead} draw outlinetext.f ("\bf\namedheadnumber{chapter}") (withcolor "blue") ysized 50pt ; \stopusableMPgraphic \unexpanded\def\processMPheadnum

Re: [NTG-context] Emacs + latest beta

2018-08-27 Thread Fabrice Couvreur
...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: >> attempt to >> > call a nil value (global 'getid') >> > stack traceback: >> > ...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: in >> > upvalue 'getexpansion' >> &g

Re: [NTG-context] Emacs + latest beta

2018-08-27 Thread Fabrice Couvreur
xt/base/mkiv/font-mps.lua:343: in > > function > <...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:338> > > ...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:437: in > > local 'boxtomp' > > ...ext/tex/texmf-context/tex/context/base/

Re: [NTG-context] Emacs + latest beta

2018-08-26 Thread Vladimir Lomov
ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1894: in > function <...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1891> > (...tail calls...) > > 1 > 2 \setupsynctex[state=start] > 3 > 4 \startusableMPgraphic{NumberHead} > 5

Re: [NTG-context] Emacs + latest beta

2018-08-24 Thread Fabrice Couvreur
usableMPgraphic{NumberHead} 5 draw outlinetext.f 6 ("\bf\namedheadnumber{chapter}") 7 (withcolor "red") 8 ysized 50pt ; 9 \stopusableMPgraphic 10 >> 11 \unexpanded\def\processMPheadnumber#1% 12 {\useMPgraphic{NumberHead}}

Re: [NTG-context] Emacs + latest beta

2018-08-24 Thread Fabrice Couvreur
- > \setupsynctex[state=start] > > \startusableMPgraphic{NumberHead} > draw outlinetext.f > ("\bf\namedheadnumber{chapter}") > (withcolor "lightgray") > ysized 50pt ; > \stopusableMPgraphic > > \unexpanded\def\processMPheadnumber#1%

Re: [NTG-context] Emacs + latest beta

2018-08-23 Thread Vladimir Lomov
8< \setupsynctex[state=start] \startusableMPgraphic{NumberHead} draw outlinetext.f ("\bf\namedheadnumber{chapter}") (withcolor "lightgray") ysized 50pt ; \stopusableMPgraphic \unexpanded\def\processMPheadnumber#1% {\useMPgraphic{NumberHead}} \setuphead% [chapter]% [co

Re: [NTG-context] Emacs + latest beta

2018-08-23 Thread Wolfgang Schuster
e/mkiv/font-mps.lua:437: in local 'boxtomp' ...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1894: in function <...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1891> (...tail calls...) 1 2 \startusableMPgraphic{NumberHead} 3 draw outlinetext.f 4 ("\bf\na

Re: [NTG-context] Emacs + latest beta

2018-08-23 Thread Fabrice Couvreur
t; (...tail calls...) 1 \startusableMPgraphic{NumberHead} 2 draw outlinetext.f 3 ("\bf\namedheadnumber{chapter}") 4 (withcolor "lightgray") 5 ysized 50pt ; 6 \stopusableMPgraphic 7 8 \unexpanded\def

[NTG-context] Emacs + latest beta

2018-08-22 Thread Fabrice Couvreur
ua:1891> (...tail calls...) 1 2 \startusableMPgraphic{NumberHead} 3 draw outlinetext.f 4 ("\bf\namedheadnumber{chapter}") 5 (withcolor "lightgray") 6 ysized 50pt ; 7 \stopusableMPgraphic 8 9 \unexpanded\d

[NTG-context] Latest beta

2018-08-20 Thread Fabrice Couvreur
ext/tex/context/base/mkiv/mlib-pps.lua:1891> (...tail calls...) 1 %macro=mkiv 2 3 \setuppagenumbering[location=footer] 4 5 \startusableMPgraphic{NumberHead} 6 draw outlinetext.f 7 ("\bf\namedheadnumber{chapter}") 8 (withcolor "

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
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}] \startletter [opening={Anrede}, subject={Betreff}, closing={Gruß

[NTG-context] Problem of compiling a file with Emacs

2018-07-19 Thread Fabrice Couvreur
ring[location=footer] \startusableMPgraphic{NumberHead} draw outlinetext.f ("\bf\namedheadnumber{chapter}") (withcolor "lightgray") ysized 50pt ; \stopusableMPgraphic \unexpanded\def\processMPheadnumber#1% {\useMPgraphic{NumberHead}} \setu

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-18 Thread Fabrice Couvreur
;>> \startusableMPgraphic{NumberHead} > >>>> draw outlinetext.f > >>>> ("\bf\namedheadnumber{chapter}") > >>>> (withcolor "lightgray") > >>>> ysized 50pt ; > >>>> \st

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Hans Hagen
ic \unexpanded\def\processMPheadnumber#1% {\useMPgraphic{NumberHead}} \setuphead [chapter] [command=\HeadTitle, headstyle=\ss, numbercommand=\processMPheadnumber] \unexpanded\def\HeadTitle#1#2% {\framed [frame=off, bottomframe=on, width=broad, align={broad,nothyphen

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Alan Braslau
enumbering[location=footer] >>>> >>>> \startusableMPgraphic{NumberHead} >>>> draw outlinetext.f >>>> ("\bf\namedheadnumber{chapter}") >>>> (withcolor "lightgray") >>>>

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Rik Kabel
(withcolor "lightgray") ysized 50pt ; \stopusableMPgraphic \unexpanded\def\processMPheadnumber#1%   {\useMPgraphic{NumberHead}} \setuphead    [chapter]    [command=\HeadTitle,     headstyle=\ss,     numbercommand=\processMPheadnumber] \unexpanded\def\HeadTitle#1#2%   {\f

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Hans Hagen
ysized 50pt ; \stopusableMPgraphic \unexpanded\def\processMPheadnumber#1%   {\useMPgraphic{NumberHead}} \setuphead    [chapter]    [command=\HeadTitle,     headstyle=\ss,     numbercommand=\processMPheadnumber] \unexpanded\def\HeadTitle#1#2%   {\framed     [frame=off,     bottomframe=on,     wi

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Rik
ic \unexpanded\def\processMPheadnumber#1%   {\useMPgraphic{NumberHead}} \setuphead    [chapter]    [command=\HeadTitle,     headstyle=\ss,     numbercommand=\processMPheadnumber] \unexpanded\def\HeadTitle#1#2%   {\framed     [frame=off,     bottomframe=on,     width=broad,     align={broad,nothyphe

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

2018-07-17 Thread Hans Hagen
\bold \MPtext{Pare3} etex, (0, -50))     withcolor yellow     ; \stopuseMPgraphic % Overlays \defineoverlay[Pare][\useMPgraphic{Pare}] \setupbackgrounds[page][background={foreground,Pare}] \starttext   \startTEXpage[width=210mm,height=297mm]     Aaa   \stopTEXpage \stoptext Here, t

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

2018-07-17 Thread Procházka Lukáš Ing .
ow ; \stopuseMPgraphic % Overlays \defineoverlay[Pare][\useMPgraphic{Pare}] \setupbackgrounds[page][background={foreground,Pare}] \starttext \startTEXpage[width=210mm,height=297mm] Aaa \stopTEXpage \stoptext Here, texts "1" and "U" are not rendered; if you change

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Fabrice Couvreur
t;> >>> >>> % macros=mkvi >>> >>> \setuppagenumbering[location=footer] >>> >>> \startusableMPgraphic{NumberHead} >>> draw outlinetext.f >>> ("\bf\namedheadnumber{chapter}&q

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-16 Thread Fabrice Couvreur
s=mkvi >> >> \setuppagenumbering[location=footer] >> >> \startusableMPgraphic{NumberHead} >> draw outlinetext.f >> ("\bf\namedheadnumber{chapter}") >> (withcolor "lightgray") >> ysized 50pt ;

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-16 Thread Hans Hagen
bleMPgraphic \unexpanded\def\processMPheadnumber#1%   {\useMPgraphic{NumberHead}} \setuphead    [chapter]    [command=\HeadTitle,     headstyle=\ss,     numbercommand=\processMPheadnumber] \unexpanded\def\HeadTitle#1#2%   {\framed     [frame=off,     bottomframe=on,     width=broad,     a

[NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-16 Thread Fabrice Couvreur
ion=footer] \startusableMPgraphic{NumberHead} draw outlinetext.f ("\bf\namedheadnumber{chapter}") (withcolor "lightgray") ysized 50pt ; \stopusableMPgraphic \unexpanded\def\processMPheadnumber#1% {\useMPgraphic{NumberHead}} \setuphead [c

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
ColorB][c=0.00, m=0.62, y=1.00, k=0.00] > \definecolor[MyColorA][.75(MyColorB,white)] > > \defineframedtext >[MyText] >[frame=off, > background=MyFrame, > width=\textwidth, > location=right] > > \defineoverlay >[MyFrame] >[\useMPgra

[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
actor 1.5 > withshadecolors (.85white,white) >% withtransparency (multiplytransparent,.7) > withtransparency (normaltransparent,.7) > \stopuseMPgraphic > > \defineoverlay[test][\useMPgraphic{test}] > > \framed >[align=middle,background={fore

Re: [NTG-context] Shading and transparency

2018-07-12 Thread Hans Hagen
dedirection shadedup withshadefactor 1.5 withshadecolors (.85white,white) % withtransparency (multiplytransparent,.7) withtransparency (normaltransparent,.7) \stopuseMPgraphic \defineoverlay[test][\useMPgraphic{test}] \framed [align=middle,background={foreground,test}] {\samplefile{s

[NTG-context] Shading and transparency

2018-07-11 Thread Marco Patzer
;) doesn't work here withshadecolors (white, white) withtransparency (0, .7); \stopuseMPgraphic %% to illustrate the effect, actual background is white \setupbackgrounds [page] [background=color, backgroundcolor=lightgray] \defineoverlay [gradient-mp] [\useMPgraphic{trans}] %% requires external

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

2018-06-27 Thread Wolfgang Schuster
rlayBox withpen pensquare scaled \frameddimension{bottomrulethickness} withcolor \MPcolor{\framedparameter{bottomframecolor}} ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \installleftframerenderer {mp} {\useMPgraphic{mp_frame_left}} \installrightframerenderer

[NTG-context] \startplacetable in \startcolumnset

2018-04-19 Thread Jeong Dal
ure to OverlayBox enlarged 2.5mm; fi \stopuseMPgraphic \defineoverlay [verticalrule] [\useMPgraphic{verticalrule}] \definecolumnset [exam] [n=2, background=verticalrule] \starttext \startcolumnset[exam] \startcolumns[n=2, rule=on] \startitemize[n] \item Question 1. G

Re: [NTG-context] \basegrid ignores color

2018-03-22 Thread Henri Menke
color \edef\p_align{\directdummyparameter\c!align}% \ifx\p_align\v!middle \let\p_align\!!plusone \else \let\p_align\!!zerocount \fi \useMPgraphic {grid}% {nx=\directdummyparameter\c!nx,% ny=\directdummyparameter\c!ny,% dx=\directdummyparameter\c!dx\directdummypa

[NTG-context] tex error Argument of \titlecmd has an extra }

2018-03-06 Thread ????????
] % \defineoverlay[CruxOrnament][\useMPgraphic{crux}] \def\CruxFramed#1{\framed[frame=off,width=12cm,height=fit]{#1}} \startuseMPgraphic{crux} color ccc ; pair p, h[], v[] ; u := \overlaywidth ; v := \overlayheight ; hdelta := .15u ; vdelta := .03v ; drawoptions (withpen pensquare scaled 2

Re: [NTG-context] about makempy (metapost outlines)

2018-02-19 Thread Jeong Dal
number} graphictext \MPstring{string} scaled 10 withdrawcolor \MPcolor{red} withfillcolor \MPcolor{gray} withpen pencircle scaled 2pt ; \stopuseMPgraphic \def\TextCommand#1% {\setMPtext{string}{#1}% \framed [frame=off,offset=overlay,height=3cm,width=\hsize] {\useMPgraphic{text}}}

  1   2   3   4   5   6   7   8   9   >