[NTG-context] \setupheadnumber and zero
Hello, can a section head be generated with the number 0 (or less)? Sometimes I need to prepend a section while keeping existing section head numbers... Example: \starttext \setupheadnumber[chapter][-1] \chapter{Ch0} % Getting "Ch0" instead of "0. Ch0"? \chapter{Ch1} \stoptext Here, "0. Ch0" is not generated, the zero is not displayed; why? Best regards, Lukas -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038 t.mkiv Description: Binary data t.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Left border of a rectangle (Metafun)
On 8/29/2015 1:11 PM, Otared Kavian wrote: Hi fabrice, I dont’t know whether this the best solution, but you can use the following definition of the MPgraphic Funny: \startuseMPgraphic{Funny} interim linecap := butt ; path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; drawoptions (withpen pencircle scaled 6.5pt withcolor \MPcolor{MyColorA}) ; draw lrcorner p --urcorner p --ulcorner p withcolor white; draw ulcorner p --llcorner p ; \stopuseMPgraphic \startuseMPgraphic{Funny} interim linecap := butt ; draw leftboundary OverlayBox ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Left border of a rectangle (Metafun)
Hi Fabrice, You can also use the following simpler method: % begin leftframe.tex \definecolor[MyColorA][c=0.3, m=0.00, y=0.00, k=0.05] \defineframedtext [MethodeB] [before={\blank}, after={\blank}, frame=off, leftframe=on, framecolor=MyColorA, rulethickness=6.5pt, width=\textwidth, height=fit] \starttext \startMethodeB \input knuth \stopMethodeB \stoptext % end leftframe.tex Best regards: OK > On 29 Aug 2015, at 10:56, Fabrice Couvreur > wrote: > > Hi, > I want to draw the left border of the rectangle, but it is drawn in the > middle. > Why ? > Thank you, > Fabrice > > \setupcolors[state=start] > > > \definecolor[MyColorA][c=0.3, m=0.00, y=0.00, k=0.05] > > > > \defineoverlay > [Funny] > [\useMPgraphic{Funny}] > > \startuseMPgraphic{Funny} > interim linecap := butt ; > path p ; > p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; > drawoptions (withpen pencircle scaled 6.5pt withcolor \MPcolor{MyColorA}) > ; > draw ulcorner p--llcorner p ; > \stopuseMPgraphic > > \defineframedtext > [Methode] > [before={\blank}, >after={\blank}, >frame=off, >background=Funny, >width=\textwidth, >height=fit] > > \starttext > > \startMethode > \input knuth > \stopMethode > > \stoptext > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Left border of a rectangle (Metafun)
Hi fabrice, I dont’t know whether this the best solution, but you can use the following definition of the MPgraphic Funny: \startuseMPgraphic{Funny} interim linecap := butt ; path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; drawoptions (withpen pencircle scaled 6.5pt withcolor \MPcolor{MyColorA}) ; draw lrcorner p --urcorner p --ulcorner p withcolor white; draw ulcorner p --llcorner p ; \stopuseMPgraphic If necessary, you can use a backgroundcolor instead of white for the part of the path p which is to be invisible. Best regards: OK > On 29 Aug 2015, at 10:56, Fabrice Couvreur > wrote: > > Hi, > I want to draw the left border of the rectangle, but it is drawn in the > middle. > Why ? > Thank you, > Fabrice > > \setupcolors[state=start] > > > \definecolor[MyColorA][c=0.3, m=0.00, y=0.00, k=0.05] > > > > \defineoverlay > [Funny] > [\useMPgraphic{Funny}] > > \startuseMPgraphic{Funny} > interim linecap := butt ; > path p ; > p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; > drawoptions (withpen pencircle scaled 6.5pt withcolor \MPcolor{MyColorA}) > ; > draw ulcorner p--llcorner p ; > \stopuseMPgraphic > > \defineframedtext > [Methode] > [before={\blank}, >after={\blank}, >frame=off, >background=Funny, >width=\textwidth, >height=fit] > > \starttext > > \startMethode > \input knuth > \stopMethode > > \stoptext > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Left border of a rectangle (Metafun)
Hi, I want to draw the left border of the rectangle, but it is drawn in the middle. Why ? Thank you, Fabrice \setupcolors[state=start] \definecolor[MyColorA][c=0.3, m=0.00, y=0.00, k=0.05] \defineoverlay [Funny] [\useMPgraphic{Funny}] \startuseMPgraphic{Funny} interim linecap := butt ; path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; drawoptions (withpen pencircle scaled 6.5pt withcolor \MPcolor{MyColorA}) ; draw ulcorner p--llcorner p ; \stopuseMPgraphic \defineframedtext [Methode] [before={\blank}, after={\blank}, frame=off, background=Funny, width=\textwidth, height=fit] \starttext \startMethode \input knuth \stopMethode \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___