Re: [NTG-context] Are positional graphics still working?

2021-02-17 Thread Hans Hagen
On 2/17/2021 12:18 AM, Jairo A. del Rio wrote: I've copied the following example from the ConTeXt archive: \defineoverlay[frames][\positionoverlay{frames}] \setupbackgrounds[text][background=frames] \startMPpositiongraphic{frame} if unknown context_apos : input mp-apos.mpiv ; fi

[NTG-context] Are positional graphics still working?

2021-02-16 Thread Jairo A. del Rio
I've copied the following example from the ConTeXt archive: \defineoverlay[frames][\positionoverlay{frames}] \setupbackgrounds[text][background=frames] \startMPpositiongraphic{frame} if unknown context_apos : input mp-apos.mpiv ; fi ; \MPgetposboxes{\MPvar{self}}{\MPanchorid} if nofposboxes

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-23 Thread Hans Hagen
(0,1) withshadecolors (red, blue) ; \stopuseMPgraphic \defineoverlay[MyShade][\useMPgraphic{MyShade}] \setupbackgrounds[page][background=MyShade] \startmakeup \definedfont[SerifBold*default @ 50pt] \setupinterlinespace \defineeffect[MyOutline][alternative=outer,rulethickness

[NTG-context] MP background for text typeset by \typefile

2020-11-05 Thread context
,backgroundcolor=blue] }, after={\stopbackground }, ] - which creates a rectangular backround to the text, and the text may spread over pages; 2. or this: \defineoverlay[AnOverlayDefinition][] \definetyping[Test] [before={\startframedtext[background=AnOverlayDefinition

Re: [NTG-context] numbering pages included by \copypages

2020-09-28 Thread Alan Bowen
t; \dorecurse {5} {Before #1\page} > > \getfiguredimensions[oeps.pdf] > > \startsetups SomeNumber > \vbox to \overlayheight \bgroup > \vss > \hbox to \overlaywidth \bgroup > \hss > \bfd \red You can figure it out: \pagenumber >

Re: [NTG-context] numbering pages included by \copypages

2020-09-25 Thread Hans Hagen
dimensions[oeps.pdf] \startsetups SomeNumber \vbox to \overlayheight \bgroup \vss \hbox to \overlaywidth \bgroup \hss \bfd \red You can figure it out: \pagenumber \hss \egroup \vss \egroup \stopsetups \defineoverlay[

Re: [NTG-context] More table questions

2020-09-22 Thread Aditya Mahajan
entpicture to OverlayBox; \stopuseMPgraphic \defineoverlay[booktabs_bottom] [\uniqueMPgraphic{booktabs_bottom}] \installbottomframerenderer{booktabs}{\uniqueMPgraphic{booktabs_bottom}} \startsetups booktabs \setupTABLE[each][each][frame=off, rulethickness=1.2bp] \setupTABLE[row][first][topframe=

Re: [NTG-context] memoir-style chapter heading

2020-08-18 Thread jbf
not find one. But I'd be quite prepared to 'have a go' at this, if I had some pointers of just where to start! I assume I would have to \defineoverlay[number] and then add text on top \framed (but without the frame borders). Am I at least correct about this? You don't need metafun for something

Re: [NTG-context] memoir-style chapter heading

2020-08-18 Thread Otared Kavian
> manual and elsewhere, in terms of ConTeXt/Metafun commands, but could >>> not find one. But I'd be quite prepared to 'have a go' at this, if I had >>> some pointers of just where to start! I assume I would have to >>> \defineoverlay[number] and then

Re: [NTG-context] memoir-style chapter heading

2020-08-17 Thread jbf
to \defineoverlay[number] and then add text on top \framed (but without the frame borders). Am I at least correct about this? You don't need metafun for something this simple. Here is a crude implementation: \setuphead[chapter] [ numberstyle={\switchtobodyfont[48pt

Re: [NTG-context] memoir-style chapter heading

2020-08-17 Thread jbf
looking for one in the manual and elsewhere, in terms of ConTeXt/Metafun commands, but could not find one. But I'd be quite prepared to 'have a go' at this, if I had some pointers of just where to start! I assume I would have to \defineoverlay[number] and then add text on top \framed (but without

Re: [NTG-context] memoir-style chapter heading

2020-08-17 Thread Aditya Mahajan
rs of just where to start! I assume I would have to > \defineoverlay[number] and then add text on top \framed (but without the > frame borders). Am I at least correct about this? You don't need metafun for something this simple. Here is a crude implementation: \setuphead[chapter]

[NTG-context] memoir-style chapter heading

2020-08-16 Thread jbf
was keenly looking for one in the manual and elsewhere, in terms of ConTeXt/Metafun commands, but could not find one. But I'd be quite prepared to 'have a go' at this, if I had some pointers of just where to start! I assume I would have to \defineoverlay[number] and then add text on top \framed

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
Hello listmembers, I try to use a Metapost drawing as 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 \defineoverlay[Marks

Re: [NTG-context] Draft Watermark of Garden gives unexpected results

2020-06-11 Thread Wolfgang Schuster
Floris van Manen schrieb am 11.06.2020 um 23:03: On 11/06/2020 22:31, Jairo A. del Rio wrote: The watermark is partially outside the page, whereas the Wiki result is more "centered". Is that an intended behaviour? A slightly better version. \defineoverlay [WatermarkOverlay]

Re: [NTG-context] Unexpected result when using PaperHeight and MetaFUun

2020-04-19 Thread Keith McKay
{blueShade} draw lmt_shade [     path    = fullsquare xyscaled (OverlayWidth,OverlayHeight) ,     direction   = "up",     alternative = "linear",     colors  = { "red", "blue" }, ] ; \stopuniqueMPgraphic \defineoverlay [mybg] [\uniqueMPgraphic{blueShade

Re: [NTG-context] Unexpected result when using PaperHeight and MetaFUun

2020-04-19 Thread Wolfgang Schuster
in the metafun manual). \setuppapersize [A4,landscape] \startuniqueMPgraphic{blueShade} draw lmt_shade [ path= fullsquare xyscaled (OverlayWidth,OverlayHeight) , direction = "up", alternative = "linear", colors = { "red", "blue" },

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

Re: [NTG-context] offset for background overlay

2020-04-13 Thread mf
OverlayWidth yscaled 2.5 OverlayHeight ; draw p withcolor red ; setbounds currentpicture to p topenlarged 6mm ; \stopuseMPgraphic \defineoverlay[triangle][{\uniqueMPgraphic{cell:triangle}}] \starttext \bTABLE[frame=off] \bTR \bTD[nx=2,align=middle,background=triangle] \dontleavehmode a\crlf

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] 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
; \stopuseMPgraphic \defineoverlay[triangle][{\uniqueMPgraphic{cell:triangle}}] \starttext \bTABLE[frame=off]    \bTR \bTD[nx=2,background=triangle,align=middle] \dontleavehmode a\crlf text \eTD    \eTR    \bTR[toffset=1mm] \bTD left \eTD \bTD right \eTD    \eTR \eTABLE \stoptext

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] splitted xtable with repeating headers and placetable

2020-04-04 Thread Geert Dobbels
t[location=middle, width=27.5cm, height=18cm, backspace=1cm,header=4cm] \setupcaptions[location=none] \setupbackgrounds[header][text][background={Logos}, state=repeat] \defineoverlay [Logos][{ \framed[width=\textwidth, height=3cm, align=right, strut=no, offset=none]{ \framed[width=0.280\textwidth,

[NTG-context] splitted xtable with repeating headers and placetable

2020-04-04 Thread Geert Dobbels
tuppapersize[A4, landscape] \setuplayout[location=middle, width=27.5cm, height=18cm, backspace=1cm,header=4cm] \setuppagenumbering[state=stop] \setupcaptions[location=none] \setupbackgrounds[header][text][background={Logos}, state=repeat] \setupnumbering [location=] \setupframed[offset=none] \

[NTG-context] Hatch color in a table cell

2020-03-12 Thread Fabrice Couvreur
} ) ; \stopuniqueMPgraphic \setupMPvariables [meta:hash] [gap=.25\bodyfontsize, angle=45, linewidth=\overlaylinewidth, linecolor=\overlaylinecolor] \def\metahashoverlay#1{\uniqueMPgraphic{meta:hash}{angle=#1}} \defineoverlay[meta:hash:right] [\metahashoverlay{ +45}] \defineoverlay[meta:hash:left

Re: [NTG-context] Repeat backgrounds on slides

2020-02-15 Thread Jan U. Hasecke
\structureuservariable – this is really cool. Thanks a lot Wolfgang. juh Am 14.02.20 um 19:53 schrieb Wolfgang Schuster: > \setupexternalfigures[location=default] > > \defineoverlay > [SlideBackground] > [\doifsomething > {\structureuservariable{background}} >

Re: [NTG-context] Repeat backgrounds on slides

2020-02-14 Thread Wolfgang Schuster
peat] > > Thanks. There was a dark idea of this in the back of my brain. > > > > > In your case a simple overlay is the simpler solution to get repeated > > images on every page, i.e. > > > > \defineoverlay [bg:hs2020-mond] > > [{\externalfigure[backgro

Re: [NTG-context] Repeat backgrounds on slides

2020-02-14 Thread Jan U. Hasecke
lay is the simpler solution to get repeated images > on every page, i.e. > > \defineoverlay [bg:hs2020-mond] > [{\externalfigure[background.jpg][height=\paperheight]}] > > or > > \defineoverlay [bg:hs2020-mond] [\overlayfigure{background.jpg}] Is this defining and se

Re: [NTG-context] Repeat backgrounds on slides

2020-02-13 Thread Wolfgang Schuster
your case a simple overlay is the simpler solution to get repeated images on every page, i.e. \defineoverlay [bg:hs2020-mond] [{\externalfigure[background.jpg][height=\paperheight]}] or \defineoverlay [bg:hs2020-mond] [\overlayfigure{background.jpg}] Wolfgang _

Re: [NTG-context] overlay problem (beta 31.12.2019)

2020-01-02 Thread Hans Hagen
On 1/2/2020 5:00 PM, Peter Rolf wrote: Hi Hans There is a small problem with overlays. %- \starttext \defineoverlay[foo][{\blackrule[color=black,width=20mm,height=20mm]}]% \framed[background=foo,strut=no,offset=overlay]%{\blackrule[color=white,width=16mm,height=16mm]} \stoptext

[NTG-context] overlay problem (beta 31.12.2019)

2020-01-02 Thread Peter Rolf
Hi Hans There is a small problem with overlays. %- \starttext \defineoverlay[foo][{\blackrule[color=black,width=20mm,height=20mm]}]% \framed[background=foo,strut=no,offset=overlay]%{\blackrule[color=white,width=16mm,height=16mm]} \stoptext %- The inner square should be centered. Peter

Re: [NTG-context] Watermark is behind \externalfigure

2019-12-27 Thread Wolfgang Schuster
Jon Wong schrieb am 27.12.2019 um 04:13: Any way to put the watermark in front? You can use the foreground to flush the content in a frame and place then your layer on top of it. \definecolor [Watermark] [s=1,a=1,t=0.5] % \defineoverlay %   [watermark] % [{\backgroundimage{1

Re: [NTG-context] LMTX Tagging and overlay

2019-12-15 Thread Otared Kavian
height] >> % \setlayerframed[WatermarkOverlay] >> %[preset=center] >> %[foregroundcolor=red,frame=off] >> %{\scale[factor=max]{\rotate[rotation=60.0]{~Oops!~}}} >> >> \defineoverl

Re: [NTG-context] LMTX Tagging and overlay

2019-12-15 Thread Rik Kabel
=center] %    [foregroundcolor=red,frame=off] % {\scale[factor=max]{\rotate[rotation=60.0]{~Oops!~}}} \defineoverlay   [WatermarkOverlay] [{\framed[frame=off,    foregroundcolor=red

[NTG-context] LMTXL Tagging and overlay

2019-12-10 Thread Rik Kabel
, % width=\paperwidth, % height=\paperheight] % \setlayerframed    [WatermarkOverlay] %    [preset=center] %    [foregroundcolor=red,frame=off] % {\scale[factor=max]{\rotate[rotation=60.0]{~Oops!~}}} \defineoverlay

[NTG-context] maths simplifying fractions

2019-11-13 Thread jkitz
Hi Altoff. Maybe this markup will help? \startuniqueMPgraphic{cancel} pickup pencircle scaled 0.7pt ; path p ; p := OverlayBox topenlarged -ExHeight bottomenlarged -ExHeight ; draw llcorner p -- urcorner p withcolor OverlayColor ; \stopuniqueMPgraphic \defineoverlay[cancel

[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
{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
; \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

Re: [NTG-context] Graphics placement with columnsets/page grids (was "no subject)

2019-07-28 Thread Denis Maier
> >> \definecolor[color-1][.5(red,green)] >> \definecolor[color-2][.5(green,blue)] >> \definecolor[color-3][.5(blue,red)] >> \definecolor[color-4][.5(white,black)] >> \definecolor[color-5][.5(white,color-4)] >> >> \startuniqueMPgraphic{frame} >> fill O

[NTG-context] Graphics placement with columnsets/page grids (was "no subject)

2019-07-24 Thread Denis Maier
ck)] > \definecolor[color-5][.5(white,color-4)] > > \startuniqueMPgraphic{frame} > fill OverlayBox withcolor \MPcolor{color-1} ; > \stopuniqueMPgraphic > > \startuniqueMPgraphic{contrast} > fill OverlayBox withcolor \MPcolor{color-2} ; > \stopuniqueMPgraphic > >

[NTG-context] (no subject)

2019-07-23 Thread Denis Maier
} ; \stopuniqueMPgraphic \startuniqueMPgraphic{contrast} fill OverlayBox withcolor \MPcolor{color-2} ; \stopuniqueMPgraphic \defineoverlay[frame] [\uniqueMPgraphic{frame}] \defineoverlay[contrast][\uniqueMPgraphic{contrast}] \definecolumnset[example][n=2] %\setupcolumnsetstart[example][1][1][2

[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] 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] 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] Color a column (xtable, lua)

2019-01-27 Thread Wolfgang Schuster
Fabrice Couvreur schrieb am 27.01.19 um 00:59: Hi Henry, Thank you for your proposition. I tested both : the first work  but not the second. Fabrice Remove the empty line between the two arguments of the \defineoverlay command. Wolfgang

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] two different outputs.

2018-12-31 Thread Jeong Dal
[BigColorOne][r=.86,g=.850,b=.54] \definecolor[BigColorTwo][r=.43,g=.425,b=.27] \define[1]\TitlePage {\begingroup \defineoverlay[back][{\BigFontOne \blue \starteffect[outer]#1\stopeffect}]% \framed[frame=off,background=back,align={hilo}] {\kern-3pt{\BigFontOne\BigColorOne \starteffect[inner

[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

[NTG-context] index problem with \setupcolumnset

2018-11-09 Thread Peter Rolf
Hi, I run into this error after updating my ConTeXt version. Small (but not minimal) example attached. mtx-context | current version: 2018.10.18 00:07 Peter \startuniqueMPgraphic{column:bg} fill OverlayBox withcolor yellow; \stopuniqueMPgraphic \defineoverlay[columnbg

Re: [NTG-context] Creating flyers with ConTeXt

2018-09-21 Thread Marco Patzer
handsixth] [first] [backspace=\measure{big}, width=\dimexpr\paperwidth-2\measured{big}\relax] \definelayout [1] [first] \definelayout [2] [second] \definelayout [3] [thirdandfourth] \definelayout [4] [thirdandfourth] \definelayout [5] [fifthandsixth] \definelayout [6] [fifthandsixth]

Re: [NTG-context] drop shadow

2018-09-10 Thread Hans Hagen
arbitrary shapes, maybe even letters (like drop shadows e.g. in InDesign do). \startuniqueMPgraphic{mpnewshadow}{offset} MyOffset := \MPvar{offset} ; ... ... OverlayWidth ... \defineoverlay[newshadow][\uniqueMPgraphic{mpnewshadow}{offset=.3em}] you use unique graphics ... so you need to make

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 .
[20mm]\sans\bold \MPtext{Pare} etex, (0, 50)) withcolor green ; draw thelabel(btex \switchtobodyfont[20mm]\sans\bold \MPtext{Pare2} etex, (0, 0)) withcolor blue ; draw thelabel(btex \switchtobodyfont[20mm]\sans\bold \MPtext{Pare3} etex, (0, -50)) withcolor yell

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

[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] Circled text in metapost

2018-03-29 Thread Hans Hagen
withcolor darkred ; setbounds currentpicture to boundingbox p ; \stopuniqueMPgraphic \defineoverlay[half circle][\uniqueMPgraphic{half circle}] \starttext \framed[background=half circle,frame=off]{Text width half circle.} \stoptext Well, if you really want a tear down

Re: [NTG-context] Circled text in metapost

2018-03-29 Thread Henri Menke
darkred ; setbounds currentpicture to boundingbox p ; \stopuniqueMPgraphic \defineoverlay[half circle][\uniqueMPgraphic{half circle}] \starttext \framed[background=half circle,frame=off]{Text width half circle.} \stoptext > > My greatest problems seem to be in the e

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

2018-03-06 Thread ????????
etuptyping[bodyfont=9pt, numbering=line, before=\blank, after=\blank] \setupitemize[paragraph, packed, broad] % \setupcombinedlist[content][alternative=c,aligntitle=yes,interaction=pagenumber] \setuplist[section][margin=2em,] \setuplist[subsection][margin=5em,] \setuplist[subsubsection][margin=8em,

Re: [NTG-context] Presentation sections identified by color and mark

2018-02-04 Thread Hans Hagen
age] [background=color, backgroundcolor=MyBackgroundColor] Thanks. ---8< - Start example \usemodule[present-original] \usemodule[present-common] \definecolor [PageColor]   [black] \definecolor [BackgroundColor] [s=.85] \definecolor [OrnamentColor]   [r=.75] \definecolor [Po

[NTG-context] Presentation sections identified by color and mark

2018-02-03 Thread jmmora
or [PageColor] [black] \definecolor [BackgroundColor] [s=.85] \definecolor [OrnamentColor] [r=.75] \definecolor [PositionColor] [s=.55] \defineoverlay [PageShape][\useMPgraphic{PageShape}] \startuseMPgraphic{PageShape} StartPage ; path p ; pair pa, pb ; numeric len ; color contrastc

Re: [NTG-context] referencing the customized enumeration with framed title

2018-01-12 Thread Hans Hagen
rawoptions (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 \defineoverlay[MyFrame][\u

Re: [NTG-context] referencing the customized enumeration with framed title

2018-01-12 Thread Jeong Dal
ndingbox p) superellipsed .95 ; fill b withcolor .85white ; draw b ; draw p withcolor black ; setbounds currentpicture to a ; \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext [FunnyText] [frame=off, background=FunnyFrame, before={\blank[lin

Re: [NTG-context] referencing the customized enumeration with framed title

2018-01-12 Thread Hans Hagen
le 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 \defineoverlay[MyFrame][\useMPgraphic{MyFrame}] \

Re: [NTG-context] referencing the customized enumeration with framed title

2018-01-12 Thread Hans Hagen
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 \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext [F

[NTG-context] referencing the customized enumeration with framed title

2018-01-11 Thread Jeong Dal
; draw p withcolor black ; setbounds currentpicture to a ; \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext [FunnyText] [frame=off, background=FunnyFrame, before={\blank[line,halfline]}, %before={\blank[line]}, after={\

Re: [NTG-context] framed with titles

2017-12-02 Thread Pablo Rodriguez
; >     p := p shifted (2o,OverlayHeight-ypart center 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 ; >     dr

Re: [NTG-context] framed with titles

2017-12-02 Thread Jeong Dal
eMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext [FunnyText] [frame=off, background=FunnyFrame, before={\blank[line,halfline]}, after={\blank[line]}, offset=\bodyfontsize, width=\textwidth] \defineenumeration[Theorem] [title=no, text=Theorem,

Re: [NTG-context] framed with titles

2017-11-14 Thread Jeong Dal
ipsed .95 ; fill b withcolor .85white ; %.425green;%. draw b ; draw p withcolor black ; setbounds currentpicture to a ; \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext[FunnyText][frame=off,background=FunnyFrame, offset=\bodyfontsize, width=\

Re: [NTG-context] framed with titles

2017-11-13 Thread Jeong Dal
.625red) ; b := a superellipsed .95 ; %fill b withcolor .85white ; draw b ; b := (boundingbox p) superellipsed .95 ; fill b withcolor .85white ; %.425green;%. draw b ; draw p withcolor black ; setbounds currentpicture to a ; \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame

Re: [NTG-context] framed with titles

2017-11-05 Thread Jean-Pierre Delange
caled 1pt withcolor darkred; draw p; setbounds currentpicture to boundingbox currentpicture enlarged 2mm; \stopuseMPgraphic \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] % Fin de la définition d'un texte encadré en rouge \starttext \startMyFrame[Title=Knuth Text] \knuth \stopMyFrame \stopt

Re: [NTG-context] framed with titles

2017-11-05 Thread Jean-Pierre Delange
b withcolor darkred; draw bottomboundary OverlayBox withpen pencircle scaled 1pt withcolor darkred; draw topboundary OverlayBox withpen pencircle scaled 1pt withcolor darkred; draw p; setbounds currentpicture to boundingbox currentpicture enlarged 2mm; \stopuseMPgraphic \defineoverlay [MyFram

[NTG-context] Background with rounded corners (Metafun)

2017-08-22 Thread Fabrice Couvreur
eMPgraphic \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \defineframedtext [MyFrame] [frame=off, foregroundstyle={\switchtobodyfont[10pt]}, background=MyFrame, align={verytolerant}, height=fit] \definefloat [recipe] [figure] \setupfloat [recipe] [default={right,none}]

[NTG-context] Problem with placing a float and a tab

2017-08-22 Thread Fabrice Couvreur
dyFontSize,OverlayHeight-ypart center p+.25ExHeight) ; b := boundingbox p enlarged .3EmWidth ; fill OverlayBox withcolor \MPcolor{MyColorA} ; fill b withcolor \MPcolor{MyColorB} ; draw p ; setbounds currentpicture to boundingbox currentpicture enlarged 2mm ; \stopuseMPgraphic \defineoverlay

Re: [NTG-context] About formatting the "Fonts out of ConTEXT" manual

2017-08-16 Thread Fabrice Couvreur
linecap := squared ; > > drawoptions(withcolor \MPcolor{darkred}) ; > > draw ulcorner p -- urcorner p ; > > setbounds currentpicture to p ; > > \stopuniqueMPgraphic > > > > \defineoverlay[titled][\uniqueMPgraphic{titled}] > > > > \startuseMPgrap

<    1   2   3   4   5   6   7   8   >