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

2024-05-19 Thread Hans Hagen via ntg-context
}] \definemeasure [myheightb] [{\the\dimexpr\baselineskip*25-\lineskip*1\relax}] \startuseMPgraphic{shape:1} path p ; numeric mywidth ; mywidth := \measure{mywidth}; numeric mywidtha ; mywidtha := \measure{mywidtha}; numeric myheight ; myheight := \measure{myheight}; numeric myheighta

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

2024-05-19 Thread garulfo
[myheightb][{\the\dimexpr\baselineskip*25-\lineskip*1\relax}] \startuseMPgraphic{mymetafunpath} path p ; numeric mywidth ; mywidth := \measure{mywidth}; numeric mywidtha ; mywidtha := \measure{mywidtha}; numeric myheight ; myheight := \measure{myheight}; numeric myheighta

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

2024-05-17 Thread Wolfgang Schuster
are necessary to show the problem, the custom layout isn't necessary and can be left out. \startuseMPgraphic{FunnyFrame} picture p ; numeric w, h, o ; p := textext.rt(\MPstring{FunnyFrame}) ; w := OverlayWidth ; h := OverlayHeight ; o := BodyFontSize ; p := p shifted (2o,h-ypart center p) ; draw p

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

2024-05-16 Thread madiazm . eoicc
, rightmargindistance=7mm, leftmargin=1.5cm, header=1cm, headerdistance=.5cm, bottomspace=.5cm, bottomdistance=0mm, footer=.8cm, footerdistance=.2cm, setup=strict,] \startuseMPgraphic

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

