[NTG-context] Re: Numbered equation
Hi, This works but I should have thought of that, I'm a bit confused ! Thanks Fabrice Le mar. 27 août 2024 à 17:34, Henning Hraban Ramm a écrit : > Am 27.08.24 um 17:10 schrieb Fabrice Couvreur: > > Numbered equation > > Hello, > > Assuming i am working in the first chapter, using \startplaceformula ... > > \stopplaceformula induces a numbered equation (1.1), (1.2), etc > > How to get (1), (2), etc ? > > Try \setupformula[prefix=no] > > Otherwise look into the options of > https://wiki.contextgarden.net/Command/setupcounter, e.g. prefixset > (\setupformula inherits from \setupcounter). > > Hraban > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Numbered equation
Numbered equation Hello, Assuming i am working in the first chapter, using \startplaceformula ... \stopplaceformula induces a numbered equation (1.1), (1.2), etc How to get (1), (2), etc ? Thanks Fabrice ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: About the font used in the document mathincontext-paper.pdf
In this " A small note, with source". Le mar. 27 août 2024 à 15:23, Mikael Sundqvist a écrit : > Hi, > > On Tue, Aug 27, 2024 at 3:08 PM Fabrice Couvreur > wrote: > > > > Hello, > > I read this very good document and it says that it was written with the > Pagella font. I use this font with a simple \setupbodyfont[pagella,11pt] > but I find that the rendering is not the same as on the document, it is > less nice especially in the writing of the theorems with the text in > italic. Imaginary impression or reality ? > > Thanks. > > Fabrice > > If you talk about the ones in the Enunciation chapter, then they are > indeed set with Pagella (unless I did some mistake). The example in > the "Getting started" chapter is done in Antykwa. In the "Meaningful > math" chapter, I think Bonum was used. > > So, I would guess you get the same font... > > /Mikael > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] About the font used in the document mathincontext-paper.pdf
Hello, I read this very good document and it says that it was written with the Pagella font. I use this font with a simple \setupbodyfont[pagella,11pt] but I find that the rendering is not the same as on the document, it is less nice especially in the writing of the theorems with the text in italic. Imaginary impression or reality ? Thanks. Fabrice ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] About a pagination
Hi, I'm trying to get the same pagination as in the attached photos. Using the wiki and Wolfgang's codes I get something interesting but not very elegant (\ACFRAME{}). Only, I don't see how to emphasize the title of each chapter in the same way. Thanks. Fabrice \startcomponent[essai] \setuplayout [ backspace=28mm, topspace=35mm, width=140mm ] \setuppagenumbering[alternative=doublesided,location=] \setupbodyfont[pagella,11pt] \mainlanguage[fr] \setcharacterspacing [frenchpunctuation] \startuseMPgraphic{acframeleft} fill OverlayBox leftenlarged (BackSpace) rightenlarged 5mm withcolor "lightgray"; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \defineoverlay [acframeleft] [\useMPgraphic{acframeleft}] \defineframed [ACFRAMELEFT] [frame=off, width=fit, height=1ex, background=acframeleft, location=, ] \startuseMPgraphic{acframeright} fill OverlayBox leftenlarged 5mm rightenlarged 42mm withcolor "lightgray"; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \defineoverlay [acframeright] [\useMPgraphic{acframeright}] \defineframed [ACFRAMERIGHT] [frame=off, width=fit, height=1ex, background=acframeright, location=hanging, ] \setupheader[style=\tfx] \startsetups [header:leftpage] \setuplabeltext [fr] [chapter=\tfx Chapitre] \ACFRAMERIGHT{} \hfill \labeltext{chapter} \getmarking[chapternumber] \getmarking[chapter] \stopsetups \startsetups [header:rightpage] \getmarking[sectionnumber] \space \getmarking[section] \hfill \ACFRAMERIGHT{} \stopsetups \setupheadertexts [\directsetup{header:rightpage}] [\prefixedpagenumber] [\prefixedpagenumber] [\directsetup{header:leftpage}] \defineframedtext [ChapterFrame] [frame=on, width=local, height=broad, after={\blank[2*line]}, offset=0pt] \startsetups [section:chapter] \setuphead [chapter] [align=leftright, textcommand=\groupedcommand{\blank[medium]}{}, numbercolor=, textstyle=, numberstyle=, numbercommand=, before=\startChapterFrame, after=\stopChapterFrame, header=nomarking] \stopsetups \startsectionblockenvironment [bodypart] \directsetup{section:chapter} \stopsectionblockenvironment \doifmode{*component}{\directsetup{section:chapter}} \setuplabeltext [fr] [chapter=\tf Chapitre\space] \startchapter [title={Polynômes}] \startsection [title={Forme réduite et identification}] \dorecurse{6}{\input knuth} \stopsection \startsection [title={Polynômes du second degré}] \dorecurse{6}{\input knuth} \stopsection \stopchapter \stopcomponent ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Math manual
Hi, Thank you for this document which will help many people, including me. Quick question : this document seems to have been written in the Pagella font : is this correct ? Why this choice : Personal ? The most complete and nice font ? Fabrice Le sam. 15 juin 2024 à 17:50, Jeong Dal via ntg-context a écrit : > Dear Hans and Mikael, > > I appreciate for all the efforts to make a nicer math output and for the > math manual. > I hope that a few problems in math are gone away in this new version. > > The math writing in ConTeXt was getting better and better to this point. > I’ll learn many things from this manual. > > Thanks again and have a nice weekend. > > Best regards, > > Dalyoung > > > > 2024. 6. 15. 오전 6:22, Otared Kavian 작성: > > Hi Hans and Mikael, > > I just could update to the latest ConTeXt (after afew hassles with xattr > on MacOS…), and went straight to find mathincontext-screen.pdf. > Thank you so much for this superbe manual! It is really wonderful in all > aspects! > > As Aditya says, there is no excuse for mathematicians not to use ConTeXt > (apart the usual laziness in many of my colleagues…). > > Best regards: Otared > > On 14 Jun 2024, at 09:46, Mikael Sundqvist wrote: > > Hi! > > Hans just uploaded a new version. I am not writing about the news in > that version (although there are some fun things!), but rather to > announce that the math manual is finally included. > > We have been working on and off since 2021 on math and therefore also > on this document, and we finally believe that both math and the > document are now in a state that should be sufficiently useful and not > too confusing. You can find a screen and a paper version: > > > ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-screen.pdf > > ./tex/texmf-context/doc/context/documents/general/manuals/mathincontext-paper.pdf > > The versions are generated from the same tex files, so the content > (except for some chapter pages only available in the screen version) > should be the same. > > We hope that this will be useful for all of you who use math in your > documents. If you have any questions, find any errors, or miss > something, please let us know. We consider the document not to be > finished, so there will be updates. Also, we will also at some point > include the tex files, but that will have to wait a bit. > > /Hans and Mikael > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > > > Otared Kavian > e-mail: ota...@gmail.com > Phone: +33 6 88 26 70 95 > > > > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Metapost limitation ?
With Okular, it works ! Le dim. 12 mai 2024 à 17:55, Hans Hagen a écrit : > On 5/12/2024 5:36 PM, Fabrice Couvreur wrote: > > Sorry for the comment ! > > I use Evince > so how about okular or mupdf > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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 / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Metapost limitation ?
Sorry for the comment ! I use Evince Le dim. 12 mai 2024 à 17:30, Hans Hagen a écrit : > On 5/12/2024 3:57 PM, Fabrice Couvreur wrote: > > Hi, > > When I want to draw the curve which corresponds to n=60 (blue curve), it > > doesn't seem possible: I don't understand. > > Thanks > > Fabrice > > > > \startMPpage[offset=1DK] > > > >numeric u; > >u = 6cm; > > > >interim linejoin := mitered; > >interim ahangle := 30; > > > >path xx, yy; > >xx = ( (-0.3,0) -- 1.4 right) scaled u; > >yy = ( (-0.1,0) -- 1.8 right) rotated 90 scaled u; > > > >def compute_curve(suffix f)(expr xmin, xmax, xinc) = > >((xmin,f(xmin)) > >for x=xmin+xinc step xinc until xmax: > > .. (x,f(x)) > >endfor) > >enddef; > > > > > >for i = 1 upto 4: > > > >vardef f(expr x) =x+exp(-i*x) enddef; > > > >path curve; > > > >curve = compute_curve(f,-0.4,1.4,0.0001) scaled u; > > > >draw curve; > > > >endfor; > > > >vardef f(expr x) =x+exp(-6*x) enddef; > > > >path curve; > > > >curve = compute_curve(f,-0.4,1.4,0.0001) scaled u; > > > >draw curve; > > > >vardef f(expr x) =x+exp(-15*x) enddef; > > > >path curve; > > > >curve = compute_curve(f,-0.4,1.4,0.0001) scaled u; > > > >draw curve; > > > > > >vardef f(expr x) =x+exp(-60*x) enddef; > > > >path curve; > > > >curve = compute_curve(f,-0.4,1.4,0.0001) scaled u; ->>>>> not > > drawn > > best put a comment before the ->>>>>>> > > >draw curve withcolor blue; > > > > > >drawarrow (0,0) -- (u,0) withpen pencircle scaled 1.5bp; > >drawarrow (0,0) -- (0,u) withpen pencircle scaled 1.5bp; > > > > > >label.urt("A",(0,1u)); > > > >draw xx; > >draw yy; > > > >draw (1u,0) -- (1u,1.8u); > > > > > >label.llft("0",(0,0)); > > > > vardef mark_y_axis(expr value, name) = > > save p; pair p; p = value * u * up; > > draw (left--right) scaled 1 shifted p; > > label.lft(name, p shifted 2 left); > >enddef; > > > >for a = 1 upto 1: > > mark_y_axis(a, ""); > >endfor > > > > mark_y_axis(1, "$1$"); > > > > > > vardef mark_x_axis(expr value, name) = > > save p; pair p; p = value * u * right; > > draw (up--down) scaled 1 shifted p; > > label.bot(name, p shifted 2 down); > > enddef; > > > > for a = 1 upto 1: > > mark_x_axis(a, ""); > > endfor > > > > mark_x_axis(1, "$1$"); > > > > > >path rectangle; > >rectangle = (-0.3u,-0.4u) -- (1.3u,-0.4u) -- (1.3u,-0.4u) -- > > (1.3u,1.4u) -- (-0.3u,1.4u)--cycle; > > > >clip currentpicture to rectangle; > > \stopMPpage > > > your exp usage: > >exp(-60*-0.4) > > if you see what huge numbers come out of that, like > > -51.006602 11100558579.857309 l > -50.989594 11034154639.123087 l > -50.972586 10968147929.149401 l > -50.955579 10902536073.687559 l > -50.938571 10837316710.703716 l > > you could imagine a viewer crapping out on that because no matter what > one clips it still is 'kind of drawn', so what viewer do you use? > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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 / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Metapost limitation ?
Hi, When I want to draw the curve which corresponds to n=60 (blue curve), it doesn't seem possible: I don't understand. Thanks Fabrice \startMPpage[offset=1DK] numeric u; u = 6cm; interim linejoin := mitered; interim ahangle := 30; path xx, yy; xx = ( (-0.3,0) -- 1.4 right) scaled u; yy = ( (-0.1,0) -- 1.8 right) rotated 90 scaled u; def compute_curve(suffix f)(expr xmin, xmax, xinc) = ((xmin,f(xmin)) for x=xmin+xinc step xinc until xmax: .. (x,f(x)) endfor) enddef; for i = 1 upto 4: vardef f(expr x) =x+exp(-i*x) enddef; path curve; curve = compute_curve(f,-0.4,1.4,0.0001) scaled u; draw curve; endfor; vardef f(expr x) =x+exp(-6*x) enddef; path curve; curve = compute_curve(f,-0.4,1.4,0.0001) scaled u; draw curve; vardef f(expr x) =x+exp(-15*x) enddef; path curve; curve = compute_curve(f,-0.4,1.4,0.0001) scaled u; draw curve; vardef f(expr x) =x+exp(-60*x) enddef; path curve; curve = compute_curve(f,-0.4,1.4,0.0001) scaled u; -> not drawn draw curve withcolor blue; drawarrow (0,0) -- (u,0) withpen pencircle scaled 1.5bp; drawarrow (0,0) -- (0,u) withpen pencircle scaled 1.5bp; label.urt("A",(0,1u)); draw xx; draw yy; draw (1u,0) -- (1u,1.8u); label.llft("0",(0,0)); vardef mark_y_axis(expr value, name) = save p; pair p; p = value * u * up; draw (left--right) scaled 1 shifted p; label.lft(name, p shifted 2 left); enddef; for a = 1 upto 1: mark_y_axis(a, ""); endfor mark_y_axis(1, "$1$"); vardef mark_x_axis(expr value, name) = save p; pair p; p = value * u * right; draw (up--down) scaled 1 shifted p; label.bot(name, p shifted 2 down); enddef; for a = 1 upto 1: mark_x_axis(a, ""); endfor mark_x_axis(1, "$1$"); path rectangle; rectangle = (-0.3u,-0.4u) -- (1.3u,-0.4u) -- (1.3u,-0.4u) -- (1.3u,1.4u) -- (-0.3u,1.4u)--cycle; clip currentpicture to rectangle; \stopMPpage ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: The graph is not visible.
Hi, Thanks for your help. I did several tests playing only with the code of component 5 which interferes with that of component 14. @Aditya begingroup; . endgroup; does not work. @Hans save defaultfont, defaultscale; maybe also: save circle, p, q, b ; I get an empty rectangle in place of the graph in composant 5. @Taco The solution that works is to add component 14 to the code numeric a, b; Fabrice Le ven. 26 avr. 2024 à 10:45, Aditya Mahajan a écrit : > On Fri, 26 Apr 2024, Taco Hoekwater wrote: > > > > > > > > On 25 Apr 2024, at 23:12, Fabrice Couvreur < > fabrice1.couvr...@gmail.com> wrote: > > > > > > Hi, > > > Here is the code that interferes with the graph from the last chapter > but why ? > > > > Because of this “path b”: > > > > > path circle, p, q, b; > > > > which interferes with the assignment line from the other graphic code: > > > > > b := xpart(reverse C_f intersectionpoint reverse C_g); > > > > because there “b” is a now a path, not a numeric. > > > > Adding > > > >numeric a,b; > > > > fixes the problem in chapter 14. > > Woundn't newnumeric be better? > > There are very few instances where I want variables defined in one block > to be reused in another block. So, I almost always use > > \startMPcode > begingroup; > > endgroup; > \stopMPcode > > to avoid such issues. > > > Aditya___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: The graph is not visible.
Hi, Here is the code that interferes with the graph from the last chapter but why ? \startMPcode pickup pencircle xscaled 1; defaultfont := "texgyrepagella-regular*default" ; defaultscale := 0.8 ; path circle, p, q, b; circle = fullcircle xscaled 5cm yscaled 3.5cm; p = (point 2 of circle .. (-0.15cm,1.5cm) ..(0,0)..(0.15cm,-1.5cm).. point 6 of circle); q = (subpath(0,2) of circle -- p -- subpath(6,8) of circle --cycle); b = (reverse p -- subpath(2,6) of circle -- cycle); definecolor [ name = "mp:red", r = 1 ]; definecolor [ name = "mp:blue", r = 0.54, g = 0.17, b = 0.89 ]; fill q withcolor "mp:red" withtransparency(1,0.4) ; fill b withcolor "mp:blue" withtransparency(1,0.4) ; draw circle; draw p; label("$\overline{\text{A}}$",( 1.5cm,0)); label("$\text{A}$",(-1.5cm,0)); label.top("E",(0,1.85cm)); \stopMPcode Le jeu. 25 avr. 2024 à 16:55, Fabrice Couvreur a écrit : > Hi Hans and Taco, > @Hans, I compiled by commenting and uncommenting one component at a time; > it is component 5 which interferes with the metapost code of component 14 > All I have to do now is find out what the cause is. > Fabrice > > Le jeu. 25 avr. 2024 à 16:40, Taco Hoekwater a écrit : > >> >> >> > On 25 Apr 2024, at 16:08, Fabrice Couvreur >> wrote: >> > >> > Hi Taco, >> > I knew I wouldn't be able to explain what was happening. >> > The code works perfectly and the figure is clearly visible in the >> component chapter-14 : >> >> It is probably not related to the figure itself. Something may be >> different in this component compared to the other ones. I cannot really >> say, of course. Still, using external image instead of inline metapost may >> be fix it. Not elegant, but if it works it works! >> >> Good luck, >> Taco >> >> >> > >> > \startcomponent[chapter-14] >> > \startMPpage >> > ... >> > \stopMPpage >> > \stopcomponent >> > >> > But if I compile my project, it disappears !! >> > >> > \startproduct[terminale-manual] >> > \startbodymatter >> > \component[chapter-1] >> > \component[chapter-2] >> > \component[chapter-3] >> > \component[chapter-4] >> > \component[chapter-5] >> > \component[chapter-6] >> > \component[chapter-7] >> > \component[chapter-8] >> > \component[chapter-9] >> > \component[chapter-10] >> > \component[chapter-11] >> > \component[chapter-12] >> > \component[chapter-13] >> > \component[chapter-14] >> > \stopbodymatter >> > \stopproduct >> >> — >> Taco Hoekwater E: t...@bittext.nl >> genderfluid (all pronouns) >> >> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl >> webpage : https://www.pragma-ade.nl / https://context.aanhet.net >> (mirror) >> archive : https://github.com/contextgarden/context >> wiki : https://wiki.contextgarden.net >> >> ___ >> > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: The graph is not visible.
Hi Hans and Taco, @Hans, I compiled by commenting and uncommenting one component at a time; it is component 5 which interferes with the metapost code of component 14 All I have to do now is find out what the cause is. Fabrice Le jeu. 25 avr. 2024 à 16:40, Taco Hoekwater a écrit : > > > > On 25 Apr 2024, at 16:08, Fabrice Couvreur > wrote: > > > > Hi Taco, > > I knew I wouldn't be able to explain what was happening. > > The code works perfectly and the figure is clearly visible in the > component chapter-14 : > > It is probably not related to the figure itself. Something may be > different in this component compared to the other ones. I cannot really > say, of course. Still, using external image instead of inline metapost may > be fix it. Not elegant, but if it works it works! > > Good luck, > Taco > > > > > > \startcomponent[chapter-14] > > \startMPpage > > ... > > \stopMPpage > > \stopcomponent > > > > But if I compile my project, it disappears !! > > > > \startproduct[terminale-manual] > > \startbodymatter > > \component[chapter-1] > > \component[chapter-2] > > \component[chapter-3] > > \component[chapter-4] > > \component[chapter-5] > > \component[chapter-6] > > \component[chapter-7] > > \component[chapter-8] > > \component[chapter-9] > > \component[chapter-10] > > \component[chapter-11] > > \component[chapter-12] > > \component[chapter-13] > > \component[chapter-14] > > \stopbodymatter > > \stopproduct > > — > Taco Hoekwater E: t...@bittext.nl > genderfluid (all pronouns) > > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: The graph is not visible.
Hi Taco, I knew I wouldn't be able to explain what was happening. The code works perfectly and the figure is clearly visible in the component chapter-14 : \startcomponent[chapter-14] \startMPpage ... \stopMPpage \stopcomponent But if I compile my project, it disappears !! \startproduct[terminale-manual] \startbodymatter \component[chapter-1] \component[chapter-2] \component[chapter-3] \component[chapter-4] \component[chapter-5] \component[chapter-6] \component[chapter-7] \component[chapter-8] \component[chapter-9] \component[chapter-10] \component[chapter-11] \component[chapter-12] \component[chapter-13] \component[chapter-14] \stopbodymatter \stopproduct Le jeu. 25 avr. 2024 à 13:36, Taco Hoekwater a écrit : > H Fabrice, > > You did not provide a good minimum test because the graph by itself > renders fine: > > > > Best wishes, > Taco > (if all else fails, you can replace \startMPcode with \startMPpage and > generate a standalone graph that way) > > > On 25 Apr 2024, at 12:27, Fabrice Couvreur > wrote: > > > > Hi, > > I don't know if I can explain the problem I'm having. I made a project > with 14 chapters. In each of them, there are graphics embedding metapost > code. I proceed as follows : I compile each chapter alone with lmtx then I > compile the project containing the 14 chapters. I didn't encounter any > problems except with a graphic from the last chapter. It is indeed in > chapter 14 but not in the project ! I give the code for this graph. > > Thanks. > > Fabrice > > > > \startMPcode > > > >interim linejoin := mitered; > >interim ahangle := 30; > >numeric u, pi; > > > >pi = 3.141592653589793; > >u = 1.5cm; > > > >vardef graph_of_function (suffix f) (expr xmin, xmax, > xsep) = > > for x = xmin step xsep until xmax: (x, f(x)) .. endfor > (xmax, f(xmax)) > >enddef ; > > > >vardef vline (suffix f, g) (expr x) = (x, min(f(x), > g(x))) -- (x, max(f(x),g(x))) enddef; > > > >vardef area_between_functions (suffix f, g)(expr a, b, > xsep) = > > buildcycle(graph_of_function(f, a, b, xsep), vline(f, > g, b), > > reverse graph_of_function(g, a, b, xsep), reverse > vline(f, g, a)) > >enddef; > > > >vardef xaxis (expr xmin, xmax) = (xmin, 0) -- (xmax, 0) > enddef ; > >vardef yaxis (expr ymin, ymax) = (0, ymin) -- (0, ymax) > enddef ; > > > > > >xmin:=-pi/2; xmax := 3*pi/2; > >ymin := -1.5; ymax := 5; > > > > > >vardef f(expr x)= exp(-x)*(-cos(x)+sin(x)+1) enddef; > >vardef g(expr x)=-exp(-x)*cos(x) enddef; > >path C_f, C_g; > >C_f = graph_of_function(f,xmin, xmax, .1); > >C_g = graph_of_function(g, xmin, xmax, .1); > > > >a := xpart(C_f intersectionpoint C_g); > >b := xpart(reverse C_f intersectionpoint reverse C_g); > > > >fill (area_between_functions(f, g, a, b, 0.1)) scaled u > withcolor 0.4[white, blue]; > >draw C_f scaled u withcolor blue; > >draw C_g scaled u withcolor blue; > > > > > >\stopMPcode > > > ___ > > If your question is of interest to others as well, please add an entry > to the Wiki! > > > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > > webpage : https://www.pragma-ade.nl / https://context.aanhet.net > (mirror) > > archive : https://github.com/contextgarden/context > > wiki : https://wiki.contextgarden.net > > > ___ > > — > Taco Hoekwater E: t...@bittext.nl > genderfluid (all pronouns) > > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki
[NTG-context] The graph is not visible.
Hi, I don't know if I can explain the problem I'm having. I made a project with 14 chapters. In each of them, there are graphics embedding metapost code. I proceed as follows : I compile each chapter alone with lmtx then I compile the project containing the 14 chapters. I didn't encounter any problems except with a graphic from the last chapter. It is indeed in chapter 14 but not in the project ! I give the code for this graph. Thanks. Fabrice \startMPcode interim linejoin := mitered; interim ahangle := 30; numeric u, pi; pi = 3.141592653589793; u = 1.5cm; vardef graph_of_function (suffix f) (expr xmin, xmax, xsep) = for x = xmin step xsep until xmax: (x, f(x)) .. endfor (xmax, f(xmax)) enddef ; vardef vline (suffix f, g) (expr x) = (x, min(f(x), g(x))) -- (x, max(f(x),g(x))) enddef; vardef area_between_functions (suffix f, g)(expr a, b, xsep) = buildcycle(graph_of_function(f, a, b, xsep), vline(f, g, b), reverse graph_of_function(g, a, b, xsep), reverse vline(f, g, a)) enddef; vardef xaxis (expr xmin, xmax) = (xmin, 0) -- (xmax, 0) enddef ; vardef yaxis (expr ymin, ymax) = (0, ymin) -- (0, ymax) enddef ; xmin:=-pi/2; xmax := 3*pi/2; ymin := -1.5; ymax := 5; vardef f(expr x)= exp(-x)*(-cos(x)+sin(x)+1) enddef; vardef g(expr x)=-exp(-x)*cos(x) enddef; path C_f, C_g; C_f = graph_of_function(f,xmin, xmax, .1); C_g = graph_of_function(g, xmin, xmax, .1); a := xpart(C_f intersectionpoint C_g); b := xpart(reverse C_f intersectionpoint reverse C_g); fill (area_between_functions(f, g, a, b, 0.1)) scaled u withcolor 0.4[white, blue]; draw C_f scaled u withcolor blue; draw C_g scaled u withcolor blue; \stopMPcode ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Size of subscript notations
Perhaps the size should be even smaller because I personally find it still a little large. PS : In a thread, I thought I read that you had written a document on the use of mathematics with ConTeXt, true or false? Le ven. 29 déc. 2023 à 16:14, Mikael Sundqvist a écrit : > Great, all is good then. (Or?) > > /Mikael > > On Fri, Dec 29, 2023 at 5:07 PM Fabrice Couvreur < > fabrice1.couvr...@gmail.com> wrote: > >> Well, actually I get the same thing . >> [image: test.png] >> >> Le ven. 29 déc. 2023 à 16:00, Mikael Sundqvist a >> écrit : >> >>> Hi, >>> >>> On Fri, Dec 29, 2023 at 4:49 PM Fabrice Couvreur >>> wrote: >>> > >>> > Thank you for your suggestion but in the following example the >>> operational symbol is too big as well as the number 1. >>> > >>> > \mapfontsize[modern][script] [.4] >>> > \mapfontsize[modern][scriptscript][.2] >>> > >>> > \setupbodyfont[modern,12pt] >>> > >>> > \startTEXpage[offset=1DK] >>> > \m{z_{n+1}} >>> > \stopTEXpage >>> >>> Strange, here it looks OK. Maybe something that will be solved when >>> there is an update then. >>> >>> /Mikael >>> >>> ___ >>> If your question is of interest to others as well, please add an entry >>> to the Wiki! >>> >>> maillist : ntg-context@ntg.nl / >>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl >>> webpage : https://www.pragma-ade.nl / https://context.aanhet.net >>> (mirror) >>> archive : https://github.com/contextgarden/context >>> wiki : https://wiki.contextgarden.net >>> >>> ___ >>> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl >> webpage : https://www.pragma-ade.nl / https://context.aanhet.net >> (mirror) >> archive : https://github.com/contextgarden/context >> wiki : https://wiki.contextgarden.net >> >> ___ >> > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Size of subscript notations
Well, actually I get the same thing . [image: test.png] Le ven. 29 déc. 2023 à 16:00, Mikael Sundqvist a écrit : > Hi, > > On Fri, Dec 29, 2023 at 4:49 PM Fabrice Couvreur > wrote: > > > > Thank you for your suggestion but in the following example the > operational symbol is too big as well as the number 1. > > > > \mapfontsize[modern][script] [.4] > > \mapfontsize[modern][scriptscript][.2] > > > > \setupbodyfont[modern,12pt] > > > > \startTEXpage[offset=1DK] > > \m{z_{n+1}} > > \stopTEXpage > > Strange, here it looks OK. Maybe something that will be solved when > there is an update then. > > /Mikael > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Size of subscript notations
Thank you for your suggestion but in the following example the operational symbol is too big as well as the number 1. \mapfontsize[modern][script] [.4] \mapfontsize[modern][scriptscript][.2] \setupbodyfont[modern,12pt] \startTEXpage[offset=1DK] \m{z_{n+1}} \stopTEXpage Le ven. 29 déc. 2023 à 14:47, Mikael Sundqvist a écrit : > Hi, > > On Fri, Dec 29, 2023 at 3:17 PM Fabrice Couvreur > wrote: > > > > Hi, > > To type my lessons or other, I use the Modern font in 12 pt or 11 pt. I > find that the subscript notations are a little too big : how can I improve > this ? > > Thanks > > Fabrice > > > > \m{ \forall n \in N, z_{n+1}=\frac{i}{3}z_n} > > you could try something like (here with too small numbers only to show...) > > \mapfontsize[modern][script] [.4] > \mapfontsize[modern][scriptscript][.2] > > \setupbodyfont[modern,10pt] > > \startTEXpage[offset=1DK] > \m{3^{2^3}} > \stopTEXpage > > I hope it helps. > > /Mikael > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Size of subscript notations
Hi, To type my lessons or other, I use the Modern font in 12 pt or 11 pt. I find that the subscript notations are a little too big : how can I improve this ? Thanks Fabrice \m{ \forall n \in N, z_{n+1}=\frac{i}{3}z_n} ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] About framedtext
Hi, Is this a bug or not ? The key to coloring the background of the text seems to no longer work. Thanks Fabrice \definecolor[MyColorC][s=0.8784] \definecolor[MyColorD][m=0.27,y=1] \definecolor[ColorA][0.8(white)] \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00] \definecolor[MyColorA][.75(MyColorB,white)] \defineframed [FrameTitle] [frame=off, foregroundstyle=\bfx\ss, foregroundcolor=white, background=color, backgroundcolor=MyColorD, location=depth] \defineframedtext [FramedText] [offset=0.25em, style=\ss, toffset=\zeropoint, background=color, backgroundcolor=MyColorA, foregroundstyle={\switchtobodyfont[9pt]}, align={right, broad}, frame=off, corner=00, radius=0.5em, width=10cm] \definedescription [Info] [before=, after=, text=Info, title=no, width=fit, distance=0.5em, headcommand=\FrameTitle, alternative=serried] \starttext \startFramedText[width=5cm] \startInfo \input{ward} \stopInfo \stopFramedText \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Fractions (was \placefigure[location=here...] problem)
Hi Wolfgang, I'm reading this thread and I'm interested because I type a lot of text with mathematical formulas. In fact, I find that \dfrac{} creates unsightly leading space and that \frac{} is too small. What is the difference between \frac{} and \tfrac{} ? Fabrice Le sam. 9 déc. 2023 à 14:00, Henning Hraban Ramm a écrit : > Am 09.12.23 um 14:43 schrieb Wolfgang Schuster: > > anton.chig...@mail.com schrieb am 09.12.2023 um 14:15: > > \startlines > > \type{\frac{1}{3}}: \m{\frac{1}{3}} > > \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} > > \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} > > \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} > > \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} > > \type{\frac{1}{3}}: \m{\frac{1}{3}} > > \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} > > \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} > > \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} > > \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} > > \stoplines > > There’s also \vulgarfraction{1}{3} (but probably not suitable for your > application). > > Hraban > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: externalfigure crashed
Hi Hans, It works, thank you very much. Le sam. 2 déc. 2023 à 16:24, Hans Hagen a écrit : > On 12/2/2023 4:57 PM, Fabrice Couvreur wrote: > > Hi Hans, > > I have the same problem and definitely need to use \externalfigure[] > > this weekend. In which file should this patch be added ? > > Thanks. > cont-new.mkxl > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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 / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: externalfigure crashed
Hi Hans, I have the same problem and definitely need to use \externalfigure[] this weekend. In which file should this patch be added ? Thanks. Fabrice Le ven. 24 nov. 2023 à 17:16, Hans Hagen via ntg-context a écrit : > On 11/22/2023 10:02 PM, Hans van der Meer via ntg-context wrote: > > Here too, I find 'undefined' from \meaning\expandeddetokenize > \ifdefined\expandeddetokenize\else > \let\expandeddetokenize\detokenize > \fi > > will do for now ... i can't upload a new installer .. pending the built; > the advantage is that i can do some experiments that would otherwise > break the current version (making compact font mode very close to > normal, pdf signing, adapting to the latest validation, math magick, > etc); so fixes have to wait (but are done anyway) > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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 / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Strange behavior with anglestriped()
Hi Fabrice, Exactly, thanks for the correction. Fabrice Le lun. 20 nov. 2023 à 19:43, Fabrice L a écrit : > Hi, > > Fabrice, you have a problem with the definition of the path b: this path > include q and b. To see this, replace your lines with : > >draw q anglestriped (1,45,2) withcolor cyan; >draw b anglestriped (1,45,2) withcolor red; > > And you will see that the path b is drawn twice : once in red, once in > cyan. So if you change your instructions to : > >draw q anglestriped (1,45,2) withcolor cyan; >draw r anglestriped (1,45,2) withcolor cyan; > > This will correct the problem, because each path is now drawn only once. > > Fabrice. > > Le 20 nov. 2023 à 14:47, Fabrice Couvreur a > écrit : > > Hi Otared, > It's true that the color seems identical. > Thanks. > Fabrice > > Le dim. 19 nov. 2023 à 21:55, Otared Kavian a écrit : > >> Hi Fabrice, >> >> It seems to me the colors are the same, although they may appear >> different at first sight because the « with » of the lines are different >> (the width is larger in the lower rectangle). >> >> I attach the PDF created with your code. >> >> Best regards: Otared >> >> >> >> On 19 Nov 2023, at 18:56, Fabrice Couvreur >> wrote: >> >> Hi, >> I don't understand why the hatching of the two rectangles is not the same >> color. >> Thanks for your help. >> Fabrice >> >> \starttext >> \setupbodyfont[8pt] >> \startMPcode >>path p, q, r, b ; >> >>z[0] = (2cm,0cm) ; >>z[1] = (2cm,2cm) ; >>z[2] = (0cm,2cm) ; >> >>p := unitsquare xyscaled (9cm, 5cm) ; >>q := llcorner p--z[0]--z[1]--z[2]--cycle ; >>r := unitsquare xyscaled (7cm,3cm) shifted(2cm,2cm) ; >>b := z[2]--z[1]--ulcorner r--urcorner p--lrcorner r--z[1]-- >>z[0]--llcorner p--cycle ; >> >> >>draw b anglestriped (1,45,2) withcolor cyan; >>draw q anglestriped (1,45,2) withcolor cyan; >> >>draw p ; >> >>label.llft("A", p) ; >>label.lrt("D", p) ; >>label.ulft("B", p) ; >>label.urt("C", p) ; >>label.lft("M", z[2]) ; >>label.ulft("N", z[1]) ; >>label.bot("P", z[0]) ; >>label.top("J", ulcorner r) ; >>label.rt("I", lrcorner r) ; >>label.bot(btex $x$ etex,(llcorner p+z[0])/2); >>label.lft(btex $x$ etex,(llcorner p+z[2])/2); >> \stopMPcode >> >> \stoptext >> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl >> webpage : https://www.pragma-ade.nl / https://context.aanhet.net >> (mirror) >> archive : https://github.com/contextgarden/context >> wiki : https://wiki.contextgarden.net >> >> ___ >> >> >> Otared Kavian >> e-mail: ota...@gmail.com >> Phone: +33 6 88 26 70 95 >> >> >> >> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl >> webpage : https://www.pragma-ade.nl / https://context.aanhet.net >> (mirror) >> archive : https://github.com/contextgarden/context >> wiki : https://wiki.contextgarden.net >> >> ___ >> > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > _
[NTG-context] Re: Strange behavior with anglestriped()
Hi Otared, It's true that the color seems identical. Thanks. Fabrice Le dim. 19 nov. 2023 à 21:55, Otared Kavian a écrit : > Hi Fabrice, > > It seems to me the colors are the same, although they may appear different > at first sight because the « with » of the lines are different (the width > is larger in the lower rectangle). > > I attach the PDF created with your code. > > Best regards: Otared > > > > On 19 Nov 2023, at 18:56, Fabrice Couvreur > wrote: > > Hi, > I don't understand why the hatching of the two rectangles is not the same > color. > Thanks for your help. > Fabrice > > \starttext > \setupbodyfont[8pt] > \startMPcode >path p, q, r, b ; > >z[0] = (2cm,0cm) ; >z[1] = (2cm,2cm) ; >z[2] = (0cm,2cm) ; > >p := unitsquare xyscaled (9cm, 5cm) ; >q := llcorner p--z[0]--z[1]--z[2]--cycle ; >r := unitsquare xyscaled (7cm,3cm) shifted(2cm,2cm) ; >b := z[2]--z[1]--ulcorner r--urcorner p--lrcorner r--z[1]-- >z[0]--llcorner p--cycle ; > > >draw b anglestriped (1,45,2) withcolor cyan; >draw q anglestriped (1,45,2) withcolor cyan; > >draw p ; > >label.llft("A", p) ; >label.lrt("D", p) ; >label.ulft("B", p) ; >label.urt("C", p) ; >label.lft("M", z[2]) ; >label.ulft("N", z[1]) ; >label.bot("P", z[0]) ; >label.top("J", ulcorner r) ; >label.rt("I", lrcorner r) ; >label.bot(btex $x$ etex,(llcorner p+z[0])/2); >label.lft(btex $x$ etex,(llcorner p+z[2])/2); > \stopMPcode > > \stoptext > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > > > Otared Kavian > e-mail: ota...@gmail.com > Phone: +33 6 88 26 70 95 > > > > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Strange behavior with anglestriped()
Hi, I don't understand why the hatching of the two rectangles is not the same color. Thanks for your help. Fabrice \starttext \setupbodyfont[8pt] \startMPcode path p, q, r, b ; z[0] = (2cm,0cm) ; z[1] = (2cm,2cm) ; z[2] = (0cm,2cm) ; p := unitsquare xyscaled (9cm, 5cm) ; q := llcorner p--z[0]--z[1]--z[2]--cycle ; r := unitsquare xyscaled (7cm,3cm) shifted(2cm,2cm) ; b := z[2]--z[1]--ulcorner r--urcorner p--lrcorner r--z[1]-- z[0]--llcorner p--cycle ; draw b anglestriped (1,45,2) withcolor cyan; draw q anglestriped (1,45,2) withcolor cyan; draw p ; label.llft("A", p) ; label.lrt("D", p) ; label.ulft("B", p) ; label.urt("C", p) ; label.lft("M", z[2]) ; label.ulft("N", z[1]) ; label.bot("P", z[0]) ; label.top("J", ulcorner r) ; label.rt("I", lrcorner r) ; label.bot(btex $x$ etex,(llcorner p+z[0])/2); label.lft(btex $x$ etex,(llcorner p+z[2])/2); \stopMPcode \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Large unwanted white space
Hi, Thanks, it works perfectly. Fabrice Le sam. 21 oct. 2023 à 20:33, Hans Hagen a écrit : > On 10/21/2023 9:43 PM, Fabrice Couvreur wrote: > > Hi, > > I don't know if I will explain my problem clearly but I will try. For my > > students' tests, I use a master file. If I insert this piece of code, > there > > is a large white space that is created between the horizontal line of the > > header and the first exercise. > > \startMPcode makes an image so it will take space > > for definitions use \startMPdefinitions > > > > \startMPcode > >def suite (expr n, t) = > >begingroup > > numeric u; > > u := 5mm; > > pickup pencircle scaled 5pt; > > for i=0 upto n: > > for j=0 upto n: > > drawdot (i*u,j*u) shifted(t*u,0) withcolor \MPcolor{darkred}; > > endfor > > endfor > >endgroup > >enddef; > > > >def Suite (expr n, t) = > >begingroup > >numeric u; > >u := 5mm; > >pickup pencircle scaled 5pt; > >for i=0 upto n: > > drawdot(i*u,0) shifted(t*u,0) withcolor \MPcolor{blue}; > >endfor > >endgroup > >enddef; > > > >def cross (expr n, t) = > >begingroup > >numeric u; > >u := 5mm; > >pickup pencircle scaled 5pt; > >for i=-n upto n: > > drawdot(0,i*u) shifted(t*u,0) withcolor \MPcolor{blue}; > >endfor > >endgroup > >enddef; > > \stopMPcode > > __ %horizontal > line > > % big unwanted white space > > \starttext > > % \startex First exercise > > \startlinecorrection[blank] > > \startmidaligned > >\startcombination[1*2] > > {\startMPcode > >Suite(2,0); > >cross(1,1); > >Suite(4,4); > >cross(2,6); > >Suite(6,10); > >cross(3,13); > >\stopMPcode > > }{\tfx \bf Suite 1} > > {\startMPcode > >suite(0,0); > >suite(1,2); > >suite(2,5); > >\stopMPcode > > }{\tfx \bf Suite 2} > > \stopcombination > > \stopmidaligned > > \stoplinecorrection > >%\stopex > > \stoptext > > > > > > > ___ > > If your question is of interest to others as well, please add an entry > to the Wiki! > > > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > > webpage : https://www.pragma-ade.nl / https://context.aanhet.net > (mirror) > > archive : https://github.com/contextgarden/context > > wiki : https://wiki.contextgarden.net > > > ___ > > -- > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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 / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Large unwanted white space
Hi, I don't know if I will explain my problem clearly but I will try. For my students' tests, I use a master file. If I insert this piece of code, there is a large white space that is created between the horizontal line of the header and the first exercise. Thanks for your help. Fabrice \startMPcode def suite (expr n, t) = begingroup numeric u; u := 5mm; pickup pencircle scaled 5pt; for i=0 upto n: for j=0 upto n: drawdot (i*u,j*u) shifted(t*u,0) withcolor \MPcolor{darkred}; endfor endfor endgroup enddef; def Suite (expr n, t) = begingroup numeric u; u := 5mm; pickup pencircle scaled 5pt; for i=0 upto n: drawdot(i*u,0) shifted(t*u,0) withcolor \MPcolor{blue}; endfor endgroup enddef; def cross (expr n, t) = begingroup numeric u; u := 5mm; pickup pencircle scaled 5pt; for i=-n upto n: drawdot(0,i*u) shifted(t*u,0) withcolor \MPcolor{blue}; endfor endgroup enddef; \stopMPcode __ %horizontal line % big unwanted white space \starttext % \startex First exercise \startlinecorrection[blank] \startmidaligned \startcombination[1*2] {\startMPcode Suite(2,0); cross(1,1); Suite(4,4); cross(2,6); Suite(6,10); cross(3,13); \stopMPcode }{\tfx \bf Suite 1} {\startMPcode suite(0,0); suite(1,2); suite(2,5); \stopMPcode }{\tfx \bf Suite 2} \stopcombination \stopmidaligned \stoplinecorrection %\stopex \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Gray gradient with Metapost
Hi, Sorry for the late response. Thanks for the help. So I read the documents and managed to get a gradient even if it's not exactly like the figure. Fabrice draw lmt_shade [ path = (z0--z4--z5--z1--cycle), direction = "left", alternative = "linear", colors = {"black", "lightgray"}, ] ; Le ven. 6 oct. 2023 à 08:27, Henning Hraban Ramm a écrit : > While the luametafun (“Metafun XL”) manual is also (meta)fun, I meant > the general metafun(-s|-p) manual, the big one (>400 p. in the “print” > version, >600 p. in the “screen” version). Recommended! > > Hraban > > Am 06.10.23 um 10:08 schrieb Keith McKay: > > Also look at the LuaMetaFun manual chapter 8. In fact the whole manual > > is worth a read. I'm sure you find much of use in it. > > Best Wishes > > Keith > > > > On Thu, 5 Oct 2023, 20:52 Henning Hraban Ramm, > <mailto:te...@fiee.net>> wrote: > > > > Am 05.10.23 um 21:50 schrieb Fabrice Couvreur: > > > Hi, > > > I would like to obtain, if possible, a gray gradient like in the > > image. > > > My code uses Metapost but maybe this is possible with Metafun. > > > > Have a look into the Metafun manual, chapter 8.1 “shading”. > > > > Hraban > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id} > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id} webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Gray gradient with Metapost
Hi, I would like to obtain, if possible, a gray gradient like in the image. My code uses Metapost but maybe this is possible with Metafun. Thanks. Fabrice \starttext \startMPcode u=1.2cm; interim ahangle := 30; z0=(0,0); z1=(3u,0); z2=(3u,4u); z3=(0,4u); z4=(0.8u,4u); z5=(2.2u,4u); path rectangle; rectangle=z0--z1--z2--z3--cycle; picture X; X = image( drawoptions(withpen pencircle scaled 1.25 withcolor \MPcolor{orange}); draw (left--right) scaled 2; draw (down--up) scaled 2; drawoptions(); ); fill z0--z4--z3--cycle withcolor .5[red,green]; fill z1--z5--z2--cycle withcolor .5[red,green]; fill z0--z4--z5--z1--cycle withcolor 0.625white; draw z0--z4--z3--cycle; draw z1--z5--z2--cycle; draw rectangle; path a[]; a1 = subpath (0, 1) of rectangle shifted 10 down; a2 = subpath (3, 4) of rectangle shifted 10 left; a3 = subpath (2.26, 2.76) of rectangle shifted 13 up; drawdblarrow a1; label.bot("$30$", point 1/2 of a1); drawdblarrow a2; label.lft("$x+20$", point 1/2 of a2); drawdblarrow a3; label.top("$x$", point 1/2 of a3); draw X shifted z0; draw X shifted z1; draw X shifted z2; draw X shifted z3; draw X shifted z4; draw X shifted z5; label.ulft("B",z3); label.urt("C",z2); label.lrt("D",z1); label.llft("A",z0); label.top("E",z4); label.top("F",z5); \stopMPcode \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id} webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Question about building an array of values with Lua
Hi Wolfgang, Thank you so much Fabrice Le jeu. 24 août 2023 à 19:46, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> a écrit : > Otared Kavian schrieb am 24.08.2023 um 12:50: > > > On 24 Aug 2023, at 06:03, Wolfgang Schuster < > wolfgang.schuster.li...@gmail.com> wrote: > > […] > > > I would drop the column check in this case. > > for i = 0,9 do > context.startxrow() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(math.mod(i*i,10)) > context.stopxcell() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(math.mod(2*i*i,10)) > context.stopxcell() > context.stopxrow() > end > > Wolfgang > > > Indeed this is much more elegant… It feels so good to be on this list and > learn from such insights :-) > > > We don't even need the math.mod function because Lua added with version > 5.1 a modulo operator, > the loop to create the row can now be changed to > > for i = 0,9 do > context.startxrow() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(i * i % 10) > context.stopxcell() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(2 * i * i % 10) > context.stopxcell() > context.stopxrow() > end > > Wolfgang > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Question about building an array of values with Lua
Hi Otared and Wolgang, Thanks for the answers. In fact, being familiar with Python and not at all with Lua, I didn't have the reflex to think of using a mathematical function which gives the remainder in the Euclidean division by 10, it's strange !! Fabrice Le jeu. 24 août 2023 à 04:06, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> a écrit : > Otared Kavian schrieb am 24.08.2023 um 01:04: > > Hi Fabrice, > > As Wolfgang points out, it is indeed possible to fill-in your table with > Lua: maybe you were wondering how to fill the columns 2, 3 and 4. In this > case you need to use the Lua function math.mod as in the following, which > is a completed version of what Wolfgang sent: > > > I guess I completely missed the units digit part :) > > %% begin filling-with-lua.tex > \starttext > > \startluacode > context.startxtable{ align = "middle,lohi", bodyfont = "9pt", framecolor = > "black" } > context.startxrow{ background = "color", backgroundcolor = "lightgray" > } > context.startxcell{ nx = 4 } > context("Units digit of") > context.stopxcell() > context.stopxrow() > context.startxrow() > context.startxcell{ width = "1cm" } > context.im("a") > context.stopxcell() > context.startxcell{ width = "1cm" } > context.im("a^2") > context.stopxcell() > context.startxcell{ width = "1cm" } > context.im("b") > context.stopxcell() > context.startxcell{ width = "1cm" } > context.im("2b^2") > context.stopxcell() > context.stopxrow() > for i = 0,9 do > context.startxrow() > for j = 1,4 do > context.startxcell() > if j == 1 then > context(i) > elseif j == 2 then > context(math.mod(i*i,10)) > elseif j == 3 then > context(i) > else > context(math.mod(2*i*i,10)) > end > context.stopxcell() > end > context.stopxrow() > end > > > I would drop the column check in this case. > > for i = 0,9 do > context.startxrow() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(math.mod(i*i,10)) > context.stopxcell() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(math.mod(2*i*i,10)) > context.stopxcell() > context.stopxrow() > end > > Wolfgang > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Question about building an array of values with Lua
Hi, I'm trying to fill an array using lua. So far it works but then I don't know if it's possible. Thanks Fabrice \startluacode context.startxtable({"align={middle,lohi},bodyfont=9pt,framecolor=black"}) context.startxrow({"background=color, backgroundcolor=lightgray"}) context.startxcell({"nx=4"}) context("Units digit of") context.stopxcell() context.stopxrow() context.startxrow() context.startxcell({"width=1cm"}) context("\\im{a}") context.stopxcell() context.startxcell({"width=1cm"}) context("\\im{a²}") context.stopxcell() context.startxcell({"width=1cm"}) context("\\im{b}") context.stopxcell() context.startxcell({"width=1cm"}) context("\\im{2b²}") context.stopxcell() context.stopxrow() for i = 0, 9 do context.startxrow() context.startxcell() context(i) context.stopxcell() context.stopxrow() end context.stopxtable() \stopluacode ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Equivalent of the \cancel command with conTeXt
Hi Mikael, Thank you for this command ; there must be many others that I don't know how they work. Fabrice Le mar. 22 août 2023 à 10:54, Mikael Sundqvist a écrit : > Hi, > > On Tue, Aug 22, 2023 at 12:25 PM Fabrice Couvreur > wrote: > > > > Hi, > > In an algebraic expression, it is sometimes interesting to cross out > terms. With LaTeX, there is the \cancel command from the package cancel. Is > there an equivalent with conTeXt ? > > Thanks > > Fabrice > > I don't know what the cancel package gives, but since December 22 or > so, one can do > > \starttext > > \setupframed > [mathstrikeout] > [color=darkgreen, > backgroundcolor=darkred, > frame=off] > > \startTEXpage[offset=4dk,align=flushleft] > \dm{1+\mathstrikeout[strike:text={what is this?}]{(2x-x)}+2=3+x} > \blank > \dm{1+\mathstrikeout[strike:math={=x}]{(2x-x)}+2=3+x} > \blank > \dm{1+\mathstrikeout[strike:math=u,arrow=no]{(2x-x)}+2=3+x} > \blank > \dm{1+\mathcrossout[strike:math={=x}]{(2x-x)}+2=3+x} > \stopTEXpage > > \stoptext > > /Mikael > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Equivalent of the \cancel command with conTeXt
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} > picture cross; > cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0);); > draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle > scaled .8pt ; > \stopuniqueMPgraphic > > \defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}] > > \define[1]\cancel{% > \ifmmode > \mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}% > \else% > \framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}% > \fi% > } > > Maybe something else is available nowadays. > > A. Christe > Le 22 août 2023 à 12:22 +0200, Fabrice Couvreur < > fabrice1.couvr...@gmail.com>, a écrit : > > Hi, > In an algebraic expression, it is sometimes interesting to cross out > terms. With LaTeX, there is the \cancel command from the package cancel. Is > there an equivalent with conTeXt ? > Thanks > Fabrice > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Equivalent of the \cancel command with conTeXt
Hi, In an algebraic expression, it is sometimes interesting to cross out terms. With LaTeX, there is the \cancel command from the package cancel. Is there an equivalent with conTeXt ? Thanks Fabrice ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Key distance with enumeration
Hi, I don't understand why the distance between the dot and the first letter of the text is not always the same (see with theorem). Thanks Fabrice \setupenumerations [before={\blank}, after={\blank}, alternative=serried, distance=1cm, title=yes, titleleft=, titleright=, titlestyle=normal, prefix=no, prefixsegments=chapter, way=bychapter, prefixconversionset=digit, counter=, headcommand=\groupedcommand{}{.}, numbercommand=\groupedcommand{}{}, titlecommand=\groupedcommand{(}{)}, width=broad] \defineenumeration [definition] [text=Définition, number=yes, style=italic] \defineenumeration [theorem] [text=Théorème, number=yes, style=italic] \starttext \startdefinition Un polynôme est une application de R dans R somme d'un nombre fini de monômes. \stopdefinition \starttheorem La forme réduite d'un polynôme est unique à l'ordre près des monômes qui le constituent. \stoptheorem \startdefinition Le degré d'un polynôme {\bi non nul} est le degré du monôme de plus haut degré figurant dans son écriture réduite. \stopdefinition \startdefinition Le terme constant d'un polynôme est le coefficient (éventuellement nul) de son monôme de degré 0. \stopdefinition \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Problem with exponent
Hi, I want to write x'² . Only, I get x²'. Thanks Fabrice \starttext \m{{x'}²+{y'}²} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Table of contents not appearing.
An extra parenthesis in a section title seems to be the problem but I'm not sure. I compiled the file line by line and it works now. Thanks Fabrice Le ven. 21 avr. 2023 à 14:37, Hans Hagen via ntg-context a écrit : > On 4/21/2023 5:05 PM, Fabrice Couvreur via ntg-context wrote: > > It's chapter_5 that's the problem, but how do you know what's causing > > the table of contents not to appear ? > depends on the error : the toc comes from the tuc file so if that one is > not made ... > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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 / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Table of contents not appearing.
It's chapter_5 that's the problem, but how do you know what's causing the table of contents not to appear ? Le ven. 21 avr. 2023 à 14:42, Fabrice Couvreur a écrit : > Hi Hans, > Alright, I'll compile by integrating one component at a time to figure out > which one is causing the problem. > Thanks. > Fabrice > > Le jeu. 20 avr. 2023 à 15:52, Hans Hagen via ntg-context < > ntg-context@ntg.nl> a écrit : > >> On 4/20/2023 6:59 PM, Fabrice Couvreur via ntg-context wrote: >> > Hi, >> > I don't see why the table of contents does not appear. On the other >> > hand, the 12 chapters are present. >> >> \startproduct[terminale-manual] >> >> \startfrontmatter >> \starttitle[title=Table des matières] >> \placelist >> [chapter,section,subsection,subsubsection] >> [criterium=all, >> interaction=all, >> alternative=c] >> \stoptitle >> \stopfrontmatter >> >> \startbodymatter >> \chapter{xxx} >> \stopbodymatter >> >> \stopproduct >> >> shows a table of contents so it must be something in your components >> >> > Fabrice >> > >> > >> > \startproduct[terminale-manual] >> > >> >\project[terminale-environment] >> >\startfrontmatter >> > >> > \setuppagenumbering >> > [location=] >> > >> > \definefont >> >[ChapterTextStyle] >> >[SansBold*default sa 2.2] >> > >> > \setuphead >> >[title] >> >[style=ChapterTextStyle, >> > align=flushright] >> > >> > \setuplist >> > [chapter] >> > [style=bold, >> > alternative=b, >> > width=1em] >> > >> > \setuplist >> > [section] >> > [margin=1em, >> > width=1.75em] >> > >> > \setuplist >> > [subsection] >> > [margin=2.75em, >> > width=2.25em, >> > distance=\spaceamount] >> > >> > >> > \starttitle[title=Table des matières] >> > >> > \placelist >> > [chapter,section,subsection,subsubsection] >> > [criterium=all, >> > interaction=all, >> > alternative=c] >> > >> >\stoptitle >> > >> > \stopfrontmatter >> > >> > \startbodymatter >> >\component[chapitre_1] >> >\component[chapitre_2] >> >\component[chapitre_3] >> >\component[chapitre_4] >> >\component[chapitre_5] >> >\component[chapitre_6] >> >\component[chapitre_7] >> >\component[chapitre_8] >> >\component[chapitre_9] >> >\component[chapitre_10] >> >\component[chapitre_11] >> >\component[chapitre_12] >> > \stopbodymatter >> > >> > \stopproduct >> > >> > >> > >> ___ >> > If your question is of interest to others as well, please add an entry >> to the Wiki! >> > >> > maillist : ntg-context@ntg.nl / >> https://www.ntg.nl/mailman/listinfo/ntg-context >> > webpage : https://www.pragma-ade.nl / http://context.aanhet.net >> > archive : https://bitbucket.org/phg/context-mirror/commits/ >> > wiki : https://contextgarden.net >> > >> ___ >> >> -- >> >> - >>Hans Hagen | PRAGMA ADE >>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >> tel: 038 477 53 69 | www.pragma-ade.nl | 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 / >> https://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : https://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : https://contextgarden.net >> >> ___ >> > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Table of contents not appearing.
Hi Hans, Alright, I'll compile by integrating one component at a time to figure out which one is causing the problem. Thanks. Fabrice Le jeu. 20 avr. 2023 à 15:52, Hans Hagen via ntg-context a écrit : > On 4/20/2023 6:59 PM, Fabrice Couvreur via ntg-context wrote: > > Hi, > > I don't see why the table of contents does not appear. On the other > > hand, the 12 chapters are present. > > \startproduct[terminale-manual] > > \startfrontmatter > \starttitle[title=Table des matières] > \placelist > [chapter,section,subsection,subsubsection] > [criterium=all, > interaction=all, > alternative=c] > \stoptitle > \stopfrontmatter > > \startbodymatter > \chapter{xxx} > \stopbodymatter > > \stopproduct > > shows a table of contents so it must be something in your components > > > Fabrice > > > > > > \startproduct[terminale-manual] > > > >\project[terminale-environment] > >\startfrontmatter > > > > \setuppagenumbering > > [location=] > > > > \definefont > >[ChapterTextStyle] > >[SansBold*default sa 2.2] > > > > \setuphead > >[title] > >[style=ChapterTextStyle, > > align=flushright] > > > > \setuplist > > [chapter] > > [style=bold, > > alternative=b, > > width=1em] > > > > \setuplist > > [section] > > [margin=1em, > > width=1.75em] > > > > \setuplist > > [subsection] > > [margin=2.75em, > > width=2.25em, > > distance=\spaceamount] > > > > > > \starttitle[title=Table des matières] > > > > \placelist > > [chapter,section,subsection,subsubsection] > > [criterium=all, > > interaction=all, > > alternative=c] > > > >\stoptitle > > > > \stopfrontmatter > > > > \startbodymatter > >\component[chapitre_1] > >\component[chapitre_2] > >\component[chapitre_3] > >\component[chapitre_4] > >\component[chapitre_5] > >\component[chapitre_6] > >\component[chapitre_7] > >\component[chapitre_8] > >\component[chapitre_9] > >\component[chapitre_10] > >\component[chapitre_11] > >\component[chapitre_12] > > \stopbodymatter > > > > \stopproduct > > > > > > > ___ > > If your question is of interest to others as well, please add an entry > to the Wiki! > > > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > wiki : https://contextgarden.net > > > ___ > > -- > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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 / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Table of contents not appearing.
Hi, I don't see why the table of contents does not appear. On the other hand, the 12 chapters are present. Thanks Fabrice \startproduct[terminale-manual] \project[terminale-environment] \startfrontmatter \setuppagenumbering [location=] \definefont [ChapterTextStyle] [SansBold*default sa 2.2] \setuphead [title] [style=ChapterTextStyle, align=flushright] \setuplist [chapter] [style=bold, alternative=b, width=1em] \setuplist [section] [margin=1em, width=1.75em] \setuplist [subsection] [margin=2.75em, width=2.25em, distance=\spaceamount] \starttitle[title=Table des matières] \placelist [chapter,section,subsection,subsubsection] [criterium=all, interaction=all, alternative=c] \stoptitle \stopfrontmatter \startbodymatter \component[chapitre_1] \component[chapitre_2] \component[chapitre_3] \component[chapitre_4] \component[chapitre_5] \component[chapitre_6] \component[chapitre_7] \component[chapitre_8] \component[chapitre_9] \component[chapitre_10] \component[chapitre_11] \component[chapitre_12] \stopbodymatter \stopproduct ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] About \blackrule
Hi Wolfgang, Thanks a lot. Fabrice Le mer. 19 avr. 2023 à 15:05, Wolfgang Schuster via ntg-context < ntg-context@ntg.nl> a écrit : > Fabrice Couvreur via ntg-context schrieb am 19.04.2023 um 17:01: > > Hi, > The idea is to have a black square whose height is that of the number 3. > Thanks > Fabrice > > \setupbodyfont[12pt,pagella] > \starttext > \blackrule[width=0.71em,height=0.71em]37254H > > > \blackrule[width=\wdofstring{3},height=\htofstring{3},depth=\dpofstring{3}] > > Wolfgang > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] About \blackrule
Hi, The idea is to have a black square whose height is that of the number 3. Thanks Fabrice \setupbodyfont[12pt,pagella] \starttext \blackrule[width=0.71em,height=0.71em]37254H \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Userdata environment
Hi, I have already created a thread on the subject and Wolgang, Marco and Taco have replied but the userdata environment is not yet clear to me. I would like, if possible, to write a definition, a property or a theorem on the left and illustrate it in the right margin with an example. In the code below, the second example is on the second page and not next to the second definition. Thanks. Fabrice \ useMPlibrary[dum] \setuppapersize[A4] \mainlanguage [fr] \setuppagenumbering [alternative=doublesided] \setuplayout [width=12cm, rightmargin=60mm] \setupenumerations [before={\blank}, after={\blank}, alternative=serried, distance=0.5em, title=yes, titleleft=, titleright=, titlestyle=normal, headcommand=\groupedcommand{}{.}, numbercommand=\groupedcommand{}{}, titlecommand=\groupedcommand{(}{)}, width=fit] \defineenumeration [definition] [text=Définition, number=no, style=italic] \defineenumeration [exemple] [text=Exemple, number=no, style=normal] \definemargindata[marginfigure][inright] \setupmargindata [marginfigure][command=\vbox,align=middle,stack=yes] \defineuserdata [margintext] [alternative=margintext] \defineuserdataalternative [margintext] [renderingsetup=userdata:margintext] \startsetups [userdata:margintext] \margindata [inright] [ style={\switchtobodyfont[10pt]}, width=\rightmarginwidth, align={flushleft,broad} ] {\startexemple \getinlineuserdata \stopexemple} \stopsetups \showframe \starttext \startchapter[title={First Chapter},ownnumber=1] \startdefinition \input ward \stopdefinition \startuserdata [margintext] \input ward \stopuserdata \startdefinition \input ward \stopdefinition \startuserdata [margintext] \input knuth \stopuserdata \stopchapter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Problem with latest version ?
Hi, >From my side, after the last update, it works. Thank you Hans. Fabrice Le ven. 6 janv. 2023 à 14:17, Gavin via ntg-context a écrit : > Hi Hans, > > > On Jan 5, 2023, at 5:49 AM, Hans Hagen via ntg-context < > ntg-context@ntg.nl> wrote: > > On 1/5/2023 11:40 AM, Gavin via ntg-context wrote: > >> ...I can try with the latest LMTX later today. The test file works with > TeXLive 2022 > >> Gavin > >> TEST FILE: > >> \usemodule[tikz] > >> \usemodule[pgfplots] % PGFPlots module for graphs > >> \starttext > >> \starttikzpicture > >> \draw (0, 0) circle (3cm); > >> \stoptikzpicture > >> \starttikzpicture > >> \startaxis > >>\addplot+[domain=0:360] > >>{sin(x)}; > >> \stopaxis > >> \stoptikzpicture > >> \stoptext > > fixed in next upload (later today) > > I downloaded yesterday's upload. It did not work for me. I did a clean > instal. > > ConTeXt ver: 2023.01.04 11:35 LMTX fmt: 2023.1.6 int: english/english > ... > tex error on line 14 in file ./TikZTest.tex: Control sequence expected > instead of undefined > >\startaxis > > \startaxis > > > -Gavin > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Problem with latest version ?
The problem seems to come from pgfplots ... Le mer. 4 janv. 2023 à 17:35, Fabrice Couvreur a écrit : > > Hi, > I just installed the latest version of LMTX and also updated to texlive > 2022 and I get this error message which was not the case before. > Thank you. > Fabrice > > > Running `lmtX' on `complexes_2' with > ``/home/fabrice/LMTX/tex/texmf-linux-64/bin/mtxrun --autogenerate --script > context --autopdf --purgeall complexes_2'' > > resolvers | formats | executing runner 'run luametatex format': > /home/fabrice/LMTX/tex/texmf-linux-64/bin/luametatex > --jobname="./complexes_2.tex" > --fmt=/home/fabrice/LMTX/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt > --lua=/home/fabrice/LMTX/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui > --c:autopdf --c:currentrun=1 --c:fulljobname="./complexes_2.tex" > --c:input="./complexes_2.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall > --c:texmfbinpath="/home/fabrice/LMTX/tex/texmf-linux-64/bin" > system > > system > ConTeXt ver: 2023.01.04 11:35 LMTX fmt: 2023.1.4 int: > english/english > system > > system > 'cont-new.mkxl' loaded > open source > level 1, order 1, name > '/home/fabrice/LMTX/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' > system > beware: some patches loaded from cont-new.mkiv > close source> level 1, order 1, name > '/home/fabrice/LMTX/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' > system > files > jobname './complexes_2', input > './complexes_2.tex', result './complexes_2' > fonts > latin modern fonts are not preloaded > languages > language 'en' is active > open source > level 1, order 2, name './complexes_2.tex' > open source > level 2, order 3, name 'exercises.mkiv' > open source > level 3, order 4, name 'terminale-modules.tex' > open source > level 4, order 5, name > '/home/fabrice/LMTX/tex/texmf-context/tex/context/base/mkiv/symb-imp-mvs.mkiv' > close source> level 4, order 5, name > '/home/fabrice/LMTX/tex/texmf-context/tex/context/base/mkiv/symb-imp-mvs.mkiv' > fonts > symbols > library 'mvs' loaded > open source > level 4, order 6, name > '/home/fabrice/LMTX/tex/texmf-context/tex/context/base/mkiv/colo-imp-xwi.mkiv' > close source> level 4, order 6, name > '/home/fabrice/LMTX/tex/texmf-context/tex/context/base/mkiv/colo-imp-xwi.mkiv' > colors > system 'xwi' is loaded > modules > 'tikz' is loaded > open source > level 4, order 7, name > '/home/fabrice/LMTX/tex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl' > open source > level 5, order 8, name 'pgfutil-common.tex' > open source > level 6, order 9, name 'pgfutil-common-lists.tex' > close source> level 6, order 9, name 'pgfutil-common-lists.tex' > close source> level 5, order 9, name 'pgfutil-common.tex' > open source > level 5, order 10, name 'pgfutil-context.def' > close source> level 5, order 10, name 'pgfutil-context.def' > open source > level 5, order 11, name 'pgfrcs.code.tex' > close source> level 5, order 11, name 'pgfrcs.code.tex' > open source > level 5, order 12, name 'pgfsys.code.tex' > open source > level 6, order 13, name 'pgfkeys.code.tex' > open source > level 7, order 14, name 'pgfkeysfiltered.code.tex' > close source> level 7, order 14, name 'pgfkeysfiltered.code.tex' > close source> level 6, order 14, name 'pgfkeys.code.tex' > open source > level 6, order 15, name 'pgf.cfg' > close source> level 6, order 15, name 'pgf.cfg' > Driver file for pgf: pgfsys-pdftex.def > > open source > level 6, order 16, name 'pgfsys-pdftex.def' > open source > level 7, order 17, name 'pgfsys-common-pdf.def' > close source> level 7, order 17, name 'pgfsys-common-pdf.def' > close source> level 6, order 17, name 'pgfsys-pdftex.def' > close source> level 5, order 17, name 'pgfsys.code.tex' > open source > level 5, order 18, name 'pgfkeys.code.tex' > close source> level 5, order 18, name 'pgfkeys.code.tex' > op
[NTG-context] Problem with latest version ?
Hi, I just installed the latest version of LMTX and also updated to texlive 2022 and I get this error message which was not the case before. Thank you. Fabrice Running `lmtX' on `complexes_2' with ``/home/fabrice/LMTX/tex/texmf-linux-64/bin/mtxrun --autogenerate --script context --autopdf --purgeall complexes_2'' resolvers | formats | executing runner 'run luametatex format': /home/fabrice/LMTX/tex/texmf-linux-64/bin/luametatex --jobname="./complexes_2.tex" --fmt=/home/fabrice/LMTX/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/home/fabrice/LMTX/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui --c:autopdf --c:currentrun=1 --c:fulljobname="./complexes_2.tex" --c:input="./complexes_2.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall --c:texmfbinpath="/home/fabrice/LMTX/tex/texmf-linux-64/bin" system > system > ConTeXt ver: 2023.01.04 11:35 LMTX fmt: 2023.1.4 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/home/fabrice/LMTX/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 1, order 1, name '/home/fabrice/LMTX/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './complexes_2', input './complexes_2.tex', result './complexes_2' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './complexes_2.tex' open source > level 2, order 3, name 'exercises.mkiv' open source > level 3, order 4, name 'terminale-modules.tex' open source > level 4, order 5, name '/home/fabrice/LMTX/tex/texmf-context/tex/context/base/mkiv/symb-imp-mvs.mkiv' close source> level 4, order 5, name '/home/fabrice/LMTX/tex/texmf-context/tex/context/base/mkiv/symb-imp-mvs.mkiv' fonts > symbols > library 'mvs' loaded open source > level 4, order 6, name '/home/fabrice/LMTX/tex/texmf-context/tex/context/base/mkiv/colo-imp-xwi.mkiv' close source> level 4, order 6, name '/home/fabrice/LMTX/tex/texmf-context/tex/context/base/mkiv/colo-imp-xwi.mkiv' colors > system 'xwi' is loaded modules > 'tikz' is loaded open source > level 4, order 7, name '/home/fabrice/LMTX/tex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl' open source > level 5, order 8, name 'pgfutil-common.tex' open source > level 6, order 9, name 'pgfutil-common-lists.tex' close source> level 6, order 9, name 'pgfutil-common-lists.tex' close source> level 5, order 9, name 'pgfutil-common.tex' open source > level 5, order 10, name 'pgfutil-context.def' close source> level 5, order 10, name 'pgfutil-context.def' open source > level 5, order 11, name 'pgfrcs.code.tex' close source> level 5, order 11, name 'pgfrcs.code.tex' open source > level 5, order 12, name 'pgfsys.code.tex' open source > level 6, order 13, name 'pgfkeys.code.tex' open source > level 7, order 14, name 'pgfkeysfiltered.code.tex' close source> level 7, order 14, name 'pgfkeysfiltered.code.tex' close source> level 6, order 14, name 'pgfkeys.code.tex' open source > level 6, order 15, name 'pgf.cfg' close source> level 6, order 15, name 'pgf.cfg' Driver file for pgf: pgfsys-pdftex.def open source > level 6, order 16, name 'pgfsys-pdftex.def' open source > level 7, order 17, name 'pgfsys-common-pdf.def' close source> level 7, order 17, name 'pgfsys-common-pdf.def' close source> level 6, order 17, name 'pgfsys-pdftex.def' close source> level 5, order 17, name 'pgfsys.code.tex' open source > level 5, order 18, name 'pgfkeys.code.tex' close source> level 5, order 18, name 'pgfkeys.code.tex' open source > level 5, order 19, name 'pgfsyssoftpath.code.tex' close source> level 5, order 19, name 'pgfsyssoftpath.code.tex' open source > level 5, order 20, name 'pgfsysprotocol.code.tex' close source> level 5, order 20, name 'pgfsysprotocol.code.tex' open source > level 5, order 21, name 'pgfcore.code.tex' open source > level 6, order 22, name 'pgfmath.code.tex' open source > level 7, order 23, name 'pgfmathcalc.code.tex' open source > level 8, order 24, name 'pgfmathutil.code.tex' fonts > beware: no fonts are loaded yet, using 'lm mono' in box close source> level 8, order 24, name 'pgfmathutil.code.tex' open source > level 8, order 25, name 'pgfmathparser.code.tex' close source> level 8, order 25, name 'pgfmathparser.code.tex' open source > level 8, order 26, name 'pgfmathfunctions.code.tex' open source > level 9, order 27, name 'pgfmathfunctions.basic.code.tex' close source> level 9, order 27, name 'pgfmathfunctions.basic.code.tex' open source > level 9, order 28, name 'pgfmathfunctions.trigono
Re: [NTG-context] Page break with placement of a figure at the bottom of the page
Hi Bruce and Pablo, I'm sorry for the late reply but I'm running out of time right now. Thanks for trying to solve the problem. I think the problem comes from the pyramid.png file. Fabrice Le dim. 13 nov. 2022 à 14:37, Pablo Rodriguez via ntg-context < ntg-context@ntg.nl> a écrit : > On 11/13/22 11:32, Fabrice Couvreur via ntg-context wrote: > > Hi Pablo, > > Indeed but I posted these two files in a previous post. > > Hi Fabrice, > > the output from your ie_3.tex is too big for the list, so > https://pdf.ousia.tk/ie_3.pdf contains it. > > I see no problem there, but I think that the output from > https://mailman.ntg.nl/pipermail/ntg-context/2022/107191.html may come > from a different source. > > BTW, I couldn’t find "ie_3.tex" in > https://mailman.ntg.nl/pipermail/ntg-context/2022.txt.gz (which seems to > be generated with messages previous to current date). > > If you sent the files before, it is fine to include a link to the > relevant message in the list (such as the first link included in this > message). > > BTW, it might be worth considering a GitHub or GitLab repository for not > minimal samples. There files may be stored (and the whole repository > might be deleted when not needed). > > I hope it helps, > > Pablo > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Page break with placement of a figure at the bottom of the page
Hi Bruce and Pablo, I'm sorry for the late reply but I'm running out of time right now. Thanks for trying to solve the problem. I think the problem comes from the pyramid.png file. Fabrice Le mer. 16 nov. 2022 à 14:55, Fabrice Couvreur a écrit : > Hi Bruce and Pablo, > I'm sorry for the late reply but I'm running out of time right now. Thanks > for trying to solve the problem. I think the problem comes from the > pyramid.png file. > Fabrice > > Le dim. 13 nov. 2022 à 14:37, Pablo Rodriguez via ntg-context < > ntg-context@ntg.nl> a écrit : > >> On 11/13/22 11:32, Fabrice Couvreur via ntg-context wrote: >> > Hi Pablo, >> > Indeed but I posted these two files in a previous post. >> >> Hi Fabrice, >> >> the output from your ie_3.tex is too big for the list, so >> https://pdf.ousia.tk/ie_3.pdf contains it. >> >> I see no problem there, but I think that the output from >> https://mailman.ntg.nl/pipermail/ntg-context/2022/107191.html may come >> from a different source. >> >> BTW, I couldn’t find "ie_3.tex" in >> https://mailman.ntg.nl/pipermail/ntg-context/2022.txt.gz (which seems to >> be generated with messages previous to current date). >> >> If you sent the files before, it is fine to include a link to the >> relevant message in the list (such as the first link included in this >> message). >> >> BTW, it might be worth considering a GitHub or GitLab repository for not >> minimal samples. There files may be stored (and the whole repository >> might be deleted when not needed). >> >> I hope it helps, >> >> Pablo >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : https://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : https://contextgarden.net >> >> ___ >> > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Page break with placement of a figure at the bottom of the page
Hi Pablo, Indeed but I posted these two files in a previous post. Fabrice Le dim. 13 nov. 2022 à 09:24, Pablo Rodriguez via ntg-context < ntg-context@ntg.nl> a écrit : > On 11/12/22 15:09, Fabrice Couvreur via ntg-context wrote: > > Hi Pablo and Bruce, > > Please try to figure out what is not working. > > I'm sorry but I forgot in my previous post files. > > Hi Fabrice, > > I get empty files when compiling premiere-modules.tex and > premiere-macros.tex and error message with tikz-style.tex. > > I guess a fourth file invoking the other three files may be missing here. > > Pablo > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > \environment[template.mkiv] \definemargindata[marginfigure][inright] \useMPlibrary[dum] \setupmargindata [marginfigure][command=\vbox,align=middle,stack=yes] \setvariables [headertext] [title={Interrogation écrite}, number={3}, day={8}, month={11}, year={2022}, location={Premières}, time={55 minutes}] \showgrid \startcomponent[ie_3] \startex Nous considérons la suite \u définie sur \N par son premier terme \m{u_0=-2} et la relation de récurrence \startformula \text{pour tout} \; n \in \N, \; u_{n+1}=\sqrt{3+u_n}. \stopformula Les termes de cette suite sont itérés par la fonction \m{f\,\colon x \longmapsto \sqrt{x+3}} qui est définie sur \intervalfo{-3}{+\infty}, et dont la représentation graphique \m{C_f} est donnée ci-après. \startlinecorrection[blank] \startmidaligned \externalfigure[spirale.pdf] \stopmidaligned \stoplinecorrection Représenter graphiquement les cinq premiers termes de cette suite. \stopex \startex La suite \u est arithmétique de raison \m{r=-7} et de premier terme \m{u_0=5}. \startitemize[n] \startitem Calculer \m{u_{16}}. \stopitem \startitem Calculer la somme \startformula \sum_{k=0}^{k=16}u_k=u_0+u_1+u_2+\cdots + u_{15}+u_{16}. \stopformula \stopitem \stopitemize \stopex \startex On considère la suite arithmétique \u, définie sur \N, telle que \m{u_{12}=52} et \m{u_{23}=107}. \startitemize[n] \startitem Calculer la raison \m{r} de la suite. \stopitem \startitem Déterminer le terme initial \m{u_0}. \stopitem \startitem Déterminer \m{u_n} en fonction de \m{n}, puis calculer \m{u_{55}}. \stopitem \startitem Donner le sens de variation de \u. \stopitem \startitem Conjecturer la limite éventuelle de la suite \u. \stopitem \stopitemize \stopex \startex On s'intéresse à des pyramides construites avec des allumettes comme ci-après . En poursuivant ainsi, on obtient des pyramides à autant d'étages que l'on souhaite à condition, bien sûr, d'avoir assez d'allumettes. \startlinecorrection[blank] \startmidaligned \startcombination[3*1] {\externalfigure[pyramide_1.pdf]}{\tfx 1 étage} {\externalfigure[pyramide_2.pdf]}{\tfx 2 étages} {\externalfigure[pyramide_3.pdf]}{\tfx 3 étages} \stopcombination \stopmidaligned \stoplinecorrection Le 1\high{\tfxx er} étage est formé de 3 allumettes, le 2\high{\tfxx e} de 7 allumettes, et le 3\high{\tfxx e} de 11 allumettes. \startitemize[n] \startitem De combien d'allumettes est formé le 4\high{\tfxx e} étage ? Le 5\high{\tfxx e} ? \stopitem \startitem Pour tout entier naturel \m{n\geqslant 1}, on note \m{u_n} le nombre d'allumettes du \m{n-\text{ième}} étage. Ainsi, nous avons \m{u_1=3}. Justifier que la suite \u est arithmétique en précisant sa raison. \stopitem \startitem Déterminer le calcul explicite de \m{u_n} en fonction de \m{n}, \m{u_1} et \m{r}. \stopitem \placerecipe{}{ \externalfigure[pyramide.png][scale=850]} \startitem Déterminer le nombre d'allumettes du 10\high{\tfxx e} étage. \stopitem \startitem Combien d'allumettes au total ont été nécessaires pour réaliser la construction jusqu'au 10\high{\tfxx e} étage ? \stopitem \startitem On considère la fonction {\tt \darkred pyramide()} ci-contre programmée en langage Python. À quoi correspond le nombre renvoyé par
Re: [NTG-context] Page break with placement of a figure at the bottom of the page
Hi Pablo and Bruce, Please try to figure out what is not working. I'm sorry but I forgot in my previous post files. Fabrice Le sam. 12 nov. 2022 à 12:28, Pablo Rodriguez via ntg-context < ntg-context@ntg.nl> a écrit : > On 11/11/22 21:58, Bruce Horrocks via ntg-context wrote: > >> On 10 Nov 2022, at 17:06, Fabrice Couvreur via ntg-context wrote: > >> > >> Hi, > >> Sorry to come back to you, but it seems to me that there is enough > space here. > >> Fabrice > > > > For some reason your PNG images came through in extremely low > > resolution. Without having the ConTeXt source it's hard to say for sure > > what's happening - for example, I would have expected the text on the > > second page to be at the bottom of the first even if there wasn't room > > for the image - because that was what was happening in your first > example. > > Hi Fabrice and Bruce, > > I agree that the source would be helpful to say what may be hard for > ConTeXt. > > In any case, ConTeXt has a hard time with pagebreaks when you combine > elements that need both horizontal and vertical calculation, such as in: > > \starttext > \dorecurse{64} > {\input knuth\footnote{\input zapf} > > \startitemize[a, columns, eight, packed] > \dorecurse{64}{\item\currentitemnumber} > \stopitemize} > \stoptext > > There is a similar issue with paragraph notes. > > Pablo > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > \startenvironment[premiere-modules] \usesymbols[mvs] \usecolors[xwi] \usemodule[tikz] \usemodule[pgfplots] \usepgfplotslibrary[fillbetween] \pgfplotsset{compat=newest} \usetikzlibrary[arrows] \usetikzlibrary[automata] \usetikzlibrary[calc] \usetikzlibrary[backgrounds] \usetikzlibrary[intersections] \usetikzlibrary[patterns] \usetikzlibrary[bending] \usetikzlibrary[arrows.meta] \usetikzlibrary[shapes.geometric] \usetikzlibrary[plotmarks] \usetikzlibrary[shapes] \usetikzlibrary[trees] \usetikzlibrary[animations] \usetikzlibrary[quotes] \usetikzlibrary[mindmap] \usetikzlibrary[matrix,decorations.pathreplacing,fit,positioning] \stopenvironment\startenvironment[premiere-macros] \unexpanded\def\R{\math{\mathbb{R}}\autoinsertnextspace} \protected\def\N{\doifnextcharelse{*}\MyNstarred\MyNnormal} \def\MyNstarred*{\m{\mathbb{N}^*}\autoinsertnextspace} \def\MyNnormal {\m{\mathbb{N} }\autoinsertnextspace} \define[1]\cscript {\start\switchtobodyfont[stixtwo]\m{{\mathscript{#1}}}\stop} %\protected\def\card#1{\m{\mfunction{Card}\thinspace(#1)}} \define[1]\card {\m{\mathtexttf{Card}\thinspace(#1)}\autoinsertnextspace} \define[1]\norm {\math{\left\Vert#1\right\Vert}} \define\esp{\math{\mathcal{E}}\autoinsertnextspace} \define\espv{\math{\vec{\mathcal{E}}}\autoinsertnextspace} \define\repere {\m{\left(O\,;\vec{i}, \vec{j}\right)}\autoinsertnextspace} \define\base {\m{\left(\vec{i}, \vec{j}, \vec{k}\right)}\autoinsertnextspace} \protected\def\vector#1{% \starttikzpicture[baseline=(arg.base),>=stealth,thick] \node[inner xsep=0pt] (arg) {\m{#1}}; \draw[->,shorten >=-2pt] (arg.north west) -- (arg.north east); \stoptikzpicture% } \definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX] \unexpanded\def\intervalff#1#2{\math{\left[#1\nonscript\,;#2\right]}} \unexpanded\def\intervaloo#1#2{\math{\left]#1\nonscript\,;#2\right[}} \unexpanded\def\intervalfo#1#2{\math{\left[#1\nonscript\,;#2\right[}} \unexpanded\def\intervalof#1#2{\math{\left]#1\nonscript\,;#2\right]}} \define[1]\vabs{\math{\left\vert#1\right\vert}} \define\u{\math{\left(u_n\right)}\autoinsertnextspace} \define\v{\math{\left(v_n\right)}\autoinsertnextspace} \define\w{\math{\left(w_n\right)}\autoinsertnextspace} \unexpanded\def\euros#1{#1\,\symbol[europe][EUR]} \protected\def\point#1#2#3{\math{#1\left(#2\,;#3\right)}} \protected\def\coord#1#2{\math{\left(#1\,;#2\right)}} \define[2]\prod{\m{\vector{#1}\cdot\vector{#2}}} \protected\def\e#1{\math{{\rm e}^{#1}}\autoinsertnextspace} \stopenvironment\startenvironment[tikz-style] \pgfplotsset{ /pgfplots/layers/Bowpark/.define layer set={ axis background,axis grid,main,axis ticks,axis lines,axis tick labels, axis de
Re: [NTG-context] Page break with placement of a figure at the bottom of the page
Hi, Sorry to come back to you, but it seems to me that there is enough space here. Fabrice Le jeu. 10 nov. 2022 à 18:04, Fabrice Couvreur a écrit : > Hi, > Sorry to come back to you, but it seems to me that there is enough space > here. > Fabrice > > Le jeu. 10 nov. 2022 à 17:45, Fabrice Couvreur < > fabrice1.couvr...@gmail.com> a écrit : > >> Hi, >> Sorry to come back to you, but it seems to me that there is enough space >> here. >> Fabrice >> >> Le jeu. 10 nov. 2022 à 11:59, Fabrice Couvreur < >> fabrice1.couvr...@gmail.com> a écrit : >> >>> Sorry to come back to you, but it seems to me that there is enough space >>> here. >>> >>> Le jeu. 10 nov. 2022 à 11:36, Fabrice Couvreur < >>> fabrice1.couvr...@gmail.com> a écrit : >>> >>>> Hi Bruce and Pablo, >>>> Thank you very much, your explanations are very clear. >>>> Cordially >>>> Fabrice >>>> >>>> Le mer. 9 nov. 2022 à 19:39, Bruce Horrocks via ntg-context < >>>> ntg-context@ntg.nl> a écrit : >>>> >>>>> On 9 Nov 2022, at 18:22, Pablo Rodriguez via ntg-context < >>>>> ntg-context@ntg.nl> wrote: >>>>> > >>>>> > On 11/9/22 17:51, Fabrice Couvreur via ntg-context wrote: >>>>> >> Hi, >>>>> >> I find that for some time (but maybe the problem comes from me !), >>>>> the >>>>> >> placement of a figure at the bottom of the page causes a page break >>>>> when >>>>> >> it seems to me that there is enough space, which poses some >>>>> problems in >>>>> >> the pagination of my documents. >>>>> > >>>>> > Hi Fabrice, >>>>> > >>>>> > your figure requires about 7¼ lines (one line before, six for the >>>>> image >>>>> > itself, and some extra space after it). >>>>> > >>>>> > Your layout for the first page only allows 43 lines and sample text >>>>> ends >>>>> > on line 37. >>>>> > >>>>> > Replace \showframe with \showgrid and you will see that there might >>>>> be >>>>> > not enough space to fit the image in the first page. >>>>> > >>>>> > Add "bottomspace=7.25mm" to the layout for the first page and the >>>>> image >>>>> > will fit in the first page. >>>>> > >>>>> > Just in case it might help, >>>>> >>>>> Or Pablo's answer shown another way... change the end of the example >>>>> to: >>>>> >>>>> \starttext >>>>> \dorecurse{11}{\input ward} >>>>> \placerecipe{}{\externalfigure[dum]} >>>>> \dorecurse{5}{\input ward} %% extra >>>>> \stoptext >>>>> >>>>> and the extra text shows how much space the image requires. Holding a >>>>> ruler up to the screen you can see that it won't fit. >>>>> >>>>> The problem seems to be that the image is reserving space for a >>>>> caption even though there isn't a caption. A work-around is to change >>>>> \setupfloat to the following: >>>>> >>>>> \setupfloat >>>>> [recipe] >>>>> [default={right,none,high}] >>>>> >>>>> and then the image fits as you want it to. >>>>> — >>>>> Bruce Horrocks >>>>> Hampshire, UK >>>>> >>>>> >>>>> ___ >>>>> If your question is of interest to others as well, please add an entry >>>>> to the Wiki! >>>>> >>>>> maillist : ntg-context@ntg.nl / >>>>> https://www.ntg.nl/mailman/listinfo/ntg-context >>>>> webpage : https://www.pragma-ade.nl / http://context.aanhet.net >>>>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>>>> wiki : https://contextgarden.net >>>>> >>>>> ___ >>>>> >>>> ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Page break with placement of a figure at the bottom of the page
Hi Bruce and Pablo, Thank you very much, your explanations are very clear. Cordially Fabrice Le mer. 9 nov. 2022 à 19:39, Bruce Horrocks via ntg-context < ntg-context@ntg.nl> a écrit : > On 9 Nov 2022, at 18:22, Pablo Rodriguez via ntg-context < > ntg-context@ntg.nl> wrote: > > > > On 11/9/22 17:51, Fabrice Couvreur via ntg-context wrote: > >> Hi, > >> I find that for some time (but maybe the problem comes from me !), the > >> placement of a figure at the bottom of the page causes a page break when > >> it seems to me that there is enough space, which poses some problems in > >> the pagination of my documents. > > > > Hi Fabrice, > > > > your figure requires about 7¼ lines (one line before, six for the image > > itself, and some extra space after it). > > > > Your layout for the first page only allows 43 lines and sample text ends > > on line 37. > > > > Replace \showframe with \showgrid and you will see that there might be > > not enough space to fit the image in the first page. > > > > Add "bottomspace=7.25mm" to the layout for the first page and the image > > will fit in the first page. > > > > Just in case it might help, > > Or Pablo's answer shown another way... change the end of the example to: > > \starttext > \dorecurse{11}{\input ward} > \placerecipe{}{\externalfigure[dum]} > \dorecurse{5}{\input ward} %% extra > \stoptext > > and the extra text shows how much space the image requires. Holding a > ruler up to the screen you can see that it won't fit. > > The problem seems to be that the image is reserving space for a caption > even though there isn't a caption. A work-around is to change \setupfloat > to the following: > > \setupfloat > [recipe] > [default={right,none,high}] > > and then the image fits as you want it to. > — > Bruce Horrocks > Hampshire, UK > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Page break with placement of a figure at the bottom of the page
Hi, I find that for some time (but maybe the problem comes from me !), the placement of a figure at the bottom of the page causes a page break when it seems to me that there is enough space, which poses some problems in the pagination of my documents. Thanks. Fabrice \useMPlibrary[dum] \definelayout [1] [topspace=10mm, header=15mm, headerdistance=10mm, height=middle, width=middle, location=middle] \setuplayout [topspace=10mm, header=0pt, headerdistance=0pt, height=middle, width=middle, location=middle] \definefloat [recipe] [figure] \setupfloat [recipe] [default={right,none}] \showframe \starttext \dorecurse{11}{\input ward} \placerecipe{}{\externalfigure[dum]} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Create the values of a sequence with Lua
Hi, The idea is to fill the array with the sequence defined by p(0) = 0.3 and p(n + 1) = 0.3 + 0.7*p(n) The problem is that I don't really master Lua but I will learn when I have some time! Thanks for your help. Fabrice \starttext \startluacode context.startxtable({"align={middle,lohi},width=2cm,bodyfont=9pt"}) p = {} p[0] = 0.3 for i=0,19 do p[i+1] = 0.3+0.7*p[i]^2 end context.startxrow() for i=0,19 do context.startxcell() context(i) context.stopxcell() context.startxcell() context(i+1) context.stopxcell() context.startxcell() context("%0.8f",p[i] ) context.stopxcell() context.stopxrow() end context.stopxtable() \stopluacode \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] About macro numberstriped ()
Hi Mikael, Great job ! Thanks Fabrice Le dim. 2 oct. 2022 à 15:37, Mikael Sundqvist via ntg-context < ntg-context@ntg.nl> a écrit : > Hi, > > On Sun, Oct 2, 2022 at 3:26 PM Hans Hagen via ntg-context > wrote: > > > > On 10/2/2022 3:13 PM, Fabrice Couvreur via ntg-context wrote: > > > Ok, it works very well. Without wanting to insist, how to have the same > > > hatching with two different figures ? > > see upcoming mail from Mikael > > Oh, OK, here it goes. Hans will probably rename things if he adds this. > > \startMPpage[offset=1dk] > > vardef Stripe(expr p, a, d) = > save thestripe ; picture thestripe ; thestripe := nullpicture ; > save diag ; numeric diag ; diag := 0.55*( abs((urcorner boundingbox p) > - (llcorner boundingbox p)) ) ; > thestripe := image ( > draw (-diag,0) -- (diag, 0) && > for i = d step d until diag: > (-diag, i) -- (diag, i) && > (-diag,-i) -- (diag,-i) && > endfor nocycle > withpen currentpen ; > ) ; > thestripe := thestripe shifted center boundingbox p ; > thestripe := thestripe rotatedaround(center boundingbox p, a) ; > clip thestripe to p ; > thestripe > enddef ; > > > path p ; p := fullcircle scaled 3cm && (unitsquare scaled 2cm shifted > (4cm,4cm)) && cycle ; > fill p withcolor darkred ; > draw Stripe(p,30,.2cm) withcolor darkgreen ; > > path q ; q := fullsquare randomized 0.3 scaled 3cm yshifted 5cm ; > fill q withcolor yellow ; > draw Stripe(q,70,.3cm) withcolor red ; > > draw Stripe(p && q && cycle, -20, .5cm) withcolor "orange" ; > > draw p ; > draw q ; > > \stopMPpage > > /Mikael > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] About macro numberstriped ()
Ok, it works very well. Without wanting to insist, how to have the same hatching with two different figures ? Thanks. Fabrice Le dim. 2 oct. 2022 à 13:38, Hans Hagen via ntg-context a écrit : > On 10/2/2022 1:02 PM, Fabrice Couvreur via ntg-context wrote: > > I just tried but I got an empty file... > > Do we agree that I have to replace the two lines with the other two ? > > Regarding what you proposed, how to get the same type of hatching in > > both figures ? > no, we disagree here; add them after the min/max lines > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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 / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] About macro numberstriped ()
I just tried but I got an empty file... Do we agree that I have to replace the two lines with the other two ? Regarding what you proposed, how to get the same type of hatching in both figures ? \startMPcode path p, q, r, b ; p := unitsquare xyscaled (4cm,4cm) ; z[0] = (2cm,0cm) ; z[1] = (2cm,4cm) ; z[2] = (0cm,2cm) ; q := llcorner p--z[0]--z[1]--z[2]--cycle ; r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; b := (0cm,0cm) -- lrcorner r -- lrcorner p -- cycle; draw r withpattern image ( draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ; % how to get the corner dots ) withpatternscale 1/4 withpen pencircle scaled 1bp withcolor green ; draw b withpattern image ( draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ; % how to get the corner dots ) withpatternscale 1/16 withpen pencircle scaled 1bp withcolor green ; draw b withpen pencircle scaled 1bp withcolor darkgreen; draw r withpen pencircle scaled 1bp withcolor darkgreen; draw p; label.llft("B", p) ; label.lrt("C", p) ; label.ulft("A", p) ; label.urt("D", p) ; label.urt("F", lrcorner r) ; label.lft("E", llcorner r) ; label.top("G", urcorner r) ; \stopMPcode Le dim. 2 oct. 2022 à 11:52, Hans Hagen via ntg-context a écrit : > On 10/2/2022 11:20 AM, Floris van Manen via ntg-context wrote: > > > > > > On 02/10/2022 10:55, Fabrice Couvreur via ntg-context wrote: > >> Initially, there was a bug with maro numberstriped() and Hans > >> suggested another sensible approach to me, but you don't get the same > >> shape of the hatches depending on the dimensions of the squares. > > > > some unexpected side effect show up when the unitsquare is xyscaled to a > > rectangle like (2.5cm,1cm) > > it seems related to the angle chosen > > > > e.g. > > > > > > > > \startMPcode > > > > path p, q, r, b ; > > p := unitsquare xyscaled (4cm,4cm) ; > > q := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; > > r := unitsquare xyscaled (2.5cm,1cm) shifted(1cm,3cm) ; > > b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ; > > > > draw r anglestriped (1,35,2) withcolor red; > > draw q anglestriped (1,35,2) withcolor green; > > draw b anglestriped (1,35,2) withcolor cyan; > > draw p; > > draw q; > > draw b; > > draw r; > > > > label.llft("D", p) ; > > label.lrt("C", p) ; > > label.ulft("A", p) ; > > label.urt("B", p) ; > > label.urt("P", lrcorner r) ; > > label.lft("Q", llcorner r) ; > > label.top("M", urcorner r) ; > > > > \stopMPcode > > for that you can patch mp-tool.mpxl (l 676): > > maximum := max (xpart llcorner mask, xpart urcorner mask, ypart > llcorner mask, ypart urcorner mask) ; > minimum := min (xpart llcorner mask, xpart urcorner mask, ypart > llcorner mask, ypart urcorner mask) ; > % a hack: > maximum := maximum + max(xpart urcorner shape, ypart urcorner shape); > minimum := minimum - max(xpart urcorner shape, ypart urcorner shape); > > a bit overkill but it seems to work > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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 / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] About macro numberstriped ()
Not only, it is also true with the code below : \startMPcode path p, q, r, b ; p := unitsquare xyscaled (4cm,4cm) ; z[0] = (2cm,0cm) ; z[1] = (2cm,4cm) ; z[2] = (0cm,2cm) ; q := llcorner p--z[0]--z[1]--z[2]--cycle ; r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; b := (0cm,0cm) -- lrcorner r -- lrcorner p -- cycle; draw r anglestriped (1,45,2) withcolor green; draw b anglestriped (1,45,2) withcolor green; draw b withcolor darkgreen; draw r withcolor darkgreen; draw p; label.llft("B", p) ; label.lrt("C", p) ; label.ulft("A", p) ; label.urt("D", p) ; label.urt("F", lrcorner r) ; label.lft("E", llcorner r) ; label.top("G", urcorner r) ; \stopMPcode Le dim. 2 oct. 2022 à 11:21, Floris van Manen via ntg-context < ntg-context@ntg.nl> a écrit : > > > On 02/10/2022 10:55, Fabrice Couvreur via ntg-context wrote: > > Initially, there was a bug with maro numberstriped() and Hans suggested > > another sensible approach to me, but you don't get the same shape of the > > hatches depending on the dimensions of the squares. > > some unexpected side effect show up when the unitsquare is xyscaled to a > rectangle like (2.5cm,1cm) > it seems related to the angle chosen > > e.g. > > > > \startMPcode > > path p, q, r, b ; > p := unitsquare xyscaled (4cm,4cm) ; > q := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; > r := unitsquare xyscaled (2.5cm,1cm) shifted(1cm,3cm) ; > b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ; > > draw r anglestriped (1,35,2) withcolor red; > draw q anglestriped (1,35,2) withcolor green; > draw b anglestriped (1,35,2) withcolor cyan; > draw p; > draw q; > draw b; > draw r; > > label.llft("D", p) ; > label.lrt("C", p) ; > label.ulft("A", p) ; > label.urt("B", p) ; > label.urt("P", lrcorner r) ; > label.lft("Q", llcorner r) ; > label.top("M", urcorner r) ; > > \stopMPcode > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] About macro numberstriped ()
Hi, Initially, there was a bug with maro numberstriped() and Hans suggested another sensible approach to me, but you don't get the same shape of the hatches depending on the dimensions of the squares. Your solution works perfectly but I'm trying to understand the action of the parameters: the first ? the second represents the angle in degrees that the segments make the third represents the gap between two segments Thanks Fabrice Le sam. 1 oct. 2022 à 21:46, Mikael Sundqvist via ntg-context < ntg-context@ntg.nl> a écrit : > Hi, > > Is this what you are looking for? > > On Sat, Oct 1, 2022 at 7:43 PM Fabrice Couvreur via ntg-context > wrote: > > > > Hi Hans, > > When the rectangles are not identical, how to have the same type of > hatching in both ? > > Thanks. > > Fabrice > > > > > > \starttext > > \startlinecorrection[blank] > > \startmidaligned > > \switchtobodyfont[9pt] > > \startMPcode > > path p, q, r, b ; > > p := unitsquare xyscaled (4cm,4cm) ; > > z[0] = (2cm,0cm) ; > > z[1] = (2cm,4cm) ; > > z[2] = (0cm,2cm) ; > > q := llcorner p--z[0]--z[1]--z[2]--cycle ; > > r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; > > b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ; > > > > draw r anglestriped (1,45,2) withcolor cyan; > draw b anglestriped (1,45,2) withcolor cyan; > > > > >draw p; > >draw b; > >draw r; > > > > label.llft("D", p) ; > > label.lrt("C", p) ; > > label.ulft("A", p) ; > > label.urt("B", p) ; > > label.urt("P", lrcorner r) ; > > label.lft("Q", llcorner r) ; > > label.top("M", urcorner r) ; > > > > \stopMPcode > > \stopmidaligned > > \stoplinecorrection > > \stoptext > > > > > > /Mikael > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] About macro numberstriped ()
Hi Hans, When the rectangles are not identical, how to have the same type of hatching in both ? Thanks. Fabrice \starttext \startlinecorrection[blank] \startmidaligned \switchtobodyfont[9pt] \startMPcode path p, q, r, b ; p := unitsquare xyscaled (4cm,4cm) ; z[0] = (2cm,0cm) ; z[1] = (2cm,4cm) ; z[2] = (0cm,2cm) ; q := llcorner p--z[0]--z[1]--z[2]--cycle ; r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ; draw r withpattern image ( draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ; % how to get the corner dots ) withpatternscale 1/8 withpen pencircle scaled 1pt withcolor cyan; ; draw b withpattern image ( draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ; % how to get the corner dots ) withpatternscale 1/16 withpen pencircle scaled 1pt withcolor cyan; ; draw p; draw b; draw r; label.llft("D", p) ; label.lrt("C", p) ; label.ulft("A", p) ; label.urt("B", p) ; label.urt("P", lrcorner r) ; label.lft("Q", llcorner r) ; label.top("M", urcorner r) ; \stopMPcode \stopmidaligned \stoplinecorrection \stoptext Le mer. 28 sept. 2022 à 21:05, Henning Hraban Ramm via ntg-context < ntg-context@ntg.nl> a écrit : > Am 28.09.22 um 15:29 schrieb Hans Hagen via ntg-context: > > On 9/28/2022 3:11 PM, Fabrice Couvreur via ntg-context wrote: > >> PS : What is the exact meaning of the word "blobs" because my English > >> is average ? > > in order to get 'lines' you need to fill the two opposing corners with > > "blobs of ink" > > Otherwise, a BLOB is a “binary large object”, e.g. if you save image > data to a database. > > Hraban > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] About macro numberstriped ()
Hi Hans, Thank you for this solution which is an approach that I did not know. Fabrice PS : What is the exact meaning of the word "blobs" because my English is average ? Le mar. 27 sept. 2022 à 22:04, Hans Hagen via ntg-context < ntg-context@ntg.nl> a écrit : > On 9/27/2022 7:49 PM, Fabrice Couvreur via ntg-context wrote: > > Hello, > > I notice a strange behavior of the macro numberstriped ( ). > > Thanks. > > Fabrice > > > > \starttext > > \switchtobodyfont[9pt] > > \startMPcode > > > >path p, q, r, b ; > >p := unitsquare xyscaled (4cm,4cm) ; > >z[0] = (2cm,0cm) ; > >z[1] = (2cm,4cm) ; > >z[2] = (0cm,2cm) ; > >q := llcorner p--z[0]--z[1]--z[2]--cycle ; > >r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; > >b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ; > >draw p ; > >draw r withcolor red; > >draw r numberstriped (.25,20,5) withcolor magenta ; > >draw b numberstriped (.25,20,5) withcolor magenta ; > >label.llft("D", p) ; > >label.lrt("C", p) ; > >label.ulft("A", p) ; > >label.urt("B", p) ; > >label.urt("P", lrcorner r) ; > >label.lft("Q", llcorner r) ; > >label.top("M", urcorner r) ; > > > >\stopMPcode > > \stoptext > you need to find a volunteer to make the pattern have the two corner blobs > > \starttext > > \startMPcode > path p, q, r, b ; > path p ; p := unitsquare xyscaled (4cm,4cm) ; > draw p ; > draw p > withpattern image ( > draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ; > % how to get the corner dots > ) > withpatternscale 1/16 > withpen pencircle scaled 1mm > ; > \stopMPcode > > \stoptext > > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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 / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] About macro numberstriped ()
Hello, I notice a strange behavior of the macro numberstriped ( ). Thanks. Fabrice \starttext \switchtobodyfont[9pt] \startMPcode path p, q, r, b ; p := unitsquare xyscaled (4cm,4cm) ; z[0] = (2cm,0cm) ; z[1] = (2cm,4cm) ; z[2] = (0cm,2cm) ; q := llcorner p--z[0]--z[1]--z[2]--cycle ; r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ; draw p ; draw r withcolor red; draw r numberstriped (.25,20,5) withcolor magenta ; draw b numberstriped (.25,20,5) withcolor magenta ; label.llft("D", p) ; label.lrt("C", p) ; label.ulft("A", p) ; label.urt("B", p) ; label.urt("P", lrcorner r) ; label.lft("Q", llcorner r) ; label.top("M", urcorner r) ; \stopMPcode \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Size of all subscripts
Hello How to reduce the size of all subscripts in math mode ? Thanks Fabrice \usemodule[tikz] \protected\def\vector#1{% \starttikzpicture[baseline=(arg.base),>=stealth] \node[inner xsep=0pt] (arg) {\m{#1}}; \draw[thick,->,shorten >=-1pt] (arg.north west) -- (arg.north east); \stoptikzpicture% } \starttext \m{z_{\vector{U}}} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Special numbering
Hi Aditya, Thanks for your help, it works perfectly. Fabrice Le mer. 17 août 2022 à 17:48, Aditya Mahajan via ntg-context < ntg-context@ntg.nl> a écrit : > On Wed, 17 Aug 2022, Fabrice Couvreur via ntg-context wrote: > > > Hello, > > how to get this > > Définition 1.1. > > Proposition 1.2. > > Définition 1.3. > > Proposition 1.4. > > > > Thanks > > Fabrice > > > > \setupenumerations > > [before={\blank}, > >after={\blank}, > >alternative=serried, > >distance=0.5em, > >title=yes, > >titleleft=, > >titleright=, > >titlestyle=normal, > >prefix=yes, > >prefixsegments=chapter, > >way=bychapter, > >headcommand=\groupedcommand{}{.}, > >numbercommand=\groupedcommand{}{}, > >titlecommand=\groupedcommand{(}{)}, > >width=broad] > > > > \defineenumeration > >[definition] > >[text=Définition, > > number=yes, > > style=italic] > > > > \defineenumeration > >[proposition] > >[text=Proposition, > > number=yes, > > Add: > > counter=definition, > > > style=italic] > > > Now, definition and proposition share the same counter. > > > Aditya___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Special numbering
Hello, how to get this Définition 1.1. Proposition 1.2. Définition 1.3. Proposition 1.4. Thanks Fabrice \setupenumerations [before={\blank}, after={\blank}, alternative=serried, distance=0.5em, title=yes, titleleft=, titleright=, titlestyle=normal, prefix=yes, prefixsegments=chapter, way=bychapter, headcommand=\groupedcommand{}{.}, numbercommand=\groupedcommand{}{}, titlecommand=\groupedcommand{(}{)}, width=broad] \defineenumeration [definition] [text=Définition, number=yes, style=italic] \defineenumeration [proposition] [text=Proposition, number=yes, style=italic] \starttext \startchapter [title={First chapter}] \dorecurse{2}{ \startdefinition \stopdefinition \startproposition \stopproposition} \stopchapter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Numbercommand and title
Hello, How to make the period after the number be after the second parenthesis when there is a title like this Définition 1.1 (Title). ? Thanks Fabrice \definestructureconversionset [structure] [n, R, n, n, n] [n] \defineconversionset [digit] [] [n] \setupheads[sectionconversionset=structure] \setupenumerations [before={\blank}, after={\blank}, alternative=serried, distance=0.5em, title=yes, titleleft=, titleright=, titlestyle=normal, numbercommand=\groupedcommand{}{.}, titlecommand=\groupedcommand{(}{)}, width=broad, way=bychapter, prefix=yes, prefixsegments=chapter, prefixconversionset=digit,] \defineenumeration [definition] [text=Définition, number=yes, style=italic] \starttext \startchapter [title={First Chapter}] \startdefinition [title={My first définition}] \input{ward} \stopdefinition \startdefinition \input ward \stopdefinition \startdefinition [title={My third définition}] \input ward \stopdefinition \stopchapter \stopchapter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Font too small with a macro
Hi, I didn't know that \exp was already defined. Thanks Fabrice Le sam. 23 avr. 2022 à 15:28, Mikael Sundqvist via ntg-context < ntg-context@ntg.nl> a écrit : > On Sat, Apr 23, 2022 at 12:11 PM Fabrice Couvreur via ntg-context > wrote: > > > > Hello, > > If I compile with context the expected result is correct but with lmtx > the font under the square root is smaller. > > Thank you > > Fabrice > > > > \protected\def\exp{\text{\normal exp}} > > > > \starttext > > \startformula > >\sqrt{\exp(x)}=\exp\left(\frac{x}{2}\right). > > \stopformula > > \stoptext > > Hi, > > without your redefinition of \exp it looks fine (exp is already > defined). Does that solve your problem, or are you doing something > else, and this exp was just an example? > > Best, Mikael > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Font too small with a macro
Hello, If I compile with context the expected result is correct but with lmtx the font under the square root is smaller. Thank you Fabrice \protected\def\exp{\text{\normal exp}} \starttext \startformula \sqrt{\exp(x)}=\exp\left(\frac{x}{2}\right). \stopformula \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] the resolver databases are not present or outdated
Hello, Some files no longer compile, I tried updating lmtx but I get this. Thank you Fabrice viserion@archlinux LMTX]$ install install.sh install: opérande de fichier cible manquant après 'install.sh' Saisissez « install --help » pour plus d'informations. [viserion@archlinux LMTX]$ sh install.sh mtxrun | forcing cache reload resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/viserion/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/viserion/texmf-local/web2c' from specification 'selfautoparent:/texmf-local/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/viserion/texmf-context/web2c' from specification 'selfautoparent:/texmf-context/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/viserion/texmf-dist/web2c' from specification 'selfautoparent:/texmf-dist/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/viserion/texmf/web2c' from specification 'selfautoparent:/texmf/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/viserion/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/viserion/texmf-local/web2c' from specification 'selfautoparent:/texmf-local/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/viserion/texmf-context/web2c' from specification 'selfautoparent:/texmf-context/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/viserion/texmf-dist/web2c' from specification 'selfautoparent:/texmf-dist/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/viserion/texmf/web2c' from specification 'selfautoparent:/texmf/web2c' resolvers | resolving | resolvers | resolving | warning: no lua configuration files found resolvers | resolving | no texmf paths are defined (using TEXMF) resolvers | resolving | mtxrun | the resolver databases are not present or outdated mtx-install | provide valid server and instance ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] new upload
Hi Hans I just updated lmtx and this macro does not work although it did before. On the other hand, no problem with context. Thanks. Fabrice \protected\def\e#1{\math{{\rm e}^{#1}}\autoinsertnextspace} \starttext \startformula \e{a+b} \stopformula \stoptext Le sam. 15 janv. 2022 à 16:14, Hans Hagen via ntg-context < ntg-context@ntg.nl> a écrit : > On 1/15/2022 3:52 PM, Alexandre Christe via ntg-context wrote: > > Just came across a weird behavior with the latest upload. > > > > The following doesn't print as it should > > \startformula 4^{2x} - 4^x - 25 = 0 \stopformula > > > > I don't think it's normal (I see the spacing to make room for anything > > that comes after the first character in the exposant, but it is not > > printed). > i'll fix it ... > > > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Strange behavior with \startbodymatter ... \stopbodymatter
Hi, In my file cours_premiere.tex if I indicate \startbodymatter \component[probabilites.tex] \stopbodymatter I get the following error message tex error > tex error on line 49 in file ./cours_premiere.tex: Undefined control sequence \pgfmath@settrigformat \pgfmath@settrigformat \pgfmath@settrigformat \pgfmath@settrigformat \stopbodymatter 39[criterium=all, 40interaction=all, 41 alternative=c] 42 43 \stoptitle 44 45 \stopfrontmatter 46 47 \startbodymatter 48 \component[probabilites.tex] 49 >> \stopbodymatter 50 51 52 \stopproduct The control sequence at the end of the top line of your error message was never \def'ed. You can just continue as I'll forget about whatever was undefined. mtx-context | fatal error: return code: 1 TeX Output exited abnormally with code 1 at Tue Dec 28 15:31:31 On the other hand, if I indicate \component[probabilites.tex] the file compiles without error. Thanks Fabrice ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Compilation error with the new version of lmtx
Hi, The latest version of lmtx does not allow me to compile the following file although there was no problem before. Thank you Fabrice \startproduct[expertes-manual] \startfrontmatter \setuppagenumbering [location=] \definefont [ChapterTextStyle] [SansBold*default sa 2.2] \setuphead [title] [style=ChapterTextStyle, align=flushright] \setuplist [chapter] [style=bold, alternative=b, width=1em] \setuplist [section] [margin=1em, width=1.75em] \setuplist [subsection] [margin=2.75em, width=2em, distance=\spaceamount] \starttitle[title=Table des matières] \placelist [chapter,section,subsection] [criterium=all, interaction=all, alternative=c] \stoptitle \stopfrontmatter \startbodymatter \component[chapter_1] \component[chapter_2] \stopbodymatter \stopproduct ## tex error > tex error on line 1 in file ./expertes.tex: Undefined control sequence \undefined \relax \p_maxwidth \dostarttagged \t!listcontent \empty \clf_listtitle {\currentlist }\currentlistindex \relax \dostoptagged \strc_lists_limitated_text #1->\edef \p_maxwidth {\listparameter \c!maxwidth }\ifempty \p_maxwidth \listparameter \c!textcommand {#1} \else \listparameter \c!textcommand {\limitatetext {#1}\p_maxwidth {\splitsymbol {\listparameter \c!limittext }}}\fi \22>:140>:abc ...rence_attribute \v!text \strc_lists_set_style_color \c!textstyle \c!textcolor \v!text \the \t_lists_every_renderingtext \the \t_lists_every_renderingsynchronize \setstrut \begstrut \strc_lists_limitated_text \currentlistentrytitle \endstrut \en ... \currentlistextra ...\begingroup \ifempty \m_strc_list_alternative \edef \currentlistalternative {\listparameter \c!alternative }\else \let \currentlistalternative \m_strc_list_alternative \fi \directsetup {\listalternativeparameter \c!renderingsetup } \relax \endgr ... ... alternative=c] 1 >> \startproduct[expertes-manual] 2 3 \startfrontmatter 4 5 \setuppagenumbering 6[location=] 7 8 \definefont 9 [ChapterTextStyle] 10 [SansBold*default sa 2.2] 11 The control sequence at the end of the top line of your error message was never \def'ed. You can just continue as I'll forget about whatever was undefined. mtx-context | fatal error: return code: 256 TeX Output exited abnormally with code 1 at Sat Oct 16 19:28:21 ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Framedtext : text out of frame
Hi, How to fix the small problem in the code below where the text goes out of the frame ? Thanks Fabrice \usecolors[x11] \starttext \startframedtext[frame=off,width=\textwidth, align={broad,right},indenting={yes},background=color,backgroundcolor=navajowhite1] \startitemize[columns,three,n] \startitem Une quantité constante est une quantité déterminée, qui conserve toujours la même valeur. \stopitem\par \startitem Une quantité variable est une quantité indéterminée, ou, si l'on veut, une quantité universelle, qui comprend toutes les valeurs déterminées. \stopitem\par \startitem Une quantité variable devient déterminée, lorsqu'on lui attribue une valeur déterminée quelconque. \stopitem\par \startitem Une fonction de quantité variable est une expression analytique composée, de quelque manière que ce soit, de cette même quantité & de nombres, ou de quantités constantes. Par exemple, \m{a+3z} ; \m{az-4zz} ; \m{az+b\sqrt{aa-zz}} , cz ; \m{etc}. sont des fonctions de \m{z}. \stopitem\par \startitem Une fonction de variable est donc aussi une quantité variable. \stopitem\par \stopitemize \stopframedtext \stoptext1 ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Image cropped
Hi Wolfgang, I had done the same thing but I thought this solution was not the most elegant, and I wanted to know what the specialists were going to do. Thank you. Fabrice Le dim. 12 sept. 2021 à 16:50, Wolfgang Schuster via ntg-context < ntg-context@ntg.nl> a écrit : > Fabrice Couvreur via ntg-context schrieb am 12.09.2021 um 12:10: > > Hi Wolfgang, > That's what I understood but the problem is that if I reduce the margin, > the logo is too small in my opinion : what would you do ? > > > Place the logo with a layer or shift is inwards. > > \setuplayout > [width=middle, >height=middle] > > \setupfootertexts > [margin] > [] > [{\offset[x=-1cm,y=\strutdp]{\externalfigure[logo.pdf][factor=max]}}] > [] > [{\offset[x=1cm,y=\strutdp]{\externalfigure[logo.pdf][factor=max]}}] > > %\showframe > > \starttext > \dorecurse{8}{\samplefile{knuth}} > \stoptext > > Wolfgang > > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Image cropped
Hi Wolfgang, That's what I understood but the problem is that if I reduce the margin, the logo is too small in my opinion : what would you do ? Indeed the line is green but you will have understood: =) Fabrice Le sam. 11 sept. 2021 à 19:17, Wolfgang Schuster via ntg-context < ntg-context@ntg.nl> a écrit : > Fabrice Couvreur via ntg-context schrieb am 11.09.2021 um 17:52: > > Hi Wolfgang, > The red frame is the print area ? > > > The *green* frame are the margins of the A4 paper which is positioned in > the middle of the A3 paper. > > The larger paper allows you to the see the part of the margins which are > outside of the printable area. > > Wolfgang > > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Image cropped
Hi Wolfgang, The red frame is the print area ? Le sam. 11 sept. 2021 à 16:43, Wolfgang Schuster via ntg-context < ntg-context@ntg.nl> a écrit : > Fabrice Couvreur via ntg-context schrieb am 11.09.2021 um 16:32: > > Hello, > I like to put a logo on my statements but I noticed that the image is > cropped on the edge. > I tried to change the printer's print settings but was unsuccessful. > > > Add these settings to your example and you see the problem. > > \setuppapersize[A4][A3] > > \setuplayout[location=middle] > > \setuplayout[width=middle,height=middle] > > \setupfootertexts >[margin] >[] >[{\offset[y=\strutdp]{\externalfigure[logo.pdf][factor=max]}}] >[] >[{\offset[y=\strutdp]{\externalfigure[logo.pdf][factor=max]}}] > > \showframe > > \starttext > \dorecurse{8}{\input knuth} > \stoptext > > > Wolfgang > > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Image cropped
Hello, I like to put a logo on my statements but I noticed that the image is cropped on the edge. I tried to change the printer's print settings but was unsuccessful. Thanks Fabrice \setuplayout[width=middle,height=middle] \setupfootertexts [margin] [] [{\offset[y=\strutdp]{\externalfigure[logo.pdf][factor=max]}}] [] [{\offset[y=\strutdp]{\externalfigure[logo.pdf][factor=max]}}] \showframe \starttext \dorecurse{8}{\input knuth} \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] getting line numbers
Hi, I am trying to test this file but without success. I just do context test.tex but I suspect that is not it. When you say > We compile and run: > Which command is it with ? Thanks Fabrice Le ven. 3 sept. 2021 à 18:26, Hans Hagen via ntg-context a écrit : > On 9/3/2021 3:53 PM, Aditya Mahajan via ntg-context wrote: > > On Fri, 3 Sep 2021, Thierry Horsin via ntg-context wrote: > > > >> Hi everybody > >> > >> Is there a way to have an automatic access to the current line number > of a specific place inside a tex file ? To be more precise, here is what I > would like to do. > > > > Also look at the filter module. > > > > https://github.com/adityam/filter > > > > Behind the scenes, it works by saving the content in an external file > and then > > running it through any external program. It also allows for caching the > > result, and has many options for customizing the behavior. > you forgot to mention that it also makes sure that you only process when > there has been a change (after all calling gcc comes at a price) > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Test for displaying a header
Hi, Using this (but it's not exactly what I want) it works test-1.tex %% \setuppagenumbering [alternative=doublesided,location=] \definelayout [1] [header=10mm] \setuplayout [header=0pt, height=middle] \setupbackgrounds [header] [text] [frame=off,bottomframe=on, framecolor=lightgray,rulethickness=1pt] \starttext \dorecurse{5}{\samplefile{lorem}} %\dorecurse{1}{\samplefile{lorem}} \stoptext %%ù Using this (almost what I'm trying to do) without success test-2.tex % \setuppagenumbering [alternative=doublesided,location=] \setupbackgrounds [header] [text] [frame=off,bottomframe=on, framecolor=lightgray,rulethickness=1pt] \startsetups[header] \doifelse{\totalnumberofpages}{1} {\setupheadertexts[\setups{header}]} {} \stopsetups \starttext \dorecurse{5}{\samplefile{lorem}} %\dorecurse{1}{\samplefile[lorem]r} \stoptext %%% Fabrice Le jeu. 26 août 2021 à 17:56, Wolfgang Schuster via ntg-context < ntg-context@ntg.nl> a écrit : > Taco Hoekwater via ntg-context schrieb am 26.08.2021 um 16:34: > > > > Hi, > > > >> On 26 Aug 2021, at 16:07, Fabrice Couvreur via ntg-context < > ntg-context@ntg.nl> wrote: > >> > >> Hi, > >> I know I asked the question a few years ago, but I don't remember ! > >> The idea is to test whether the document contains only one page or not. > > > > Perhaps not the nicest solution, but this works: > > > > \doifvalueelse > >{\lastpage} > >{1} > >{\message{true}} > >{\message{false}} > > > Same solution but better counter name: > > \doifelse{\totalnumberofpages}{1}{...}{...} > > Wolfgang > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Test for displaying a header
Hi, I know I asked the question a few years ago, but I don't remember ! The idea is to test whether the document contains only one page or not. If it contains only one page, the header is enabled. If it contains several pages, the header is enabled only on the first page but not on the others. Thanks Fabrice ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Place a logo at the bottom of the page with a layer
Hi, I want to insert a logo at the bottom of the page on the right on the first page, on the left on the second, on the right on the third ... With the key repeat=yes, the logo is always at the bottom right Thanks Fabrice \useMPlibrary[dum] \definelayer [MyLogo] [x=0mm, y=0mm, width=\paperwidth, height=\paperheight, repeat=yes] \setupbackgrounds[page][background=MyLogo] \setlayer [MyLogo] [hoffset=\dimexpr\textwidth+\backspace+\rightmargindistance\relax, voffset=\dimexpr\topspace+\textheight+\footerheight\relax] {\externalfigure[dum][width=\rightmarginwidth,height=\headerheight]} \showframe \starttext \dorecurse{20}{\samplefile{lorem}} \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Adjustment for header and footer
Hi, In the file below (not minimal, sorry!) I am using commands from Wolfgang in different threads. We can see that the top frame overflows into the text: how to correct this ? I would also like the top and bottom stroke to be adjusted to the width of the paper. Thanks Fabrice \useMPlibrary[dum] \setuplayout [topspace=1cm, backspace=3cm, cutspace=3cm, leftmargin=.75cm, leftmargindistance=.5cm, rightmargin=1.25cm, rightmargindistance=1cm, header=20mm, headerdistance=1cm, footer=20mm, footerdistance=1cm, width=middle, height=middle, location=middle] \setupbodyfont [newcomputermodern-book,11pt] \definefont [TextStyle] [SansBold*default sa 1.2] \defineframed [headerframed] [frame=off, height=fit, width=fit, ] \setupbackgrounds [header] [text] [frame=off,bottomframe=on,width=\widthpaper, framecolor=darkred,rulethickness=1pt] \setupbackgrounds [footer] [text] [frame=off,bottomframe=on,width=max, framecolor=darkred,rulethickness=1pt] \setupfootertexts [margin] [] [{\offset[y=\strutdp]{\externalfigure[dum][factor=max]}}] [] [{\offset[y=\strutdp]{\externalfigure[dum][factor=max]}}] \startsetups [headertext] \setupheadertexts [{ \startframed [headerframed] [foregroundstyle=TextStyle,align=middle] \getvariable{headertext}{location}\\ Spécialité mathématiques\\ \getvariable{headertext}{title} n\high{\tfxx \bf o}\,\getvariable{headertext}{number} \stopframed }] \setupheadertexts [{ \startframed [headerframed] [align=flushleft,foregroundstyle=\ssx] Lycée LA SALLE\\ Durée : \getvariable{headertext}{time}\\ \date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},y=\getvariable{headertext}{year}] \stopframed }] [{ \startframed [headerframed] [align=flushright,foregroundstyle=\ssx] \externalfigure[dum] [factor=max] \stopframed }] \stopsetups \setvariable{headertext}{set}{\directsetup{headertext}} \setvariables [headertext] [title={Devoir maison}, number={2}, day={22}, month={08}, year={2021}, location={Terminale}, time={2 heures}] \starttext \samplefile{lorem} \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Strange behavior of a macro
Hello, I don't understand why this macro works with this simple example but return the following error if I use it for chapters in my book. Thanks Fabrice \setupbodyfont [newcomputermodern-book,11pt] \unexpanded\def\N{\math{\mathbb{N}}\autoinsertnextspace} \defineenumeration [test] [title=yes, text={Test}, style=italic] \starttext \N \starttest \m{\forall n \in \N} \stoptest \stoptext tex error > tex error on line 64 in file ./terminale_suites_2.tex: Use of \N doesn't match its definition Soient \u, \v deux suites définies sur \N, \m{l} et \m{l'} deux réels. 54 \startitem 55 \u converge vers \m{l}, 56 \stopitem 57 \stopitemize 58 alors \m{l\geqslant 0}. 59 \stopproposition 60 \startremarque 61 Nous retiendrons que le passage à la limite sur une inégalité stricte restitue une inégalité large. 62 \stopremarque 63 \startcorollaire 64 >>Soient \u, \v deux suites définies sur \N, \m{l} et \m{l'} deux réels. 65 66 Si 67 68 \startitemize 69 \startitem 70 les suites \u et \v convergent respectivement vers \m{l} et \m{l'}, 71 \stopitem 72 \startitem 73 \m{\forall n \in\mathbb{N}, \thinspace u_n>v_n}, 74 \stopitem If you say, e.g., '\def\a1{...}', then you must always put '1' after '\a', since control sequence names are made up of letters only. The macro here has not been followed by the required stuff, so I'm ignoring it. mtx-context | fatal error: return code: 256 ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] How not to display the header of the chapter page on the page with the table of contents ?
Hi Wolfgang, Pablo's solution works, but I tried yours without success. Here are the main lines of my project begin product \startproduct[terminale-manual] \project[terminale-environment] \startdocument \startfrontmatter ... \stopfrontmatter \startbodymatter \component[terminale_recurrence] ... \stopbodymatter \stopdocument \stopproduct end product begin project \startproject[terminale-environment] \environment[terminale-style] ... \stopproject end project begin component \project[terminale-environment] \startcomponent[terminale_recurrence] ... \endcomponent end component begin environment \startenvironment[terminale-style] ... \startsetups [section:chapter] \setuphead [chapter] [align=flushright, textcommand=\groupedcommand{\blank[medium]}{}, numbercolor=darkgray, textstyle=ChapterTextStyle, numberstyle=ChapterNumberStyle, before=\startChapterFrame, after=\stopChapterFrame, header=high] \stopsetups \startsectionblockenvironment [bodypart] \directsetup{section:chapter} \stopsectionblockenvironment \doifmode{*component}{\directsetup{section:chapter}} ... \endenvironment end environment Le dim. 15 août 2021 à 19:03, Wolfgang Schuster via ntg-context < ntg-context@ntg.nl> a écrit : > Pablo Rodriguez via ntg-context schrieb am 15.08.2021 um 18:33: > > On 8/15/21 6:02 PM, Fabrice Couvreur via ntg-context wrote: > >> A small note : this method works if I compile the project but if I > >> compile only one chapter, the header no longer appears. > > Hi Fabrice, > > > > I have never used projects and chapters (or whatever the right name is). > > > > I’m not sure I get what you’re experiencing: with a single chapter, do > > you have the fancy layout or not? > > > > It would make sense that the fancy chapter doesn’t appear only compiling > > a chapter. I guess there is no \startbodymatter...\stopbodymatter > > wrapping it. > > > > Another approach would be: > > > > [...] > > Setting values for \title is a way to avoid the chapter setup for the > table of contents etc. > but there is a way to set values which are used only when you process a > component file. > > To make it work one has to load the environment file after > \startcomponent because you > can use the *component mode to check whether the parent file is a > product or a component. > > begin product > \startproduct [*] > > \environment [...] > > \startfrontmatter > ... > \stopfrontmatter > > \startbodymatter > \component [...] > \stopbodymatter > > \stopproduct > end product > > begin component > \startcomponent [*] > > \environment [...] > > ... > > \stopcomponent > end component > > begin environment > \startenvironment [*] > > \startsetups [section:chapter] > > \setuphead > [chapter] > [...] > > \stopsetups > > \startsectionblockenvironment [bodypart] > \directsetup{section:chapter} > \stopsectionblockenvironment > > \doifmode{*component}{\directsetup{section:chapter}} > > \stopenvironment > end environment > > Wolfgang > > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Adjustment in the table of contents
Hi, I wish to have the table of contents as the attached image. The result is almost as expected except for the margin of the subsection. \setuplist [chapter,section,subsection] [width=fit,distance=\spaceamount] \setuplist [chapter] [alternative=b] \setuplist [chapter][style=bold] \setuplist [section][margin=1em] \setuplist [subsection] [margin=2.75em] Thanks Fabrice ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] How not to display the header of the chapter page on the page with the table of contents ?
Hi Pablo, The second solution works as I want it to Thanks Fabrice Le dim. 15 août 2021 à 18:33, Pablo Rodriguez via ntg-context < ntg-context@ntg.nl> a écrit : > On 8/15/21 6:02 PM, Fabrice Couvreur via ntg-context wrote: > > A small note : this method works if I compile the project but if I > > compile only one chapter, the header no longer appears. > > Hi Fabrice, > > I have never used projects and chapters (or whatever the right name is). > > I’m not sure I get what you’re experiencing: with a single chapter, do > you have the fancy layout or not? > > It would make sense that the fancy chapter doesn’t appear only compiling > a chapter. I guess there is no \startbodymatter...\stopbodymatter > wrapping it. > > Another approach would be: > > \setuphead >[chapter] >[align=flushright, > textcommand=\groupedcommand{\blank[medium]}{}, > numbercolor=darkgray, > textstyle=ChapterTextStyle, > numberstyle=ChapterNumberStyle, > before=\startChapterFrame, > after=\stopChapterFrame, > header=high] > > \setuphead > [title] > [header=empty, >align=, >textcommand=, >textstyle=, >style=\tfc, >before={\blank[2*big]}, >after={\blank[2*big]}] > > I hope it helps, > > Pablo > > -- > http://www.ousia.tk > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] How not to display the header of the chapter page on the page with the table of contents ?
A small note : this method works if I compile the project but if I compile only one chapter, the header no longer appears. Le dim. 15 août 2021 à 17:01, Fabrice Couvreur a écrit : > Hi Pablo, > Thanks, it works. > Fabrice > > Le dim. 15 août 2021 à 16:20, Pablo Rodriguez via ntg-context < > ntg-context@ntg.nl> a écrit : > >> On 8/15/21 12:49 PM, Fabrice Couvreur via ntg-context wrote: >> > Hello, >> > Wolfgang created a >> > heading https://mailman.ntg.nl/pipermail/ntg-context/2021/102870.html >> > for the chapters of my book. >> > How can I prevent this header from appearing on the page with the table >> > of contents ? >> >> Hi Fabrice, >> >> a simple way would be: >> >> \startsectionblockenvironment[bodypart] >> \setuphead >>[chapter] >>[align=flushright, >> textcommand=\groupedcommand{\blank[medium]}{}, >> numbercolor=darkgray, >> textstyle=ChapterTextStyle, >> numberstyle=ChapterNumberStyle, >> before=\startChapterFrame, >> after=\stopChapterFrame, >> header=high] >> \stopsectionblockenvironment >> >> Then use frontmatter and bodymatter. >> >> Just in case it might help, >> >> Pablo >> -- >> http://www.ousia.tk >> >> ___ >> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] How not to display the header of the chapter page on the page with the table of contents ?
Hi Pablo, Thanks, it works. Fabrice Le dim. 15 août 2021 à 16:20, Pablo Rodriguez via ntg-context < ntg-context@ntg.nl> a écrit : > On 8/15/21 12:49 PM, Fabrice Couvreur via ntg-context wrote: > > Hello, > > Wolfgang created a > > heading https://mailman.ntg.nl/pipermail/ntg-context/2021/102870.html > > for the chapters of my book. > > How can I prevent this header from appearing on the page with the table > > of contents ? > > Hi Fabrice, > > a simple way would be: > > \startsectionblockenvironment[bodypart] > \setuphead >[chapter] >[align=flushright, > textcommand=\groupedcommand{\blank[medium]}{}, > numbercolor=darkgray, > textstyle=ChapterTextStyle, > numberstyle=ChapterNumberStyle, > before=\startChapterFrame, > after=\stopChapterFrame, > header=high] > \stopsectionblockenvironment > > Then use frontmatter and bodymatter. > > Just in case it might help, > > Pablo > -- > http://www.ousia.tk > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] How not to display the header of the chapter page on the page with the table of contents ?
Hello, Wolfgang created a heading https://mailman.ntg.nl/pipermail/ntg-context/2021/102870.html for the chapters of my book. How can I prevent this header from appearing on the page with the table of contents ? Thanks Fabrice ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Create an enumeration style
I forgot this : how to reduce the font size for the exponents "er", "e" ? Thanks Fabrice Le mer. 11 août 2021 à 12:41, Fabrice Couvreur a écrit : > Hi Wolfgang, > Many thanks > Fabrice > > Le mer. 11 août 2021 à 10:23, Hans Hagen via ntg-context < > ntg-context@ntg.nl> a écrit : > >> On 8/11/2021 10:09 AM, Otared Kavian via ntg-context wrote: >> > >> > >> >> On 9 Aug 2021, at 18:10, Wolfgang Schuster via ntg-context < >> ntg-context@ntg.nl> wrote: >> >> (…) >> >> core-con.lua (line 1155): >> >> >> >> local ordinals = { >> >> [...] >> >> french = function(n) >> >> if n == 1 then >> >> return "er" >> >> + else >> >> + return "e" >> >> end >> >> end, >> >> } >> > >> > Hi Wolfgang, >> > >> > Thanks for the example and the fix, but I would rather think that the « >> french » part of ordinals should be >> > >> > french = function(n) >> > if n == 1 then >> > return « er" >> > else >> >return « ème" >> > end >> > end, >> > >> > Now if this were not accepted as a fix in core-con.lua, is there a way >> for a user to change the default to the above choice in his document ? >> >> it is no problem to fix if you all can agree on what/how to fix ... >> >> Hans >> >> >> - >>Hans Hagen | PRAGMA ADE >>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >> tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Create an enumeration style
Hi Wolfgang, Many thanks Fabrice Le mer. 11 août 2021 à 10:23, Hans Hagen via ntg-context a écrit : > On 8/11/2021 10:09 AM, Otared Kavian via ntg-context wrote: > > > > > >> On 9 Aug 2021, at 18:10, Wolfgang Schuster via ntg-context < > ntg-context@ntg.nl> wrote: > >> (…) > >> core-con.lua (line 1155): > >> > >> local ordinals = { > >> [...] > >> french = function(n) > >> if n == 1 then > >> return "er" > >> + else > >> + return "e" > >> end > >> end, > >> } > > > > Hi Wolfgang, > > > > Thanks for the example and the fix, but I would rather think that the « > french » part of ordinals should be > > > > french = function(n) > > if n == 1 then > > return « er" > > else > >return « ème" > > end > > end, > > > > Now if this were not accepted as a fix in core-con.lua, is there a way > for a user to change the default to the above choice in his document ? > > it is no problem to fix if you all can agree on what/how to fix ... > > Hans > > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Create an enumeration style
Hello, Is it possible to create an enumeration style to get this : 1 ^ {er} exemple 2 ^ {e} exemple 3 ^ {e} exemple Thanks Fabrice ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Question about \groupedcommand{}{}
Hi Wolfgang, Thank you for this nice solution. Fabrice Le mar. 27 juil. 2021 à 21:31, Wolfgang Schuster via ntg-context < ntg-context@ntg.nl> a écrit : > Fabrice Couvreur via ntg-context schrieb am 27.07.2021 um 18:57: > > Hi, > > The name of the environment must always end with a dot both with a title > > and without title. How to do ? > > Thanks > > Fabrice > > > > [...] > > > You can create simple dummy environments to test the parameters. > > \defineenumeration >[grouptest] >[title=yes, > text={dummy text}, > titleleft=, >titleright=, > headcommand=\groupedcommand{[}{]}, > numbercommand=\groupedcommand{(}{)}, > titlecommand=\groupedcommand{<}{>}] > > \starttext > > \startgrouptest [title={dummy title}] > \unknown > \stopgrouptest > > \startgrouptest > \unknown > \stopgrouptest > > \blank[2*line] > > \setupenumeration >[grouptest] >[number=no] > > \startgrouptest [title={dummy title}] > \unknown > \stopgrouptest > > \startgrouptest > \unknown > \stopgrouptest > > \stoptext > > Wolfgang > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Question about \groupedcommand{}{}
Hi, The name of the environment must always end with a dot both with a title and without title. How to do ? Thanks Fabrice \setupenumerations [before={\blank}, after={\blank}, alternative=serried, title=yes, titleleft={(}, titleright={)}, titlestyle=normal, titlecommand=\groupedcommand{}{\bf.}, width=broad] \defineenumeration [definition] [text=Définition, number=no, headcommand=\groupedcommand{}{}, style=italic] \starttext \startdefinition{With a title} \samplefile{lorem} \stopdefinition Without title but no dot after the name of the environment. \startdefinition \samplefile{lorem} \stopdefinition \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Macro that does not work in an environment
Hello, How to make the macro work in the environment definition ? Thank you Fabrice \unexpanded\def\card#1{\math{\text{Card}\thinspace#1}} \defineenumeration [definition] [text=Définition, number=no, headcommand=\groupedcommand{}{.}, style=italic] \starttext \startdefinition Soit E un ensemble fini. Le cardinal de E, noté \card{E}, est le nombre d'éléments de E. En particulier, nous avons \m{\card{\emptyset}=0}. \stopdefinition \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Adjust the length of a frame
-- Forwarded message - De : Fabrice Couvreur Date: lun. 26 juil. 2021 à 13:13 Subject: Texte source 30 / 5000 Résultats de traduction Adjust the length of a frame To: mailing list for ConTeXt users Hello, Following on from my previous questions for writing my book (thanks again Wolfgang), I have to create a solution environment like the attached image. My problem is adjusting the length of the frame. Thank you. Fabrice \setupbodyfont[newcomputermodern-book,11pt] \defineframed [ACFRAME] [frame=off, width=fit, align=flushleft, location=low, background=color, backgroundcolor=lightgray, foregroundcolor=, foregroundstyle=] \setupenumerations [before={\blank}, after={\blank}, alternative=top, title=yes, titleleft={}, titleright={}, titlestyle=bold, width=broad] \defineenumeration [exercice] [text=Exercice, number=yes, numbercommand=\groupedcommand{}{.}, style=italic] \defineenumeration [solution] [text=Solution, headcommand=\ACFRAME, number=no, numbercommand=\groupedcommand{}{}, style=normal] \starttext \startexercice{Le nombre d'or est irrationnel} Le nombre d'or, noté \m{\phi}, est tel que \m{\phi=\dfrac{1+\sqrt{5}}{2}}. Montrer que \m{\phi} est irrationnel. \stopexercice \startsolution Nous raisonnons par l'absurde en supposant que \m{\phi} est rationnel. \stopsolution \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Adjust the length of a frame
Le lun. 26 juil. 2021 à 13:13, Fabrice Couvreur a écrit : > Hello, > Following on from my previous questions for writing my book (thanks again > Wolfgang), I have to create a solution environment like the attached image. > My problem is adjusting the length of the frame. > Thank you. > Fabrice > > \setupbodyfont[newcomputermodern-book,11pt] > > \defineframed >[ACFRAME] >[frame=off, > width=fit, > align=flushleft, > location=low, > background=color, > backgroundcolor=lightgray, > foregroundcolor=, > foregroundstyle=] > > > \setupenumerations > [before={\blank}, >after={\blank}, >alternative=top, >title=yes, >titleleft={}, >titleright={}, >titlestyle=bold, >width=broad] > > \defineenumeration >[exercice] >[text=Exercice, > number=yes, > numbercommand=\groupedcommand{}{.}, > style=italic] > > \defineenumeration >[solution] >[text=Solution, > headcommand=\ACFRAME, > number=no, > numbercommand=\groupedcommand{}{}, > style=normal] > > \starttext > > \startexercice{Le nombre d'or est irrationnel} > Le nombre d'or, noté \m{\phi}, est tel que > \m{\phi=\dfrac{1+\sqrt{5}}{2}}. Montrer que \m{\phi} est irrationnel. > \stopexercice > > \startsolution > Nous raisonnons par l'absurde en supposant que \m{\phi} est rationnel. > \stopsolution > > \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Texte source 30 / 5000 Résultats de traduction Adjust the length of a frame
Hello, Following on from my previous questions for writing my book (thanks again Wolfgang), I have to create a solution environment like the attached image. My problem is adjusting the length of the frame. Thank you. Fabrice \setupbodyfont[newcomputermodern-book,11pt] \defineframed [ACFRAME] [frame=off, width=fit, align=flushleft, location=low, background=color, backgroundcolor=lightgray, foregroundcolor=, foregroundstyle=] \setupenumerations [before={\blank}, after={\blank}, alternative=top, title=yes, titleleft={}, titleright={}, titlestyle=bold, width=broad] \defineenumeration [exercice] [text=Exercice, number=yes, numbercommand=\groupedcommand{}{.}, style=italic] \defineenumeration [solution] [text=Solution, headcommand=\ACFRAME, number=no, numbercommand=\groupedcommand{}{}, style=normal] \starttext \startexercice{Le nombre d'or est irrationnel} Le nombre d'or, noté \m{\phi}, est tel que \m{\phi=\dfrac{1+\sqrt{5}}{2}}. Montrer que \m{\phi} est irrationnel. \stopexercice \startsolution Nous raisonnons par l'absurde en supposant que \m{\phi} est rationnel. \stopsolution \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with chapter numbering
Hi Bruce, Thanks for the suggestion, it works fine. Fabrice Le mer. 14 juil. 2021 à 22:54, Bruce Horrocks a écrit : > On 13 Jul 2021, at 18:47, Fabrice Couvreur > wrote: > > > > Hi, > > For my book, the header for each chapter should be like the attached > image. I don't know if I am using the best method, but the result looks > like what I want. Nevertheless, I am having a problem. > > I don't understand why the first chapter is not numbered while the > second is with number 1 etc. > > Thanks. > > Fabrice > > You were nearly there. Use: > > \unexpanded\def\processheadnumber#1% >{\getmarking[chapternumber][current]} > > — > Bruce Horrocks > Hampshire, UK > > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___