[NTG-context] Re: Customizing chapter and page no. styles

2024-08-02 Thread Duncan Hothersall
chapter titles: \startuniqueMPgraphic{titled} path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; pickup pencircle scaled 1mm ; drawoptions(withcolor .625yellow) ; draw llcorner p -- lrcorner p ; setbounds currentpicture to p ; \stopuniqueMPgraphic \defineoverlay

[NTG-context] Re: Pocket Diary Photo Calendar: how to specify on which day the week begins?

2024-06-15 Thread Michael Guravage
r ip[]; w = OverlayWidth; h = OverlayHeight; p[1] := fullcircle scaled h; p[2] := p[1] shifted (0.2 w,0); ip[1] := p[1] intersectionpoint p[2]; ip[2] := reverse p[1] intersectionpoint p[2]; p[3] := p[1] cutbefore ip[1] cutafter ip[2]; p[4] := p[2] cutbefore ip[1] cutafter

[NTG-context] Re: Number in a circle

2024-05-27 Thread Wolfgang Schuster
Kip Warner schrieb am 27.05.2024 um 19:23: On Mon, 2024-05-27 at 05:43 -0400, seyal zavira wrote: if you don't want to use metapost you can also use svg for background for example: \startuniqueMPgraphic{centered_svg}   draw lmt_svg [     filename = "badge.svg",     width

[NTG-context] Re: Number in a circle

2024-05-27 Thread Kip Warner
On Mon, 2024-05-27 at 05:43 -0400, seyal zavira wrote: > if you don't want to use metapost you can also use svg for background > for example: > > \startuniqueMPgraphic{centered_svg} >   draw lmt_svg [ >     filename = "badge.svg", >     width  = OverlayW

[NTG-context] Re: Number in a circle

2024-05-27 Thread seyal zavira
if you don't want to use metapost you can also use svg for background for example: \startuniqueMPgraphic{centered_svg} draw lmt_svg [ filename = "badge.svg", width = OverlayWidth, y = OverlayHeight/2, ] ; \stopuniqueMPgraphic \defineoverlay [svgback]

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

2023-08-22 Thread Fabrice Couvreur
Hi Alexander, Thank you for this suggestion which will do the trick. Fabrice Le mar. 22 août 2023 à 10:26, Alexandre Christe a écrit : > Hi Fabrice, > > I have this from former exchanges > > % Cancel command for use in equations. > \startuniqueMPgraphic{cross out} > pi

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

2023-08-22 Thread Alexandre Christe
Hi Fabrice, I have this from former exchanges % Cancel command for use in equations. \startuniqueMPgraphic{cross out}  picture cross;  cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0););  draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle scaled .8pt

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

2023-02-10 Thread Jeong Dal via ntg-context
{\color[darkred]{#1}}} > > \setuppagenumbering[location=] > \setupheadertexts[margin][][\hbox to \hsize{\hss\Circled\pagenumber\hss}] > > \startuniqueMPgraphic{titled} > path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; > pickup pencircle sca

[NTG-context] Chapter title in MetaFun manual.

2023-02-10 Thread Jeong Dal via ntg-context
led% {\framed [background=circled,frame=off,offset=overlay] {\color[darkred]{#1}}} \setuppagenumbering[location=] \setupheadertexts[margin][][\hbox to \hsize{\hss\Circled\pagenumber\hss}] \startuniqueMPgraphic{titled} path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayhei

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

2022-12-12 Thread Ursula Hermann via ntg-context
use the MetaFun features of ConTeXt to cross out stuff. % Cancel command for use in equations. \startuniqueMPgraphic{cross out} picture cross; cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0);); draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle scaled .8pt

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

2022-12-12 Thread Gavin via ntg-context
Hi Uschi, I use the MetaFun features of ConTeXt to cross out stuff. % Cancel command for use in equations. \startuniqueMPgraphic{cross out} picture cross; cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0);); draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle

Re: [NTG-context] startTEXpage on A4

2022-10-10 Thread Willi Egger via ntg-context
{Cutpointstight}] \startuniqueMPgraphic{Cutpointstight} path p; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight; draw ulcorner p; draw urcorner p; draw llcorner p; draw lrcorner p

Re: [NTG-context] no greyscales in MetaFun any more?

