Re: [NTG-context] Progressively encouraging page/column breaks at \blank with penalties
That works for my purposes; thank you for letting me know about it! Joey On Sun, Aug 15, 2021 at 1:53 AM Aditya Mahajan via ntg-context < ntg-context@ntg.nl> wrote: > On Sun, 15 Aug 2021, Joey McCollum via ntg-context wrote: > > > Hi, > > > > I'm trying to implement a section break marker in a grid layout. At a > > section break, two lines of space should separate the subsequent segments > > of text (just plain paragraphs, in this case), and a symbol (in the > example > > below, "X") should be set in the middle of these two lines. For my > > purposes, the section break symbol should never occur at the top of a > page > > or column, and it is more desirable to have a page or column end with the > > section break symbol than to have a single orphaned line follow the > symbol > > at the end of the page or column. Based on these constraints, I thought > > that using the "samepage" and "preference" options for the first and > second > > line breaks would work nicely: > > > > ``` > > \define\SectionBreak{% > > \blank[halfline, samepage]% non-breaking to ensure that no column > > begins with the section break symbol > > \startalignment[middle]% > > {X}% section break symbol > > \stopalignment% > > \blank[halfline, preference]% this can (and, if possible, should) be > > broken across a column > > ``` > > > > This does successfully prevent the placement of the symbol at the top of > a > > page/column, but it doesn't encourage the placement of the symbol at the > > end of a page/column as often as I would like. > > Depending on what you want, you can try adding \testpage[n] (where n is a > number). This checks if the remainder of the page has enough space for n > lines; if not, then it issues a page-break. > > Aditya > > ___ > 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 ?
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 ___
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 ?
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 ___
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] Failure when loading variable font
Hi, On Sat, Aug 14, 2021 at 09:05:45PM +0200, Hans Hagen wrote: > that's because since then we check for the cycle (otherwise artifacts) > > it probably relates to these extra points (the 'standard' is somewhat fuzzy > in that respect also because some fonts have them and some don't so it's the > usual wait till we run into something issue) As far as I understand the spec the phantom points shouldn't influence this since the next and previous points are only looked up in the current contour and the phantom point are not on any contour, so they can never appear as next or previous point anyway. That doesn't seem to be implemented though. > > we can check for bounds > > for i=1,nofpoints do > local d1, d2, d3 = find(i) > local p2 = points[i] > if d2 then > xv[i] = xvalues[d2] > yv[i] = yvalues[d2] > else > local n1 = dpoints[d1] > local n3 = dpoints[d3] > if n1 > nofpoints then > n1 = nofpoints > end > if n3 > nofpoints then > n3 = nofpoints > end > > no crash then (the resulting shapes look good enough to me, assumign that > the weird f is intended) Thanks, with this change ConTeXt seems to give the expected output for this font. (Yes, the weird f is intentional. Evn though IMO it's not siginificantly weirder than the other glyphs in that font) Best, Marcel ___ 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 ___
Re: [NTG-context] How not to display the header of the chapter page on the page with the table of contents ?
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 ___
[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 ___