2024-05-14 Thread garulfo
\baselineskip*20-\lineskip*2\relax}] \startuseMPgraphic{mp1} path p ; numeric myheight ; myheight := \measure{myheight}; numeric myheighta ; myheighta := \measure{myheighta}; numeric myheightb ; myheightb := \measure{myheightb}; p := (0,0) -- (6cm,0) -- (6cm,myheighta) -- (4cm

[NTG-context] Re: intercolumn pull quotes typesetting

2024-05-07 Thread Garulfo
Hi all, I am happy to share one way to get "pull quotes between two columns" (in a three columns layout). https://wiki.contextgarden.net/images/5/50/context_3columns_layout.pdf It's not based on Columns / ColumnSet / Page Columns. It just combines \startuseMPgraphic + build_parshape

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

2024-04-24 Thread Wolfgang Schuster
garu...@azules.eu schrieb am 20.04.2024 um 23:00: I can not figure out why this progress bar only works when \showframe is activated. When you comment on \showframe, it's as if \realpageno is at zero. (current version: 2024.04.01 08:59) \showframe \startuseMPgraphic{MonGraphisme_MP

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

2024-04-20 Thread garulfo
I can not figure out why this progress bar only works when \showframe is activated. When you comment on \showframe, it's as if \realpageno is at zero. (current version: 2024.04.01 08:59) \showframe \startuseMPgraphic{MonGraphisme_MP} numeric n ; n := \number\realpageno ; numeric m ; m

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

2024-03-01 Thread Jean-Pierre Delange
, width=max, height=fit, style=italic] \definelabel [Définition] [headstyle=\bf\smallcaps] \startuseMPgraphic{MyFrame} path b; picture p; %p := textext.rt("\white\Définition"); p := textext.rt("\white\framedtextparameter{Title}"); %p := textext.rt("\white\getva

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

2024-02-22 Thread Henning Hraban Ramm
not much interested in dashed borders but to have lines affected by my sketchy style - courtesy of Aditya et al., see below) Taco, will the syntax pages in the wiki update automatically to a newer version? """ \startuseMPgraphic{mp:sketchy} input mp-sketch.mp; sketchypaths; ske

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

2024-02-22 Thread Hans Hagen via ntg-context
On 2/21/2024 7:47 PM, Henning Hraban Ramm wrote: Am 21.02.24 um 19:43 schrieb Wolfgang Schuster: … but it would be visible on a colored background. I’m sure you can show me a better way… \startuseMPgraphic{dottedborder}    draw bottomboundary OverlayBox withpen pencircle scaled 2 dashed

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

2024-02-21 Thread Henning Hraban Ramm
Am 21.02.24 um 19:43 schrieb Wolfgang Schuster: … but it would be visible on a colored background. I’m sure you can show me a better way… \startuseMPgraphic{dottedborder}   draw bottomboundary OverlayBox withpen pencircle scaled 2 dashed withdots withcolor "red";   setbounds curr

[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
a crutch… The example below draws a custom border for the whole cell but you're free to draw only certain sides (leftboundary etc. helps) but don't forget to set the boundary box for the graphic (OverlayBox is the size of the cell). begin example \startuseMPgraphic{dottedborder} draw

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

2024-02-19 Thread Emanuel Han via ntg-context
> > > > > > In my logic, the layers will be drawn in the order of their appearance > > > > within the {}. In the example, drawn content of layerM might cover > > > > drawn content of layerU. > > > > > > > > Contrary to a layer subse

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

2024-02-19 Thread Mikael Sundqvist
awn > > > content of layerU. > > > > > > Contrary to a layer subset, each layer set will result in a PDF page, and > > > thus the layer sets are related to each other by an inner order. That's > > > why I would use an array variable here with [

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

2024-02-19 Thread Emanuel Han via ntg-context
> layerset2 := myappend{layerset1, layerY};> > layerset3 := myappend{layerset2, layersubsetGamma};> > layerset4 := myappend{layerset2, layerU};> > layerset5 := myappend{layerset4, layersubsetGamma};> >> > Finally, I would need each layerset[k] typeset on its own pdf

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

2024-02-17 Thread Emanuel Han via ntg-context
related to each other by an inner order. That's > > > why I would use an array variable here with []. > > > > > > I don't know how to append a set. In the following example, I assumed > > > there would be a function myappend(, > > initial set should be appende

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

2024-02-15 Thread Mikael Sundqvist
pend(, > set should be appended with>) > > > > myset layerset[]; > > layerset1 := {layerW,layerA}; > > layerset2 := myappend{layerset1, layerY}; > > layerset3 := myappend{layerset2, layersubsetGamma}; > > layerset4 := myappend{layerset2, layerU}; >

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

2024-02-15 Thread Emanuel Han via ntg-context
gt; > > and thus the layer sets are related to each other by an inner order. > > > > That's why I would use an array variable here with []. > > > > > > > > I don't know how to append a set. In the following example, I assumed > > > > there w

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

2024-02-15 Thread Emanuel Han via ntg-context
; > myset layerset[]; > > > layerset1 := {layerW,layerA}; > > > layerset2 := myappend{layerset1, layerY}; > > > layerset3 := myappend{layerset2, layersubsetGamma}; > > > layerset4 := myappend{layerset2, layerU}; > > > layerset5 := myappend{layerset4, layers

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

2024-02-15 Thread Emanuel Han via ntg-context
> layerset1 := {layerW,layerA}; > > layerset2 := myappend{layerset1, layerY}; > > layerset3 := myappend{layerset2, layersubsetGamma}; > > layerset4 := myappend{layerset2, layerU}; > > layerset5 := myappend{layerset4, layersubsetGamma}; > > > > Finally, I woul

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

2024-02-14 Thread Mikael Sundqvist
yersubsetGamma}; > > Finally, I would need each layerset[k] typeset on its own pdf page. And of > course on each page k, only the layers which appear in the definition of the > layerset[k] should be drawn on top of each other in the order as they appear > in that definition.

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

2024-02-08 Thread Otared Kavian
e code and its outputs of two cases for comparison.Any suggestions are welcomed.Tomorrow is the New Years day in Lunar calendar.Happy new year, again.Best regards,Dalyoung%%%\startuseMPgraphic{mark}path p;p := unitsquare scaled 3cm;draw p;draw (point 0 of p)--(point 2 of p);draw (point 1 of p)--(p

[NTG-context] \startcolumns and \startcolumnset

2024-02-08 Thread Jeong Dal via ntg-context
suggestions are welcomed.Tomorrow is the New Years day in Lunar calendar.Happy new year, again.Best regards,Dalyoung%%%\startuseMPgraphic{mark}path p;p := unitsquare scaled 3cm;draw p;draw (point 0 of p)--(point 2 of p);draw (point 1 of p)--(point 3 of p);\stopuseMPgraphic\startuseMPgraphic

[NTG-context] Asking help for better way to make tickets.

2024-01-12 Thread Jeong Dal via ntg-context
]\startuseMPgraphic{ticket}{i,j}path p,q;pair A,B;p := unitsquare xyscaled (67mm,73mm);A := point 0.5 of p;B := point 2.5 of p;draw p;label(textext("Text"), .25A+.75B );label(textext("\tfd " & decimal (3*\MPvar{i}-\MPvar{j})), center p);label(textext("Text"

[NTG-context] Re: multipage metapost output from ConTeXt

2024-01-06 Thread Emanuel Han via ntg-context
not be visible on pages 29 and forward). I don't bother you with my code which is too long. Let's use the mwe provided by you (I added it here for convenience), where we have 3 pages. How can I have the content of p2 not be added on page 3 and forward? \startuseMPgraphic{base} picture p[]; path TheFrame

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Emanuel Han via ntg-context
Thank you Mikael, this works! Emanuel On Dez. 2 2023, at 7:46 pm, Mikael Sundqvist wrote: > Hi, > > I don't know if \startMPinclusions \stopMPinclusions shall work with > \startMPpage and \stopMPpage. In this case, one can use a separate > graphics: > > \startuseMPgrap

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Mikael Sundqvist
Hi, I don't know if \startMPinclusions \stopMPinclusions shall work with \startMPpage and \stopMPpage. In this case, one can use a separate graphics: \startuseMPgraphic{base} picture p[]; path TheFrame ; TheFrame := fullsquare scaled 5in ; z1 = (60,40); z2 = (40,90); z3 = (10,70); p1:=image

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

2023-09-17 Thread Jeroen
That works fine except that the following line does only issue the sequential number and not the chapter number. Refer to \in{code fragment}[tit1] bla MWE: \startuseMPgraphic{CountFrame} picture p; numeric w, h, o; p := textext.rt("\wrappedcurrentconstruction"); w := Overlay

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

2023-09-16 Thread Jeroen
) Code Fragment 2.1 (The Third Title) MWE: \startuseMPgraphic{CountFrame} picture p; numeric w, h, o; p := textext.rt("\wrappedcurrentconstruction"); w := OverlayWidth; h := OverlayHeight; o := BodyFontSize; p := p shifted (2o,h-ypart center p); draw p; path b; b := bou

[NTG-context] Verbatim Textbox with Reference NUmbering

2023-09-09 Thread Jeroen
for chapter 1, codefragment 1, 2 etc. with the possibility that in the text I can refer to the codefragment like \in{codefragment\space}[code:ccpsample] similar as to tables and figures? Thanks Jeroen %% % MWE1 %% \startuseMPgraphic{mpos:par:myexample} path p; for i = 1

[NTG-context] Re: Text runs out of Verbatim Frame

2023-09-08 Thread Wolfgang Schuster
for if the situation asks for it to have it only have a frame half pagewidth, like a width=0.5\textwidth Thanks Jeroen \unprotect \startuseMPgraphic{mpos:par:myexample} path p; for i = 1 upto nofmultipars : p := multipars[1] topenlarged 4pt bottomenlarged 4pt cornered 2mm ; fill p withcolor 0.95white

[NTG-context] Text runs out of Verbatim Frame

2023-09-08 Thread Jeroen
a frame half pagewidth, like a width=0.5\textwidth Thanks Jeroen \unprotect \startuseMPgraphic{mpos:par:myexample} path p; for i = 1 upto nofmultipars : p := multipars[1] topenlarged 4pt bottomenlarged 4pt cornered 2mm ; fill p withcolor 0.95white ; draw p withcolor black withpen pencircle

[NTG-context] Re: Pass string into text background graphic

2023-08-12 Thread Hans Hagen via ntg-context
current} why twice ? you only have to typeset the text once, right? {text:\number\numexpr1+\rawcountervalue[ConcurrentTextGetCounter]/2\relax}} \startuseMPgraphic{GraphicConcurrent} numeric index; index := 1; % Differentiate between new text blocks and those crossing pages.

[NTG-context] Re: Pass string into text background graphic

2023-08-12 Thread Thangalin
SetCounter]} {#1}} % Account for the counter incrementing twice and the index being 1-based. \def\ConcurrentTextGet{% \incrementnumber[ConcurrentTextGetCounter]% \getvariable {concurrent} {text:\number\numexpr1+\rawcountervalue[ConcurrentTextGetCounter]/2\relax}} \startuseMPgraph

[NTG-context] Re: Pass string into text background graphic

2023-08-11 Thread Hans Hagen
ion here {\localcontrolled{\global\advance\ConcurrentTextGetCounter\plusone}% \getvariable {concurrent} {text:\the\ConcurrentTextGetCounter}} % We also use the helpers (so at least we can see what we do): \startuseMPgraphic{GraphicConcurrent}{text} % % {mpos:region:draw} %

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

2023-07-19 Thread Taco Hoekwater
Hi, First, find the actual point along the curve of the wave you want, then you can ask for the direction of the wave at that time, and its point: \startuseMPgraphic{Waves} numeric height,stops,yoffset; stops := 10; height := OverlayHeight/10; path wave[]; % storing waves draw (0,0

[NTG-context] enhancing MetaPost presentation progress graphics

2023-07-19 Thread Henning Hraban Ramm
to use a randomized sinus? (How?) * The boat should sit on the middle wave and be rotated by the current slope. I know I need the “time” of the upper curve and get the 1st derivation, but how? """ \setuppapersize[SW] \startuseMPgraphic{Waves} numeric height,stops,yoffset; stop

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

