[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: Fwd: Re: Working with layer sets with Metapost

2024-02-19 Thread Emanuel Han via ntg-context
7:56 am, Mikael Sundqvist wrote: > > > > Hi, > > > > not sure I get what you are missing. But you can try > > > > setbounds currentpicture to (fullsquare scaled 200) ; > > > > in base. And then do > > > > \dorecurse{5}{ > > \start

[NTG-context] Re: Fwd: Re: Working with layer sets with Metapost

2024-02-19 Thread Mikael Sundqvist
ages entry > with it. Feel free to modify. > > Cheers > Emanuel > > On Feb. 16 2024, at 7:56 am, Mikael Sundqvist wrote: > > Hi, > > not sure I get what you are missing. But you can try > > setbounds currentpicture to (fullsquare scaled 200) ; > >

[NTG-context] Fwd: Re: Working with layer sets with Metapost

2024-02-19 Thread Emanuel Han via ntg-context
. And then do\dorecurse{5}{\startTEXpage[offset=1DK]\useMPgraphic{layerset#1}\stopTEXpage}if that is the looping you are after./MikaelOn Fri, Feb 16, 2024 at 6:54 AM Emanuel Han via ntg-context wrote:>> Resp. the solution should be such that each generated PDF page has the same dimension, th

[NTG-context] Re: Working with layer sets with Metapost

2024-02-17 Thread Emanuel Han via ntg-context
ot sure I get what you are missing. But you can try > setbounds currentpicture to (fullsquare scaled 200) ; > in base. And then do > \dorecurse{5}{ > \startTEXpage[offset=1DK] > \useMPgraphic{layerset#1} > \stopTEXpage > } > > if that is the looping you are after. > /M

[NTG-context] Re: Working with layer sets with Metapost

2024-02-15 Thread Mikael Sundqvist
Hi, not sure I get what you are missing. But you can try setbounds currentpicture to (fullsquare scaled 200) ; in base. And then do \dorecurse{5}{ \startTEXpage[offset=1DK] \useMPgraphic{layerset#1} \stopTEXpage } if that is the looping you are after. /Mikael On Fri, Feb 16, 2024 at 6:54 AM

[NTG-context] Re: Working with layer sets with Metapost

2024-02-15 Thread Emanuel Han via ntg-context
actually need to keep the \dorecurse mechanism of the mwe (from line 44 > on), because I need the "setbounds currentpicture to TheFrame" and also > because I need page numbering inside the MPpage, as done with draw > textext(decimal(currentime)). > So, how can I use t

[NTG-context] Re: Working with layer sets with Metapost

2024-02-15 Thread Emanuel Han via ntg-context
Dear Mikael, I actually need to keep the \dorecurse mechanism of the mwe (from line 44 on), because I need the "setbounds currentpicture to TheFrame" and also because I need page numbering inside the MPpage, as done with draw textext(decimal(currentime)). So, how can I use the \us

[NTG-context] Re: Working with layer sets with Metapost

2024-02-15 Thread Emanuel Han via ntg-context
icture layerC; > layerC:=image( > label("Wort 4", z3+z1); > ); > > picture layerY; > layerY:=image( > label("Nummer 5", z2+z3); > ); > > picture layerU; > layerU:=image( > label("number 6", z2+z1); > ); > \stopuseMPgraphic >

[NTG-context] Re: Working with layer sets with Metapost

2024-02-14 Thread Mikael Sundqvist
rtuseMPgraphic{layerset2} \includeMPgraphic{layerset1} ; draw layerY ; \stopuseMPgraphic \startuseMPgraphic{layerset3} \includeMPgraphic{layerset2} ; \includeMPgraphic{Gamma} ; \stopuseMPgraphic \startuseMPgraphic{layerset4} \includeMPgraphic{layerset2} ; draw layerU ; \stopuseMPgraphic \startu

[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] Asking help for better way to make tickets.

2024-01-12 Thread Jeong Dal via ntg-context
;), .75A + .25B);\stopuseMPgraphic\starttext\dorecurse{4}{\startcombination[3*1]%distance=0mm]{\useMPgraphic{ticket}{i=\recurselevel,j=2}}{}{\useMPgraphic{ticket}{i=\recurselevel,j=1}}{}{\useMPgraphic{ticket}{i=\recurselevel,j=0}}{}\stopcombination\startcombination[3*1]%distance=0mm]{\useMPg

[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
withcolor OverlayColor ; \stopusableMPgraphic \defineoverlay[MetaCirc][\useMPgraphic{MetaCirc}] \framed [background=MetaCirc, backgroundcolor=red, frame=off, rulethickness=1pt] {test} \framed [background=MetaCirc, backgroundcolor=blue, rulethickness=.5pt] {test} is more

[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: 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] Custom TOC with makeup and setups

2023-05-10 Thread Jethro Djan via ntg-context
welcome. My MWE: \setuppapersize[S6] \startuseMPgraphic{itemize:toc} save p; path p; p := ( (0,-0.5)--(0,0.5)--(0.866,0)--cycle ) scaled 1.5ExHeight; fill p withcolor \MPcolor{Black}; \stopuseMPgraphic \definesymbol[itemize:toc][\useMPgraphic{itemize:toc}] \definelistalternative [toclist

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] MP figure continuation

2023-01-06 Thread Mikael Sundqvist via ntg-context
ot;x","vdw(3,x)+vdw(2,x)+vdw(1,x)+vdw(0,x)",epsed(-1),epsed(1),1/1000) scaled u ; \stopuseMPgraphic \startplacefigure[reference=fig:vdw] \startcombination[nx=2,ny=4] {\useMPgraphic{vanderwaerden0}} {(a)} {\useMPgraphic{vanderwaerden0}} {(b)} {\useMPgraphic{vanderwaerden1}}

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

[NTG-context] Write a long chapter title in two lines

2022-08-18 Thread Jeong Dal via ntg-context
(\MPvar{tt}) (withcolor .75white) (withcolor .725blue withpen pencircle scaled .75pt);%\MPvar{thick}); \stopuseMPgraphic \definefont[BigFontOne][NotoSansCJKkr-Bold sa 4] \define[1]\outlineTitle{\useMPgraphic{outlineT}{tt="#1"}} \setuphead[chapter] [textcommand=\outlineTit

[NTG-context] Write a long chapter title in two lines

2022-08-15 Thread Jeong Dal via ntg-context
{\useMPgraphic{outlineT}{tt="#1"}} \setuphead[chapter] [textcommand=\outlineTitle, style=\BigFontOne, numbercommand=\outlineTitle, % align = middle, number=yes] \setupexternalfigures[location={default,local,global}] %\definefont[fancy][Zapfino at 24pt] \starttext \startchapter[title={Very Long

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

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] 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] Solved! Itemize columns with MPgraphics: another vertical spacing puzzle

2022-01-14 Thread Gavin via ntg-context
>> and output below, for anyone who is interested. >> Even when I’m a bit confused, I’m glad to be working with ConTeXt rather >> than any other system! > > % your hack: > > \define[1]\mycolordot{\def\mycolor{#1}\framed[location=top,offset=0pt,boffset=-\strutdep

Re: [NTG-context] Solved! Itemize columns with MPgraphics: another vertical spacing puzzle

2022-01-14 Thread Hans Hagen via ntg-context
=-\strutdepth,xframe=off]{\useMPgraphic{name}}} % but ... you just don't want struts \define[1]\mycolordot{\def\mycolor{#1}\framed[location=top,offset=0pt,strut=no,frame=off]{\useMPgraphic{name}}} % and no offset but also no invisible frame \define[1]\mycolordot{\def\mycolor{#1}\framed[location

Re: [NTG-context] Solved! Itemize columns with MPgraphics: another vertical spacing puzzle

2022-01-14 Thread Gavin via ntg-context
]{\useMPgraphic{name}}} Here are a few great looking multiple choice questions about colors. \startquestions \question What is your favorite color? \startchoices[columns,four] \choice \mycolordot{.625red} \choice \mycolordot{.625blue} \choice \mycolordot{.625green} \choice \mycolordot

[NTG-context] Itemize columns with MPgraphics: another vertical spacing puzzle

2022-01-14 Thread Gavin via ntg-context
withcolor \mycolor; \stopuseMPgraphic \define[1]\mycolordot{\def\mycolor{#1}\framed[location=top,offset=0pt,frame=off]{\useMPgraphic{name}}} What is your favorite color? (There is too much space after these choices.) \startchoices[columns,four] \choice \mycolordot{.625red} \choice \mycolordot

Re: [NTG-context] Laundry symbols (now: altered picture)

2022-01-02 Thread Alfredo Catalina via ntg-context
gt; > u:=.095cm; > > draw externalfigure "./skysprite.png" xscaled 4u yscaled 5u shifted > > (0u,-0u); > > draw externalfigure "./sandsprite.png" xscaled 4u yscaled 5u shifted > > (0u,-5u); > > \stopuseMPgraphic > > \useMPgraphic{mapa} > > \stopte

Re: [NTG-context] Laundry symbols (now: altered picture)

2022-01-02 Thread Hans Hagen via ntg-context
; \stopuseMPgraphic \useMPgraphic{mapa} \stoptext But instead I got two huge sprites of 2.8 cm x 4.4 cm. Am I forgetting something? Originally that worked because the image was always 'included' at 1 bp and then scaled but that was (1) inaccurate and (2) a bit depending on the image and (3) cou

Re: [NTG-context] Laundry symbols (now: altered picture)

2022-01-02 Thread Alfredo Catalina via ntg-context
[termes,8pt]}] \startuseMPgraphic{mapa} u:=.095cm; draw externalfigure "./skysprite.png" xscaled 4u yscaled 5u shifted (0u,-0u); draw externalfigure "./sandsprite.png" xscaled 4u yscaled 5u shifted (0u,-5u); \stopuseMPgraphic \useMPgraphic{mapa} \stoptext But instead I got two huge

Re: [NTG-context] [MetaFun] Trying to understand outlinetext, 'stretch' effect and \kerncharacters

2022-01-01 Thread Hans Hagen via ntg-context
s follows to produce a stylized 'title' head: \setupMPtext{TitleText}{% \starteffect[stretch]\bfc\namedstructurevariable{title}{title}\stopeffect} \useMPgraphic{TitleGraphic} low level pdf magic ... so not done in mp [colors "titlefg" and "titleoutline" are set using \define

Re: [NTG-context] [MetaFun] Trying to understand outlinetext, 'stretch' effect and \kerncharacters

2021-12-30 Thread kauśika via ntg-context
gt; \stopuseMPgraphic > > which I tried to use as follows to produce a stylized 'title' head: > > \setupMPtext{TitleText}{% > \starteffect[stretch]\bfc\namedstructurevariable{title}{title}\stopeffect} > \useMPgraphic{TitleGraphic} > > [colors "titlefg" and

[NTG-context] [MetaFun] Trying to understand outlinetext, 'stretch' effect and \kerncharacters

2021-12-30 Thread kauśika via ntg-context
etupMPtext{TitleText}{% \starteffect[stretch]\bfc\namedstructurevariable{title}{title}\stopeffect} \useMPgraphic{TitleGraphic} [colors "titlefg" and "titleoutline" are set using \definecolor] But, the 'stretch' effect caused by \starteffect[stretch]…\stopeffect does not work with 'outl

[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] metafun: circular arc

2021-10-05 Thread Floris van Manen via ntg-context
:= q rotated 20 ; drawarrow q  withpen pencircle scaled .5mm withcolor green ; draw followtext(q, "\strut TEXT TWO") ; \stopuseMPgraphic \useMPgraphic{empedocless} ___ If your question is of interes

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Thomas A. Schmitz via ntg-context
a withpen pencircle scaled 2mm; q := p cutafter a ; q := q rotated 20 ; drawarrow q  withpen pencircle scaled .5mm withcolor green ; draw followtext(q, "\strut TEXT TWO") ; \stopuseMPgraphic \useMPgraphic{empedocless} So, just always start at point 0 and then just rotate t

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Hans Hagen via ntg-context
aw followtext(S[18], "\strut\hbox to 2em{\EmpArrow}\hskip2em RUHEPAUSE\hskip4em\strut") ; draw followtext(S[19], "\strut\hbox to 2em{\EmpArrow}EINHEIT (SPHAIROS)\hskip2em\strut") ; \stopuseMPgraphic \useMPgraphic{empedocles} \stoptext I have a big problem and some smaller ques

[NTG-context] metafun: circular arc

2021-10-05 Thread Thomas A. Schmitz via ntg-context
\hskip2em RUHEPAUSE\hskip4em\strut") ; draw followtext(S[19], "\strut\hbox to 2em{\EmpArrow}EINHEIT (SPHAIROS)\hskip2em\strut") ; \stopuseMPgraphic \useMPgraphic{empedocles} \stoptext I have a big problem and some smaller questions, for those who are better at math and at metaf

[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

[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
[\ifodd\currentxtablerow \useMPgraphic{xtablerow}% \fi] \starttext \startxtable[frame=off,background=xtablerow] \dorecurse{20} {\startxrow \startxcell Column 1 \stopxcell \startxcell Column 2 \stopxcell \stopxrow} \stopxtable \stoptext

Re: [NTG-context] weekend upload - stacking and animation

2021-07-13 Thread Jeong Dal
Dear Hans, Wolfgang, Both of your methods are working well. Using \frame, the \dorecurse problem is solved. \starttext \startanimation[menu=yes] \dorecurse{10} { \frame{\useMPgraphic[stacking={#1}]{demo}}} \stopanimation \stoptext Thank you for your solutions. Best regards, Dalyoung

Re: [NTG-context] Header for a book

2021-07-13 Thread Wolfgang Schuster
apterframe] [\useMPgraphic{chapterframe}] \defineframedtext [ChapterFrame] [frame=off, background=chapterframe, width=max, height=6cm, after={\blank[2*line]}, offset=0pt] \setuphead [chapter] [align=flushright, textcommand=\groupedcommand{\blank[medium]}{}, numbercolor=darkgray,

Re: [NTG-context] weekend upload - stacking and animation

2021-07-13 Thread Hans Hagen
; endfor ; \stopuseMPgraphic \unprotect \tolerant\protected\def\useMPanimation[#1]#2%    {\begingroup     \scratchtoks\emptytoks \dorecurse{10}{\etoksapp\scratchtoks{{\useMPgraphic[\c!stacking={\recurselevel}]{#2%     \expanded{\startanimation[#1]\the\scratchtoks

Re: [NTG-context] weekend upload - stacking and animation

2021-07-13 Thread Wolfgang Schuster
; \stopuseMPgraphic \setupinteraction[state=start] \usemodule[animation] \starttext \startanimation[menu=yes] % \dorecurse{10} % { {\useMPgraphic[stacking={#1}]{demo}}} {\useMPgraphic[stacking={1}]{demo}} {\useMPgraphic[stacking={2}]{demo}} {\useMPgraphic[stacking={3}]{demo}} {\useMPgraphic[stacking={4

Re: [NTG-context] weekend upload - stacking and animation

2021-07-13 Thread Jeong Dal
[state=start] \usemodule[animation] \starttext \startanimation[menu=yes] % \dorecurse{10} % { {\useMPgraphic[stacking={#1}]{demo}}} {\useMPgraphic[stacking={1}]{demo}} {\useMPgraphic[stacking={2}]{demo}} {\useMPgraphic[stacking={3}]{demo}} {\useMPgraphic[stacking={4}]{demo}} {\useMPgraphic

Re: [NTG-context] weekend upload - stacking and animation

2021-07-13 Thread Floris van Manen
\unprotect \tolerant\protected\def\useMPanimation[#1]#2%   {\begingroup    \scratchtoks\emptytoks \dorecurse{10}{\etoksapp\scratchtoks{{\useMPgraphic[\c!stacking={\recurselevel}]{#2%    \expanded{\startanimation[#1]\the\scratchtoks\stopanimation}%    \endgroup} \protect

Re: [NTG-context] weekend upload - stacking and animation

2021-07-13 Thread Hans Hagen
; \stopuseMPgraphic \setupinteraction[state=start] \usemodule[animation] \starttext \startanimation[menu=yes] % \dorecurse{10} % { {\useMPgraphic[stacking={#1}]{demo}}} {\useMPgraphic[stacking={1}]{demo}} {\useMPgraphic[stacking={2}]{demo}} {\useMPgraphic[stacking={3}]{demo}} {\useMPgraphic[stacking={4

Re: [NTG-context] weekend upload

2021-07-12 Thread Jeong Dal
Dear Aditya, Thank you for your code and an explanation. > Let's assume that the last MPpage was a \startuseMPgraphic{boxes} > \stopuseMPgraphic. Suppose I wanted to use these pictures in a presentation. > On the first slide, I can use > > \useMPgraphic[stacking=0]{boxe

Re: [NTG-context] weekend upload

2021-07-12 Thread Aditya Mahajan
On the first slide, I can use > > > >\useMPgraphic[stacking=0]{boxes} > > > > to show the three boxes, and on the next slide, I can use > > > >\useMPgraphic[stacking={-1,0}]{boxes} > > > > I tried to reproduce your example using \start

Re: [NTG-context] weekend upload

2021-07-12 Thread Hans Hagen
's assume that the last MPpage was a \startuseMPgraphic{boxes} \stopuseMPgraphic. Suppose I wanted to use these pictures in a presentation. On the first slide, I can use \useMPgraphic[stacking=0]{boxes} to show the three boxes, and on the next slide, I can use \useMPgraphic[stacking={-1

Re: [NTG-context] weekend upload

2021-07-12 Thread Hans Hagen
's assume that the last MPpage was a \startuseMPgraphic{boxes} \stopuseMPgraphic. Suppose I wanted to use these pictures in a presentation. On the first slide, I can use \useMPgraphic[stacking=0]{boxes} to show the three boxes, and on the next slide, I can use \useMPgraphic[stacking={-1

Re: [NTG-context] weekend upload

2021-07-11 Thread Aditya Mahajan
et's assume that the last MPpage was a \startuseMPgraphic{boxes} \stopuseMPgraphic. Suppose I wanted to use these pictures in a presentation. On the first slide, I can use \useMPgraphic[stacking=0]{boxes} to show the three boxes, and on the next slide, I can use \useMPgraphic[stacki

Re: [NTG-context] weekend upload

2021-07-10 Thread Hans Hagen
pencircle scaled 2mm ; endfor ; draw boundingbox currentpicture withpen pencircle scaled 1pt withstacking 0 ; currentpicture := currentpicture xsized 15mm; \stopuseMPgraphic \setupMPvariables[demo] \startTEXpage \vskip1ex \hbox{\space\dore

Re: [NTG-context] weekend upload

2021-07-09 Thread Hans Hagen
pencircle scaled 2mm ; endfor ; draw boundingbox currentpicture withpen pencircle scaled 1pt withstacking 0 ; currentpicture := currentpicture xsized 15mm; \stopuseMPgraphic \setupMPvariables[demo] \startTEXpage \vskip1ex \hbox{\space\dore

Re: [NTG-context] weekend upload

2021-07-09 Thread Aditya Mahajan
ithstacking (if odd(i) : i else : 5 fi) > withpen pencircle scaled 2mm ; > endfor ; > draw boundingbox currentpicture > withpen pencircle scaled 1pt > withstacking 0 ; > currentpicture := currentpicture xsized 15mm; > \stopuse

[NTG-context] weekend upload

2021-07-09 Thread Hans Hagen
withstacking 0 ; currentpicture := currentpicture xsized 15mm; \stopuseMPgraphic \setupMPvariables[demo] \startTEXpage \vskip1ex \hbox{\space\dorecurse{10}{\useMPgraphic{demo}{list={0,#1}}\space}} \vskip1ex \nointerlineskip \hbox{\space\dorecurse{10}{\useMPgraphic{demo}{list={0,1

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-25 Thread Jeong Dal
{\udCount} {\useMPgraphic{foldUD}{num=\recurselevel}} {\useMPgraphic{dotLines}{num=\recurselevel}} %} %\stopanimation \stoptext However, it draws all the figures under the \startanimation case. There may be something I missed or there is something uncertain between \dorecurse and \startanimation.

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-24 Thread Jeong Dal
:= \MPvar{num}-1; G := z[n-1]; grayUD(n); \stopuseMPgraphic \startuseMPgraphic{dotLines}{num} numeric n; n := \MPvar{num}-1; linesUD(n); \stopuseMPgraphic \setupinteraction[state=start] \usemodule[animation] \starttext %\startanimation[menu=yes] %{ \dorecurse{\udCount} {

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-24 Thread Hans Hagen
On 6/24/2021 5:39 AM, Aditya Mahajan wrote: You need to call the setglobalmacro(...) macro. The code inside \startMPinitializations is only executed when you call any MP environment. But you are using \udCount before \useMPgraphic. A simple solution is to run dummy MP code so that MP

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-23 Thread Aditya Mahajan
alcount("udCount",maxNum); > > \stopMPinitializations > > \startuseMPgraphic{foldUD}{num} >numeric n; >n := \MPvar{num}-1; >G := z[n-1]; >grayUD(n); > \stopuseMPgraphic > \startuseMPgraphic{dotLines}{num} >numeric n; >n := \MPvar{n

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-23 Thread Jeong Dal
n := \MPvar{num}-1; G := z[n-1]; grayUD(n); \stopuseMPgraphic \startuseMPgraphic{dotLines}{num} numeric n; n := \MPvar{num}-1; linesUD(n); \stopuseMPgraphic \setupinteraction[state=start] \usemodule[animation] \starttext \startanimation[menu=yes] \dorecurse{7} { {\useMPgraphic{f

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] new upload

2021-05-05 Thread Hans Hagen
ars "color" ; \stopuseMPgraphic or even can be: \startuseMPgraphic{foo3} fill fullcircle scaled mpvar "size" withcolor mpvar "color" ; \stopuseMPgraphic where numerics, dimensions and strings are figured out automatically: \newdimen\mydimen \mydimen=1cm \us

[NTG-context] working on page refs with MP

2021-03-18 Thread Werner Hennrich
][\useMPgraphic{hdrPgs}] \startuseMPgraphic{hdrPgs} StartPage; % calc and draw 'Page x of y' numeric numCurr; numCurr := \MPvar{curr}; string strFirst; strFirst := "\MPvar{first}"; string strNext; strNext := "\MPvar{next}"; message("===&quo

[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] Ducks in ConTeXt

2021-01-02 Thread Hans Hagen
> I've recently ported TikZducks to ConTeXt and finally removed TIkZ > along the way. So a new module was created. The module is called > "metaducks" (lol) and it's essentially a \useMPgraphic{...} with a lot > of options, most of them ported from Tik

Re: [NTG-context] Ducks in ConTeXt

2021-01-02 Thread Jairo A. del Rio
So a new module was created. The module is called > > "metaducks" (lol) and it's essentially a \useMPgraphic{...} with a lot > > of options, most of them ported from TikZducks. For those not familiar > > with the package, it draws customized rubber ducks :) I want to

Re: [NTG-context] Ducks in ConTeXt

2020-12-31 Thread Wolfgang Schuster
Jairo A. del Rio schrieb am 24.12.2020 um 15:18: Hi everyone! I've recently ported TikZducks to ConTeXt and finally removed TIkZ along the way. So a new module was created. The module is called "metaducks" (lol) and it's essentially a \useMPgraphic{...} with a lot of options, mo

Re: [NTG-context] Ducks in ConTeXt

2020-12-24 Thread Jairo A. del Rio
eated. The module is called "metaducks" > > (lol) and it's essentially a \useMPgraphic{...} with a lot of options, > > most of them ported from TikZducks. For those not familiar with the > > package, it draws customized rubber ducks :) I want to include some >

Re: [NTG-context] Ducks in ConTeXt

2020-12-24 Thread Hans Hagen
On 12/24/2020 3:18 PM, Jairo A. del Rio wrote: Hi everyone! I've recently ported TikZducks to ConTeXt and finally removed TIkZ along the way. So a new module was created. The module is called "metaducks" (lol) and it's essentially a \useMPgraphic{...} with a lot of options, mo

  1   2   3   4   5   6   7   8   9   10   >