[NTG-context] Re: build_parshape and \getshapetext - need for a deeper understanding

2024-05-19 Thread Hans Hagen via ntg-context
) ; fill SavedShape withcolor red; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \showframe \defineoverlay[myoverlay][\useMPgraphic{shape:2}] \setupbackgrounds[text][text][background=myoverlay] \startsection[title={test}] \startshapedparagraph[mp=shape:1]% \setupalign[verytolera

[NTG-context] build_parshape and \getshapetext - need for a deeper understanding

2024-05-19 Thread garulfo
; build_parshape(p,0,0,0,\baselinedistance,\strutheight,\strutdepth,\topskip) ; fill p withcolor \MPcolor{tan}; \stopuseMPgraphic \defineoverlay[myoverlay][\useMPgraphic{mymetafunpath}] %-- \define[2]\MySubSectionCommand

[NTG-context] Re: Why is only the first frame protruding into the margin?

2024-05-17 Thread Wolfgang Schuster
; drawoptions (withpen pencircle scaled .25pt withcolor blue) ; draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h) ; %draw boundingbox p ; %%%quitamos el frame pequeño setbounds currentpicture to unitsquare xyscaled(w,h) ; \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame

[NTG-context] Why is only the first frame protruding into the margin?

2024-05-16 Thread madiazm . eoicc
urcorner p,h) ; %draw boundingbox p ; %%%quitamos el frame pequeño setbounds currentpicture to unitsquare xyscaled(w,h) ; \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext[FunnyText][width=.85\textwidth, height=20mm, frame=off, background=FunnyFrame, align

[NTG-context] compatibility between \startshapetext and \startsection ?

2024-05-14 Thread garulfo
,myheighta) -- (4cm,myheightb) -- (6cm,myheightb) -- (6cm,myheight) -- (0cm,myheight) -- cycle; build_parshape(p,0,0,0,\baselinedistance,\strutheight,\strutdepth,\topskip) ; fill p withcolor \MPcolor{lightyellow}; \stopuseMPgraphic \defineoverlay[ol1][\useMPgraphic{mp1

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

2024-04-24 Thread Wolfgang Schuster
fullsquare xscaled r yscaled e shifted (r/2, h/2) withcolor darkred; \stopuseMPgraphic \defineoverlay [MonGraphisme_OL] [\useMPgraphic{MonGraphisme_MP}] \setupbackgrounds [footer] [rightmargin] [background={MonGraphisme_OL}] \starttext \dorecurse{10}{\input tufte\page} \stoptext Any clue is warmly

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

2024-04-20 Thread garulfo
darkred; \stopuseMPgraphic \defineoverlay [MonGraphisme_OL] [\useMPgraphic{MonGraphisme_MP}] \setupbackgrounds [footer] [rightmargin] [background={MonGraphisme_OL}] \starttext \dorecurse{10}{\input tufte\page} \stoptext Any clue is warmly welcome

[NTG-context] Wiki page : Mixed languages sample (French, Ancient Greek, Arabic, Chinese)

2024-03-01 Thread Jean-Pierre Delange
1pt withcolor darkred; draw topboundary OverlayBox withpen pencircle scaled 1pt withcolor darkred; draw p; setbounds currentpicture to boundingbox currentpicture enlarged 2mm; \stopuseMPgraphic \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \setupwhitespace[medium] \

[NTG-context] Re: MetaPost lines in tables?

2024-02-22 Thread Henning Hraban Ramm
tch_amount := 1 + (uniformdeviate 2); sketch_passes := 3; sketch_segments := 2 + (uniformdeviate 3); sketch_length := OverlayWidth / 3; draw topboundary withpen pensquare withcolor lightgray; naturalizepaths; \stopuseMPgraphic \defineoverlay[sketchylines][\useMPgraphic{mp:sketchy}] \setupTABLE[

[NTG-context] Re: MetaPost lines in tables?

2024-02-21 Thread Wolfgang Schuster
(OverlayBox is the size of the cell). begin example \startuseMPgraphic{dottedborder}    draw OverlayBox withpen pencircle scaled 2 dashed withdots withcolor "red"; \stopuseMPgraphic \defineoverlay[dottedborder][\useMPgraphic{dottedborder}] \starttext \bTABLE[frame=off,

[NTG-context] Re: MetaPost lines in tables?

2024-02-21 Thread Henning Hraban Ramm
example \startuseMPgraphic{dottedborder}   draw OverlayBox withpen pencircle scaled 2 dashed withdots withcolor "red"; \stopuseMPgraphic \defineoverlay[dottedborder][\useMPgraphic{dottedborder}] \starttext \bTABLE[frame=off,background=dottedborder] Thank you! Since I needed only horizo

[NTG-context] Re: MetaPost lines in tables?

2024-02-19 Thread Wolfgang Schuster
OverlayBox withpen pencircle scaled 2 dashed withdots withcolor "red"; \stopuseMPgraphic \defineoverlay[dottedborder][\useMPgraphic{dottedborder}] \starttext \bTABLE[frame=off,background=dottedborder] \bTR \bTD Hello Table! \eTD \eTR \eTABLE \stoptext end example

[NTG-context] Re: \startcolumns and \startcolumnset

2024-02-08 Thread Otared Kavian
ed 1mm rightenlarged 1mm; draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;\stopuseMPgraphic\defineoverlay [verticalrule] [\useMPgraphic{verticalrule3}]\setuppagenumbering[state=stop]\setupexternalfigures[location={local,defalut}]\definecolumnset [quiz] [n=2,background=vertic

[NTG-context] \startcolumns and \startcolumnset

2024-02-08 Thread Jeong Dal via ntg-context
leftenlarged 1mm rightenlarged 1mm;\stopuseMPgraphic\defineoverlay [verticalrule] [\useMPgraphic{verticalrule3}]\setuppagenumbering[state=stop]\setupexternalfigures[location={local,defalut}]\definecolumnset [quiz] [n=2,background=verticalrule]\setupbodyfont[bonum, rm, 11pt]\starttext %\startcolumns[n=2

[NTG-context] Re: externalfigure crashed

2023-12-04 Thread Hans Hagen via ntg-context
themselves. Basically one can sign (with some certificate) and then validate. % sign-001.tex \setupinteraction[state=start] \definefield[signature][signed] \defineoverlay[signature][my signature] \starttext \startTEXpage[offset=1ts,frame=on,framecolor=darkblue] sign: \inframed

[NTG-context] Re: How to encircle text?

2023-11-05 Thread Pablo Rodriguez via ntg-context
xyscaled (OverlayWidth-OverlayLineWidth,OverlayHeight-OverlayLineWidth) withpen pencircle scaled OverlayLineWidth withcolor OverlayColor ; \stopusableMPgraphic \defineoverlay[MetaCirc][\useMPgraphic{MetaCirc}] a\dontleavehmode\framed [background=MetaCirc, bac

[NTG-context] Re: How to encircle text?

2023-11-05 Thread Hans Hagen via ntg-context
On 11/5/2023 7:23 AM, anton.chig...@mail.com wrote: I want to use \bigcirc to encircle text. Is there a way to do it. if you're wiling to compensate for its depth: \defineoverlay [BigCirc] [{\scale [width=\overlaywidth] {\setbox0\hpack{\bigcirc}\raise\dp0\box0}}] \framed

[NTG-context] Re: Framed Text with Chapter Numbers as Counter

2023-09-17 Thread Jeroen
; draw b; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \defineoverlay [CountFrame] [\useMPgraphic{CountFrame}] \defineframedtext [CountFramedText] [frame=off, background=CountFrame, offset=\bodyfontsize, width=\textwidth, % style={\switchtobodyfont[11pt,tt]}] bod

[NTG-context] Framed Text with Chapter Numbers as Counter

2023-09-16 Thread Jeroen
ndingbox p enlarged (o/10); drawoptions (withpen pencircle scaled 1pt withcolor black); draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner b,h); draw b; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \defineoverlay [CountFrame] [\useMPgraphic{

[NTG-context] Verbatim Textbox with Reference NUmbering

2023-09-09 Thread Jeroen
boundingbox p ; setbounds currentpicture to unitsquare xyscaled(w,h) ; \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext[FunnyText][frame=off,background=FunnyFrame] \def\FrameTitle#1% {\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}} \setMPtext{FunnyFrame

[NTG-context] Re: Equivalent of the \cancel command with conTeXt

2023-08-22 Thread Fabrice Couvreur
cture cross; > cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0);); > draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle > scaled .8pt ; > \stopuniqueMPgraphic > > \defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}] > > \define[1]\cancel{% >

[NTG-context] Re: Equivalent of the \cancel command with conTeXt

2023-08-22 Thread Alexandre Christe
; \stopuniqueMPgraphic \defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}] \define[1]\cancel{%  \ifmmode  \mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%  \else%  \framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%  \fi% } Maybe something else is available nowadays

[NTG-context] Re: upload

2023-08-10 Thread Thangalin
ter the meeting) but here is one: > > \starttext > > \defineoverlay >[test] >[\color > [blue] > {TEST >\inframed > [foregroundcolor=red] > {xxx} >TEST}] > > \fr

[NTG-context] upload

2023-08-09 Thread Hans Hagen
Hi, I uploaded a new lmtx. There are some new features that wil be revealed in the future (likely after the meeting) but here is one: \starttext \defineoverlay [test] [\color [blue] {TEST \inframed [foregroundcolor=red] {xxx

[NTG-context] Re: enhancing MetaPost presentation progress graphics

2023-07-19 Thread Taco Hoekwater
2)) ... > endfor > (OverlayWidth,yoffset)--(OverlayWidth,0)--cycle; > fill wave withcolor "Sea"; > endfor; > > pair pos; > pos := (OverlayWidth * RealPageNumber/NOfPages, height/2 randomized 2); > path ship; > ship := (0,10)---(70,10)...(60,0)---(10,0)...cycle; &

[NTG-context] enhancing MetaPost presentation progress graphics

2023-07-19 Thread Henning Hraban Ramm
= (0,10)---(70,10)...(60,0)---(10,0)...cycle; fill ship xysized (10,5) shifted pos rotatedaround (pos, 15) withcolor red; \stopuseMPgraphic \defineoverlay[Waves][\useMPgraphic{Waves}] \setupbackgrounds[state=repeat] \setupbackgrounds[page][background={Waves}] \starttext \dorecurse{10}{\recurs

[NTG-context] Re: MP setup for a progress bar

2023-07-04 Thread Wolfgang Schuster
\setupbackgrounds[state=repeat]. \setuppapersize[SW] \startuseMPgraphic{Blocks} fill unitsquare xysized (OverlayWidth * PageNumber / LastPageNumber, OverlayHeight) withcolor blue; %setbounds currentpicture to OverlayBox; \stopuseMPgraphic \defineoverlay[Blocks][\useMPgraphic{Blocks}] \setupbackgrounds[state

[NTG-context] MP setup for a progress bar

2023-07-04 Thread Henning Hraban Ramm
tsquare xysized (800 * RealPageNumber/NOfPages, 50) withcolor blue; \stopuseMPgraphic \defineoverlay[Blocks][\useMPgraphic{Blocks}] \setupbackgrounds[footer][background={Blocks}] \starttext \dorecurse{10}{\recurselevel\page} \stopt

[NTG-context] viewer layers (optional content groups, OCG)

2023-06-19 Thread Henning Hraban Ramm via ntg-context
r[Gebuesch] Hier versteckt sich ein Wolf... \stopviewerlayer Bäume, Bäume, Bäume... \viewerlayer[Gebuesch]{... und ein Rotkehlchen} \startviewerlayer[Versteck]Rumpelwicht\stopviewerlayer \defineoverlay[MitVersteck] [{\overlayrollbutton[VideLayer{Versteck}][HideLayer{Versteck}]}] \framed[

Re: [NTG-context] Problem with \setuplayout parameters being ignored

2023-03-05 Thread Keith McKay via ntg-context
to put large settings into a setups-blocks and > pass the block to a setup-command. > > \startsetups [apage] > \startMPcode > StartPage; > ... > StopPage; > \stopMPcode > \stopsetups > > \defineoverlay[apage][\directsetup{apage}] > > Wolfgang > > ___

Re: [NTG-context] Problem with \setuplayout parameters being ignored

2023-03-05 Thread Wolfgang Schuster via ntg-context
,   footer=1cm] Another useful method is to put large settings into a setups-blocks and pass the block to a setup-command. \startsetups [apage] \startMPcode StartPage; ... StopPage; \stopMPcode \stopsetups \defineoverlay[apage][\directsetup{apage}] Wolfgang

[NTG-context] Problem with \setuplayout parameters being ignored

2023-03-05 Thread Keith McKay via ntg-context
[ backspace = 2.5cm, margin = 0.5cm, width = 16cm, header = 1cm, footer = 1cm, ] \setupbackgrounds[state=repeat] \defineoverlay[apage][ {\startMPcode StartPage; definecolor[ name = "MyColor1", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; definec

Re: [NTG-context] Chapter title in MetaFun manual.

2023-02-10 Thread Jeong Dal via ntg-context
ithcolor .625yellow) ; > draw fullcircle xscaled 1.5cm yscaled 1cm ; > \stopuseMPgraphic > > %\startnotmode[proof] > % \defineoverlay[circled][\useMPgraphic{circled}] > %\stopnotmode > > \define[1]\Circled% > {\framed > [background=circled,frame=off,offset=overlay] >

[NTG-context] Chapter title in MetaFun manual.

2023-02-10 Thread Jeong Dal via ntg-context
ons(withcolor (.6+uniformdeviate.35)*white) ; fill fullcircle xscaled 1.5cm yscaled 1cm ; drawoptions(withcolor .625yellow) ; draw fullcircle xscaled 1.5cm yscaled 1cm ; \stopuseMPgraphic %\startnotmode[proof] % \defineoverlay[circled][\useMPgraphic{circled}] %\stopnotmode \define[1]\Circ

Re: [NTG-context] Is this possible to do the same

2022-12-12 Thread Ursula Hermann via ntg-context
; \stopuniqueMPgraphic \defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}] \define[1]\cancel{% \ifmmode \mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}% \else% \framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}% \fi% } \starttext \dots E.g

Re: [NTG-context] Is this possible to do the same

2022-12-12 Thread Gavin via ntg-context
scaled .8pt ; \stopuniqueMPgraphic \defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}] \define[1]\cancel{% \ifmmode \mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}% \else% \framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}% \fi% } \starttext

