[NTG-context] Re: Shadow around a figure

2025-05-11 Thread Jeroen
This is the version I ended up with, seems to do exactly what I had in mind: \startuniqueMPgraphic{mpshadow} % BodyFontSize should be the current font size of/in the frame mw := BodyFontSize/3; ox := 3 ; % offset x oy := 2 ; % offset y bx := 1.7mw ; % bleed x (height of the shadow) by := 3mw

[NTG-context] Re: Shadow around a figure

2025-05-11 Thread Jeroen
So far I have been able to get this setup which does what I was looking for. I just dont seem to get the "Intermezzo 1" text removed: \useMPlibrary[dum] \startuniqueMPgraphic{mpshadow} % BodyFontSize should be the current font size of/in the frame mw := BodyFontSize/3; ox := +3.5 ; % o

[NTG-context] Re: Draw cutting line

2025-04-08 Thread vm via ntg-context
alan.caruanam...@gmail.com: I modified it, but it only affects the first page. The mark appears on the edge of the page; I just want a line in the middle. \setuppapersize[A5][A4,landscape] \setuparranging[2*2] \setuplayout[middle] \startuniqueMPgraphic{MPfoldmark} pickup pensquare scaled 0.5pt

[NTG-context] Re: Draw cutting line

2025-04-08 Thread Henning Hraban Ramm
Am 08.04.25 um 12:18 schrieb alan.caruanam...@gmail.com: I modified it, but it only affects the first page. The mark appears on the edge of the page; I just want a line in the middle. \setuppapersize[A5][A4,landscape] \setuparranging[2*2] \setuplayout[middle] \startuniqueMPgraphic{MPfoldmark

[NTG-context] Re: Draw cutting line

2025-04-08 Thread alan . caruanambom
I modified it, but it only affects the first page. The mark appears on the edge of the page; I just want a line in the middle. \setuppapersize[A5][A4,landscape] \setuparranging[2*2] \setuplayout[middle] \startuniqueMPgraphic{MPfoldmark} pickup pensquare scaled 0.5pt ; drawoptions(dashed evenly

[NTG-context] Re: Draw cutting line

2025-04-08 Thread Henning Hraban Ramm
] \starttext     \dorecurse{100}{\input knuth \relax} \stoptext I would use a layer and some MetaPost code, like this: \startuniqueMPgraphic{MPfoldmark} pickup pensquare scaled 0.5pt ; drawoptions(dashed evenly withcolor "registration") ; xd := OverlayWidth/2; draw (xd,0)--(xd,\pagecutmarklen

[NTG-context] Re: error in metafun of context version 2025.02.04

2025-02-08 Thread Florent Michel
kael > > On Fri, Feb 7, 2025 at 10:34 AM Florent Michel > wrote: > >> Hi, >> >> On a related note, the second example from >> https://wiki.contextgarden.net/Command/startuniqueMPgraphic seems to >> have a similar issue, although it seems to work fine after

[NTG-context] Re: error in metafun of context version 2025.02.04

2025-02-07 Thread Mikael Sundqvist
Hi, I think there will be a new release today or tomorrow that should fix this. /Mikael On Fri, Feb 7, 2025 at 10:34 AM Florent Michel wrote: > Hi, > > On a related note, the second example from > https://wiki.contextgarden.net/Command/startuniqueMPgraphic seems to have >

[NTG-context] Re: error in metafun of context version 2025.02.04

2025-02-07 Thread Florent Michel
Hi, On a related note, the second example from https://wiki.contextgarden.net/Command/startuniqueMPgraphic seems to have a similar issue, although it seems to work fine after replacing xyscaled (\overlaywidth, \overlayheight) with xyscaled (OverlayWidth, OverlayHeight) Best regards

[NTG-context] Re: GB7714-2015 of author-year format

2024-10-15 Thread hf
wn within a subsection with an overlay. The logic to create the underlined subsection is by the way copied from the metafun manual source. I do not have the slightest clue what is going wrong in this example. Thanks for ideas. Best, Bernd \usemodule[chart] \startuniqueMPgraphic{SectionUnderline

[NTG-context] Re: Artifact in flow cell connection

2024-10-15 Thread Bernd Donner via ntg-context
overlay. > The logic to create the underlined subsection is by the way copied from the > metafun manual source. I do not have the slightest clue what is going wrong > in this example. Thanks for ideas. > > Best, Bernd > > \usemodule[chart] > > \startuniqueMPgraphic{SectionU

[NTG-context] GB7714-2015 of author-year format

2024-10-13 Thread wangzhongtian
eate the underlined subsection is by the way copied from the metafun manual source. I do not have the slightest clue what is going wrong in this example. Thanks for ideas.Best, Bernd\usemodule[chart]\startuniqueMPgraphic{SectionUnderline} path p;p:= unitsquare xscaled OverlayWidth yscaled Overla

[NTG-context] Re: Artifact in flow cell connection

2024-10-12 Thread wangzhongtian
manual source. I do not have the slightest clue what is going wrong in this example. Thanks for ideas.Best, Bernd\usemodule[chart]\startuniqueMPgraphic{SectionUnderline} path p;p:= unitsquare xscaled OverlayWidth yscaled OverlayHeight; draw llcorner p -- lrcorner p; setbounds

[NTG-context] Artifact in flow cell connection

2024-10-11 Thread Bernd Donner via ntg-context
going wrong in this example. Thanks for ideas. Best, Bernd \usemodule[chart] \startuniqueMPgraphic{SectionUnderline} path p; p:= unitsquare xscaled OverlayWidth yscaled OverlayHeight; draw llcorner p -- lrcorner p; setbounds currentpicture to p; \stopuniqueMPgraphic \defineoverlay

[NTG-context] Metapost and write to file...

2024-10-01 Thread Willi Egger
regards Willi \startuniqueMPgraphic{Test} draw fullcircle scaled 3cm; write "Hello World!" to "data.txt"; write EOF to "data.txt"; \stopuniqueMPgraphic \starttext \useMPgraphic{Test} Import data from \quotation{data.txt}: \bla

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

  1   2   3   4   >