2023-07-05 Thread Henning Hraban Ramm
[state=repeat]. Thank you! But \setupbackgrounds[footer][text][background=Blocks,state=repeat] doesn’t work. Does this make sense if I don’t want layers in _all_ areas to repeat? \setuppapersize[SW] \startuseMPgraphic{Blocks} fill unitsquare xysized (OverlayWidth * PageNumber / LastPageNumber

[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
\useMPgraphics would be enough to re-calculate on every page? * How can I set a background to the footer area, but page width? * I tried \overlaywidth as well as OverlayWidth in the MP graphic – how do I get the page size? """ \setuppapersize[SW] \startuseMPgraphic{Blocks} fill uni

[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
; Thank you for reading. > > Best regards, > > Dalyoung > > > \startuseMPgraphic{circled} > pickup pencircle scaled 1mm ; > drawoptions(withcolor (.6+uniformdeviate.35)*white) ; > fill fullcircle xscaled 1.5cm yscaled 1cm ; > drawoptions(w

[NTG-context] Chapter title in MetaFun manual.

2023-02-10 Thread Jeong Dal via ntg-context
to be not-related with chapter title. And, I changed \def\ChapterCommand#1#2% —> \define[2]\ChapterCommand Would you please test the following code to find out what is wrong? Thank you for reading. Best regards, Dalyoung \startuseMPgraphic{circled} pickup pencircle scaled 1mm ; drawopti

Re: [NTG-context] MP figure continuation

2023-01-06 Thread Mikael Sundqvist via ntg-context
r useful. > > Thanks in advance and happy new year, > Alex Hi Alex, Maybe there are other ways, but one can use \includeMPgraphic. One simple example given below. /Mikael \starttext \startuseMPgraphic{vanderwaerdenbas} u:=3cm ; def vdwbas(expr x) = abs(x-round x) enddef ; def vdw(expr

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

2022-10-23 Thread Thomas A. Schmitz via ntg-context
Here comes another one that works with the switch --luatex but not in lmtx: \setuppapersize[A6,landscape][A6,landscape] \startuseMPgraphic{ornament} StartPage ; save diff ;numeric diff; diff = .3cm ; save w; numeric w; w = xpart (lrcorner Field[Text][Text] - llcorner Field[Text][Text]) - diff

[NTG-context] Perceptrons

2022-10-16 Thread Thangalin via ntg-context
param graph - object - The tree containing numerous nodes. -- -- @return The number of vertex pairs in the tree. function ud.count( graph ) return #graph end \stopluacode \startuseMPgraphic{HexGridBaseGraphic}{side} % Set the random seed to the current second. randomseed := lua( &quo

[NTG-context] atan2 function

2022-10-12 Thread Thangalin via ntg-context
Hi there, How is atan2 called? I rolled my own as follows: % SOT \startuseMPgraphic{HexGridBaseGraphic} vardef atantwo( expr ax, ay, bx, by ) = save theta; numeric dx; numeric dy; numeric theta; dx := bx - ax; dy := by - ay; theta := 0; if (dx >

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

2022-09-14 Thread Jeong Dal via ntg-context
without error! I don't know what is happened, but it is a good news. Here is a sample file which I simplified one that is given by one of the experts. Someone may modify it better. Thanks to ConTeXt team. Best regards, Dalyoung \startuseMPgraphic{squareBox} draw topboundary OverlayBox

Re: [NTG-context] Issue with setupMPvariables

2022-09-03 Thread Alexandre Christe via ntg-context
e MP code for several custom enumeration. > > > > However I can't make the overall setup work, needless to say different > > border colors for each enumeration though setupMPvariables. What am I > > missing?\startuseMPgraphic{mp:textFrame} > begingroup; >

Re: [NTG-context] Issue with setupMPvariables

2022-09-03 Thread Hans Hagen via ntg-context
?\startuseMPgraphic{mp:textFrame} begingroup; path p ; for i = 1 upto nofmultipars : p := (ulcorner multipars[i]) -- (llcorner multipars[i]) -- (llcorner multipars[i] xshifted .25cm) -- (ulcorner multipars[i] xshifted .25cm) -- cycle ; fill p withcolor boxfillcolor

[NTG-context] Question about text backgrounds

2022-09-03 Thread Alexandre Christe via ntg-context
Hi, I just came across nofmultipars (which is great for splitting frames across pages, unlike a simple framed). Is there an equivalent for floats? The MWE would contain \startuseMPgraphic{mp:textFrame} begingroup; path p ; for i = 1 upto nofmultipars : p := (ulcorner multipars[i]) -- (llcorner

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

2022-08-19 Thread Hans Hagen via ntg-context
On 8/19/2022 3:03 AM, Jeong Dal wrote: Dear all, A few days ago, I sent an email as follows. But it is linked to another subject because I choose reply of another subject. So, I send the same mail again. \startuseMPgraphic{outlineT} draw lmt_outline [ text = \MPvar{tt

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

2022-08-18 Thread Jeong Dal via ntg-context
than the textwidth. It is OK when I use just bigger fonts. But it writes the long title in one line if I use outlined font for title as in MWE. Is there a way to write it in two lines using the outlined font? Thanks, Best regards, Dalyoung \startuseMPgraphic{outlineT} draw outlinetext.b

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

2022-08-15 Thread Jeong Dal via ntg-context
? Thanks, Best regards, Dalyoung \startuseMPgraphic{outlineT} draw outlinetext.b (\MPvar{tt}) (withcolor .75white) (withcolor .725blue withpen pencircle scaled .75pt);%\MPvar{thick}); \stopuseMPgraphic \definefont[BigFontOne][NotoSansCJKkr-Bold sa 4] \define[1]\outlineTitle

Re: [NTG-context] MP scratch counter

2022-07-13 Thread Hans Hagen via ntg-context
On 7/13/2022 8:14 PM, Henning Hraban Ramm via ntg-context wrote: Hi y’all, this is a scratch counter from the simpleslides module. It doesn’t work any more (always shows max-1), and I guess it used to. What’s wrong? Hraban """ \startuseMPgraphic{MP:ornament} StartPage ; sav

[NTG-context] MP scratch counter

2022-07-13 Thread Henning Hraban Ramm via ntg-context
Hi y’all, this is a scratch counter from the simpleslides module. It doesn’t work any more (always shows max-1), and I guess it used to. What’s wrong? Hraban """ \startuseMPgraphic{MP:ornament} StartPage ; save a,b ; numeric a,b ; a = 7mm ; b = PaperWidth/2 - NOfPages * 2.

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
lax or \dimexpr\measured{base}+2bp\relax should work. > 2. I have an mp graphic defined in the file "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? (Again, untested) \startuseMPgraphic

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

2022-05-28 Thread Garulfo via ntg-context
\startuseMPgraphic{mytest1} % column on the left of the pull quote lmt_parshape [path = pleft ] ; fill pleft withcolor \MPcolor{transparentred} ; \stopuseMPgraphic \startuseMPgraphic{mytest2} % column on the right of the pull quote lmt_parshape [path = pright] ; fill pright withcolor \MPcolor

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

2022-05-21 Thread Garulfo via ntg-context
} \def\mypen{1pt} \def\PQhalfwith{20mm} % \startuseMPgraphic{mytest0} % for basic straight column begingroup ; save p ; path p ; p := (0,0) -- (0.3*TextWidth,0cm) -- (0.3*TextWidth,TextHeight

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

2022-04-07 Thread Thangalin via ntg-context
Works flawlessly, thank you! Here's a demo with left and right speech bubbles: \definefont [TextFontEmoji] [OpenSansEmoji] \startuseMPgraphic{TextBubble}{side} z1 = (0, 0) ; z2 = (OverlayWidth, 0) ; z3 = (OverlayWidth, OverlayHeight) ; z4 = (0, OverlayHeight) ; offset := 1 ; tail

Re: [NTG-context] Chapter number retrieval

2022-03-22 Thread Willi Egger via ntg-context
– > > \define[2]\ChapterTitle{#2} > \setuphead[chapter][command=\ChapterTitle] > > It will still appeared as numbered in any lists (ToC, etc). Also, it can be > accessed using \headnumber[...][...]. An example graphic – > > \startuseMPgraphic {graphic:chapter} >

Re: [NTG-context] Chapter number retrieval

2022-03-21 Thread śrīrāma via ntg-context
ad[chapter][command=\ChapterTitle] It will still appeared as numbered in any lists (ToC, etc). Also, it can be accessed using \headnumber[...][...]. An example graphic – \startuseMPgraphic {graphic:chapter} picture cg; cg := outlinetext.d ("\ssbfd \headnumber[chapter]"

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

2022-03-20 Thread Wolfgang Schuster via ntg-context
[textcolor] [white] \startuseMPgraphic{chapter-thumb} path chap_frame ; pair pos,a,b ; picture Chap ; if \somenamedheadnumber{chapter}{current} > 0 : curr_chap := \somenamedheadnumber{chapter}{current} ; else : curr_chap := 1 ;

[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] SimpleSlides and Visual counters

2022-01-16 Thread Otared Kavian via ntg-context
, in case someone else encounters the issue, I add the example below. Many thanks for help ! Best regards: Otared % begin interactive-visual-counter.tex %% to use with the simpleslides module \setupinteraction[state=start] \usemodule[simpleslides] [style=swoosh] \startuseMPgraphic

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

2022-01-14 Thread Gavin via ntg-context
[each] [A,columns] [left=(, right=), width=1.7em, stopper=,] \define\choice{\item} \def\mycolor{.625red} \startuseMPgraphic{name} fill fullcircle scaled 40pt withcolor \mycolor; \stopuseMPgraphic \define[1]\mycolordot{\def\mycolor{#1}\framed[location=top,offset=0pt,boffset=-\strutdepth,frame=off

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

2022-01-14 Thread Gavin via ntg-context
if this is related to the itemize column spacing in my previous comment. Thanks, again! Gavin \starttext \defineitemgroup[choices] \setupchoices [each] [A,joinedup] [left=(, right=), width=1.7em, stopper=,] \define\choice{\item} \def\mycolor{.625red} \startuseMPgraphic{name} fill fullcircle scaled 40pt

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

2022-01-02 Thread Alfredo Catalina via ntg-context
> below the other. It worked in the past. Each sprite should be 4 x 0.095 > > cm = 0,38 cm wide and 5 x 0.095 cm = 0.475 cm high: > > > > \starttext > > \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,8pt]}] > > \startuseMPgraphic{mapa} &

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

2022-01-02 Thread Hans Hagen via ntg-context
: \starttext \setupMPinstance[metafun][textstyle={\switchtobodyfont[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)

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
On 12/31/2021 3:13 AM, kauśika via ntg-context wrote: Dear list, I have the following graphic \startuseMPgraphic{TitleGraphic} draw outlinetext.b (\MPstring{TitleText}) (withcolor "titlefg") (withcolor "titleoutline"); \stopuseMPgraphic which I tried to use a

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

2021-12-30 Thread kauśika via ntg-context
On Friday, December 31, 2021 7:43:21 AM IST kauśika wrote: > Dear list, > > I have the following graphic > > \startuseMPgraphic{TitleGraphic} > draw outlinetext.b (\MPstring{TitleText}) > (withcolor "titlefg") > (withcolor "titleoutline"); &

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

2021-12-30 Thread kauśika via ntg-context
Dear list, I have the following graphic \startuseMPgraphic{TitleGraphic} draw outlinetext.b (\MPstring{TitleText}) (withcolor "titlefg") (withcolor "titleoutline"); \stopuseMPgraphic which I tried to use as follows to produce a stylized 'title' head: \s

[NTG-context] upload

2021-12-30 Thread Hans Hagen via ntg-context
context \frules with leaders as in: test \leaders \frule height 6mm depth 3mm radius 1mm\hfill test \startuseMPgraphic{demoleader} fill unitcircle xysized (RuleWidth,RuleHeight+RuleDepth) withcolor RuleColor ; \stopuseMPgraphic test {\red \leaders \frule height 6mm depth 3mm

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

2021-12-16 Thread Jeong Dal via ntg-context
and terminal too. I am using Mac OSX, ConTeXt ver: 2021.12.03 15:20 LMTX fmt: 2021.12.9 int: english/english Thank you for reading. Best regards, Dalyoung %%% \startuseMPgraphic{verticalrule0} if CurrentColumn < NOfColumns : draw rightboundary OverlayBox shifted (4mm,0); setbou

[NTG-context] using the newcolumnsets module

2021-12-09 Thread Jeong Dal via ntg-context
message “return code 11”. It loads “m-newcolumnset.tex” without problem. What is the cause of this error? Thank you for reading. Best regards, Dalyoung \startuseMPgraphic{verticalrule0} if CurrentColumn < NOfColumns : draw rightboundary OverlayBox shifted (4mm,0); setbou

Re: [NTG-context] double underbars

2021-11-30 Thread Hans Hagen via ntg-context
copy the whole \startuseMPgraphic and rename it for editing (to let’s say rules:under:bardots), then do \definebar[underbardot][undergraphic][mp=rules:under:bardots] and play with the mp until you are happy with the output. But the problem is that you have to create an “underbardot

Re: [NTG-context] double underbars

2021-11-30 Thread Denis Maier via ntg-context
t; (l. 327) Any hints how I could get this started? > > Yes, that is the right part to get started with. You could just copy the whole > \startuseMPgraphic and rename it for editing (to let’s say > rules:under:bardots), then do > > \definebar[underbardot][undergraphic][mp=ru

Re: [NTG-context] double underbars

2021-11-30 Thread Taco Hoekwater via ntg-context
metafun yet. > > If my understanding of https://source.contextgarden.net/node-rul.mkiv is > correct, it should be possible to build upon the defintion of > rules:under:dots (l. 327) Any hints how I could get this started? Yes, that is the right part to get started with. You could jus

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Floris van Manen via ntg-context
the space before. But I might be wrong here (most likely ;-) .F On 05/10/2021 23:32, Thomas A. Schmitz via ntg-context wrote: \startuseMPgraphic{empedocless} path p, q, r ; pair a ; p := fullcircle scaled 10cm ; drawarrow p  withpen pencircle scaled 1mm withcolor red ; draw 

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Thomas A. Schmitz via ntg-context
Thank you so much, Hans, that's a neat solution! I was banging my head against the wall, but this makes sense. On 10/5/21 6:38 PM, Hans Hagen wrote: Because you know how to rotate and scale: \startuseMPgraphic{empedocless} path p, q, r ; pair a ; p := fullcircle scaled 10cm ; drawarrow p

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Hans Hagen via ntg-context
On 10/5/2021 4:58 PM, Thomas A. Schmitz via ntg-context wrote: Hi all, I hope the following example is not too convoluted: \useMPlibrary [txt] \define\EmpArrow{\getscaledglyph{1.6}{name:dejavumath}{\char"2B05}} \setupbodyfont [ss,9pt] \starttext \startuseMPgraphic{empedocles} %nu

[NTG-context] metafun: circular arc

2021-10-05 Thread Thomas A. Schmitz via ntg-context
Hi all, I hope the following example is not too convoluted: \useMPlibrary [txt] \define\EmpArrow{\getscaledglyph{1.6}{name:dejavumath}{\char"2B05}} \setupbodyfont [ss,9pt] \starttext \startuseMPgraphic{empedocles} %numeric a ; a = 6.56cm ; %numeric b ; b = 1.1 ; save S; path S[]

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

2021-09-05 Thread Garulfo via ntg-context
and llft) textext.dlft | KO | OK | as Default + LeFT (like ulft and llft) For backward compatibility, would it be possible to add textext.dflt to LMTX as a synonym of textext.dlft ? % \startuseMPgraphic{MonGraphique} StartPage ; picture Pict ; % Pict

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

2021-08-02 Thread Jeong Dal via ntg-context
Text with title %%% \startuseMPgraphic{redFrame} picture p ; numeric o ; path a, b ; pair c ; p := textext.rt(\MPstring{FrameText}) ; o := BodyFontSize ; a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; p := p shifted (2o,OverlayHeight-ypart center p) ; drawoptions (withpen pencircle scaled 1pt with

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
\setupbodyfont[newcomputermodern-book,11pt] \defineframed    [ACFRAME]    [frame=off,     width=fit,     align=flushleft,     location=low,     background=color,     backgroundcolor=lightgray,     foregroundcolor=,     foregroundstyle=] \startuseMPgraphic{acframe} fill OverlayBox

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] weekend upload - stacking and animation

2021-07-13 Thread Hans Hagen
On 7/13/2021 4:11 PM, Floris van Manen wrote: On 13/07/2021 15:14, Hans Hagen wrote: How about: \startuseMPgraphic{demo} for i=1 upto 10: draw fullcircle scaled (i*cm/3) withcolor (i*red/10) withpen   pencircle scaled (bp/2) withstacking i

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

2021-07-13 Thread Wolfgang Schuster
Jeong Dal schrieb am 13.07.2021 um 12:25: Dear Hans, Aditya, Now, I understand the stacking method. I made a simple animation using it. \startuseMPgraphic{demo} for i=1 upto 10: draw fullcircle scaled (.3*i*cm) withcolor (.1*i*red) withpen pencircle scaled (.5*bp) withstacking i; endfor

Re: [NTG-context] weekend upload

2021-07-13 Thread Jeong Dal
Dear Aditya, > You cannot use [offset=2mm] here. Just use \startuseMPgraphic{boxes}. > After remove [offset=smm], it is working well. Thank you for the solution. Best regards, Dalyoung ___ If your qu

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

2021-07-13 Thread Jeong Dal
Dear Hans, Aditya, Now, I understand the stacking method. I made a simple animation using it. \startuseMPgraphic{demo} for i=1 upto 10: draw fullcircle scaled (.3*i*cm) withcolor (.1*i*red) withpen pencircle scaled (.5*bp) withstacking i; endfor; \stopuseMPgraphic \setupinteraction

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

2021-07-13 Thread Floris van Manen
On 13/07/2021 15:14, Hans Hagen wrote: How about: \startuseMPgraphic{demo}     for i=1 upto 10:     draw fullcircle scaled (i*cm/3)     withcolor (i*red/10)     withpen   pencircle scaled (bp/2)     withstacking i     ;     endfor ; \stopuseMPgraphic

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

2021-07-13 Thread Hans Hagen
On 7/13/2021 12:25 PM, Jeong Dal wrote: Dear Hans, Aditya, Now, I understand the stacking method. I made a simple animation using it. \startuseMPgraphic{demo} for i=1 upto 10: draw fullcircle scaled (.3*i*cm) withcolor (.1*i*red) withpen pencircle scaled (.5*bp) withstacking i; endfor

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

  1   2   3   4   5   6   7   8   9   10   >