Re: [NTG-context] Backgrounds has changed in latest lmtx

2022-10-23 Thread Thomas A. Schmitz via ntg-context
led (0,2) shifted ( (i-1)*factor,-diff-0.85cm) withcolor blue ; else : fill p shifted ( (i-1)*factor, 0) withcolor red ; fi ; endfor ; StopPage ; \stopuseMPgraphic \defineoverlay [Ornament] [\useMPgraphic{ornament}] \setupbackgrounds[page] [state=rep

Re: [NTG-context] Backgrounds has changed in latest lmtx

2022-10-21 Thread Otared Kavian via ntg-context
\startreusableMPgraphic{card} > StartPage ; > save p ; path p[] ; > p[0] = ulcorner Page -- urcorner Page ; > p[0] := p[0] shifted (0, -0.97cm) ; > for i = 1 upto 18 : > p[i] = p[i-1] shifted (0, -14.42pt) ; > draw p[i] withcolor (0.5,0.5,0.5) ; > endfor ; > pick

[NTG-context] Backgrounds has changed in latest lmtx

2022-10-21 Thread Thomas A. Schmitz via ntg-context
(0, -14.42pt) ; draw p[i] withcolor (0.5,0.5,0.5) ; endfor ; pickup pencircle scaled 2pt ; draw p[0] withcolor red ; StopPage ; \stopreusableMPgraphic \defineoverlay[Card][\reuseMPgraphic{card}] \setupbackgrounds[page] [state=repeat, background={Card

[NTG-context] Perceptrons

2022-10-16 Thread Thangalin via ntg-context
ons scaled SCALE; \stopuseMPgraphic \startuseMPgraphic{HexGridBgGraphic} % Define the grid background colour color gridback; gridback := (0.15, 0.18, 0.24); fill unitsquare xyscaled (OverlayWidth, OverlayHeight) withcolor gridback; \stopuseMPgraphic \defineoverlay[HexGri

Re: [NTG-context] startTEXpage on A4

2022-10-10 Thread Willi Egger via ntg-context
I would suggest the approach of Wolfgang because the standard setting of \framed(texts)’ width is fit and the height setting can be changed to this too. Further I would suggest to use an overlay and a Metafun graphic for the cut-indicators. \defineoverlay[Cutpointstight][\useMPgraphic

[NTG-context] \startcolumnset ... \stopcolumnset is working.

2022-09-14 Thread Jeong Dal via ntg-context
leftenlarged 1mm rightenlarged 1mm; draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm; draw rightboundary OverlayBox shifted (1mm,0); draw leftboundary OverlayBox shifted (-1mm,0); \stopuseMPgraphic \defineoverlay [headerBox] [\useMPgraphic{squareBox}] \startuseMPgraphic

Re: [NTG-context] image with rounded corners

2022-08-12 Thread Wolfgang Schuster via ntg-context
Henning Hraban Ramm via ntg-context schrieb am 12.08.2022 um 10:57: Hi, can ConTeXt make rounded image corners? Both of my approaches don’t work: \externalfigure[mill][   width=3cm,   frame=on,   corner=round,radius=1cm,   backgroundcorner=round,backgroundradius=1cm, ] \defineoverlay[Mill

[NTG-context] image with rounded corners

2022-08-12 Thread Henning Hraban Ramm via ntg-context
Hi, can ConTeXt make rounded image corners? Both of my approaches don’t work: \externalfigure[mill][ width=3cm, frame=on, corner=round,radius=1cm, backgroundcorner=round,backgroundradius=1cm, ] \defineoverlay[Mill][{% \externalfigure[mill][width=\overlaywidth] }] \framed[background

Re: [NTG-context] MP scratch counter

2022-07-13 Thread Hans Hagen via ntg-context
ted (i*5pt, 0pt)    withcolor if i < PageNumber : red else :  black fi ; endfor ; StopPage ; \stopuseMPgraphic \defineoverlay[background:ornament][\useMPgraphic{MP:ornament}] \setupbackgrounds[page][background={background:ornament}] \set

[NTG-context] MP scratch counter

2022-07-13 Thread Henning Hraban Ramm via ntg-context
else : black fi ; endfor ; StopPage ; \stopuseMPgraphic \defineoverlay[background:ornament][\useMPgraphic{MP:ornament}] \setupbackgrounds[page][background={background:ornament}] \setupbodyfont[ss,18pt] \starttext \dorecurse{10}{ \strut\par

Re: [NTG-context] Two minor questions

2022-06-06 Thread Stefan Nedeljkovic via ntg-context
; exact same dimensions as my page. I'd like to set that graphic as a > > background. How do I do this? > > (Again, untested) > > \startuseMPgraphic{background-image} > input graphic.mp; > \stopuseMPgraphic > > \defineo

Re: [NTG-context] Two minor questions

2022-06-06 Thread Aditya Mahajan via ntg-context
{background-image} input graphic.mp; \stopuseMPgraphic \defineoverlay[background-image][\useMPgraphic{background-image}] \setupbackgrounds[page][background={background-image}] Aditya ___ If your question is of interest t

Re: [NTG-context] Two minor questions

2022-06-06 Thread Wolfgang Schuster via ntg-context
. I have an mp graphic defined in the file "graphic.mp <http://graphic.mp>" which has the exact same dimensions as my page. I'd like to set that graphic as a background. How do I do this? \startreusableMPgraphic{backgroundgraphic}     input graphic.mp; \stopreusableMPgraphic

Re: [NTG-context] Pull quote between two column - trial

2022-05-28 Thread Garulfo via ntg-context
{transparentred} ; \stopuseMPgraphic \defineoverlay[myOL1][\useMPgraphic{mytest1}] \defineoverlay[myOL2][\useMPgraphic{mytest2}] %=== \defineframed [MyBigFrame] [offset=-0.26pt, frameoffset=0pt, frame=off, strut=yes, before

[NTG-context] Pull quote between two column - trial

2022-05-21 Thread Garulfo via ntg-context
,TextHeight+\mygap-\posB*LineHeight) -- (0.0*TextWidth,TextHeight+\mygap-\posB*LineHeight) -- cycle ; lmt_parshape [path = p] ; draw p withpen pencircle scaled \mypen ; endgroup ; \stopuseMPgraphic \defineoverlay[myOL1][\useMPgraphic{mytest1}] \defineoverlay[myOL2

[NTG-context] MetaFun manual's "texvar" is not working for me

2022-05-21 Thread Gavin via ntg-context
\setupbackgrounds [page] [background={backgraphics,foreground,foregraphics}] \defineoverlay [backgraphics] [\positionoverlay{backgraphics}] \defineoverlay [foregraphics] [\positionoverlay{foregraphics}] \setupMPvariables [mpos:box] [linecolor=blue, linewidth=\linewidth, fillcolor

Re: [NTG-context] Crediting copyright on photographs

2022-05-04 Thread Adam Reviczky via ntg-context
Hi Bruce, The Layers page has some examples ( https://wiki.contextgarden.net/Layers#Place_labels_on_pictures) and the Collectors page as well (https://wiki.contextgarden.net/Collectors). Some MWE: \starttext \definelayer [figure][width=\overlaywidth,height=\overlayheight] \defineoverlay[figure

Re: [NTG-context] Switching fonts changes framedtext justification

2022-04-07 Thread Thangalin via ntg-context
). \defineoverlay[TextBubbleRxOverlay][\useMPgraphic{TextBubble}{side=0}] \defineframedtext[TextBubbleRxFrame][TextBubbleFrame][ background=TextBubbleRxOverlay, location=left, ] % Send text (right-facing). \defineoverlay[TextBubbleTxOverlay][\useMPgraphic{TextBubble}{side=1}] \defineframedtext

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context
b := urcorner chap_frame ; pos := urcorner Field[Text][RightMarginSeparator] - ulcorner chap_frame - (-1mm,skip) ; fill chap_frame shifted pos withcolor "chap_frame" ; draw Chap rotated 90 shifted (xpart pos-4mm,ypart pos) ; StopPage ; \stopuseMPgraphic \defi

[NTG-context] Errors compiling the MetaFun manual

2022-03-12 Thread Marco Patzer via ntg-context
wn string ta %% metafun > log > %% metafun > log > error: Equation cannot be performed (unknown string=vacuous) \setupbackgrounds [page] [background={foreground,foregraphics}] \defineoverlay [foregraphics] [\positionoverlay{foregraphics}] \starttext \startMPpo

[NTG-context] Double-sided documents with MetaFun's Field[Text][Text]

2022-02-06 Thread śrīrāma via ntg-context
, height=fit] \startuseMPgraphic{page} StartPage; draw Area[Text][Text] shifted (InnerMarginWidth,BottomHeight+FooterHeight); draw Field[Text][Text] withcolor blue; StopPage; \stopuseMPgraphic \defineoverlay[page][\useMPgraphic{page

Re: [NTG-context] measure layer/ ruler

2022-01-01 Thread Youssef Cherem via ntg-context
rt (n/10,(f+sign*12mm,i)) ; > fi > elseif (n mod 5) == 0 : > draw (f,i) -- (f+sign*5mm,i) ; > else : > draw (f,i) -- (f+sign*3mm,i) ; > fi ; > n := n + 1 ; > endfor ; > setbounds currentpicture to Page ; &

Re: [NTG-context] measure layer/ ruler

2022-01-01 Thread Hans Hagen via ntg-context
*5mm,i) ; else : draw (f,i) -- (f+sign*3mm,i) ; fi ; n := n + 1 ; endfor ; setbounds currentpicture to Page ; \stopuniqueMPpagegraphic \defineoverlay[ruler][\uniqueMPpagegraphic{ruler}] \setupbackgrounds[page][background=ruler] \setuppagenumbering[alter

Re: [NTG-context] Extra shift with ornament

2021-12-17 Thread Mikael Sundqvist via ntg-context
r} >{\framed > [offset=overlay, > align=normal, > width=\textwidth, > height=2cm]{foo}} > > works but maybe you want this instead: > > \defineoverlay >[MyOrn] >[\MyOrn > {\framedtextparameter{MyTitle}} > {\novrule wi

Re: [NTG-context] Extra shift with ornament

2021-12-17 Thread Hans Hagen via ntg-context
} {\framed [offset=overlay, align=normal, width=\textwidth, height=2cm]{foo}} works but maybe you want this instead: \defineoverlay [MyOrn] [\MyOrn {\framedtextparameter{MyTitle}} {\novrule width \overlaywidth height \overlayheight}] \defineframedtext [MyText

[NTG-context] \startcolumnset ... \stopcolumnset fatal error: return code 11

2021-12-16 Thread Jeong Dal via ntg-context
ted (-1mm,0); %if CurrentColumn = 2: shifted(2mm,0) fi ; draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm; \stopuseMPgraphic \defineoverlay [headerBox] [\useMPgraphic{squareBox}] \startuseMPgraphic{verticalrule3} draw rightboundary OverlayBox shifted (1m

[NTG-context] using the newcolumnsets module

2021-12-09 Thread Jeong Dal via ntg-context
ted (-1mm,0); %if CurrentColumn = 2: shifted(2mm,0) fi ; draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm; \stopuseMPgraphic \defineoverlay [headerBox] [\useMPgraphic{squareBox}] \startuseMPgraphic{verticalrule3} draw rightboundary OverlayBox shifted (1m

Re: [NTG-context] Sum and mathalignment

2021-11-30 Thread Bruce Horrocks via ntg-context
> On 30 Nov 2021, at 19:34, Alexandre Christe via ntg-context > wrote: > > Dear list, > > > > What I've done is to play with mathalignment and \framed. Here is a MWE: > > \starttext > \defineoverlay[midrule][{\blackrule[height=.02cm,width=5.5cm]}] > &g

[NTG-context] Sum and mathalignment

2021-11-30 Thread Alexandre Christe via ntg-context
Dear list, [image: image.png] What I've done is to play with mathalignment and \framed. Here is a MWE: \starttext \defineoverlay[midrule][{\blackrule[height=.02cm,width=5.5cm]}] \framed[frame=off,background=midrule,boffset=.65cm]{\startformula \startmathalignment[n=12,align={middle,middle

Re: [NTG-context] positioning of metapost figure

2021-09-12 Thread Sylvain Hubert via ntg-context
> > \startuniqueMPgraphic{concept} > > draw fullcircle scaled 1cm shifted (10cm,10cm); > > \stopuniqueMPgraphic > > \defineoverlay[concept][\uniqueMPgraphic{concept}] > > \setupbackgrounds[page][background=concept] > > \starttext > > . > > \stoptext > >

Re: [NTG-context] positioning of metapost figure

2021-09-12 Thread Hans Hagen via ntg-context
On 9/12/2021 6:54 PM, Sylvain Hubert via ntg-context wrote: Dear List, The following code draws a circle at the center of the page, ignoring the "shifted" part. \startuniqueMPgraphic{concept} draw fullcircle scaled 1cm shifted (10cm,10cm); \stopuniqueMPgraphic \defineoverl

[NTG-context] positioning of metapost figure

2021-09-12 Thread Sylvain Hubert via ntg-context
Dear List, The following code draws a circle at the center of the page, ignoring the "shifted" part. \startuniqueMPgraphic{concept} draw fullcircle scaled 1cm shifted (10cm,10cm); \stopuniqueMPgraphic \defineoverlay[concept][\uniqueMPgraphic{concept}] \setupbackgrounds[page][backgrou

[NTG-context] MetaFun : textext.dflt / textext.dlft and MkIV / LMTX

2021-09-05 Thread Garulfo via ntg-context
Pict /2 , (bbheight Pict / -2) ) ; Pict := Pict rotated 45; Pict := Pict shifted (.5PaperWidth, .5PaperHeight) ; draw Pict withcolor darkyellow ; StopPage ; \stopuseMPgraphic %- \defineoverlay[MonOverlay][\useMPgraphic{MonGraphique}] \setupbackgrounds[page][background=MonOverlay

Re: [NTG-context] paper dimensions for TEXpage

2021-08-18 Thread Hans Hagen via ntg-context
setuplayer [hi] [width=\wd\scratchbox,height=\htdp\scratchbox] \setlayer [hi][preset=middle] {\color[green]{there}} \box\scratchbox \stopTEXpage \defineoverlay[hi] \startTEXpage[background=hi] \defineoverlay [hi] [{\framed [frame=off,offset=ove

[NTG-context] using a red frame as an overlay

2021-08-02 Thread Jeong Dal via ntg-context
color .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[rFrame][\useMPgraphic{red

Re: [NTG-context] Texte source 30 / 5000 Résultats de traduction Adjust the length of a frame

2021-07-26 Thread Wolfgang Schuster via ntg-context
leftenlarged (BackSpace + 5mm) rightenlarged ExHeight withcolor "lightgray"; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \defineoverlay [acframe] [\useMPgraphic{acframe}] \defineframed [ACFRAME] [..., background=acframe, ...]

Re: [NTG-context] Every odd row with a background color with extreme tables?

2021-07-23 Thread T. Kurt Bond
; > == End of Example > = > > > > That didn't seem to have any effect. > > > > Is there a way to have every odd row of every table in my document > > have color background? > > \startuseMPgraphic{xtablerow}

Re: [NTG-context] Every odd row with a background color with extreme tables?

2021-07-23 Thread Wolfgang Schuster
= That didn't seem to have any effect. Is there a way to have every odd row of every table in my document have color background? \startuseMPgraphic{xtablerow} fill OverlayBox withcolor "gray"; \stopuseMPgraphic \defineoverlay [xtablerow]

Re: [NTG-context] Header for a book

2021-07-13 Thread Wolfgang Schuster
] \startuseMPgraphic{chapterframe} fill OverlayBox leftenlarged (BackSpace + 5mm) rightenlarged (CutSpace + 5mm) topenlarged (TopSpace + 5mm) withcolor "lightgray"; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \defineoverlay [ch

Re: [NTG-context] new upload

2021-06-01 Thread Hans Hagen
1pt withcolor "blue" ; draw matrixbox (2, 2) (4, 4) withpen pencircle scaled 1pt withcolor "red" ; % drawdot anchorxy("matrix", 3, 4) withpen pencircle scaled 4pt withcolor "green"; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \d

Re: [NTG-context] new upload

2021-05-31 Thread Hans Hagen
withcolor "blue" withtransparency (1,.75) ; drawarrow anchorxy("two", 0, 1) { down } .. anchorxy("two", 0, 2) withcolor "blue" withtransparency (1,.75) ; drawarrow anchorxy("two", 0, 1) { dir 30 } .. anchorxy(

[NTG-context] new upload

2021-05-31 Thread Hans Hagen
1,.75) ; drawarrow anchorxy("two", 0, 1) { down } .. anchorxy("two", 0, 2) withcolor "blue" withtransparency (1,.75) ; drawarrow anchorxy("two", 0, 1) { dir 30 } .. anchorxy("three", 0, 1) withcolor &quo

Re: [NTG-context] Fuzzy lines

2021-05-13 Thread Thomas A. Schmitz
,OverlayHeight) -- (OverlayWidth,OverlayHeight) -- (OverlayWidth,0) -- cycle ; pickup pencircle scaled .5pt ; for i=1 upto 20 : draw p enlarged -5pt randomized 15pt withcolor blue ; endfor ; \stopuseMPgraphic \defineoverlay [Fuzzy] [\useMPgraphic{fuzzy}] \startTEXpage \framed [height=20cm,width

[NTG-context] working on page refs with MP

2021-03-18 Thread Werner Hennrich
[\setups{page:header}]% \startsetups page:header \setupMPvariables[hdrPgs] [curr=\pagenumber, first={\ref[page][\headerfirst]}, next={\ref[page][\headernext]}] \framed[ frame=off, background={hdrPgs} ]{}% all to be done in MP \stopsetups \defineoverlay[hdrPgs

[NTG-context] Center a text (Metafun)

2021-03-06 Thread Fabrice Couvreur
; draw p ; setbounds currentpicture to boundingbox currentpicture enlarged 2mm ; \stopuseMPgraphic \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \starttext \MyFrame[Title=Algorithme]{% \m{a\gets 2x-1} \m{b\gets a²-1} \m{c\gets b\div 4} \m{d\get

Re: [NTG-context] Lua code and table

2021-02-17 Thread Tomas Hala
; # \stopuseMPgraphic # #\defineoverlay #  [DiagonalRule] #  [\useMPgraphic{DiagonalRule}] # #\define[2]\DiagonalLabel{% #  \setuptabulate [after={\blank[\frameddimension{offset}]}] #  \starttabulate [|p|r|] #    \NC    \NC \bf #2 \NC\NR #    \NC \bf #1 \NC

[NTG-context] Lua code and table

2021-02-17 Thread Fabrice Couvreur
); draw leftcorner -- rightcorner; draw Leftcorner -- Rightcorner; \stopuseMPgraphic \defineoverlay [DiagonalRule] [\useMPgraphic{DiagonalRule}] \define[2]\DiagonalLabel{% \setuptabulate [after={\blank[\frameddimension{offset}]}] \starttabulate [|p|r|] \NC\NC \bf #2 \NC\NR

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

2021-02-17 Thread Jairo A. del Rio
It works fine now. Thank you a lot for the fix. Cordially, Jairo :) El mié, 17 de feb. de 2021 a la(s) 06:09, Hans Hagen (j.ha...@xs4all.nl) escribió: > On 2/17/2021 12:18 AM, Jairo A. del Rio wrote: > > I've copied the following example from the ConTeXt archive: > > > >

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}}]

  1   2   3   4   5   6   7   8   >