2022-07-21 Thread Alan via ntg-context
l.lft(100-s, (0, (s-2.5)*mm)); > > endfor; > > \stopMPpage > > > > This used to work with previous LMTX versions. > fixed in next upload Is this related? (regression: uniqueMPgraphic drops color) \startuniqueMPgraphic{red} draw textext("red?") withcolor red ; \st

Re: [NTG-context] Bloody PDF boxes and cr*p marks!

2021-10-19 Thread Henning Hraban Ramm via ntg-context
idths) .. and > some still use acrobat 4 -) Yep, last weekend I finally sent the latest issue of our magazine to the printshop, of course with correctly set boxes (and markings activated), and since the content didn’t need bleed this time, I set the CropBox to TrimBox. Everything in per

Re: [NTG-context] positioning of metapost figure

2021-09-12 Thread Sylvain Hubert via ntg-context
Thanks Hans! On Sun, 12 Sept 2021 at 19:02, Hans Hagen wrote: > 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. > >

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

Re: [NTG-context] Lua code and table

2021-02-19 Thread Hans Hagen
context.stopxcell() end context.stopxrow() end context.stopxtable() end \stopluacode \startuniqueMPgraphic{cross}{width,height,depth,color,line} draw image ( draw (\MPvar{depth},\MPvar{height}) -- (\MPvar{width},0) ; draw (\MPvar{depth}

Re: [NTG-context] Lua code and table

2021-02-18 Thread Fabrice Couvreur
onvertnumber(conversion,i) > context.stopxcell() > end > context.stopxrow() > for i=1,n do > context.startxrow() > context.startxcell() > context.convertnumber(con

Re: [NTG-context] Lua code and table

2021-02-18 Thread Hans Hagen
opxcell() for j=1,n do context.startxcell { align = "middle" } action(string.sub(pattern[i],j,j)) context.stopxcell() end context.stopxrow() end context.stop

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
On Tue, 16 Jun 2020 14:37:17 +0200 Marco Patzer wrote: > On Tue, 16 Jun 2020 14:17:09 +0200 > Willi Egger wrote: > > > I try to use a Metapost drawing as a background to a framed text. — > > I can not make it working though… > > > > \startuniqueMPgraphic{Marki

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

2020-06-16 Thread Marco Patzer
On Tue, 16 Jun 2020 14:17:09 +0200 Willi Egger wrote: > I try to use a Metapost drawing as a background to a framed text. — I > can not make it working though… > > \startuniqueMPgraphic{Markings} > %{Markings:\overlaywidth:\overlayheight} fill OverlayBox enlarged 5mm &

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

2020-06-16 Thread Willi Egger
Hello listmembers, I try to use a Metapost drawing as a background to a framed text. — I can not make it working though… \startuniqueMPgraphic{Markings} %{Markings:\overlaywidth:\overlayheight} fill OverlayBox enlarged 5mm withcolor blue; \stopuniqueMPgraphic \defineoverlay[Marks

Re: [NTG-context] Placing number in \sqrt

2020-05-04 Thread Aditya Mahajan
t customized square root signed which was asked on TeX.SE a few years ago: https://tex.stackexchange.com/a/406680/323 I tried the code from the link above, but: - I had change some macro names: \mpvar -> \MPvar, \startuniquempgraphic -> \startuniqueMPgraphic and some others, - there

Re: [NTG-context] Placing number in \sqrt

2020-05-04 Thread context
which was asked on TeX.SE a few years ago: https://tex.stackexchange.com/a/406680/323 I tried the code from the link above, but: - I had change some macro names: \mpvar -> \MPvar, \startuniquempgraphic -> \startuniqueMPgraphic and some others, - there is still an error I'm not able to fix (see att

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

2020-04-19 Thread Keith McKay
backgrounds you can use a overlay and don't have to create a layer for it. 2. Use unitsquare for your bars which has the origin in the lower left corner because fullsquare has the origin in the center (look at page 383 in the metafun manual). \setuppapersize [A4,landscape] \startuniqueMPgr

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

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

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

2020-04-19 Thread Keith McKay
eight=\paperheight] % let the layer cover the full paper \startuniqueMPgraphic{blueShade} draw lmt_shade [ path = fullsquare xyscaled(PaperWidth,PaperHeight), direction = "up", alternative = "linear", colors = { "red", "blue" }, ]; \stopuniqueMPgraphi

[NTG-context] Hatch color in a table cell

2020-03-12 Thread Fabrice Couvreur
Hi, I would like to hatch the cell green. Thank you. Fabrice \usecolors[xwi] \startuniqueMPgraphic{meta:hash}{linewidth,linecolor,angle,gap} if unknown context_back : input mp-back ; fi ; some_hash ( OverlayWidth, OverlayHeight , \MPvar{linewidth}, \MPvar{linecolor} , \MPvar{angle}, \MPvar{gap

[NTG-context] maths simplifying fractions

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

[NTG-context] colors in MetaPost

2019-09-11 Thread Henning Hraban Ramm
Hi, I’m trying to get a linear shade in the background of my presentation. But it seems like MetaPost can’t handle my self-defined colors: \definecolor[VerlaufVon][c=75,m=5,y=95,k=60] \definecolor[VerlaufNach][c=88,m=95,y=5,k=60] \startuniqueMPgraphic{Verlauf} % old method, also doesn’t work

Re: [NTG-context] radiobuttons

2019-08-15 Thread Hans Hagen
ight) Hans --- test file --- \setupinteraction [state=start] \definesymbol[yes][1] \definesymbol[nop][0] \setupfield[whatever][width=20mm,height=20mm,frame=off] \definefield[what][radio][whatever][whatone,whattwo][whatone] \definesubfield[whatone][][yes,nop] \definesubfield[whattwo][][yes,nop

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

2019-07-28 Thread Denis Maier
> >> \setuppagenumbering [ >> alternative=, >> location=, >> ] >> >> \setupfootertexts >> [Laubblatt 2019/1] [{\externalfigure[cow][height=15mm]}] >> >> \setupfooter >> [style=\ss] >> >> \setuptolerance >> [verytolerant,str

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

2019-07-24 Thread Denis Maier
\externalfigure[cow][height=15mm]}] > > \setupfooter > [style=\ss] > > \setuptolerance > [verytolerant,stretch] > > \definecolor[color-1][.5(red,green)] > \definecolor[color-2][.5(green,blue)] > \definecolor[color-3][.5(blue,red)] > \definecolor[color-4][.5

[NTG-context] (no subject)

2019-07-23 Thread Denis Maier
rance [verytolerant,stretch] \definecolor[color-1][.5(red,green)] \definecolor[color-2][.5(green,blue)] \definecolor[color-3][.5(blue,red)] \definecolor[color-4][.5(white,black)] \definecolor[color-5][.5(white,color-4)] \startuniqueMPgraphic{frame} fill OverlayBox withcolor \MPcolor{co

[NTG-context] Macro to write a vector with Metafun (again)

2018-12-04 Thread Fabrice Couvreur
= math_stacker_arrow_shape enddef ; vardef math_stacker_rightarrow_shape = math_stacker_arrow_shape rotated 180 enddef ; \stopMPextensions \startuniqueMPgraphic{math:stacker:\number"2190} math_stacker_draw(math_stacker_leftarrow_shape) ; \stopuniqueMPgr

[NTG-context] index problem with \setupcolumnset

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

Re: [NTG-context] drop shadow

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

Re: [NTG-context] Circled text in metapost

2018-03-29 Thread Hans Hagen
? The Metafun experts would probably tear this apart... \startuniqueMPgraphic{half circle} path p, q ; p := fullcircle scaled OverlayWidth; q := (p cutafter (point .5 along p)) shifted (0,-.5BodyFontSize) ; fill q -- cycle withcolor lightgray ; draw q withpen pencircle scaled 2pt

Re: [NTG-context] Circled text in metapost

2018-03-29 Thread Henri Menke
Metafun experts would probably tear this apart... \startuniqueMPgraphic{half circle} path p, q ; p := fullcircle scaled OverlayWidth; q := (p cutafter (point .5 along p)) shifted (0,-.5BodyFontSize) ; fill q -- cycle withcolor lightgray ; draw q withpen pencircle scaled 2pt withcolor

Re: [NTG-context] Fwd: Macro to write a vector (Metafun) is broken

2018-03-22 Thread Fabrice Couvreur
to draw the arrows of the vectors does not seem to >> work anymore. >> Thank you >> Fabrice >> > > Did you check ou tthe latest meta-imp file? Alan and I added more and also > changed the interface a little which might have consequences. > > \useMPlibrary[mat] >&

Re: [NTG-context] Fwd: Macro to write a vector (Metafun) is broken

2018-03-22 Thread Hans Hagen
) ; ) enddef ; vardef math_stacker_leftarrow_shape = math_stacker_arrow_shape enddef ; vardef math_stacker_rightarrow_shape = math_stacker_arrow_shape rotated 180 enddef ; \stopMPextensions \startuniqueMPgraphic{math:stacker:\number"2190} math_stacker

[NTG-context] Macro to write a vector (Metafun) is broken

2018-03-20 Thread Fabrice Couvreur
= math_stacker_arrow_shape enddef ; vardef math_stacker_rightarrow_shape = math_stacker_arrow_shape rotated 180 enddef ; \stopMPextensions \startuniqueMPgraphic{math:stacker:\number"2190} math_stacker_draw(math_stacker_leftarrow_shape) ; \stopuniqueMPgr

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

2017-08-16 Thread Fabrice Couvreur
r/ > tree/beta/doc/context/sources/general/fonts > > > I did this : > > > > \startuniqueMPgraphic{titled} > > path p ; > > p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; > > pickup pencircle scaled 1mm ; > > linecap := squared

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

2017-08-15 Thread Henri
imals.  It can be found in     tex/texmf-context/doc/context/sources/general/fonts/ or online on GitHub      https://github.com/contextgarden/context-mirror/tree/beta/doc/context/sources/general/fonts > I did this :  > > \startuniqueMPgraphic{titled} >   path p ; >   p := unitsqua

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

2017-08-15 Thread Henri
imals.  It can be found in     tex/texmf-context/doc/context/sources/general/fonts/ or online on GitHub      https://github.com/contextgarden/context-mirror/tree/beta/doc/context/sources/general/fonts > I did this :  > > \startuniqueMPgraphic{titled} >   path p ; >   p := unitsqua

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

2017-08-15 Thread Fabrice Couvreur
Hi Hans, I love the style used for this manual. I tried to do the same thing, but it's a long way off ! I tried to find the source code to inspire me :-) I did this : \startuniqueMPgraphic{titled} path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; pickup penc

Re: [NTG-context] Package esvect and Context

2017-05-27 Thread Fabrice Couvreur
ottomenlarged (OverlayOffset/2) topenlarged (OverlayOffset/2) ; >> ) >> enddef ; >> vardef math_stacker_leftarrow_shape = >> math_stacker_arrow_shape >> enddef ; >> vardef math_stacker_rightarrow_shape = >> mat

Re: [NTG-context] Package esvect and Context

2017-05-26 Thread Hans Hagen
enddef ; \stopMPextensions \startuniqueMPgraphic{math:stacker:\number"2190} math_stacker_draw(math_stacker_leftarrow_shape) ; \stopuniqueMPgraphic \startuniqueMPgraphic{math:stacker:\number"2192} math_stacker_draw(math_stacker_rightarrow_shape) ; \stopuniqueMPgraphic

[NTG-context] Package esvect and Context

2017-05-26 Thread Fabrice Couvreur
) ; ) enddef ; vardef math_stacker_leftarrow_shape = math_stacker_arrow_shape enddef ; vardef math_stacker_rightarrow_shape = math_stacker_arrow_shape rotated 180 enddef ; \stopMPextensions \startuniqueMPgraphic{math:stacker:\number"2190} math_stacker

Re: [NTG-context] Customize a table with Metafun

2017-02-15 Thread Fabrice Couvreur
yond the edges of the >> cell. >> Thank you >> Fabrice >> >> \startuniqueMPgraphic{Vertical} >> >> linecap:=squared ; >> path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; >> drawoptions (withpen pencircle withcolor \MPco

Re: [NTG-context] Customize a table with Metafun

2017-02-14 Thread Lutz Haseloff
linecap:=butt ; Am 14. Februar 2017 16:53:04 MEZ schrieb Fabrice Couvreur : >Hello, >In the code below, the red vertical line extends beyond the edges of >the >cell. >Thank you >Fabrice > >\startuniqueMPgraphic{Vertical} > > linecap:=squared ; > path p ; p :=

[NTG-context] Customize a table with Metafun

2017-02-14 Thread Fabrice Couvreur
Hello, In the code below, the red vertical line extends beyond the edges of the cell. Thank you Fabrice \startuniqueMPgraphic{Vertical} linecap:=squared ; path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; drawoptions (withpen pencircle withcolor \MPcolor{red}) ; draw .5

Re: [NTG-context] Title without the parentheses

2017-01-31 Thread Fabrice Couvreur
r command as in the exmaple below. > Best regards: Otared K. > > %% begin > \startuniqueMPgraphic{MyShape} > path p ; > p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; > pickup pencircle scaled \overlaylinewidth ; > fill p withcolor \MPcolor{\overlay

Re: [NTG-context] Title without the parentheses

2017-01-30 Thread Otared Kavian
Hi Fabrice, In order to have the box aligned with the text, it is enough to use the \lower command as in the exmaple below. Best regards: Otared K. %% begin \startuniqueMPgraphic{MyShape} path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; pickup

Re: [NTG-context] Title without the parentheses

2017-01-30 Thread Otared Kavian
Hi Fabrice, Below you have an example which may help you to achieve what you want, but in the example I am sending there is an issue with the alignment of the title. I could not solve the issue, sorry… Best regards: Otared K. %% begin example boxed-title.tex \startuniqueMPgraphic{MyShape

Re: [NTG-context] Package esvect and Context

2016-06-07 Thread Fabrice Couvreur
arrow_shape = > image ( > drawarrow > (OverlayWidth,OverlayOffset) -- (0,OverlayOffset) > withcolor > OverlayLineColor ; > setbounds currentpicture to boundingbox currentpicture > b

Re: [NTG-context] Package esvect and Context

2016-06-06 Thread Hans Hagen
) ; ) enddef ; vardef math_stacker_leftarrow_shape = math_stacker_arrow_shape enddef ; vardef math_stacker_rightarrow_shape = math_stacker_arrow_shape rotated 180 enddef ; \stopMPextensions \startuniqueMPgraphic{math:stacker:\number"2190} math_stacker

Re: [NTG-context] Is there “toffset” option for \setupbackgrounds in context

2016-02-26 Thread Wolfgang Schuster
ed options but you can do a lot when you use Metapost to draw the background. \startuniqueMPgraphic{TextBackground} path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ; draw p topenlarged 5mm ; setbounds currentpicture to OverlayBox ; \stopuniqueMPgraphic \define

[NTG-context] Strange behavior (TikZ)

2015-08-11 Thread Fabrice Couvreur
Hi, Strange behavior: why is the colored text ? Thanks, Fabrice \usemodule[tikz] \startuniqueMPgraphic{titled} path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ; pickup pencircle scaled 1mm ; drawoptions(withcolor .625yellow) ; draw llcorner p--lrcorner p ; setbounds

Re: [NTG-context] Command that does not give the expected result (Metafun)

2015-08-10 Thread Fabrice Couvreur
>> understand the definition and operation, which is not always easy with >> TeX commands. >> Also, in the following code, this does not give the expected result. >> Thank you. >> Fabrice >> >> \showframe >> >> \setupcolors >>[state=start

Re: [NTG-context] Command that does not give the expected result (Metafun)

2015-08-09 Thread Hans Hagen
\showframe \setupcolors [state=start] \setuppagenumbering[location=,alternative] \startuniqueMPgraphic{titled} path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ; pickup pencircle scaled 1mm ; drawoptions(withcolor .625yellow) ; draw llcorner p--lrcorner p ; setbounds

[NTG-context] Command that does not give the expected result (Metafun)

2015-08-09 Thread Fabrice Couvreur
] \setuppagenumbering[location=,alternative] \startuniqueMPgraphic{titled} path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ; pickup pencircle scaled 1mm ; drawoptions(withcolor .625yellow) ; draw llcorner p--lrcorner p ; setbounds currentpicture to p ; \stopuniqueMPgraphic

[NTG-context] Calculating a value in metapost, and using it in ConTeXt

2015-05-26 Thread Kate F
Hello, Is it possible to calculate the position of something in Metapost, and to export that value to TeX such that I can use it in setups and things? I thought perhaps I could \def inside btex..etex. Here's a minimal example trying to illustrate the idea: \startuniqueMPgraphic{canon}

[NTG-context] Update text variables inside metapost

2015-03-07 Thread DesdeChaves
\def\Bolha[#1]#2#3#4% {\setupMPvariables[bolha][#1]% \setMPtext{labelcima}{#3}% \setMPtext{labelesquerda}{#2}% \setMPtext{labeldireita}{#4}% \useMPgraphic{bolha}} \startuniqueMPgraphic{bolha} path p, q, cima, esquerda, direita, vertical; pair A, B, C; p:=fullcircle scaled \MPvar{size}; A

Re: [NTG-context] Define a new command from the command \periods[n]

2015-01-19 Thread Hans Hagen
=lightgray] \definecolor[Border][c=0.00, m=0.00, y=0.00, k=0.25] \startuniqueMPgraphic{borderline} path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled 1.2pt ; \stopuniqueMPgraphic \defineoverlay[borderline

Re: [NTG-context] Define a new command from the command \periods[n]

2015-01-18 Thread Fabrice
=0.00, y=0.00, k=0.25] \startuniqueMPgraphic{borderline} path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled 1.2pt ; \stopuniqueMPgraphic \defineoverlay[borderline][\uniqueMPgraphic{borderline

Re: [NTG-context] Center two frames

2015-01-14 Thread Pablo Rodriguez
foregroundstyle={\switchtobodyfont[10pt]}, align={high,flushleft}, frame=off, framecolor=0.625white, background=borderline, ] \definefiller[dots][left=\dontleavehmode,right=\hskip\zeropoint\par] \starttext \startuniqueMPgraphic{borderline} path p ; p := unitsquare xscaled \ov

[NTG-context] Center two frames

2015-01-13 Thread Fabrice Couvreur
,right} offset=1ex, frame=off, ] \setupTABLE[column][first][width=0.25\textwidth] \setupTABLE[column][2][width=0.35\textwidth] \stopsetups \starttext \startuniqueMPgraphic{borderline} path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight

Re: [NTG-context] Define a new type section with metafun

2014-12-28 Thread Fabrice
] \setuphead [subsection] [sectionstopper={}, sectionsegments=subsection:subsection, conversion=number,] \setupcolors[state=start,cmyk=yes,mpcmyk=yes] \definecolor[mycolor][c=0.45,m=0.00,y=0.1,k=0.00] \definecolor[colortext][c=1,m=0.00,y=0.3,k=0.3] \starttext \startuniqueMPgraphic

Re: [NTG-context] Define a new type section with metafun

2014-12-27 Thread Hans Hagen
] \starttext \startuniqueMPgraphic{funny} path p ; numeric h ; h := OverlayHeight ; p:=unitsquare xscaled \overlaywidth yscaled \overlayheight superellipsed 0.9 ; pickup pencircle scaled \overlaylinewidth ; fill p withcolor \MPcolor{\overlaycolor} ; draw (20,1)--(20,h-1) withcolor red ; draw p withcolor

[NTG-context] Define a new type section with metafun

2014-12-27 Thread Akira Kakuto
Dear Fabrice, A try and error method which you may not want: % macros=mkvi \setuppapersize[A4][A4] \setupcolors[state=start,cmyk=yes,mpcmyk=yes] \definecolor[mycolor][c=0.45,m=0.00,y=0.1,k=0.00] \definecolor[colortext][c=1,m=0.00,y=0.3,k=0.3] \starttext \startuniqueMPgraphic{funny} path p

[NTG-context] Define a new type section with metafun

2014-12-26 Thread Fabrice Couvreur
[mycolor][c=0.45,m=0.00,y=0.1,k=0.00] \definecolor[colortext][c=1,m=0.00,y=0.3,k=0.3] \starttext \startuniqueMPgraphic{funny} path p ; numeric h ; h := OverlayHeight ; p:=unitsquare xscaled \overlaywidth yscaled \overlayheight superellipsed 0.9 ; pickup pencircle scaled \overlaylinewidth ; fill p

Re: [NTG-context] overlay

2014-11-24 Thread Wolfgang Schuster
quare scaled 1cm xshifted i*cm; > endfor; > \stopMPcode > \stoptext > > How can a line be drawn connecting the right edges of the rectangles? I have > played with: > > \startuniqueMPgraphic{line} > path a; > a:=(0,0)--(0,3cm); > draw a withpen pencircle

Re: [NTG-context] overlay

2014-11-24 Thread John Kitzmiller
;> \startMPcode >> for i=0 upto 1: >> draw unitsquare scaled 1cm xshifted i*cm; >> endfor; >> \stopMPcode >> \stoptext >> >> >> How can a line be drawn connecting the right edges of the rectangles? I >> have pla

Re: [NTG-context] overlay

2014-11-24 Thread Peter Rolf
upto 1: > draw unitsquare scaled 1cm xshifted i*cm; > endfor; > \stopMPcode > \stoptext > > > How can a line be drawn connecting the right edges of the rectangles? I > have played with: > > \startuniqueMPgraphic{line} > path a; >

[NTG-context] overlay

2014-11-22 Thread John Kitzmiller
the rectangles? I have played with: \startuniqueMPgraphic{line} path a; a:=(0,0)--(0,3cm); draw a withpen pencircle scaled 3pt withcolor green; \stopuniqueMPgraphic \defineoverlay[line][{\uniqueMPgraphic{line}}] and using it in \framed, but placing the line correctly is elusive

Re: [NTG-context] Metafun error

2014-09-27 Thread Willi Egger
>>> >>> I tested your example file: it works fine here with >>> ConTeXt ver: 2014.09.25 18:58 MKIV beta fmt: 2014.9.25 int: >>> english/english >>> Which version are using? >>> >>> Best regards: OK >>> >>> On 26

Re: [NTG-context] Metafun error

2014-09-26 Thread Otared Kavian
;> >>> Hello! >>> >>> Today I wanted to use an older tex file…. I get the same error as in the >>> following test. >>> >>> \startuniqueMPgraphic{test} >>> >>> path p; >>> p := fullcircle scaled 5cm

Re: [NTG-context] Metafun error

2014-09-26 Thread Willi Egger
. I get the same error as in the >> following test. >> >> \startuniqueMPgraphic{test} >> >> path p; >> p := fullcircle scaled 5cm; >> draw p; >> label.bot(textext("Centre"), center p); >>

Re: [NTG-context] Metafun error

2014-09-26 Thread Otared Kavian
tex file…. I get the same error as in the > following test. > > \startuniqueMPgraphic{test} > > path p; > p := fullcircle scaled 5cm; > draw p; > label.bot(textext("Centre"), center p); > > \stopuniqueMPgraphic >

[NTG-context] Metafun error

2014-09-26 Thread Willi Egger
Hello! Today I wanted to use an older tex file…. I get the same error as in the following test. \startuniqueMPgraphic{test} path p; p := fullcircle scaled 5cm; draw p; label.bot(textext("Centre"), center p); \stopuniqueMPgraphic

[NTG-context] larger dot for \dot ?

2014-05-20 Thread Sanjoy Mahajan
ied a metafun approach \startuniqueMPgraphic{math:mydot} fill unitcircle scaled 2 shifted (OverlayWidth/2-1,OverlayHeight+OverlayOffset); path q; q:= unitsquare xscaled OverlayWidth yscaled (OverlayHeight+OverlayOffset+1); setbounds currentpicture to q; \stopuniqueMPgr

Re: [NTG-context] Text background that spans the width of the page

2014-05-07 Thread Darksair
extends into the > margins ... it depends a bit on what 'line' means here > > \startuniqueMPgraphic{whatever} > fill OverlayBox > leftenlarged BackSpace > rightenlarged CutSpace > withcolor OverlayColor ; >

Re: [NTG-context] Text background that spans the width of the page

2014-05-06 Thread Hans Hagen
example my section heads, or to highlight one specific \item. What’s the best way to do it? you can use textbackgrounds and plug in some mp code that extends into the margins ... it depends a bit on what 'line' means here \startuniqueMPgraphic{whatever} fill

[NTG-context] [Metapost] Using mkIV and metapost to produce SVG

2014-05-06 Thread ralf . waldvogel
uffer % .... \startuniqueMPgraphic{mp:margin}         picture text;     text := btex \getbuffer[buffer:dummy] etex;     draw text shifted(-11.8mm,-4.8mm );    % Some more fancy drawing her \stopuniqueMPgraphic Can I render that with MetaPost to SVG? Is it possible to render text as paths n

Re: [NTG-context] [Metapost] Using mkIV and metapost to produce SVG

2014-05-06 Thread Hans Hagen
white] \framed[align=middle,width=28mm,frame=off] { \SansBodyBold % Font definition done earlier Test to \par rendered \par } \stopcolor \stop \stopbuffer % .... \startuniqueMPgraphic{mp:margin} picture text; text := btex \getbuffer[buffer:dummy]

[NTG-context] [Metapost] Using mkIV and metapost to produce SVG

2014-05-05 Thread ralf . waldvogel
e=off]        {         \SansBodyBold % Font definition done earlier Test to \par rendered \par        }        \stopcolor    \stop\stopbuffer% \startuniqueMPgraphic{mp:margin}        picture text;    text := btex \getbuffer[buffer:dummy] etex;    draw text shifted(-11.8mm,-4.8mm );   % Some more fancy drawin

[NTG-context] glyph path

2014-02-19 Thread Peter Rolf
#x27; {R:/tex/texmf/fonts/map/dvips/lm/lm-math.map}{R:/tex/texmf/fonts/map/dvips/lm/lm-rm.map} fonts > 'fallback modern rm 12pt' is loaded metapost> initializing instance 'metafun' using format 'metafun' metapost> loading 'metafun'

Re: [NTG-context] mp: choose colors randomly from list

2014-02-19 Thread Otared Kavian
Hi Thomas, One way is to increase the « degree of randomness » by saying withcolor transparent (1,0.3,mycolor[round(uniformdeviate(10*i)/10)]) or you can define a RandomColor as below: \startuniqueMPgraphic{colortest} save mycolor ; color mycolor[] ; mycolor[1] := (0.07, 0.21, 0.65

Re: [NTG-context] mp: choose colors randomly from list

2014-02-19 Thread Alan BRASLAU
z Thomas A. wrote: > Hi all, > > I would like to have mp choose a (transparent) color randomly from a > predefined list. My naive approach was (let’s restrict it to three > colors): > > \startuniqueMPgraphic{colortest} > save mycolor ; color mycolor[] ; > mycolor[1] := (0.0

[NTG-context] mp: choose colors randomly from list

2014-02-19 Thread Schmitz Thomas A.
Hi all, I would like to have mp choose a (transparent) color randomly from a predefined list. My naive approach was (let’s restrict it to three colors): \startuniqueMPgraphic{colortest} save mycolor ; color mycolor[] ; mycolor[1] := (0.07, 0.21, 0.65) ; mycolor[2] := (0.6, 0.6, 0.4) ; mycolor[3

[NTG-context] MPpositiongraphic: I don't know when it's going to work and when it's not.

2014-01-18 Thread Elspeth McGullicuddy
can be removed without consequences \startuniqueMPgraphic{first demo} \stopuniqueMPgraphic \startMPpositiongraphic{mypos:circle} % absolute coordinates relative to paper by default? numeric x, y, w, h, d, radius; x = \MPx{\MPvar{self}}; y = \MPy{\MPvar{self}}; w = \MPw{\MPvar{self}};

[NTG-context] Need help defining command.

2013-10-22 Thread Keith J. Schultz
o write the command Pointers, help welcome. MWE: % %% NassiSimpleFrameBox %% %% Draw a box around a frame using exact height %% and width. to use it use overlay NassiSimpleFrameBox %% \startuniqueMPgraphic{NassiSimpleFrameBox} pickup pencircle scaled \overlaylinewi

[NTG-context] nested mp

2013-10-07 Thread Hans Hagen
Hi, This should work ok now in the current beta. \starttext \startuniqueMPgraphic{mytest} fill OverlayBox withcolor green ; draw textext("nested") xsized 8cm shifted center OverlayBox withcolor blue ; draw fullcircle scaled bbwidth(OverlayBox) wit

Re: [NTG-context] flowchart: \comment does not work with background

2013-10-05 Thread Hans Hagen
On 10/5/2013 1:55 AM, Peter Münster wrote: Hi, The flowchart disappears when using background=mytest here: --8<---cut here---start->8--- \usemodule[chart] \startuniqueMPgraphic{mytest} path p ; p := unitsquare xscaled \overlaywidth yscaled \overlay

[NTG-context] flowchart: \comment does not work with background

2013-10-04 Thread Peter Münster
Hi, The flowchart disappears when using background=mytest here: --8<---cut here---start->8--- \usemodule[chart] \startuniqueMPgraphic{mytest} path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; fill p withcolor green ; \stopuniqueMPg

Re: [NTG-context] mpgraphics confusion

2013-05-09 Thread Marco Patzer
> \startreusableMPgraphic-\reuseMPgraphic "for graphics that don't change". > \startuniqueMPgraphic-\uniqueMPgraphic "this graphic is calculated for each > distinctive case". > > I fail to see in what respect startuseMPgraphic en startuniqueMPgraphic d

[NTG-context] mpgraphics confusion

2013-05-09 Thread Meer, H. van der
at don't change". \startuniqueMPgraphic-\uniqueMPgraphic "this graphic is calculated for each distinctive case". I fail to see in what respect startuseMPgraphic en startuniqueMPgraphic do differ? Can someone

  1   2   3   >