Re: [NTG-context] text surrounding graphic in columns
Am 15.10.20 um 09:15 schrieb Hans Hagen: experimental (already there for a while but i need top pickup on it): \starttext \setupbodyfont[plex,10pt] \setupalign[tolerant,stretch] \useMPlibrary[dum] \startpagecolumns[n=2] \dorecurse {10} { \startplacefigure[location={left,none}] \externalfigure[dummy][width=3em] using width=13em gives funny output ... Herbert \stopplacefigure \dorecurse {4} { \samplefile{ward}\par } } \stoppagecolumns \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] text surrounding graphic in columns
On 10/14/2020 6:58 PM, Jan U. Hasecke wrote: Hi, how can I get a graphic that floats left or right from the text in columns or columnsets? \starttext \startcolumns[2] \placefigure[left, high, none]{} {\externalfigure[dummy][width=3em]} \input ward \input ward \stopcolumns \blank \placefigure[left, high, none]{} {\externalfigure[dummy][width=3em]} Without columns it works. \input ward \input ward \stoptext experimental (already there for a while but i need top pickup on it): \starttext \setupbodyfont[plex,10pt] \setupalign[tolerant,stretch] \useMPlibrary[dum] \startpagecolumns[n=2] \dorecurse {10} { \startplacefigure[location={left,none}] \externalfigure[dummy][width=3em] \stopplacefigure \dorecurse {4} { \samplefile{ward}\par } } \stoppagecolumns \stoptext don't tell Hraban 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 ___
Re: [NTG-context] bug with hz in LMTX?
On 10/12/2020 4:59 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \showframe\showgrid \setuplayout[width=middle] \definefontfamily[mainface][rm][TeX Gyre Pagella] [features={default, quality}] \setupbodyfont[mainface, 20pt] \setupalign[hanging, hz] \starttext \dorecurse{25}{\input{zapf}\input{cuomo}} \stoptext On page 36 (https://pdf.ousia.tk/wrong-font-expansion.pdf#page=36), lines 4, 11 and 20 are wrong. Current LMTX (LuaTeX 2.07 20200920 + ConTeXt MkIV 2020.09.20 23:02) has the issue, while MkIV (LuaTeX 1.11 7226 + ConTeXt MkIV 2020.01.30 14:13) has no problem with that. I think this might be a bug. Could you confirm the issue? I need to keep count of how frequently i suggest typo also \setupalign[verytolerant,stretch] when one uses hz and/or protrusion. I don't know why folks expect expansion and protrusion to give better (or intended) output when the other constraints are such that tex either not even ends up in the phase where expansion is applied, or when fitting the constraints is only possible with excessive and visible expansion. When expansion is max or min and there is not enough spacing to stretch and shrink the results will not get better. Read: expansion is a last resort in getting things right. Also, protrusion actually add to the constraints so that is never a way to get a better fit. Anyway, with tolerant and stretch the test looks ok here. 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 ___
[NTG-context] bug with hz in LMTX?
Dear list, I have the following sample: \showframe\showgrid \setuplayout[width=middle] \definefontfamily[mainface][rm][TeX Gyre Pagella] [features={default, quality}] \setupbodyfont[mainface, 20pt] \setupalign[hanging, hz] \starttext \dorecurse{25}{\input{zapf}\input{cuomo}} \stoptext On page 36 (https://pdf.ousia.tk/wrong-font-expansion.pdf#page=36), lines 4, 11 and 20 are wrong. Current LMTX (LuaTeX 2.07 20200920 + ConTeXt MkIV 2020.09.20 23:02) has the issue, while MkIV (LuaTeX 1.11 7226 + ConTeXt MkIV 2020.01.30 14:13) has no problem with that. I think this might be a bug. Could you confirm the issue? Many thanks for your 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 ___
Re: [NTG-context] Split Table, don't repeat caption
Am 07.10.2020 um 18:00 schrieb Denis Maier: Am 07.10.2020 um 17:46 schrieb Wolfgang Schuster: Denis Maier schrieb am 07.10.2020 um 17:39: Hi, is there a way not to repeat the caption of a multipage natural table? I've searched the list archive and it looks the question came up a couple of times, but I couldn't find an answer. If this doesn't help you have to provide a example. [...] Ok: = \setupcaption[table] [location=top] \starttext \startplacetable[location=split,title={Title\footnote{footnote}}] \bTABLE[split=yes] \bTABLEhead \bTR \bTD Header 1 \eTD \bTD Header 2 \eTD \eTR \eTABLEhead \bTABLEbody \dorecurse{100}{\bTR \bTD Column 1 \eTD \bTD Column 2 \eTD \eTR} \eTABLEbody \eTABLE \stopplacetable \stoptext So, the caption appears on each page, and the footnote is attached to the last caption. Ideally, the footnote should be attached to the first caption. (And, actually, I want the caption only once.) Ok, I've found a solution: ``` \setupcaption[table][location=top] \starttext \startplacetable[location={none,split}] \startalignment[middle] \placefloatcaption[table][title={Title\footnote{footnote}}] \stopalignment \bTABLE[split=yes] \bTABLEhead \bTR \bTD Header 1 \eTD \bTD Header 2 \eTD \eTR \eTABLEhead \bTABLEbody \dorecurse{100}{\bTR \bTD Column 1 \eTD \bTD Column 2 \eTD \eTR} \eTABLEbody \eTABLE \stopplacetable \stoptext ``` That works, but isn't there an easier solution yet? An automatic/parameter-based solution would be great. Something like: = \setupcaption[table] [location=top] \starttext \startplacetable[location={split,captiononcefirst},title={Title\footnote{footnote}}] [...] \stopplacetable \stoptext Best, Denis ___ 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] Split Table, don't repeat caption
Am 07.10.2020 um 17:46 schrieb Wolfgang Schuster: Denis Maier schrieb am 07.10.2020 um 17:39: Hi, is there a way not to repeat the caption of a multipage natural table? I've searched the list archive and it looks the question came up a couple of times, but I couldn't find an answer. If this doesn't help you have to provide a example. [...] Ok: = \setupcaption[table] [location=top] \starttext \startplacetable[location=split,title={Title\footnote{footnote}}] \bTABLE[split=yes] \bTABLEhead \bTR \bTD Header 1 \eTD \bTD Header 2 \eTD \eTR \eTABLEhead \bTABLEbody \dorecurse{100}{\bTR \bTD Column 1 \eTD \bTD Column 2 \eTD \eTR} \eTABLEbody \eTABLE \stopplacetable \stoptext So, the caption appears on each page, and the footnote is attached to the last caption. Ideally, the footnote should be attached to the first caption. (And, actually, I want the caption only once.) Best, Denis ___ 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] Split Table, don't repeat caption
Denis Maier schrieb am 07.10.2020 um 17:39: Hi, is there a way not to repeat the caption of a multipage natural table? I've searched the list archive and it looks the question came up a couple of times, but I couldn't find an answer. If this doesn't help you have to provide a example. \starttext \bTABLE[split=yes] \bTABLEhead \bTR \bTD Header 1 \eTD \bTD Header 2 \eTD \eTR \eTABLEhead \bTABLEbody \dorecurse{100}{\bTR \bTD Column 1 \eTD \bTD Column 2 \eTD \eTR} \eTABLEbody \eTABLE \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 ___
[NTG-context] Keep postponed footnotes on page where called
Am 02.10.2020 um 13:00 schrieb Denis Maier: Am 30.09.2020 um 19:03 schrieb Pablo Rodriguez: On 9/30/20 5:52 PM, Denis Maier wrote: Hi, postponing footnotes when using tables causes the footnote often to appear on the next page, which may not always be wanted. Is there a way to keep the footnote on the same page in these situations? Hi Denis, this options might help: \setupnote [footnote] [split=verystrict, scope=text] Thanks, I'll try. The problem is that I have multiplage tables, and I want the notes on the appropriate pages. I think postponed footnotes are cactually alled after the table is already finished so the notes always appear at the last page of the table, which in many cases is not what you'd want. Ok, no luck. With this example, the notes always appear after the table. (Pablo's settings from above make no difference.) ``` \setuppapersize[A6][A6] \starttext \startpostponingnotes \bTABLE[split=yes] \dorecurse{20}{ \bTR \bTD a\footnote{A footnote} \eTD \eTR } \eTABLE \stoppostponingnotes \stoptext ``` Is there anything else I can try? Or is that simply not possible? The problem is that I have a table where it is really awkward to have the notes after the table. (I think with localfootnotes it will be more or less the same as they appear where flushed, i.e. also after the table.) Best, Denis ___ 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] Natural Tables: spaceinbetween not working?
Am 30.09.2020 um 22:03 schrieb Wolfgang Schuster: Denis Maier schrieb am 30.09.2020 um 21:54: Hi, spaceinbetween seems to have no effect in this example: === \setupTABLE [spaceinbetween=25pt,split=yes] A few options need [start] when you set them before \bTABLE. \setupTABLE [split=yes] \setupTABLE [start] [spaceinbetween=25pt] Thanks. What exactly does [start] do? \starttext \bTABLE \dorecurse{50}{\bTR \bTD table cell \eTD \bTD table cell \eTD \eTR} \eTABLE Try to avoid blank lines in tables, it shouldn't matter in this case but in certain cases this can lead to unwanted whitespace. Thanks for the hint. Denis ___ 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] Natural Tables: spaceinbetween not working?
Denis Maier schrieb am 30.09.2020 um 21:54: Hi, spaceinbetween seems to have no effect in this example: === \setupTABLE [spaceinbetween=25pt,split=yes] A few options need [start] when you set them before \bTABLE. \setupTABLE [split=yes] \setupTABLE [start] [spaceinbetween=25pt] \starttext \bTABLE \dorecurse{50}{\bTR \bTD table cell \eTD \bTD table cell \eTD \eTR} \eTABLE Try to avoid blank lines in tables, it shouldn't matter in this case but in certain cases this can lead to unwanted whitespace. 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 ___
[NTG-context] Natural Tables: spaceinbetween not working?
Hi, spaceinbetween seems to have no effect in this example: === \setupTABLE [spaceinbetween=25pt,split=yes] \starttext \bTABLE \dorecurse{50}{\bTR \bTD table cell \eTD \bTD table cell \eTD \eTR} \eTABLE \stoptext == What am I missing? Best, Denis ___ 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] page counter problem
Thank you, Taco, for the fix *and* the helpful explanation. The file now works (and I can now put this project to bed!) Alan On Wed, Sep 30, 2020 at 7:38 AM Taco Hoekwater wrote: > Hi Alan, > > > On 30 Sep 2020, at 12:50, Alan Bowen wrote: > > > > he page counter does not increase in the first iteration an PDf > inclusion but seems to work properly after that. Have attached a sample > file (69K) that will serve to show the problem—at least, on my machine. > > It is not the iteration itself. Try with another pdf with more than 2 > pages and you > will see that it happens in the first page(s). > > The problem is that you are not giving ConTeXt a fair chance to update the > page number, > because a series of \vbox to \paperheight {}’s cannot cleanly be broken > into separate > pages. The solution is to use > > \dorecurse{\noffigurepages} >{\vbox to \paperheight > > {\vskip-\dimexpr\headerheight+\headerdistance+\topspace\relax > \hbox to \hsize > {\hskip-\backspace > \layeredtext[] > [boffset=3pc] > {\red\userpagenumber} > {\externalfigure[HannahBW.pdf][page=#1]}% > \hss}% > \vss}\page > } > > where the extra \page command allows ConTeXt to properly process the page > breaks. > > Best wishes, > Taco > > > ___ > 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] page counter problem
Hi Alan, > On 30 Sep 2020, at 12:50, Alan Bowen wrote: > > he page counter does not increase in the first iteration an PDf inclusion but > seems to work properly after that. Have attached a sample file (69K) that > will serve to show the problem—at least, on my machine. It is not the iteration itself. Try with another pdf with more than 2 pages and you will see that it happens in the first page(s). The problem is that you are not giving ConTeXt a fair chance to update the page number, because a series of \vbox to \paperheight {}’s cannot cleanly be broken into separate pages. The solution is to use \dorecurse{\noffigurepages} {\vbox to \paperheight {\vskip-\dimexpr\headerheight+\headerdistance+\topspace\relax \hbox to \hsize {\hskip-\backspace \layeredtext[] [boffset=3pc] {\red\userpagenumber} {\externalfigure[HannahBW.pdf][page=#1]}% \hss}% \vss}\page } where the extra \page command allows ConTeXt to properly process the page breaks. Best wishes, Taco ___ 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] page counter problem
he page counter does not increase in the first iteration an PDf inclusion but seems to work properly after that. Have attached a sample file (69K) that will serve to show the problem—at least, on my machine. \starttext \setupexternalfigures[location=default] \setuplayer[preset=middlebottom, method=overlay]{} \setcounter[userpage][101] \noheaderandfooterlines \getfiguredimensions[HannahBW.pdf] \dorecurse{\noffigurepages} {\vbox to \paperheight {\vskip-\dimexpr\headerheight+\headerdistance+\topspace\relax \hbox to \hsize {\hskip-\backspace \layeredtext[] [boffset=3pc] {\red\userpagenumber} {\externalfigure[HannahBW.pdf][page=#1]}% \hss}% \vss} } \dorecurse{\noffigurepages} {\vbox to \paperheight {\vskip-\dimexpr\headerheight+\headerdistance+\topspace\relax \hbox to \hsize {\hskip-\backspace \layeredtext[] [boffset=3pc] {\red\userpagenumber} {\externalfigure[HannahBW.pdf][page=#1]}% \hss}% \vss} } \stoptext HannahBW.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] numbering pages included by \copypages
After further testing guided by Hans’ suggestion, I now have \setupexternalfigures[location=default] \setuplayer[preset=rightbottom, method=overlay]{} \setuppagenumbering[color=darkmagenta] \starttext \getfiguredimensions[HannahBW.pdf] \dorecurse{\noffigurepages}{ \startTEXpage[pagestate=start] \layeredtext[] [boffset=3pc, roffset=3pc] {\darkmagenta\subpagenumber} {\externalfigure[HannahBW.pdf][page=#1]} \stopTEXpage } \stoptext which works, though it would arguably be better if there is a way to prevent the subpage number on the first page of every included file. Alan On Fri, Sep 25, 2020 at 6:12 AM Hans Hagen wrote: > On 9/25/2020 5:53 AM, Aditya Mahajan wrote: > > On Fri, 25 Sep 2020, Wolfgang Schuster wrote: > > > >> Aditya Mahajan schrieb am 24.09.2020 um 23:48: > >>> On Thu, 24 Sep 2020, Alan Bowen wrote: > >>>> Any suggestions or pointers will be most welcome. > >>> > >>> See if this gives you any ideas > >>> > >>> https://adityam.github.io/context-blog/post/include-multi-page-pdf/ > >> > >> When both document have the same size you can replace TeXpage with a > "page" > >> layout. > >> > >> \startlayout[page] > >> \dorecurse{\noffigurepages}{\externalfigure[...][page=\recurselevel]} > >> \stoplayout > > > > Thanks for the comment (also I didn't know about \startlayout .. > \stoplayout). Unfortunately, in my use case, the paper sizes may not be the > same.. I am typically attaching published journal articles and some are > published on letter paper and some on A4. > > \setupexternalfigures[location=default] > > \starttext > > \dorecurse {5} {Before #1\page} > > \getfiguredimensions[oeps.pdf] > > \startsetups SomeNumber > \vbox to \overlayheight \bgroup > \vss > \hbox to \overlaywidth \bgroup > \hss > \bfd \red You can figure it out: \pagenumber > \hss > \egroup > \vss > \egroup > \stopsetups > > \defineoverlay[SomeNumber][\setups{SomeNumber}] > > \dorecurse {\noffigurepages} { > \startTEXpage[pagestate=start] > \externalfigure[oeps.pdf][page=#1,background=SomeNumber]% > \stopTEXpage > } > > \dorecurse {5} {After #1\page} > > \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 / > 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] numbering pages included by \copypages
On 9/25/2020 5:53 AM, Aditya Mahajan wrote: On Fri, 25 Sep 2020, Wolfgang Schuster wrote: Aditya Mahajan schrieb am 24.09.2020 um 23:48: On Thu, 24 Sep 2020, Alan Bowen wrote: Any suggestions or pointers will be most welcome. See if this gives you any ideas https://adityam.github.io/context-blog/post/include-multi-page-pdf/ When both document have the same size you can replace TeXpage with a "page" layout. \startlayout[page] \dorecurse{\noffigurepages}{\externalfigure[...][page=\recurselevel]} \stoplayout Thanks for the comment (also I didn't know about \startlayout .. \stoplayout). Unfortunately, in my use case, the paper sizes may not be the same.. I am typically attaching published journal articles and some are published on letter paper and some on A4. \setupexternalfigures[location=default] \starttext \dorecurse {5} {Before #1\page} \getfiguredimensions[oeps.pdf] \startsetups SomeNumber \vbox to \overlayheight \bgroup \vss \hbox to \overlaywidth \bgroup \hss \bfd \red You can figure it out: \pagenumber \hss \egroup \vss \egroup \stopsetups \defineoverlay[SomeNumber][\setups{SomeNumber}] \dorecurse {\noffigurepages} { \startTEXpage[pagestate=start] \externalfigure[oeps.pdf][page=#1,background=SomeNumber]% \stopTEXpage } \dorecurse {5} {After #1\page} \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 / 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] numbering pages included by \copypages
On Fri, 25 Sep 2020, Wolfgang Schuster wrote: > Aditya Mahajan schrieb am 24.09.2020 um 23:48: > > On Thu, 24 Sep 2020, Alan Bowen wrote: > > > Any suggestions or pointers will be most welcome. > > > > See if this gives you any ideas > > > > https://adityam.github.io/context-blog/post/include-multi-page-pdf/ > > When both document have the same size you can replace TeXpage with a "page" > layout. > > \startlayout[page] > \dorecurse{\noffigurepages}{\externalfigure[...][page=\recurselevel]} > \stoplayout Thanks for the comment (also I didn't know about \startlayout .. \stoplayout). Unfortunately, in my use case, the paper sizes may not be the same.. I am typically attaching published journal articles and some are published on letter paper and some on A4. Thanks, 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 ___
Re: [NTG-context] numbering pages included by \copypages
Aditya Mahajan schrieb am 24.09.2020 um 23:48: On Thu, 24 Sep 2020, Alan Bowen wrote: I need to include several documents in a single paginated file. Treating the source file (.tex) of each document as a component file in a .prd file is one way to go. But I was wondering if it might be possible to do get the same result using the .pdf files of each document instead. \copypages is promising: it includes the. pdf files and the counter in the resultant .prd file is correct. But what I still have to get is the page number on all pages of the included .pdf files except the first page in each. I looked at \startpagefigure but that would be a very cumbersome way to go since there over 350 pages to include, given that it handles only one page at a time. I hope that this makes sense. I don't completely understand the question I guess something like this: \setupexternalfigures[location=default] \starttext ... \page \getfiguredimensions[texit.pdf] \noheaderandfooterlines \dorecurse{\noffigurepages} {\vbox to \vsize {\vskip-\dimexpr\headerheight+\topspace\relax \hbox to \hsize {\hskip-\backspace \externalfigure[texit.pdf][page=\recurselevel]% \hss}% \vss}} \page ... \stoptext Any suggestions or pointers will be most welcome. See if this gives you any ideas https://adityam.github.io/context-blog/post/include-multi-page-pdf/ When both document have the same size you can replace TeXpage with a "page" layout. \startlayout[page] \dorecurse{\noffigurepages}{\externalfigure[...][page=\recurselevel]} \stoplayout 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 ___
[NTG-context] Index range with page number suffix
(Using mkiv.) I have an index in which some entries need suffixes on the page numbers, for which I have used processors. For index ranges, I need the page number suffix only to appear on the end page number, not the start page number. The below MWE produces an index entry: sausage 1i-2i What I need is: sausage 1-2i Is this possible? MWE \defineprocessor[important][right={\it{i}}] \starttext \samplefile{knuth} \startregister[index][sausage][important->sausage]{sausage} \dorecurse{6}{\samplefile{knuth}} \stopregister[index][sausage]{sausage} \samplefile{knuth} \page \placeindex \stoptext Thanks in advance, Duncan ___ 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] Full page image and caption in another page?
Hi, This sounds quite complicated, really. I am not at all sure how this page rotation should work but I assume you plan a pdf-only document then? Otherwise, I would expect rotating the figure instead of the whole page. Also, rotating the paper does not rotate the layout, at least not if you use a fixed height and width. You would need something like this for auto-resizing \textheight and \textwidth: \definelayout[default][topspace=0.6cm, topdistance=0cm, header=1cm, headerdistance=0cm, height=fit, footer=0cm, backspace=4.2cm, width=fit] Another problem is that setting the width and height of a float does not affect any externafigure side. You need to do a \setupexternalfigure for that. And there is (afaik) no support for having a “two-page” float. The “opposite” key is used to put the float (including caption) on the opposite side of the current page. But at least there is a command to typeset a caption standalone, so perhaps that will help? You would then *not* use the \startplacebigfigure, but place the caption and the image manually: \page \placefloatcaption[bigfigure][title={A cow}] \page \externalfigure[cow] \page Best wishes, Taco > On 22 Sep 2020, at 19:42, José de Mattos Neto wrote: > > Hi, it's my first message on this list. > I've searched in ConTeXt manuals, TeX.SX and here, but couldn't find a way to > achieve these 4 requirements altogether: > > • Place a figure as full-page figure > • Change orientation accordingly (if it's a landscape PDF, for instance) > • Make that using \setupfloat (or other setup), not directly in > \placefloat > • Place captions in another page (ideally on opposite page) > Problems: > • I can't get # 1 and # 3 at same time > • \setupfloat doesn't have before option, which I could use to change > orientation > • I have no idea how to accomplish # 4 > A minimal working example (PDF in attachment): > > %%% > \definepapersize[default][A4, portrait] > \definelayout[default][topspace=0.6cm, topdistance=0cm, header=1cm, > headerdistance=0cm, >height=27.3cm, footer=0cm, >backspace=4.2cm, width=13.6cm] > \setuppapersize[default] > \setuplayout[default] > \setuppagenumbering[alternative=doublesided, location={header}] > \setupexternalfigures[location={default}] > > \definepapersize[rotate][A4, landscape] > \definefloat[bigfigure][bigfigures][figure] > \setupfloat[bigfigure][default={page}, >width=1\textwidth, height=1\textheight, >before={\setuppapersize[rotate]}] % there's no before > in setupfloat > \setupcaption[bigfigure][location={opposite}] % there's no opposite location > in setupcaption > > \starttext > \showframe > \dorecurse{2}{\input{knuth}} > > \setuppapersize[rotate] % this doesn't work because is in same page > \startplacebigfigure[title={A cow}]{\externalfigure[cow]}\stopplacebigfigure > \setuppapersize[default] > > \dorecurse{2}{\input{knuth}} > \stoptext > %%% > > Thanks in advance! > José Neto > ___ > 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 > ___ Taco Hoekwater Elvenkind BV ___ 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] Full page image and caption in another page?
Hi, it's my first message on this list. I've searched in ConTeXt manuals, TeX.SX and here, but couldn't find a way to achieve these 4 requirements altogether: 1. Place a figure as full-page figure 2. Change orientation accordingly (if it's a landscape PDF, for instance) 3. Make that using \setupfloat (or other setup), not directly in \placefloat 4. Place captions in another page (ideally on opposite page) Problems: - I can't get # 1 and # 3 at same time - \setupfloat doesn't have before option, which I could use to change orientation - I have no idea how to accomplish # 4 A minimal working example (PDF in attachment): %%% \definepapersize[default][A4, portrait] \definelayout[default][topspace=0.6cm, topdistance=0cm, header=1cm, headerdistance=0cm, height=27.3cm, footer=0cm, backspace=4.2cm, width=13.6cm] \setuppapersize[default] \setuplayout[default] \setuppagenumbering[alternative=doublesided, location={header}] \setupexternalfigures[location={default}] \definepapersize[rotate][A4, landscape] \definefloat[bigfigure][bigfigures][figure] \setupfloat[bigfigure][default={page}, width=1\textwidth, height=1\textheight, before={\setuppapersize[rotate]}] % there's no before in setupfloat \setupcaption[bigfigure][location={opposite}] % there's no opposite location in setupcaption \starttext \showframe \dorecurse{2}{\input{knuth}} \setuppapersize[rotate] % this doesn't work because is in same page \startplacebigfigure[title={A cow}]{\externalfigure[cow]}\stopplacebigfigure \setuppapersize[default] \dorecurse{2}{\input{knuth}} \stoptext %%% Thanks in advance! José Neto mwe.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \dorecurse{}{} problem
Dear Aditya, Jairo, Wolfgang, and Otared, Thank you for the replies and explanations. I also read the blog. In this case, using '##1’ is an easy way. For more complex table, I may use luacode. Thanks again. Best regards, Dalyoung ___ 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] \dorecurse{}{} problem
Jeong Dal schrieb am 21.09.2020 um 20:54: Dear Aditya, Jairo, Wolfgang, and Otared, Thank you for the replies and explanations. I also read the blog. In this case, using '##1’ is an easy way. For more complex table, I may use luacode. I forgot the obvious \expanded solution: \starttext \starttabulate[|c|] \dorecurse{9}{\expanded{\NC \recurselevel \NC\NR}} \stoptabulate \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 ___
[NTG-context] \dorecurse{}{} problem
Hi, I tried to make a table using \dorecurse or \doloop as in the example. There is no error but \recurselevel is not increased, all are 0 in the first example and only two rows are created with the \recurselevel 0 and 2 only in the second example. Does the tabulate cause the error? What is wrong in this MWE? Thank you for reading. Best regards, Dalyoung * \startbuffer[AdjacencyList1] \starttabulate[|c|cw(2cm)|] \HL \dorecurse{8} {\NC \recurselevel \NC \NC\NR \HL} \stoptabulate \stopbuffer \startbuffer[AdjacencyList2] \starttabulate[|c|cw(2cm)|] \HL \doloop{ \ifnum \recurselevel=7 \exitloop \fi \NC \recurselevel \NC \NC\NR \HL } \stoptabulate \stopbuffer \starttext \getbuffer[AdjacencyList1] \getbuffer[AdjacencyList2] \stoptext > 2020. 9. 21. 오후 10:50, ntg-context-requ...@ntg.nl 작성: > > Send ntg-context mailing list submissions to > ntg-context@ntg.nl > > To subscribe or unsubscribe via the World Wide Web, visit > https://mailman.ntg.nl/mailman/listinfo/ntg-context > or, via email, send a message with subject or body 'help' to > ntg-context-requ...@ntg.nl > > You can reach the person managing the list at > ntg-context-ow...@ntg.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of ntg-context digest..." > > > Today's Topics: > > 1. Parallel text support (Denis Maier) > 2. Re: Parallel text support (Taco Hoekwater) > 3. Re: ZapfDingbats Unicode differences MKIV vs LMTX > (Christoph Reller) > 4. Re: ZapfDingbats Unicode differences MKIV vs LMTX (Hans Hagen) > 5. Math fonts for Nimbus fonts (Otared Kavian) > 6. Re: 2020 Meeting recordings? (Taco Hoekwater) > > > -- > > Message: 1 > Date: Mon, 21 Sep 2020 12:21:37 +0200 > From: Denis Maier > To: ntg-context@ntg.nl > Subject: [NTG-context] Parallel text support > Message-ID: <780fe43c-f2c3-6ea1-04f5-d4d5c22e7...@mailbox.org> > Content-Type: text/plain; charset=utf-8; format=flowed > > Hi, > > I'm trying to typeset a parallel text that should appear in columns. The > sources are XML, and there I have to use tables for this. So, I thought > the easiest way is to use extreme tables for this: > > = > \starttext > > \dorecurse{3}{\input knuth} > > \startxtable[split=yes,frame=off] > \startxrow > \startxcell Text \stopxcell > \startxcell Übersetzung \stopxcell > \stopxrow > \startxrow > \startxcell \input ward \stopxcell > \startxcell \input tufte \stopxcell > \stopxrow > \stopxtable > > \stoptext > = > > However, as it turns out, split only seems to mean that the table is > split between rows, individual rows stay on the same page. > > Is there a better approach? I've found the page-streams, but that seems > to be too much... > > Best, > Denis > > > -- > > Message: 2 > Date: Mon, 21 Sep 2020 13:58:11 +0200 > From: Taco Hoekwater > To: mailing list for ConTeXt users > Subject: Re: [NTG-context] Parallel text support > Message-ID: > Content-Type: text/plain; charset=utf-8 > > > >> On 21 Sep 2020, at 12:21, Denis Maier wrote: >> >> >> However, as it turns out, split only seems to mean that the table is split >> between rows, individual rows stay on the same page. >> >> Is there a better approach? I've found the page-streams, but that seems to >> be too much… > > \starttabulate > > > > -- > > Message: 3 > Date: Mon, 21 Sep 2020 14:55:02 +0200 > From: Christoph Reller > To: Hans Hagen > Cc: mailing list for ConTeXt users > Subject: Re: [NTG-context] ZapfDingbats Unicode differences MKIV vs > LMTX > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > On Sat, Sep 19, 2020 at 12:04 PM Hans Hagen wrote: > >> On 9/19/2020 6:18 AM, Christoph Reller wrote: >>> On Fri, Sep 18, 2020 at 4:17 PM Hans Hagen >> <mailto:j.ha...@xs4all.nl>> wrote: >>> >>>On 9/18/2020 11:23 AM, Christoph Reller wrote: >>> >> \definefontsynonym[ZapfDingbats][file:ZapfDingbats][features=dingbats] >>>> \usemodule [fnt-10] >>>> \starttext >>>> (1) \getglyphdirect{ZapfDingbats}{61491}\crlf % MKIV log: char >>>> (U+0F033) in font 'ZapfDingbats-4' with id 8: missing >>>> (2) \getglyphdirect{ZapfDingbats}{983059} % LMTX log: char >>>> (U+F0013) in font 'ZapfDingbats-4' with id 8: missing >>>> \ShowCompleteFon
Re: [NTG-context] \dorecurse{}{} problem
> On 21 Sep 2020, at 16:42, Aditya Mahajan wrote: > > On Mon, 21 Sep 2020, Wolfgang Schuster wrote: > >> Aditya Mahajan schrieb am 21.09.2020 um 16:35: >>> […] > > You gave the same reply 11 years ago :-) which is also listed in the blog > post. … Which shows that some things don't change in ConTeXt :-) Kidding aside, why is there a difference between the tabulate mechanism and the xtable mechanism? Best regards: Otared K. ___ 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] \dorecurse{}{} problem
On Mon, 21 Sep 2020, Wolfgang Schuster wrote: > Aditya Mahajan schrieb am 21.09.2020 um 16:35: > > On Mon, 21 Sep 2020, Jeong Dal wrote: > > > > > Hi, > > > > > > I tried to make a table using \dorecurse or \doloop as in the example. > > > There is no error but \recurselevel is not increased, all are 0 in the > > > first example and only two rows are created with the \recurselevel 0 and 2 > > > only in the second example. > > > > > > Does the tabulate cause the error? > > > What is wrong in this MWE? > > \dorecurse does not expand its arguments. See this old blog post for a > > discussion on this: > > > > https://adityam.github.io/context-blog/post/tex-programming/ > > \starttext > > \starttabulate[|c|] > \dorecurse{8}{\NC ##1 \NC\NR} > \stoptabulate > > \stoptext You gave the same reply 11 years ago :-) which is also listed in the blog post. 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 ___
Re: [NTG-context] \dorecurse{}{} problem
Hi Dalyoung, I don't know why \recurselevel returns 0 inside a tabulate environment, but the following works fine: \starttext \startxtable[frame=off,bottomframe=on,width=1cm,align={middle,lohi}] \startxrow\startxcell \stopxcell\stopxrow % just to have a line on the top of the first row \dorecurse{8} {\startxrow\startxcell \recurselevel \stopxcell\stopxrow} \stopxtable \stoptext Best regards: Otared K. > On 21 Sep 2020, at 16:07, Jeong Dal wrote: > > Hi, > > I tried to make a table using \dorecurse or \doloop as in the example. > There is no error but \recurselevel is not increased, all are 0 in the first > example and only two rows are created with the \recurselevel 0 and 2 only in > the second example. > > Does the tabulate cause the error? > What is wrong in this MWE? > > Thank you for reading. > > Best regards, > > Dalyoung > > * > \startbuffer[AdjacencyList1] > \starttabulate[|c|cw(2cm)|] > \HL > \dorecurse{8} >{\NC \recurselevel \NC \NC\NR \HL} > \stoptabulate > \stopbuffer > > \startbuffer[AdjacencyList2] > \starttabulate[|c|cw(2cm)|] > \HL > \doloop{ >\ifnum \recurselevel=7 > \exitloop >\fi >\NC \recurselevel \NC \NC\NR \HL > } > \stoptabulate > \stopbuffer > > \starttext > \getbuffer[AdjacencyList1] > > \getbuffer[AdjacencyList2] > \stoptext > >> 2020. 9. 21. 오후 10:50, ntg-context-requ...@ntg.nl 작성: >> >> Send ntg-context mailing list submissions to >> ntg-context@ntg.nl >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://mailman.ntg.nl/mailman/listinfo/ntg-context >> or, via email, send a message with subject or body 'help' to >> ntg-context-requ...@ntg.nl >> >> You can reach the person managing the list at >> ntg-context-ow...@ntg.nl >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of ntg-context digest..." >> >> >> Today's Topics: >> >> 1. Parallel text support (Denis Maier) >> 2. Re: Parallel text support (Taco Hoekwater) >> 3. Re: ZapfDingbats Unicode differences MKIV vs LMTX >> (Christoph Reller) >> 4. Re: ZapfDingbats Unicode differences MKIV vs LMTX (Hans Hagen) >> 5. Math fonts for Nimbus fonts (Otared Kavian) >> 6. Re: 2020 Meeting recordings? (Taco Hoekwater) >> >> >> -- >> >> Message: 1 >> Date: Mon, 21 Sep 2020 12:21:37 +0200 >> From: Denis Maier >> To: ntg-context@ntg.nl >> Subject: [NTG-context] Parallel text support >> Message-ID: <780fe43c-f2c3-6ea1-04f5-d4d5c22e7...@mailbox.org> >> Content-Type: text/plain; charset=utf-8; format=flowed >> >> Hi, >> >> I'm trying to typeset a parallel text that should appear in columns. The >> sources are XML, and there I have to use tables for this. So, I thought >> the easiest way is to use extreme tables for this: >> >> = >> \starttext >> >> \dorecurse{3}{\input knuth} >> >> \startxtable[split=yes,frame=off] >> \startxrow >> \startxcell Text \stopxcell >> \startxcell Übersetzung \stopxcell >> \stopxrow >> \startxrow >> \startxcell \input ward \stopxcell >> \startxcell \input tufte \stopxcell >> \stopxrow >> \stopxtable >> >> \stoptext >> = >> >> However, as it turns out, split only seems to mean that the table is >> split between rows, individual rows stay on the same page. >> >> Is there a better approach? I've found the page-streams, but that seems >> to be too much... >> >> Best, >> Denis >> >> >> -- >> >> Message: 2 >> Date: Mon, 21 Sep 2020 13:58:11 +0200 >> From: Taco Hoekwater >> To: mailing list for ConTeXt users >> Subject: Re: [NTG-context] Parallel text support >> Message-ID: >> Content-Type: text/plain;charset=utf-8 >> >> >> >>> On 21 Sep 2020, at 12:21, Denis Maier wrote: >>> >>> >>> However, as it turns out, split only seems to mean that the table is split >>> between rows, individual rows stay on the same page. >>> >>> Is there a better approach? I've found the page-streams, but that seems to >>> be too much… >> >> \starttabulate >> >> >> >> -- >> >> Message: 3 >> Date: Mon, 21
Re: [NTG-context] \dorecurse{}{} problem
Aditya Mahajan schrieb am 21.09.2020 um 16:35: On Mon, 21 Sep 2020, Jeong Dal wrote: Hi, I tried to make a table using \dorecurse or \doloop as in the example. There is no error but \recurselevel is not increased, all are 0 in the first example and only two rows are created with the \recurselevel 0 and 2 only in the second example. Does the tabulate cause the error? What is wrong in this MWE? \dorecurse does not expand its arguments. See this old blog post for a discussion on this: https://adityam.github.io/context-blog/post/tex-programming/ \starttext \starttabulate[|c|] \dorecurse{8}{\NC ##1 \NC\NR} \stoptabulate \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 ___
Re: [NTG-context] \dorecurse{}{} problem
Hi, Using ##1 instead of \recurselevel makes it work in this specific case if you want a quick and dirty solution. It seems to be a thing with nesting, as using #1 complains. I'd prefer the solutions as shown by Aditya: constructing tables via Lua, etc. Regards, Jairo El lun., 21 de sep. de 2020 a la(s) 09:16, Jeong Dal (hak...@me.com) escribió: > Hi, > > I tried to make a table using \dorecurse or \doloop as in the example. > There is no error but \recurselevel is not increased, all are 0 in the > first example and only two rows are created with the \recurselevel 0 and 2 > only in the second example. > > Does the tabulate cause the error? > What is wrong in this MWE? > > Thank you for reading. > > Best regards, > > Dalyoung > > * > \startbuffer[AdjacencyList1] > \starttabulate[|c|cw(2cm)|] > \HL > \dorecurse{8} > {\NC \recurselevel \NC \NC\NR \HL} > \stoptabulate > \stopbuffer > > \startbuffer[AdjacencyList2] > \starttabulate[|c|cw(2cm)|] > \HL > \doloop{ > \ifnum \recurselevel=7 > \exitloop > \fi > \NC \recurselevel \NC \NC\NR \HL > } > \stoptabulate > \stopbuffer > > \starttext > \getbuffer[AdjacencyList1] > > \getbuffer[AdjacencyList2] > \stoptext > > 2020. 9. 21. 오후 10:50, ntg-context-requ...@ntg.nl 작성: > > Send ntg-context mailing list submissions to > ntg-context@ntg.nl > > To subscribe or unsubscribe via the World Wide Web, visit > https://mailman.ntg.nl/mailman/listinfo/ntg-context > or, via email, send a message with subject or body 'help' to > ntg-context-requ...@ntg.nl > > You can reach the person managing the list at > ntg-context-ow...@ntg.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of ntg-context digest..." > > > Today's Topics: > > 1. Parallel text support (Denis Maier) > 2. Re: Parallel text support (Taco Hoekwater) > 3. Re: ZapfDingbats Unicode differences MKIV vs LMTX > (Christoph Reller) > 4. Re: ZapfDingbats Unicode differences MKIV vs LMTX (Hans Hagen) > 5. Math fonts for Nimbus fonts (Otared Kavian) > 6. Re: 2020 Meeting recordings? (Taco Hoekwater) > > > -- > > Message: 1 > Date: Mon, 21 Sep 2020 12:21:37 +0200 > From: Denis Maier > To: ntg-context@ntg.nl > Subject: [NTG-context] Parallel text support > Message-ID: <780fe43c-f2c3-6ea1-04f5-d4d5c22e7...@mailbox.org> > Content-Type: text/plain; charset=utf-8; format=flowed > > Hi, > > I'm trying to typeset a parallel text that should appear in columns. The > sources are XML, and there I have to use tables for this. So, I thought > the easiest way is to use extreme tables for this: > > = > \starttext > > \dorecurse{3}{\input knuth} > > \startxtable[split=yes,frame=off] > \startxrow > \startxcell Text \stopxcell > \startxcell Übersetzung \stopxcell > \stopxrow > \startxrow > \startxcell \input ward \stopxcell > \startxcell \input tufte \stopxcell > \stopxrow > \stopxtable > > \stoptext > = > > However, as it turns out, split only seems to mean that the table is > split between rows, individual rows stay on the same page. > > Is there a better approach? I've found the page-streams, but that seems > to be too much... > > Best, > Denis > > > -- > > Message: 2 > Date: Mon, 21 Sep 2020 13:58:11 +0200 > From: Taco Hoekwater > To: mailing list for ConTeXt users > Subject: Re: [NTG-context] Parallel text support > Message-ID: > Content-Type: text/plain; charset=utf-8 > > > > On 21 Sep 2020, at 12:21, Denis Maier > wrote: > > > However, as it turns out, split only seems to mean that the table is split > between rows, individual rows stay on the same page. > > Is there a better approach? I've found the page-streams, but that seems to > be too much… > > > \starttabulate > > > > -- > > Message: 3 > Date: Mon, 21 Sep 2020 14:55:02 +0200 > From: Christoph Reller > To: Hans Hagen > Cc: mailing list for ConTeXt users > Subject: Re: [NTG-context] ZapfDingbats Unicode differences MKIV vs > LMTX > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > On Sat, Sep 19, 2020 at 12:04 PM Hans Hagen wrote: > > On 9/19/2020 6:18 AM, Christoph Reller wrote: > > On Fri, Sep 18, 2020 at 4:17 PM Hans Hagen <mailto:j.ha...@xs4all.nl>> wrote: > >On 9/18/2020 11:23 AM, Christoph Reller wrote: > > \definefontsynonym[ZapfDingbats][file:ZapfDingbats][features=dingbats]
Re: [NTG-context] \dorecurse{}{} problem
On Mon, 21 Sep 2020, Jeong Dal wrote: > Hi, > > I tried to make a table using \dorecurse or \doloop as in the example. > There is no error but \recurselevel is not increased, all are 0 in the first > example and only two rows are created with the \recurselevel 0 and 2 only in > the second example. > > Does the tabulate cause the error? > What is wrong in this MWE? \dorecurse does not expand its arguments. See this old blog post for a discussion on this: https://adityam.github.io/context-blog/post/tex-programming/ 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 ___
[NTG-context] Parallel text support
Hi, I'm trying to typeset a parallel text that should appear in columns. The sources are XML, and there I have to use tables for this. So, I thought the easiest way is to use extreme tables for this: = \starttext \dorecurse{3}{\input knuth} \startxtable[split=yes,frame=off] \startxrow \startxcell Text \stopxcell \startxcell Übersetzung \stopxcell \stopxrow \startxrow \startxcell \input ward \stopxcell \startxcell \input tufte \stopxcell \stopxrow \stopxtable \stoptext = However, as it turns out, split only seems to mean that the table is split between rows, individual rows stay on the same page. Is there a better approach? I've found the page-streams, but that seems to be too much... Best, Denis ___ 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] columns yet again
On 9/17/20 3:23 PM, Hans Hagen wrote: \setuplayout[width=16cm] \starttext \enabledirectives[tabulate.linenumbers] \showframe \starttabulate[|p(7cm)|A{verytolerant}i2p(\dimexpr9cm-2em\relax)|] \NC \startlinenumbering \dorecurse{10}{\input ward \par} \stoplinenumbering \NC \dorecurse{3}{\input tufte \par} \NC \NR \stoptabulate \disabledirectives[tabulate.linenumbers] \starttabulate[|p(7cm)|A{verytolerant}i2p(\dimexpr9cm-2em\relax)|] \NC \startlinenumbering \dorecurse{10}{\input ward \par} \stoplinenumbering \NC \dorecurse{3}{\input tufte \par} \NC \NR \stoptabulate \stoptext I'm not sure why there is no key / value interface ... probably because I made it one for someone as fast hack. Thank you, Hans, I had no idea this existed. It looks very fascinating. But as far as I could see in the source, there is no possibility of setting things up (font, size, start, etc.)? ___ 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] columns yet again
On 9/13/2020 10:54 AM, Thomas A. Schmitz wrote: Hi all, I hope everybody made it back home safely after the meeting. It was great listening in, even if I couldn't be there in person, unfortunately! Today's question is an old one, but I'm confused. What I need: two columns, of unequal width, the left column has line numbering; two column layout starts in the middle of pages. What I tried so far: \setuplayout[width=16cm] \starttext \enabledirectives[tabulate.linenumbers] \showframe \starttabulate[|p(7cm)|A{verytolerant}i2p(\dimexpr9cm-2em\relax)|] \NC \startlinenumbering \dorecurse{10}{\input ward \par} \stoplinenumbering \NC \dorecurse{3}{\input tufte \par} \NC \NR \stoptabulate \disabledirectives[tabulate.linenumbers] \starttabulate[|p(7cm)|A{verytolerant}i2p(\dimexpr9cm-2em\relax)|] \NC \startlinenumbering \dorecurse{10}{\input ward \par} \stoplinenumbering \NC \dorecurse{3}{\input tufte \par} \NC \NR \stoptabulate \stoptext I'm not sure why there is no key / value interface ... probably because I made it one for someone as fast hack. 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 ___
[NTG-context] columns yet again
Hi all, I hope everybody made it back home safely after the meeting. It was great listening in, even if I couldn't be there in person, unfortunately! Today's question is an old one, but I'm confused. What I need: two columns, of unequal width, the left column has line numbering; two column layout starts in the middle of pages. What I tried so far: 1. \defineparagraphs allows to have two paragraphs of unequal width, but the line numbering isn't visible: \setuppapersize[A4,landscape][A4,landscape] \setuplayout[grid=yes] \definelinenumbering [original] [step=2,location=text,align=flushright,distance=0.4cm,style=small,color=magenta] \defineparagraphs [Half] [n=2] \setupparagraphs [Half] [before=,after=,align=verytolerant] \setupparagraphs [Half] [1] [width=0.45\textwidth] \starttext \startlinenumbering [original] [start=4] Poetry One Word Per Line is Poetic \stoplinenumbering \nextHalf Prose translation \stopHalf \stoptext 2. columnsets:\usemodule[old-columnsets]: unequal width, but no line numbering: \usemodule [old-columnsets] \setuppapersize [A4,landscape][A4,landscape] \setuplayout [grid=yes] \definecolumnset [numbered] [n=2] \setupcolumnset [numbered] [distance=0.5cm,frame=on] \setupcolumnset [numbered:1] [width=4cm] \setupcolumnset [numbered:2] [width=10cm] \starttext \startcolumnset [numbered] \startlinenumbering[step=1,location=left] Poetry One Word Per Line is Poetic\par % needed, otherwise last line is not indented correctly \stoplinenumbering \column Two \stopcolumnset \stoptext 3. Same example without the first line: line numbers, but width is ignored; both columns are of width 0.5\textwidth. 4. page columns: always start at new page. 5. \startcolumns: like 3.; equal width. In addition, for reasons that are completely unclear to me, the example from the columnsets manual (p. 32) does not compile: \setuppapersize[A4,landscape][A4,landscape] \setuplayout[grid=yes] \showframe \definecolumnset[example][n=3,page=left] \setupbackgrounds[text][text][background=contrast] \setupcolumnset[frame=on,framecolor=color-4,rulethickness=1mm] \definecolor[fakerulecolor][white] \setupcolumnset[example:1][width=2cm] \setupcolumnset[example:2][width=4cm] \setupcolumnset[example:3][width=3cm] \setupcolumnset[example:4][width=3cm] \setupcolumnset[example:5][width=4cm] \setupcolumnset[example:6][width=6cm] \starttext \startcolumnset[example] \dorecurse{5}{ \dorecurse{3}{\fakewords{10}{15}\par} \column[yes] } \stopcolumnset \stoptext ends in "tex error > tex error on line 23 in file /tmp/test.tex: ! Undefined control sequence So I'm a bit confused: what I should use? What is the current status of the diverse columns environments? Have a nice Sunday! Thomas ___ 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] Wrong page number when placefigure spans full page in columnset
Hi, When I place a figure within a columnset and that figure takes a full page then the page number in the header is incorrect. Page number is the same as the previous page but on the next page it's correct. Please see example below and attached showing page 2 twice with pages numbered 1, 2, 2, 4, 5. If I reduce the height of the figure (from 15 to 12cm for example), then some main text gets added on the page and page number (3) becomes correct. Is that a bug or am I doing something wrong? Thanks for your help. Charles \setuppapersize[letter][letter] \setuplayout[height=fit,grid=yes] \showframe \usemodule[newcolumnsets] \definecolumnset[colset][n=2] \starttext \startcolumnset[colset] \section{One section} \dorecurse{16}{\input ward \par} \placefigure[page]{Legend. \input ward }{\externalfigure[dummy][width=\makeupwidth,height=15cm]} \section{Two section} \dorecurse{2}{\input knuth \par} \section{Three section} \dorecurse{6}{\input knuth \par} \stopcolumnset \stoptext page.pdf Description: Adobe PDF document \setuppapersize[letter][letter] \setuplayout[height=fit,grid=yes] \showframe \usemodule[newcolumnsets] \definecolumnset[colset][n=2] \starttext \startcolumnset[colset] \section{One section} \dorecurse{16}{\input ward \par} \placefigure[page]{Legend. \input ward }{\externalfigure[dummy][width=\makeupwidth,height=15cm]} \section{Two section} \dorecurse{2}{\input knuth \par} \section{Three section} \dorecurse{6}{\input knuth \par} \stopcolumnset \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] Appendix question
jbf schrieb am 08.09.2020 um 12:40: A (hopefully) simple question this time: Why would my appendices be labelled as Appendix One, Appendix Two etc., instead of Appendix A, Appendix B? I thought Appendices would normally be labelled alphabetically, not numerically. So I get APPENDIX as the label, I have: \setuplabeltext [en] [chapter={\bf Chapter }, appendix=APPENDIX ] But elsewhere I have: \setupheads[chapter][indentnext=no,conversion=Words,distance=.25em] So is that what is affecting my appendices, and if so how do I do it so that Chapters get words (One, Two, etc) and Appendices get letters (A,B, etc)? Use sectionconversionset to set the number conversion for all section levels and ignore the conversion key. \defineconversionset [bodypart:section] [n,Word] [n] \defineconversionset [appendix:section] [n,A] [n] \setupheads [sectionconversionset=section] \setuplabeltext [en] [chapter=Chapter , appendix=Appendix ] \starttext \startbodymatter \stopbodymatter \dorecurse{5}{\chapter{Chapter #1}} \startappendices \dorecurse{5}{\chapter{Chapter #1}} \stopappendices \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 ___
Re: [NTG-context] Fullwidth topfigure with caption in the margin
On Mon, Sep 7, 2020 at 9:26 PM Mikael Sundqvist wrote: > Hi, > > Is there a way to have a fullwith topfigure with caption in the margin so > that the figure does not interfere with the text? My try is > > > %%% > \setuplayout[ > rightmargin=2in, > rightmargindistance=0.375in, > width=4.125in, > ] > > \showframe > > \definecolor [transparentred] [r=1,t=.5,a=1] > > \definefloat[topfigure][topfigures][figure] > > \setupfloat[topfigure][ > default={margin}, > location=flushleft, > maxwidth=6.5in, > ] > > \setupcaption[topfigure][ > number=no, > location=bottom, > style={\switchtobodyfont[8bp]}, > ] > \starttext > \dorecurse{4}{\samplefile{knuth}} > > \startplacetopfigure[title={\samplefile{ward}}] > \blackrule[width=6.5in,height=2in,color=transparentred] > \stopplacetopfigure > > \samplefile{knuth} > \stoptext > %% > > but, as one can see on page two, the text from the previous page just > continues under the image. I want the "larg-scale user..." to start below > the image. It would be good if it was also possible to configure the > distance between the image and the text. > > (I guess one option would be to not use a margin figure, and use > default=top, but then I don't know how to handle the caption.) > > /Mikael > An update: I am now able to get something closer to what I want. The figure is where I want it, the caption is where I want it. The code might be bad and there might be better ways to do it. For example, I could not find how to use the title text but only the subtitle in the figure. The spacing is also a bit manual in the \TopFigureCaption command. Any comments for improvements (or completely different solutions) are very welcome. /Mikael \setuplayout[ rightmargin=2in, rightmargindistance=0.375in, width=4.125in, ] \showframe \definecolor [transparentred] [r=1,t=.5,a=1] \definefloat[topfigure][topfigures][figure] \setupfloat[topfigure][ default={top,none}, location=flushright, maxwidth=6.5in, ] \setupcaption[topfigure][ number=no, ] \define\TopFigureCaption{% \blank[-line,force,overlay] \vsmash{% \blank[line] \framed[align=flushright,width=6.5in,frame=off,offset=overlay]{% \startframedtext[ width=\rightmarginwidth, frame=off, offset=overlay, style={\switchtobodyfont[8bp]}, align=flushleft, ]\floatuserdataparameter{subtitle} \stopframedtext}}} \starttext \dorecurse{3}{\samplefile{knuth}} \startplacetopfigure[title=This is the title][subtitle={\samplefile{ward}}] \blackrule[width=6.5in,height=2in,color=transparentred] \TopFigureCaption \stopplacetopfigure \dorecurse{3}{\samplefile{knuth}} \startplacetopfigure[title=This is the title][subtitle={\samplefile{ward}}] \blackrule[width=6.5in,height=2in,color=transparentred] \TopFigureCaption \stopplacetopfigure \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] Fullwidth topfigure with caption in the margin
Hi, Is there a way to have a fullwith topfigure with caption in the margin so that the figure does not interfere with the text? My try is %%% \setuplayout[ rightmargin=2in, rightmargindistance=0.375in, width=4.125in, ] \showframe \definecolor [transparentred] [r=1,t=.5,a=1] \definefloat[topfigure][topfigures][figure] \setupfloat[topfigure][ default={margin}, location=flushleft, maxwidth=6.5in, ] \setupcaption[topfigure][ number=no, location=bottom, style={\switchtobodyfont[8bp]}, ] \starttext \dorecurse{4}{\samplefile{knuth}} \startplacetopfigure[title={\samplefile{ward}}] \blackrule[width=6.5in,height=2in,color=transparentred] \stopplacetopfigure \samplefile{knuth} \stoptext %% but, as one can see on page two, the text from the previous page just continues under the image. I want the "larg-scale user..." to start below the image. It would be good if it was also possible to configure the distance between the image and the text. (I guess one option would be to not use a margin figure, and use default=top, but then I don't know how to handle the caption.) /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 ___
[NTG-context] Force bottom float to be at the bottom
Hi, I'm defining a bottomfigure with default=bottom, but it does not always seem to work (example below). If the float does not fit on the page, it appears instead in the top of the next page. Can I force it to be in the bottom of the next page? That is, can I setup a float that is always at the bottom of the page? I hope what I ask makes sense. /Mikael \useMPlibrary[dum] \definefloat[bottomfigure][bottomfigures][figure] \setupfloat[bottomfigure][default=bottom] \starttext \dorecurse{4}{\samplefile{knuth}} \startplacebottomfigure \externalfigure[dummy][width=\textwidth] \stopplacebottomfigure \samplefile{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] new upload
Hi, Hans. :) Is there an analogue for display math? Could discretionaries be applicable to math formulas when "split=yes" is enabled, for instance? Thank you in advance. Jairo :) El lun., 31 de ago. de 2020 a la(s) 15:21, Hans Hagen (j.ha...@xs4all.nl) escribió: > Hi, > > In order to keep the 'context is good for toy math' reputation up to > date, in lmtx we can now have proper discretionaries in math and math in > discretionaries. The kind of things no one asks for but they might be > useful in educational settings. > > Here are some examples (): > > \starttext > > \showframe > > \enabletrackers[math.toysymbol] > > \definemathtoysymbol[Plus] [bin][+] > \definemathtoysymbol[Minus][bin][-] > \definemathtoysymbol[Equal][rel][=] > > $\dorecurse{199} { > x_{#1} \ifodd#1\relax\Plus\else\Minus\fi > } x_{200} \Equal n$ > > \blank > > \dorecurse{10} { > test \discretionary > {\darkred hel $\sqrt{y}$ lo} > {\darkgreen good $\sqrt{z}$ bye} > {\darkblue wel $\sqrt{x}$ come} test > } > > \blank > > \dorecurse{10} {test me #1 > $x + 2x \discretionary class 2 > {$+ \, \cdots $} > {$ \cdots \, +$} > {$+ \, \cdots \, +$} nx$ test > } > > \stoptext > > You might be able to guess from this code what is supposed to happen. > I'll play a bit more with this later (assuming that it's somehow > useful). We could predefine a bunch. As usual there might be issues but > I'll sort them out when we run into them (it's a non critical feature > with not much impact). > > Hans > > (who must not forget to document it somewhere) > > > - >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] new upload
Hi, In order to keep the 'context is good for toy math' reputation up to date, in lmtx we can now have proper discretionaries in math and math in discretionaries. The kind of things no one asks for but they might be useful in educational settings. Here are some examples (): \starttext \showframe \enabletrackers[math.toysymbol] \definemathtoysymbol[Plus] [bin][+] \definemathtoysymbol[Minus][bin][-] \definemathtoysymbol[Equal][rel][=] $\dorecurse{199} { x_{#1} \ifodd#1\relax\Plus\else\Minus\fi } x_{200} \Equal n$ \blank \dorecurse{10} { test \discretionary {\darkred hel $\sqrt{y}$ lo} {\darkgreen good $\sqrt{z}$ bye} {\darkblue wel $\sqrt{x}$ come} test } \blank \dorecurse{10} {test me #1 $x + 2x \discretionary class 2 {$+ \, \cdots $} {$ \cdots \, +$} {$+ \, \cdots \, +$} nx$ test } \stoptext You might be able to guess from this code what is supposed to happen. I'll play a bit more with this later (assuming that it's somehow useful). We could predefine a bunch. As usual there might be issues but I'll sort them out when we run into them (it's a non critical feature with not much impact). Hans (who must not forget to document it somewhere) - 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 ___
[NTG-context] wrong 2TOPSIDE?
Dear list, I have the following sample: \startmode[*first] \startbuffer[abcde] \setuppapersize[A5, landscape] \setupbodyfont[100pt] \starttext \dorecurse{158}{% \startmakeup[page][style=\bf\ss, align=center, pagestatus=start] \recurselevel \stopmakeup} \stoptext \stopbuffer \savebuffer[abcde][singular.tex] \executesystemcommand{context --purgeall --result=\jobname-singular.pdf \jobname-singular.tex} \ctxlua{os.remove(tex.jobname.."-singular.tex")} \stopmode \startnotmode[*first] \setuppapersize[A5, landscape][A4] \setuparranging[2TOPSIDE] \setuplayout[page] \setupinteractionscreen[option={portrait,paper}] \starttext \insertpages[\jobname-singular.pdf][width=0pt] \stopnotmode \stoptext I would say that last page (number 158 on #81) is misplaced. I think it should be on #80. Could anyone confirm this? I’m also experiencing issues (I don’t get the first 11 imposed pages), because I have to use: \executesystemcommand{context --purgeall --result=\jobname-singular.pdf --environment=\jobname-singular.tex \jobname-singular.xml} Is there a fix for this? I’m reporting this right now, but I won’t be reaching a computer until next Wednesday. (I know I’m going to forget, if I don’t write this now.) Many thanks for your 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] vertical align in tabulate paragraphs
Here’s another problem that I can’t reproduce in a MWE: In a tabulation that is set up like the example, in some cases the right column cell doesn’t top-align with the left one (see screenshot). In most cases it works. There’s no \setuptabulate in my environment; don’t know what else could influence this behaviour. Doesn’t seem to be grid or font related. Any hint where I could look? Hraban \usemodule[visual] \starttext \starttabulate[|p(0.33\textwidth)|p|] \dorecurse{100}{\NC:\fakewords{1}{15}–\NC–\fakewords{1}{20}.\NC\NR} \stoptabulate \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] Index confusion with first entry
Hi, my index of locations shows a strange problem: Hamburg 6, 12, 14, 24–25, 27, 31, 33, 35, 44, 46, 48, 57, 59, 64, 75, 79, 81, 93–94, 96, 102, 104–105, 108–110, 112, 116–118, 120, 121–125, 6, 126–135, 6, 137– 147, 149, 151–159, 161, 165, 168, 169–171, 174, 176, 178, 182, 207, 209, 211, 215–216, 219–220, 224, 240, 242–244, 291 Page 6 is mentioned two times out of order. The problem doesn’t show at other locations. The first index entry (p.6) is made by \startregister[locations][test]{Someplace}, second is Hamburg (single entry). If I replace Hamburg with another town, the problem moves. If I move the Hamburg entry in front of \startregister, it disappears! I.e. if the first index entry is set by \startregister, the subsequent entry gets confused. I tried to come up with a MWE, but couldn’t reproduce the problem in a simple example like \starttext \placeregister[index][criterium=all] \startregister[index][test]{Knuth} \input tufte \index{Donald} \page \input knuth \index{Donald} \page \stopregister[index][test] \input darwin \page \dorecurse{5}{ \input knuth \index{Knuth}\index{Donald} \page } \stoptext Hraban ___ 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] Two questions about color in MetaFun
Hi, list! I have two questions concerning MetaFun: 1st: What is the correct way to pass a ConTeXt named color (e.g. xwi's "maroon") to MetaFun. Using (with \usecolors[xwi] loaded in the preamble): withcolor maroon does not work. I could copy-paste definitions from ConTeXt sources and do e.g. \definecolor [maroon][r=.690196,g=.188235,b=.376471] but it is unfeasible for complete color schemes. So, is there a better way to do it? 2nd: I was trying to do some stuff for my girlfriend using ConTeXt and I tried to randomize colors in MetaFun using normaldeviate. However, something interesting happens. The following: \setuplayout[width=middle] \setuppagenumbering[state=stop] \setuppapersize[A10,landscape][A10,landscape] \starttext \startuseMPgraphic{cornystuff} draw outlinetext.f ("\framedtext[frame=off,width=fit,align=middle]{I love you \\ \CONTEXT}") %\CONTEXT is not my girlfriend, it's just for the example (withcolor (normaldeviate,normaldeviate,normaldeviate) withpen pencircle scaled 1/5) scaled 1 ; \stopuseMPgraphic \dorecurse{20}{% \startplacefigure[location=force,number=no] \useMPgraphic{cornystuff} \stopplacefigure \page[yes] } \stoptext changes the color of every letter. I don't complain (in fact it does look better), but I still have a question: what should I do if I wanted to select a random color first and then use it for the entire content? Thanks in advance. Jairo :) ___ 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] tabulation and \textwidth
Dear list, I have this sample: \showframe \startsetups[footers] \starttabulate [|cw(.5\textwidth)| cw(.5\textwidth)|] [unit=0pt] \NC one\NC two\NC\NR \stoptabulate \stopsetups \setupfootertexts[\directsetup{footers}] \starttext \dorecurse{20}{\input{zapf.tex}\par} \startitemize[columns, two] \dorecurse{20} {\startitem\input{zapf.tex}\stopitem} \stopitemize \startitemize[columns, three] \dorecurse{15} {\startitem\input{zapf.tex}\stopitem} \stopitemize \startitemize[columns, four] \dorecurse{10} {\startitem\input{zapf.tex}\stopitem} \stopitemize \stoptext How can I avoid that tabulation alters the \textwidth so that it remains constant and item columns doesn’t afect it? Many thanks for your 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 ___
Re: [NTG-context] Help on tweaking alignment, page numbers and ToC
Nicola schrieb am 13.08.2020 um 18:06: Thanks. That works with my MWE, but in my document I actually have a chapter, and chapters start on the right page, even if I add page=no to \setuppagenumbering: Can you start a new thread when you have a new question. When other people have the same problem they can see on the subject if this is the right thread to find a solution for it. \setuppagenumbering[alternative=doublesided,page=no] The page key in \setuppagenumbering is used to add the final page in a doublesided document to have a even number of pages. \definemakeup[ToC][align=middle,pagestate=start,doublesided=no] \starttext \startfrontmatter \startmakeup[ToC] \placecontent \stopmakeup \chapter{Preface} \stopfrontmatter \startbodymatter \dorecurse{10}{\chapter{Foo}} \stopbodymatter \stoptext I have no idea how to allow chapters to start at arbitrary pages when alternative=doublesided. \setuphead[chapter][page=yes] 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] Help on tweaking alignment, page numbers and ToC
On 2020-08-13, Pablo Rodriguez wrote: > On 8/13/20 5:17 PM, Nicola wrote: >> Hi, >> I still have an issue with blank pages... >> >>>> 2. Vertically center the ToC (wrt to the text area). >>> >>> Use a makeup for the TOC (if and only if it takes a single page). >> >> Yes, the ToC takes a single page. The makeup seems to insert a blank >> page afterwards. MWE: > > Hi Nicola, > > all makeups do that by default. > > "doublesided=no" is what you need. Thanks. That works with my MWE, but in my document I actually have a chapter, and chapters start on the right page, even if I add page=no to \setuppagenumbering: \setuppagenumbering[alternative=doublesided,page=no] \definemakeup[ToC][align=middle,pagestate=start,doublesided=no] \starttext \startfrontmatter \startmakeup[ToC] \placecontent \stopmakeup \chapter{Preface} \stopfrontmatter \startbodymatter \dorecurse{10}{\chapter{Foo}} \stopbodymatter \stoptext I have no idea how to allow chapters to start at arbitrary pages when alternative=doublesided. Nicola ___ 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] Help on tweaking alignment, page numbers and ToC
Hi, I still have an issue with blank pages... >> 2. Vertically center the ToC (wrt to the text area). > > Use a makeup for the TOC (if and only if it takes a single page). Yes, the ToC takes a single page. The makeup seems to insert a blank page afterwards. MWE: \setuppagenumbering[alternative=doublesided] \definemakeup[ToC][align=middle,pagestate=start] \starttext \startfrontmatter \startmakeup[ToC] \placecontent \stopmakeup \input{knuth} \stopfrontmatter \startbodymatter \dorecurse{10}{\chapter{Foo}} \stopbodymatter \stoptext How do I suppress the blank page after the ToC? Nicola ___ 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] custom header/footer for 1st/other pages of section
> -Original Message- > From: Wolfgang Schuster [mailto:wolfgang.schuster.li...@gmail.com] > Sent: Tuesday, August 11, 2020 11:15 AM > To: mailing list for ConTeXt users > Cc: Mike Cooper > Subject: Re: [NTG-context] custom header/footer for 1st/other pages of section > > Mike Cooper schrieb am 11.08.2020 um 19:01: > > > > > >> > >> Ehm... Why don’t you just use \setuphead[section][page=right] ? > >> > >> Hraban > > > > > > Haha! Well... because I never found that approach in my searching. > > > > But now, I'm not using it because it doesn't work for me. I was in the > > middle of > > guessing I needed to set up doublesided or some such in order for it to > > work when > > Wolfgang's other solution came in. > > When you use "page=left" or "page=right" you need a doublesided document > but for a singlesided document you can use "page=even" or "page=odd". > > > There is also another layout method which combines both. The layout is > taken from a singlesided document which means the left and right margins > are the same on odd and even page but checks for left or right pages > work like in a doublesided document. > > You can test this with the example below when you uncomment the second > and third pagenumbering setup- > > \setuppagenumbering >[alternative={singlesided,doublesided}] > > %\setuppagenumbering > % [alternative=singlesided] > > %\setuppagenumbering > % [alternative=doublesided] > > \setuphead >[chapter] >[page=right] > > \showframe > > \starttext > > \dorecurse{3} >{\expanded{\chapter{Chapter \recurselevel}} > \dorecurse{4}{\samplefile{weisman}}} > > \stoptext > > Wolfgang Interesting! Thank you! ___ 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] custom header/footer for 1st/other pages of section
Mike Cooper schrieb am 11.08.2020 um 19:01: -Original Message- From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Henning Hraban Ramm Sent: Tuesday, August 11, 2020 12:37 AM To: mailing list for ConTeXt users Subject: Re: [NTG-context] custom header/footer for 1st/other pages of section One thing I *CANNOT* figure out: I've been using \doifoddpageelse to put in a blank/empty page at the end of a section (if needed) so that new sections always start on an odd page. This is still working with the change to chapters from sections, EXCEPT for the first chapter (after TOC)! Totally stuck with that one... Ehm... Why don’t you just use \setuphead[section][page=right] ? Hraban Haha! Well... because I never found that approach in my searching. But now, I'm not using it because it doesn't work for me. I was in the middle of guessing I needed to set up doublesided or some such in order for it to work when Wolfgang's other solution came in. When you use "page=left" or "page=right" you need a doublesided document but for a singlesided document you can use "page=even" or "page=odd". There is also another layout method which combines both. The layout is taken from a singlesided document which means the left and right margins are the same on odd and even page but checks for left or right pages work like in a doublesided document. You can test this with the example below when you uncomment the second and third pagenumbering setup- \setuppagenumbering [alternative={singlesided,doublesided}] %\setuppagenumbering % [alternative=singlesided] %\setuppagenumbering % [alternative=doublesided] \setuphead [chapter] [page=right] \showframe \starttext \dorecurse{3} {\expanded{\chapter{Chapter \recurselevel}} \dorecurse{4}{\samplefile{weisman}}} \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 ___
Re: [NTG-context] custom header/footer for 1st/other pages of section
Mike Cooper schrieb am 10.08.2020 um 23:40: -Original Message- From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Wolfgang Schuster Sent: Thursday, August 06, 2020 2:58 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] custom header/footer for 1st/other pages of section Mike Cooper schrieb am 06.08.2020 um 17:15: Hola, I imagine this is probably simple but I can’t find it… I want the first page only of each section to have particular content in header/footer, then all the following pages to different specific content.Right now, I am manually entering it in each section.I’m hoping there’s a way to automate this; put it into the environment file for all sections. Of course you can set different header/footer layouts for chapter pages. With \setupheadertexts and \setupfootertexts you set first the text which should appear on regular pages. To have a different text on a chapter page you can use the \definetext command to set them (third first argument is the name of the setup and the second argument the location). These setups than can applied to the chapter with the header and footer key in \setuphead. begin example \setupheadertexts [Page \userpagenumber\ of \lastuserpagenumber] \definetext [chapterheader] % name [header] % vertical position [This is a chapter page] % content \definetext [chapterfooter] [footer] [pagenumber] \setuphead [chapter] [header=chapterheader, footer=chapterfooter] \starttext \dorecurse{10} {\expanded{\chapter{Chapter \recurselevel}} \dorecurse{\numexpr2*\recurselevel\relax}{\samplefile{knuth}}} \stoptext end example Wolfgang Thank you Wolfgang! I tried to change your code from chapters to sections (since that's what I was already using) but it didn't work. So, I switched my sections to chapters and it works great! But it also caused me to run into other things I'd set up manually that I'm having to figure out---good way to learn! Haha! You can only set header or footer settings when the section starts on a new page. Permitting these two values for every section without this restrictions can lead to problems because there can be cases where you have different section levels on the same page and the setting from the last command on the page counts. One thing I *CANNOT* figure out: I've been using \doifoddpageelse to put in a blank/empty page at the end of a section (if needed) so that new sections always start on an odd page. This is still working with the change to chapters from sections, EXCEPT for the first chapter (after TOC)! Totally stuck with that one... Let me guess you divide your document into section blocks (frontmatter, bodymatter etc.). When this is the case you have to first disable the page setting for these blocks because they interfere with the header/footer setting. To disable the page breaks add \setupsectionblock [frontpart,bodypart] [page=no] to your document setups. No you can change the settings for the page break at the begin of each chapter to \setuphead [chapter] [page={yes,header,footer,right}] which 1. Finishes the last page of the previous chapter 2. Disables the header and footer for the next (empty) page 3. Adds a empty page when necessary to start the new chapter on a right page 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 ___
[NTG-context] Help on tweaking alignment, page numbers and ToC
Hi, first of all, let me say *thank you* for the vast improvements on ConTeXt Garden! Browsing the documentation and finding stuff is so much easier and pleasant than it used to be (also the site seems faster). Thanks to the docs, dropcaps and protrusion have no secrets for me, but I am still struggling with some basic tasks (see the document below): 0. Push text to the bottom of the text area (see copyright). 1. Increase the space between Roman numbers and titles in the ToC. 2. Vertically center the ToC (wrt to the text area). 3. Suppress page numbers and headers in all blank pages. 4. Suppress headers in the front matter. 5. Style and position page numbers differently in the front and body matter (e.g., centered only in the front matter). As my full document uses environments, I would like most setups to be in the environment, if possible. E.g., is it possible to replace \setuphead[chapter][after={}] (see below) with an environment setup that applies only to the ToC? Nicola %%% \definepapersize[lsda][width=128.4mm,height=198.3mm] \setuppapersize[lsda] \setuplayout[ backspace=22.9mm, width=90.3mm, topspace=8.9mm, height=181.1mm, header=4mm, headerdistance=6.4mm, footerdistance=6.4mm, footer=4mm, leftmargin=15.2mm, leftmargindistance=0mm, rightmargindistance=0mm, rightmargin=15.2mm, ] \setuplabeltext[it][chapter=] \setuphead[chapter][ header=empty, alternative=middle, conversion=Romannumerals, numbercommand=\groupedcommand{\blank[20mm]}{\blank[10mm]}, after={\blank[3cm]}, ] \setupheadtext[content=] \setupheadertexts[] \setupheadertexts[\setups{text a}][][][\setups{text b}] \startsetups[text a] \rlap{whatever} \hfill \getmarking[chapter] \hfill \llap{whatever} \stopsetups \startsetups[text b] \rlap{} \hfill Some text goes here \hfill \llap{} \stopsetups \setuppagenumbering[ alternative=doublesided, location={text,footer,right}, style=\tfx ] \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber] [][numbers] \starttext \startfrontmatter \page[even] \startalignment[bottom,flushright] Copyright © 2020 Author \stopalignment \start \setuphead[chapter][after={}] \completecontent \stop \page[odd] \startchapter[title={Preface}]\input{knuth}\stopchapter \stopfrontmatter \startbodymatter \setuppagenumber[number=1] \dorecurse{10}{\startchapter[title={XYZ}]\input{tufte}\stopchapter} \stopbodymatter \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] custom header/footer for 1st/other pages of section
> -Original Message- > From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Wolfgang > Schuster > Sent: Thursday, August 06, 2020 2:58 PM > To: mailing list for ConTeXt users > Subject: Re: [NTG-context] custom header/footer for 1st/other pages of section > > Mike Cooper schrieb am 06.08.2020 um 17:15: > > Hola, > > > > I imagine this is probably simple but I can’t find it… > > > > I want the first page only of each section to have particular content in > > header/footer, then all the following pages to different specific > > content.Right now, I am manually entering it in each section.I’m hoping > > there’s a way to automate this; put it into the environment file for all > > sections. > > Of course you can set different header/footer layouts for chapter pages. > > With \setupheadertexts and \setupfootertexts you set first the text > which should appear on regular pages. > > To have a different text on a chapter page you can use the \definetext > command to set them (third first argument is the name of the setup and > the second argument the location). These setups than can applied to the > chapter with the header and footer key in \setuphead. > > begin example > \setupheadertexts >[Page \userpagenumber\ of \lastuserpagenumber] > > \definetext >[chapterheader] % name >[header] % vertical position >[This is a chapter page] % content > > \definetext >[chapterfooter] > [footer] >[pagenumber] > > \setuphead > [chapter] >[header=chapterheader, > footer=chapterfooter] > > \starttext > > \dorecurse{10} >{\expanded{\chapter{Chapter \recurselevel}} > \dorecurse{\numexpr2*\recurselevel\relax}{\samplefile{knuth}}} > > \stoptext > end example > > Wolfgang Thank you Wolfgang! I tried to change your code from chapters to sections (since that's what I was already using) but it didn't work. So, I switched my sections to chapters and it works great! But it also caused me to run into other things I'd set up manually that I'm having to figure out---good way to learn! Haha! One thing I *CANNOT* figure out: I've been using \doifoddpageelse to put in a blank/empty page at the end of a section (if needed) so that new sections always start on an odd page. This is still working with the change to chapters from sections, EXCEPT for the first chapter (after TOC)! Totally stuck with that one... Thanks again! hasta, Mike ___ 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] orphans and widows not working in LMTX?
Hi Pablo, I've reported similar issue to Hans 2 days ago, from my checks he fixed it in LMTX version 2020.08.07 23:37. I have not downloaded more recent version yet. Hoping it helps Joseph Le dim. 9 août 2020 à 14:06, Pablo Rodriguez a écrit : > Dear list, > > I have the following sample: > > \showframe\showgrid > \setuppapersize[A7] > \setuplayout[setups=*lessstrict] > \startsetups[*lessstrict] > \widowpenalty=1000 > \clubpenalty=1000 > \brokenpenalty=1000 > \stopsetups > \setupbodyfont[15pt] > \starttext > \dorecurse{5}{a\\ > b\\ > c\\ > d\par} > \stoptext > > Compiling it with current latest in LMTX (2020.08.07 23:37) leaves an > orphan line on page 2 (page #2 starts with "d"). > > MkIV beta from 2020.01.30 14:13 moves the the last line to avoid the > orphan (page #2 starts with "c"). > > Could anyone confirm the issue with orphans/widows in LMTX? > > Many thanks for your 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] orphans and widows not working in LMTX?
Dear list, I have the following sample: \showframe\showgrid \setuppapersize[A7] \setuplayout[setups=*lessstrict] \startsetups[*lessstrict] \widowpenalty=1000 \clubpenalty=1000 \brokenpenalty=1000 \stopsetups \setupbodyfont[15pt] \starttext \dorecurse{5}{a\\ b\\ c\\ d\par} \stoptext Compiling it with current latest in LMTX (2020.08.07 23:37) leaves an orphan line on page 2 (page #2 starts with "d"). MkIV beta from 2020.01.30 14:13 moves the the last line to avoid the orphan (page #2 starts with "c"). Could anyone confirm the issue with orphans/widows in LMTX? Many thanks for your 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] Wrong counting of lines and paragraphs
Dear list, In the MWE below you don't get lines and paragraphs numbered correctly: \setuplinenumbering[location=inner,align=right,style=\tfxx,distance=10pt,color=red] \setupparagraphnumbering[state=start,style=bold,distance=0pt,color=darkblue] \setuphead[title][alternative=text,style=bold] \setuphead[subject][alternative=text,style=bolditalic] \setuphead[subsubject][alternative=text,style=\ss] \setuphead[subsubsubject][alternative=text,style=\ss\it] \startbuffer[waltham] \input waltham \stopbuffer \starttext \startlinenumbering \starttitle[title={Waltham}] \dorecurse{4}{\getbuffer[waltham]\par} \startsubject[title={Waltham}] \dorecurse{5}{\getbuffer[waltham]\par} \startsubsubject[title={Waltham}] \dorecurse{5}{\getbuffer[waltham]\par} \startsubsubsubject[title={Waltham}] \dorecurse{2}{\getbuffer[waltham]\par} \stopsubsubsubject \stopsubsubject \stopsubject \stoptitle \stoplinenumbering \stoptext Have I hit a bug? Regards Marcus Vinicius -- Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo nem seus membros, por ser descanso da alma, primavera do coração, distração do aflito, entretenimento do solitário, e viático do viajante. Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik) \setuplinenumbering [location=inner,align=right,style=\tfxx,distance=10pt,color=red] \setupparagraphnumbering[state=start,style=bold,distance=0pt,color=darkblue] \setuphead[title][alternative=text,style=bold] \setuphead[subject][alternative=text,style=bolditalic] \setuphead[subsubject][alternative=text,style=\ss] \setuphead[subsubsubject][alternative=text,style=\ss\it] \startbuffer[waltham] \input waltham \stopbuffer \starttext \startlinenumbering \starttitle[title={Waltham}] \dorecurse{4}{\getbuffer[waltham]\par} \startsubject[title={Waltham}] \dorecurse{5}{\getbuffer[waltham]\par} \startsubsubject[title={Waltham}] \dorecurse{5}{\getbuffer[waltham]\par} \startsubsubsubject[title={Waltham}] \dorecurse{2}{\getbuffer[waltham]\par} \stopsubsubsubject \stopsubsubject \stopsubject \stoptitle \stoplinenumbering \stoptext MWE.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] About the numbering of theorems
Hello, I have a little problem with the numbering of theorems when there is no subsection. I would like to know : Theorem 1.1 Theorem 1.2 Theorem 2.3 Theorem 2.4 Thank you Fabrice begin example \setuplabeltext[chapter=Chapitre~] \unexpanded\def\Title#1#2{\framed[frame=off,width=fit,align=flushleft]{#1\blank#2}} \startbuffer[mybuffer] \starttheorem \input ward \stoptheorem \stopbuffer \setuphead [chapter] [style=\bfd, align={flushleft,broad}, command=\Title] \setuphead [section] [style=\bfc, distance=\zeropoint, sectionsegments=section, conversion={R}, align={flushleft,broad}, commandbefore={\space\endash\space}] \setuphead [subsection] [sectionsegments=subsection, conversion={n}, style=\bfb, align={flushleft,broad}] \setupenumerations [before={\blank}, after={\blank}, alternative=serried, title=yes, prefix=yes, prefixsegments=chapter, titlestyle=bold, width=broad] \defineenumeration [theorem] [text=Théorème, number=yes, style=italic] \starttext \startchapter [title={First chapter}] \startsection [title={First section}] \startsubsection [title={First subsection}] \dorecurse{2}{\getbuffer[mybuffer]} \stopsubsection \stopsection \stopchapter \startchapter [title={Second chapter}] \startsection [title={Second section}] \dorecurse{2}{\getbuffer[mybuffer]} \stopsection \stoptheorem \stopchapter \stoptext end example ___ 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] teaser
Nice, I've just tested it and it works fine. Thank you, Hans. Btw, are you gonna include those passages? I have some other samples in the public domain (Shakespeare's Sonnets translations, etc.) in case you're interested in including them. Regards, Jairo :) El vie., 7 de ago. de 2020 a la(s) 04:02, Hans Hagen (j.ha...@xs4all.nl) escribió: > On 8/7/2020 9:59 AM, Jairo A. del Rio wrote: > > The original in English, Ozymandias, by Percy Bysshe Shelley, is public > > domain. I extracted the Spanish and French versions from Wikipedia, > > which use a CC BY-SA 3.0 License. > Ok, here is the more robust variant: > > \blank > \ifnum\boxlines\EnglishBox=\boxlines\SpanishBox > \ifnum\boxlines\EnglishBox=\boxlines\FrenchBox > \ifnum\boxlines\EnglishBox>0 > \dorecurse{\boxlines\SpanishBox}{% > \dontleavehmode\llap{\hbox to 1.5em{\txx#1\hss}}% > \boxline \EnglishBox#1\par > \dontleavehmode\boxline \SpanishBox#1\par > \dontleavehmode\boxline \FrenchBox #1\par > \blank > } > \else > No content found!\blank > \fi > \else > English and Spanish boxes mismatch!\blank > \fi > \else > English and French boxes mismatch!\blank > \fi > > 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 ___
Re: [NTG-context] teaser
On 8/7/2020 9:59 AM, Jairo A. del Rio wrote: The original in English, Ozymandias, by Percy Bysshe Shelley, is public domain. I extracted the Spanish and French versions from Wikipedia, which use a CC BY-SA 3.0 License. Ok, here is the more robust variant: \blank \ifnum\boxlines\EnglishBox=\boxlines\SpanishBox \ifnum\boxlines\EnglishBox=\boxlines\FrenchBox \ifnum\boxlines\EnglishBox>0 \dorecurse{\boxlines\SpanishBox}{% \dontleavehmode\llap{\hbox to 1.5em{\txx#1\hss}}% \boxline \EnglishBox#1\par \dontleavehmode\boxline \SpanishBox#1\par \dontleavehmode\boxline \FrenchBox #1\par \blank } \else No content found!\blank \fi \else English and Spanish boxes mismatch!\blank \fi \else English and French boxes mismatch!\blank \fi 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 ___
Re: [NTG-context] teaser
Looks useful for multilingual documents, e.g. interleaved lines or linguistic glosses. The following example worked for me, but I share in case there's a way to do better code from it: \starttext \newbox\spanishbox \newbox\englishbox \newbox\frenchbox \setbox\spanishbox\vbox\bgroup\red\obeylines Conocí a un viajero de una tierra antigua quien dijo: «dos enormes piernas pétreas, sin su tronco se yerguen en el desierto. A su lado, en la arena, semihundido, yace un rostro hecho pedazos, cuyo ceño y mueca en la boca, y desdén de frío dominio, cuentan que su escultor comprendió bien esas pasiones las cuales aún sobreviven, grabadas en estos inertes objetos, a las manos que las tallaron y al corazón que las alimentó. Y en el pedestal se leen estas palabras: "Mi nombre es Ozymandias, rey de reyes: ¡Contemplad mis obras, poderosos, y desesperad!" Nada queda a su lado. Alrededor de la decadencia de estas colosales ruinas, infinitas y desnudas se extienden, a lo lejos, las solitarias y llanas arenas». \egroup \setbox\englishbox\vbox\bgroup\blue\obeylines I met a traveller from an antique land, Who said—“Two vast and trunkless legs of stone Stand in the desert. . . . Near them, on the sand, Half sunk a shattered visage lies, whose frown, And wrinkled lip, and sneer of cold command, Tell that its sculptor well those passions read Which yet survive, stamped on these lifeless things, The hand that mocked them, and the heart that fed; And on the pedestal, these words appear: My name is Ozymandias, King of Kings; Look on my Works, ye Mighty, and despair! Nothing beside remains. Round the decay Of that colossal Wreck, boundless and bare The lone and level sands stretch far away.” \egroup \setbox\frenchbox\vbox\bgroup\darkgray\obeylines J’ai rencontré un voyageur de retour d’une terre antique Qui m'a dit : « Deux immenses jambes de pierre dépourvues de buste Se dressent dans le désert. Près d’elles, sur le sable, À moitié enfoui, gît un visage brisé dont le sourcil froncé, La lèvre plissée et le rictus de froide autorité Disent que son sculpteur sut lire les passions Qui, gravées sur ces objets sans vie, survivent encore À la main qui les imita et au cœur qui les nourrit. Et sur le piédestal il y a ces mots : "Mon nom est Ozymandias, Roi des Rois. Voyez mon œuvre, ô puissants, et désespérez !" À côté, rien ne demeure. Autour des ruines De cette colossale épave, infinis et nus, Les sables monotones et solitaires s’étendent au loin. » \egroup \dorecurse{\boxlines \spanishbox}{% \strut\llap{\hbox to 1.5em{\txx#1\hss}}\boxline \englishbox#1\par \strut\boxline \spanishbox#1\par \strut\boxline \frenchbox#1\par \blank } \stoptext Thank you for the goodies, Hans Regards, Jairo :) El jue., 6 de ago. de 2020 a la(s) 13:13, Wolfgang Schuster ( wolfgang.schuster.li...@gmail.com) escribió: > Hans Hagen schrieb am 06.08.2020 um 19:26: > > Hi, > > > > I uploaded a new lmtx version ... it has a new mechanism for > > manipulating boxes: > > > > http://www.pragma-ade.com/general/magazines/mag-1105-mkiv.pdf > > > > (also in distribution) > > > > Of course experimental but I bet that some can think of usage. > > The \copyboxline command doesn't stop at the end of the requested line. > > BTW: Is it possible to have unbox command to get the width of the > content in the lines without the spaces at the begin end. This is useful > to get the width of first/last line in a box. > > %% begin example > \starttext > > \setbox0\vbox >{\hsize=4cm > one\par > two\par > three\par > four} > > \setbox2\ruledhbox{\copyboxline 0 2} > \setbox4\ruledhbox{\boxline 0 3} > %\setbox6 \boxline 0 5 % error > > [2] [\box2] \par > [3] [\box4] \par > [5] [\box6] \par > > \stoptext > %% end example > > 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] custom header/footer for 1st/other pages of section
Mike Cooper schrieb am 06.08.2020 um 17:15: Hola, I imagine this is probably simple but I can’t find it… I want the first page only of each section to have particular content in header/footer, then all the following pages to different specific content.Right now, I am manually entering it in each section.I’m hoping there’s a way to automate this; put it into the environment file for all sections. Of course you can set different header/footer layouts for chapter pages. With \setupheadertexts and \setupfootertexts you set first the text which should appear on regular pages. To have a different text on a chapter page you can use the \definetext command to set them (third first argument is the name of the setup and the second argument the location). These setups than can applied to the chapter with the header and footer key in \setuphead. begin example \setupheadertexts [Page \userpagenumber\ of \lastuserpagenumber] \definetext [chapterheader] % name [header] % vertical position [This is a chapter page] % content \definetext [chapterfooter] [footer] [pagenumber] \setuphead [chapter] [header=chapterheader, footer=chapterfooter] \starttext \dorecurse{10} {\expanded{\chapter{Chapter \recurselevel}} \dorecurse{\numexpr2*\recurselevel\relax}{\samplefile{knuth}}} \stoptext end example 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] limit of index entries?
> Am 02.08.2020 um 10:18 schrieb Hans Hagen : > > On 8/1/2020 6:08 PM, Henning Hraban Ramm wrote: >>> Am 01.08.2020 um 14:10 schrieb Hans Hagen : >>> >>> On 8/1/2020 1:54 PM, Henning Hraban Ramm wrote: >>>> Hi, >>>> my aforementioned person index has more than 600 entries. If I get over >>>> ~500, ConTeXt (MkIV, several versions) breaks with >>>> ! error (push_node): stack overflow >>>> mtx-context | fatal error: return code: 256 >>>> Is there a hard limit? Can I change it? >>> it might relate to protrusion (which needs to enter nested boxes to >>> determine an edge) but how that then can relate to the number of entries >>> puzzles me, unless we pop too less ... in which case i need to trace (with >>> a mwe) >> I can’t reproduce it with a simple example like >> \setupalign[hanging] >> \starttext >> \placeregister[index][criterium=all] >> \dorecurse{1}{\par\strut\index{Test\recurselevel}} >> \stoptext >> \recurselevel is empty in that context, \expanded didn’t help, but I guess >> we need different entries. >> Find attached the actual data, reduced to the minimum setup – the problem is >> indeed \setupalign[hanging]. >> I guess I can omit "hanging" for the index, but of course if would be nice >> if it would work. > it has to do with how you do that index: > > - you do a lot of \index but you do that in vmode > - do, they get collected for the next paragraph > - that is done in a robust way which involves packing > - eventually you flush with a \strut > - so we get deeply nested boxes > - and that means trouble for protrusion pre-analysis > > now, I can try to avoid it but we then can have side effects but we'll see > > can you try to avoid collecting: > > \leavevmode > \index{...}% > > make sure no spaces get introduced Ah, yes, that works. So it won’t be a problem in the completed book – the big list of entries is just all the names the author wants indexed and I’ll delete it as soon as the index entries are in the text where they belong. Thank you very much! Hraban ___ 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] limit of index entries?
On 8/1/2020 6:08 PM, Henning Hraban Ramm wrote: Am 01.08.2020 um 14:10 schrieb Hans Hagen : On 8/1/2020 1:54 PM, Henning Hraban Ramm wrote: Hi, my aforementioned person index has more than 600 entries. If I get over ~500, ConTeXt (MkIV, several versions) breaks with ! error (push_node): stack overflow mtx-context | fatal error: return code: 256 Is there a hard limit? Can I change it? it might relate to protrusion (which needs to enter nested boxes to determine an edge) but how that then can relate to the number of entries puzzles me, unless we pop too less ... in which case i need to trace (with a mwe) I can’t reproduce it with a simple example like \setupalign[hanging] \starttext \placeregister[index][criterium=all] \dorecurse{1}{\par\strut\index{Test\recurselevel}} \stoptext \recurselevel is empty in that context, \expanded didn’t help, but I guess we need different entries. Find attached the actual data, reduced to the minimum setup – the problem is indeed \setupalign[hanging]. I guess I can omit "hanging" for the index, but of course if would be nice if it would work. it has to do with how you do that index: - you do a lot of \index but you do that in vmode - do, they get collected for the next paragraph - that is done in a robust way which involves packing - eventually you flush with a \strut - so we get deeply nested boxes - and that means trouble for protrusion pre-analysis now, I can try to avoid it but we then can have side effects but we'll see can you try to avoid collecting: \leavevmode \index{...}% make sure no spaces get introduced 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 ___
Re: [NTG-context] margin notes (was: lmtx update)
Hi Hraban, Thanks for the hint… indeed I did see that \ColWidth command but didn't think about its definition… Sorry! Now with \ColWidth defined, your code works fine and it has the advantage that the text of the sidenote begins in the margin at the level where the \footnote command appears. However, it cannot control the overflow of a sidenote to the next page, whereas the code given by Hans can do that. I admit that this does not happen very often since a well designed text should not have too many long sidenotes… In case other users would like to use your code, I put the whole example below. Best regards: Otared %%% sidenotes, or footnotes in the margin %%% example given by Hraban: %%% here the tweaking of the width of the sidenote is turned off %%% remove the comment where there is \ColWidth %%% in order to adapt to your layout \showframe \setuplayout [cutspace=7cm, width=middle, margin=5cm, margindistance=7mm] %\def\ColWidth{57mm} \setupmargindata[inmargin] [location=right, stack=continue, align=flushright, ] \setupmargindata[inouter] [location=right, stack=continue, align=flushright, ] \def\FNVOffset{0} % Negative vertical offset of footnotes in lines % Manual tweaking was necessary for a while, when stacking didn’t work reliably. \def\MarginNote#1{% \inmargin[ voffset=\dimexpr-\FNVOffset\lineheight\relax, % width=\ColWidth, align=flushleft, ]{% \inframed[ % width=\ColWidth, align=right, frame=off, offset=overlay, strut=yes, ]{#1}% }% } \define\PlaceFootnote{% \inmargin[ voffset=\dimexpr-\FNVOffset\lineheight\relax, % width=\ColWidth, ]{% \vtop{\placelocalnotes[footnote][before=,after=]}}% } \def\FNo#1{{#1~}} % I never managed to get number and text in consecutive lines without indented text % or at least a constant whitespace after the number. \setupnote[footnote] [location=text, bodyfont=, indenting=no, before={\noindentation}, next=\PlaceFootnote, ] \setupnotation[footnote] [way=bychapter, align=flushleft, indenting=no, location=serried, alternative=serried, width=broad, numbercommand=\FNo, ] % footnote text \setuptexttexts[margin][] [% {\framed[ align={flushright,bottom}, frame=off, height=\textheight, % width=\ColWidth, ]{% \strut\vfill\placenotes[footnote]}}% ] \starttext \dorecurse{6}{\input ward\expanded{\footnote{This is a footnote \recurselevel}} } test \dorecurse{10}{ test \footnote{\input ward }\input tufte.tex \par test \footnote{This is a note about Ward, who says: \par \input ward.tex} \input ward.tex \par test \footnote{This is a note about Donald Knuth.} \input knuth.tex \par } This is a last note. \footnote{This last note is here to see what happens in the next page\dots\par \input knuth.tex} \par \dorecurse{3}{\input knuth.tex } \stoptext > On 1 Aug 2020, at 23:01, Henning Hraban Ramm wrote: > > >> Am 01.08.2020 um 22:36 schrieb Otared Kavian : >> >> Hi Hraban, >> >> Thank you for taking the time to send your code for sidenotes. >> Unfortunately when I add >> >> \starttext >> test\footnote{A footnote in the margin.} >> \stoptext >> >> to your code, I get an error and unfortunately with recent versions of LMTX >> the error message >> ! Undefined control sequence >> is not helpful to find the error… (LMTX considers \footnote as an undefined >> control sequence…). >> > > Of course it’s not \footnote that is undefined but something else from my > code – I didn’t take the time to strip it of all the references to other > setups in the same environment, probably \ColWidth that was just a shortcut > for the column width: > \def\ColWidth{57mm} > > Hraban > > ___ > 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] lmtx update
> On 1 Aug 2020, at 16:17, Hans Hagen wrote: > > On 8/1/2020 3:20 PM, Otared Kavian wrote: >>> On 31 Jul 2020, at 10:32, Hans Hagen wrote: >>> >>> […] >>> >>> Other work in progress is: better columns in itemize, esp proper footnote >>> support (not that I ever need that but I know users do so ...), experiments >>> work ok, but I need to check spacing. In general, footnotes (will) behave a >>> bit better, especially those used nested in other mechanisms. A side effect >>> of more control is that we can do other tricks too and we're playing with >>> it (kind of fun). >> Hi Hans, >> Thanks for your explanations. >> Regarding footnotes, would it be possible to have a built-in support for >> writing the footnotes in the margin? (For instance, assuming that the layout >> is such that for instance the right margin takes 1/3 of the page width, then >> the footnotes would occupy the right margin, beginning at the top). > It depends on what you want. This works ok: > […] Hi Hans, That's great! Thanks a lot! I have two questions in order to adapt what you sent to my case. I played a bit with your second solution, as in: %%% begin sidenote-Hans.tex \showframe \setupinteraction[state=start] \setuplayout [cutspace=7cm, width=middle, margin=5cm, margindistance=7mm] \setuptexttexts [margin] [] [{\directsetup{notabene}}] \newbox\MyNoteOverflow \setupnotation[endnote] [interaction=yes, after={\blank[big]}] \startsetups notabene \setbox\scratchbox\vbox \bgroup \setupalign[tolerant] \ifvoid\MyNoteOverflow \else \unvbox\MyNoteOverflow \fi \placenotes[endnote][before=,after=] \egroup \scratchdimen\dimexpr\textheight-.5\lineheight\relax \ifdim\ht\scratchbox>\scratchdimen \global\setbox\MyNoteOverflow\box\scratchbox \setbox\scratchbox\vsplit \MyNoteOverflow to \scratchdimen \fi \vbox \bgroup \topskipcorrection \unvbox\scratchbox \vfilll \egroup \stopsetups \startsetups notaflush \doloop { \page \ifvoid\MyNoteOverflow \exitloop \else \null \page \fi } \stopsetups \starttext \dorecurse{10}{ test \endnote{\input ward }\input tufte.tex \par test \endnote{This is a note about Ward, who says: \par \input ward.tex} \input ward.tex \par test \endnote{This is a note about Donald Knuth.} \input knuth.tex \par } This is a last note. \endnote{This last note is here to see what happens in the next page\dots\par \input knuth.tex} \par \input knuth.tex %\setups{notaflush} \stoptext %%% end sidenote-Hans.tex The first question is why did you define a setups called notaflush, and why your example works fine without using it ? The second question is: the side notes are vertically centered in the margin (one can see this when the notes do not cover all the margin), which is fine for me. But, out of curiosity, what can be changed in the setups notabene in order to have the notes to begin at the top of the margin ? (When a note runs into the next page, as in the last note, then it would be nicer to begin on top of the margin). Thanks again: Otared K. ___ 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] Pagenumbering with \setupcounter[userpagenumber]
Willi Egger schrieb am 29.07.2020 um 21:43: Good evening! I am trying to make use of the userpagenumber counter. I have a book at hand, where I need to adjust the start of the pagenumbering. It appears to me, that the \setupcounter[userpagenumber[state=stop] and later the \setupcounter[userpagenumber][state=start,start=7] is not giving the expected result. MWE: [...] Is this a bug or do I miss something? The second one. The name of the counter isn't "userpagenumber" and you don't even have to know the name of the counter because \setupuserpagenumber has the same options (and passes the values to \setupcounter). \setupfootertexts[\userpagenumber] \starttext \setupuserpagenumber[state=stop] \dorecurse{10}{\input knuth } \page \setupuserpagenumber[state=start,number=7] \dorecurse{10}{\input zapf } \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 ___
[NTG-context] question on page transitions
Dear list, I have a question about page transitions (lines 297-304 from scrn-pag.mkvi): \def\scrn_transitions_set_indeed {\begingroup \edef\currentinteractionscreendelay{\interactionscreenparameter\c!delay}% \clf_setpagetransition n {\scrn_transitions_list}% delay \ifx\currentinteractionscreendelay\v!none \zerocount\else\currentinteractionscreendelay\fi \relax \endgroup} I wonder whether the "delay" option in \setupinteractionscreen defines the number of seconds for the page or for the transition. From what I read in the code above, I would say that the duration is defined for the transition itself. Inspecting the output PDF code in generated documents, the duration is set for the page. In PDF code. /Page <> sets the number of seconds for the page (https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#search=duration). /Page <> >> sets the number of seconds for the transition (https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#nameddest=G11.2295795). With the followling sample: \setuppapersize[A9,landscape] \setupinteraction[state=start] \setupinteractionscreen[option=max, delay=5] \setuppagetransitions[random] \setupbodyfont[50pt] \starttext \dorecurse{2}{% \startmakeup[page][style=\bf\ss, align=center] \recurselevel \stopmakeup% } \stoptext The output PDF document may contain a /Page object such as: 6 0 obj << /Contents 4 0 R /Dur 5 /Trans << /Di 90 /M /O /S /Fly >> /Type /Page >> endobj This forces the viewer to advance the page after 5s. To have a transition duration of 5s, it should read: 6 0 obj << /Contents 4 0 R /Trans << /D 5 /Di 90 /M /O /S /Fly >> /Type /Page >> endobj https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#nameddest=G11.2104292 shows the difference between /Dur and /D. Could anyone confirm whether this should be fixed (or I’m missing something)? Many thanks for your 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 ___
Re: [NTG-context] Presentation effects
On 7/25/20 3:48 PM, Kumar Appaiah wrote: > Dear ConTeXt users, > > I have been trying to get the presentation effects listed here to > work: > > https://wiki.contextgarden.net/Presentation_effects > > But I am unable to build the example. I am using the Debian ConTeXt > (version 2020.03.10.20200331-1). Please let me know if I am missing > something. Hi Kumar, this sample works with both Acrobat for Linux and Evince (using LMTX latest): \setuppapersize[A9,landscape] \setupinteraction[state=start] \setupinteractionscreen[option=max] \setuppagetransitions[random] \setupbodyfont[50pt] \starttext \dorecurse{25}{% \startmakeup[page][style=\bf\ss, align=center] \recurselevel \stopmakeup% } \stoptext Just in case 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] Text around a figure
Hi Otared and Wolfgang, It's great, the following code does the job! Thank you so much. Fabrice \useMPlibrary[dum] \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] \setupfloats[freeregion=no] \definetextbackground[fondpaille] [background=color, backgroundcolor=fondpaille, frame=off, location=always, ] \showframe \starttext \starttextbackground[fondpaille] \startplacefigure[number=no,location=right] \externalfigure[dummy] \stopplacefigure \startitemize[n] \dorecurse{3}{\startitem \input ward \stopitem} \stopitemize \stoptextbackground \stoptext Le jeu. 16 juil. 2020 à 14:59, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> a écrit : > Otared Kavian schrieb am 16.07.2020 um 11:58: > > Hi Fabrice, > > > > Maybe you can play with different settings of your textbackground, as in > > > > \definetextbackground[fondpaille] > > [background=color, > > backgroundcolor=fondpaille, > > frame=off, > > location=paragraph, % or: text, always, paragraph > > backgroundoffset=4pt] % change the value here > > It's a float feature which can be disabled. > > \setupfloats[freeregion=no] > > 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] Text around a figure
Hi Fabrice, Maybe you can play with different settings of your textbackground, as in \definetextbackground[fondpaille] [background=color, backgroundcolor=fondpaille, frame=off, location=paragraph, % or: text, always, paragraph backgroundoffset=4pt] % change the value here Best regards: Otared > On 16 Jul 2020, at 11:10, Fabrice Couvreur > wrote: > > Hi Otared and Wolfgang, > Thanks for your help ; the result is almost what I want (the space between > the text and the figure is not colored) but it is likely that we could not do > better. > Fabrice > > Le mer. 15 juil. 2020 à 22:25, Otared Kavian a écrit : > Hi Fabrice, > > I think what Wolfgang suggests is something like the following: > > \useMPlibrary[dum] > \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > \definetextbackground[fondpaille] > [background=color, > backgroundcolor=fondpaille, > frame=off, > location=always] > > \starttext > > \starttextbackground[fondpaille] > \startplacefigure[number=no,location=right] > \externalfigure[dummy] > \stopplacefigure > \startitemize[n] > \dorecurse{3}{\startitem \input ward \stopitem} > \stopitemize > \stoptextbackground > > \stoptext > > Best regards: Otared K. > > > On 15 Jul 2020, at 22:13, Wolfgang Schuster > > wrote: > > > > Fabrice Couvreur schrieb am 15.07.2020 um 19:54: > >> Hello, > >> I always encounter difficulties with the placement of figures in such a > >> way that the text envelops the figure. > >> Thank you. > >> Fabrice > >> \useMPlibrary[dum] > >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > >> \starttext > >> \startframedtext[width=max,background=color,backgroundcolor=fondpaille] > >> \placefloat[][right,none]{} > >>{\externalfigure[dummy]} > >> \startitemize[n] > >>\dorecurse{3}{\startitem \input ward \stopitem} > >> \stopitemize > >>\stopframedtext > >>\stoptext > > > > > > Side floats don't work in frames, use the textbackground environment to add > > a colored box behind the text. > > > > 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 > ___ > ___ > 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] Text around a figure
Hi Otared and Wolfgang, Thanks for your help ; the result is almost what I want (the space between the text and the figure is not colored) but it is likely that we could not do better. Fabrice Le mer. 15 juil. 2020 à 22:25, Otared Kavian a écrit : > Hi Fabrice, > > I think what Wolfgang suggests is something like the following: > > \useMPlibrary[dum] > \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > \definetextbackground[fondpaille] > [background=color, > backgroundcolor=fondpaille, > frame=off, > location=always] > > \starttext > > \starttextbackground[fondpaille] > \startplacefigure[number=no,location=right] > \externalfigure[dummy] > \stopplacefigure > \startitemize[n] > \dorecurse{3}{\startitem \input ward \stopitem} > \stopitemize > \stoptextbackground > > \stoptext > > Best regards: Otared K. > > > On 15 Jul 2020, at 22:13, Wolfgang Schuster < > wolfgang.schuster.li...@gmail.com> wrote: > > > > Fabrice Couvreur schrieb am 15.07.2020 um 19:54: > >> Hello, > >> I always encounter difficulties with the placement of figures in such a > way that the text envelops the figure. > >> Thank you. > >> Fabrice > >> \useMPlibrary[dum] > >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > >> \starttext > >> \startframedtext[width=max,background=color,backgroundcolor=fondpaille] > >> \placefloat[][right,none]{} > >>{\externalfigure[dummy]} > >> \startitemize[n] > >>\dorecurse{3}{\startitem \input ward \stopitem} > >> \stopitemize > >>\stopframedtext > >>\stoptext > > > > > > Side floats don't work in frames, use the textbackground environment to > add a colored box behind the text. > > > > 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 > > ___ > ___ 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 to with \margindata
I didn't miss that argument, of course, my actual code was: \margindata[outer][hoffset=\marginoffset] dr. Hans van der Meer > On 15 Jul 2020, at 22:10, Wolfgang Schuster > wrote: > > Hans van der Meer schrieb am 15.07.2020 um 21:48: >> Using the following: >> \margindata{some macro expansions} > > You're missing the first mandatory argument, e.g. \margindata[inright]{...}. > >> I know that \margindata is typeset at a later moment than its place in the >> code suggests. The problem is that macro expansions inside the {}'s are >> expanded twice. This interferes badly with the things I want to happen. > > No, the content is stored in a box and placed later. > > \definecounter[test] > > \starttext > > \dorecurse{10} > {\inleft{\incrementedcounter[test]}Line \recurselevel\par} > > \stoptext > >> Tracing what happens, I conclude that the result of the first expansion is >> lost and is not carried into the actual placement of the marginnote. >> The question this is: how to solve this problem? > > Provide a working minimal example. > > 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] Text around a figure
Hi Fabrice, I think what Wolfgang suggests is something like the following: \useMPlibrary[dum] \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] \definetextbackground[fondpaille] [background=color, backgroundcolor=fondpaille, frame=off, location=always] \starttext \starttextbackground[fondpaille] \startplacefigure[number=no,location=right] \externalfigure[dummy] \stopplacefigure \startitemize[n] \dorecurse{3}{\startitem \input ward \stopitem} \stopitemize \stoptextbackground \stoptext Best regards: Otared K. > On 15 Jul 2020, at 22:13, Wolfgang Schuster > wrote: > > Fabrice Couvreur schrieb am 15.07.2020 um 19:54: >> Hello, >> I always encounter difficulties with the placement of figures in such a way >> that the text envelops the figure. >> Thank you. >> Fabrice >> \useMPlibrary[dum] >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] >> \starttext >> \startframedtext[width=max,background=color,backgroundcolor=fondpaille] >> \placefloat[][right,none]{} >>{\externalfigure[dummy]} >> \startitemize[n] >>\dorecurse{3}{\startitem \input ward \stopitem} >> \stopitemize >>\stopframedtext >>\stoptext > > > Side floats don't work in frames, use the textbackground environment to add a > colored box behind the text. > > 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] Text around a figure
Fabrice Couvreur schrieb am 15.07.2020 um 19:54: Hello, I always encounter difficulties with the placement of figures in such a way that the text envelops the figure. Thank you. Fabrice \useMPlibrary[dum] \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] \starttext \startframedtext[width=max,background=color,backgroundcolor=fondpaille] \placefloat[][right,none]{} {\externalfigure[dummy]} \startitemize[n] \dorecurse{3}{\startitem \input ward \stopitem} \stopitemize \stopframedtext \stoptext Side floats don't work in frames, use the textbackground environment to add a colored box behind the text. 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 to with \margindata
Hans van der Meer schrieb am 15.07.2020 um 21:48: Using the following: \margindata{some macro expansions} You're missing the first mandatory argument, e.g. \margindata[inright]{...}. I know that \margindata is typeset at a later moment than its place in the code suggests. The problem is that macro expansions inside the {}'s are expanded twice. This interferes badly with the things I want to happen. No, the content is stored in a box and placed later. \definecounter[test] \starttext \dorecurse{10} {\inleft{\incrementedcounter[test]}Line \recurselevel\par} \stoptext Tracing what happens, I conclude that the result of the first expansion is lost and is not carried into the actual placement of the marginnote. The question this is: how to solve this problem? Provide a working minimal example. 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 ___
[NTG-context] Text around a figure
Hello, I always encounter difficulties with the placement of figures in such a way that the text envelops the figure. Thank you. Fabrice \useMPlibrary[dum] \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] \starttext \startframedtext[width=max,background=color,backgroundcolor=fondpaille] \placefloat[][right,none]{} {\externalfigure[dummy]} \startitemize[n] \dorecurse{3}{\startitem \input ward \stopitem} \stopitemize \stopframedtext \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] About the table of contents
Hello, I would like to reduce the space between the numbering and the title of the chapters, sections and subsections. I would also like to have this: 1 My first chapter 1.1 My first section 1.1.1 My first subsection \setuplist [chapter] [style=bold,width=10mm] \starttext \placelist [chapter,section,subsection] [criterium=all, interaction=all, alternative=c] \startchapter [title=My first chapter] \dorecurse{2}{\input knuth} \startsection [title=My first section] \dorecurse{2}{\input knuth} \startsubsection [title=My first subsection] \dorecurse{2}{\input knuth} \stopsubsection \stopsection \stopchapter \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] Store images and text in the right margin
Hi Taco, Thank you for your help. What I want to do is write a course for my students, and the definitions, theorems ... will be illustrated by graphs, examples, remarks ... placed in the right margin. The idea is to consider that a text or a graphic is an element to place in the right margin without worrying about the nature and that a single command does the job. What you are proposing goes in the right direction. However, I noticed a little problem with the hyphenation. Fabrice Le lun. 6 juil. 2020 à 16:35, Taco Hoekwater a écrit : > Hi Fabrice, > > Like this maybe? It depends on what you want to achieve exactly, I think > > \useMPlibrary[dum] > > \setuppapersize[A4] > > \setuplayout > [width=12cm, >rightmargin=5cm] > > \defineuserdata [margintext] [alternative=margintext] > > \defineuserdataalternative [margintext] > [renderingsetup=userdata:margintext] > > \startsetups [userdata:margintext] > \margindata > [inright] > [style={\switchtobodyfont[9pt]}, > width=\rightmarginwidth, > align={flushleft,broad}, > stack=yes] > {\startframedtext[before=,after=,offset=0pt,width=max,frame=off] > \getinlineuserdata > \stopframedtext} > \stopsetups > > \showframe > \starttext > \startuserdata[margintext] > {\bf Remarque — }\input ward > \stopuserdata > \startuserdata[margintext] > \externalfigure[dummy][width=\rightmarginwidth] > \stopuserdata > \startchapter[title=First chapter] > \dorecurse{2}{\input knuth} > \stopchapter > \stoptext > > > > On 6 Jul 2020, at 16:18, Fabrice Couvreur > wrote: > > > > > > > > -- Forwarded message - > > De : Fabrice Couvreur > > Date: lun. 6 juil. 2020 à 12:10 > > Subject: Re: [NTG-context] Store images and text in the right margin > > To: Marco > > > > > > Hello, > > What has been proposed by Wolfgang and Marco works correctly but is it > possible to define a single environment margintext which would allow to > include both text and figures ? > > Thank you > > 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 > > ___ > ___ 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] Store images and text in the right margin
Hi Fabrice, Like this maybe? It depends on what you want to achieve exactly, I think \useMPlibrary[dum] \setuppapersize[A4] \setuplayout [width=12cm, rightmargin=5cm] \defineuserdata [margintext] [alternative=margintext] \defineuserdataalternative [margintext] [renderingsetup=userdata:margintext] \startsetups [userdata:margintext] \margindata [inright] [style={\switchtobodyfont[9pt]}, width=\rightmarginwidth, align={flushleft,broad}, stack=yes] {\startframedtext[before=,after=,offset=0pt,width=max,frame=off] \getinlineuserdata \stopframedtext} \stopsetups \showframe \starttext \startuserdata[margintext] {\bf Remarque — }\input ward \stopuserdata \startuserdata[margintext] \externalfigure[dummy][width=\rightmarginwidth] \stopuserdata \startchapter[title=First chapter] \dorecurse{2}{\input knuth} \stopchapter \stoptext > On 6 Jul 2020, at 16:18, Fabrice Couvreur wrote: > > > > -- Forwarded message - > De : Fabrice Couvreur > Date: lun. 6 juil. 2020 à 12:10 > Subject: Re: [NTG-context] Store images and text in the right margin > To: Marco > > > Hello, > What has been proposed by Wolfgang and Marco works correctly but is it > possible to define a single environment margintext which would allow to > include both text and figures ? > Thank you > 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] Bad interaction between \setupinteraction and \defineenumeration
So, cannot I use focus=standard and cross-references together? Hmm. I think it should be fixed... But maybe it's an intended feature. Thanks, Otared. Jairo :) El lun., 6 de jul. de 2020 4:31 a. m., Otared Kavian escribió: > Hi Jairo, > > If you remove > focus=standard > the interaction works fine. > > Best regards: Otared K. > > > On 6 Jul 2020, at 01:15, Jairo A. del Rio > wrote: > > > > The following: > > > > > \setupinteraction[state=start,focus=standard,color=black,contrastcolor=black] > > > \defineenumeration[proposition][alternative=top,text=Proposición,headalign=middle,numberconversion=R,headstyle=\WORDS,style=\emph,referenceprefix=prop] > > \starttext > > \startproposition[1] > > \dorecurse{10}{\input ward} > > \stopproposition > > \in[prop:1] > > \stoptext > > > > works almost perfectly. However, the cross-reference does not work, even > if the number of the enumeration is displayed correctly. The example fails > both in LuaTeX and LuaMetaTeX. As I remember, the problem appeared as early > as 2019, so not a matter of a bad installation. Any ideas? > > > > Cordially, > > > > Jairo :) > > > > > ___ > > 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 > > ___ > ___ 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] Bad interaction between \setupinteraction and \defineenumeration
Hi Jairo, If you remove focus=standard the interaction works fine. Best regards: Otared K. > On 6 Jul 2020, at 01:15, Jairo A. del Rio wrote: > > The following: > > \setupinteraction[state=start,focus=standard,color=black,contrastcolor=black] > \defineenumeration[proposition][alternative=top,text=Proposición,headalign=middle,numberconversion=R,headstyle=\WORDS,style=\emph,referenceprefix=prop] > \starttext > \startproposition[1] > \dorecurse{10}{\input ward} > \stopproposition > \in[prop:1] > \stoptext > > works almost perfectly. However, the cross-reference does not work, even if > the number of the enumeration is displayed correctly. The example fails both > in LuaTeX and LuaMetaTeX. As I remember, the problem appeared as early as > 2019, so not a matter of a bad installation. Any ideas? > > Cordially, > > Jairo :) > > ___ > 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] Bad interaction between \setupinteraction and \defineenumeration
The following: \setupinteraction[state=start,focus=standard,color=black,contrastcolor=black] \defineenumeration[proposition][alternative=top,text=Proposición,headalign=middle,numberconversion=R,headstyle=\WORDS,style=\emph,referenceprefix=prop] \starttext \startproposition[1] \dorecurse{10}{\input ward} \stopproposition \in[prop:1] \stoptext works almost perfectly. However, the cross-reference does not work, even if the number of the enumeration is displayed correctly. The example fails both in LuaTeX and LuaMetaTeX. As I remember, the problem appeared as early as 2019, so not a matter of a bad installation. Any ideas? Cordially, Jairo :) ___ 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] Store images and text in the right margin
Hi Marco, Thanks, it works but only for a comment and a picture. Indeed, if I add a comment and an image, the first image is placed on the second comment. Fabrice \starttext \startuserdata[margintext] \input ward \stopuserdata \marginfigure{\externalfigure[dummy][width=\rightmarginwidth,location=high]} \startuserdata[margintext] \input ward \stopuserdata \marginfigure{\externalfigure[dummy][width=\rightmarginwidth,location=high]} \startchapter[title=First chapter] \dorecurse{2}{\input knuth} \stopchapter \stoptext Le jeu. 2 juil. 2020 à 19:04, Marco Patzer a écrit : > On Thu, 2 Jul 2020 17:20:07 +0200 > Fabrice Couvreur wrote: > > Try: > > > \useMPlibrary[dum] > > > > \setuppapersize[A4] > > > > \setuplayout > > [width=12cm, > >rightmargin=5cm] > > > > \definemargindata[marginfigure][inright] > > \setupmargindata [marginfigure][command=\vbox,align=middle] > > \setupmargindata [marginfigure][command=\vbox,align=middle,stack=yes] > > > \startsetups [userdata:margintext] > > \margindata > > [inright] > > [%style=\smallbodyfont, > > style={\switchtobodyfont[9pt]}, > > width=\rightmarginwidth, > > stack=yes, > > > align={flushleft,broad}] > > {{\bf Remarque — }\getinlineuserdata} > > \stopsetups > > > \marginfigure{\externalfigure[dummy][width=\rightmarginwidth]} > > > \marginfigure{\externalfigure[dummy][width=\rightmarginwidth,location=high]} > > Marco > > ___ > 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] Store images and text in the right margin
Hello everyone and in particular to Wolfgang who has already provided me with the solution below. I will have to write a Mathematics book for my students and the remarks and graphics should be in the right margin. I got the code written by Wolfgang and tried to include the graphics in it. The result is not as expected because the graphic overflows on the text. The course will be written in A4 format with an 11 pts font. Thanks for your help. Fabrice \useMPlibrary[dum] \setuppapersize[A4] \setuplayout [width=12cm, rightmargin=5cm] \definemargindata[marginfigure][inright] \setupmargindata [marginfigure][command=\vbox,align=middle] \defineuserdata [margintext] [alternative=margintext] \defineuserdataalternative [margintext] [renderingsetup=userdata:margintext] \startsetups [userdata:margintext] \margindata [inright] [%style=\smallbodyfont, style={\switchtobodyfont[9pt]}, width=\rightmarginwidth, align={flushleft,broad}] {{\bf Remarque — }\getinlineuserdata} \stopsetups \showframe \starttext \startuserdata[margintext] \input ward \stopuserdata \marginfigure{\externalfigure[dummy][width=\rightmarginwidth]} \startchapter[title=First chapter] \dorecurse{2}{\input knuth} \stopchapter \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] pagecolumns: get the current column
On 6/26/2020 5:39 PM, mf wrote: Hello list, I'm using a 2-columns layout and I'd like to put some information in the margin. I should put that information in the left margin when I'm in the left column, and in the right margin when I'm in the right column, to prevent the extra information overlapping the main text in the other column. I found a useful counter in page-pcl.mkiv: \c_page_col_current. Here's a MWE: \unprotect \def\curCol{\c_page_col_current} \protect \def\InfoInMargin#1{\doifelse{\the\curCol}{1}{\inmargin{#1}}{\inothermargin{#1}}} \def\TestText{\InfoInMargin{\bf \the\curCol}\input ward \InfoInMargin{\bf \the\curCol} \input ward} \starttext \startpagecolumns[n=2,distance=25mm] \dorecurse{5}{\TestText\par} \stoppagecolumns \stoptext \c_page_col_current works most of the time, but unfortunately it tells you the current column before the lines of a paragraph get distributed over columns. So sometimes it fails. You can see that in the MWE: the bold "1" between columns in the upper part of the page. It should be a bold "2" in the right margin. Is there a better way to read the current column? Because I want you to run the usual stress test on the latest greatest, here's your reward: \usemodule[article-basic] \setupalign[verytolerant,stretch] \dontcomplain \newcounter\MyCounter \def\InfoInMargin#1% {\doglobal\increment\MyCounter \ifodd\MPcolumn{\MPregion{MyPos:\MyCounter}}\relax \inmargin{\xypos{MyPos:\MyCounter}#1}% \else \inothermargin{\xypos{MyPos:\MyCounter}#1}% \fi} \starttext \startpagecolumns[n=2,distance=10mm] \dorecurse {50} { \InfoInMargin{\bf#1}\input ward \InfoInMargin{\sl#1}\input ward \par } \stoppagecolumns \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 / 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] pagecolumns: get the current column
Hello list, I'm using a 2-columns layout and I'd like to put some information in the margin. I should put that information in the left margin when I'm in the left column, and in the right margin when I'm in the right column, to prevent the extra information overlapping the main text in the other column. I found a useful counter in page-pcl.mkiv: \c_page_col_current. Here's a MWE: \unprotect \def\curCol{\c_page_col_current} \protect \def\InfoInMargin#1{\doifelse{\the\curCol}{1}{\inmargin{#1}}{\inothermargin{#1}}} \def\TestText{\InfoInMargin{\bf \the\curCol}\input ward \InfoInMargin{\bf \the\curCol} \input ward} \starttext \startpagecolumns[n=2,distance=25mm] \dorecurse{5}{\TestText\par} \stoppagecolumns \stoptext \c_page_col_current works most of the time, but unfortunately it tells you the current column before the lines of a paragraph get distributed over columns. So sometimes it fails. You can see that in the MWE: the bold "1" between columns in the upper part of the page. It should be a bold "2" in the right margin. Is there a better way to read the current column? Thanks, Massi ___ 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] spacing before items
On 6/17/2020 11:03 PM, Mike Cooper wrote: OK. I'm not sure how I'm supposed to guess that. I am a rank beginner and while there are breakthroughs now and then, frustration is still the main thing I experience trying to learn/use ConTeXt... In any case, my original question is still not solved. The before/inbetween keys add space everywhere. I only want space between top-level items. Here is something like what I need, with the spacing exaggerated: 1. Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… What’s the answer? a. An answer that may well wrap onto a second or even third line but is usually half a line or less. b. By the time the data has been accurately analyzed, critical failure has already occurred. c. Seven bands must be hired to adequately bring the funk. 2. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. What’s the correct action to take? a. Create a spreadsheet which compiles the salient data into a logical order/layout, perform calculations and analysis then search the internet for a solution. b. Immediately report the data to the supervisory team. c. File the data in the relevant, appropriate locations, complete a standardized company report form, notify all vested parties, raise the flags, abandon ship. 3. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. What would you do? a. Run b. Walk c. Crawl I want the top-level chunks to be visually separated for better readability, etc. \defineenumeration [question] [text=, alternative=serried, distance=1em, width=fit, before={\testpage[4]\blank[3*big]}, after={\blank}] \starttext \dorecurse{10}{ \startquestion \input ward \stopquestion \startitemize[packed,a] \startitem \input ward \stopitem \startitem \input ward \stopitem \startitem \input ward \stopitem \stopitemize } \stoptext -Original Message- From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Wolfgang Schuster Sent: Wednesday, June 17, 2020 2:45 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] spacing before items Mike Cooper schrieb am 17.06.2020 um 21:50: I really should have fiddled with this before thanking you, Wolfgang. I was focused on catching up on email etc. this morning. Thanks for trying though! Your "answer" is pretty much coded code to me. I don't understand it and don't have the first notion of how to implement it in my file. For one thing, I have no clue what "ttbf" means. Can't find it on the wiki or in the manuals. Google says it's the Texas Teen Book Festival but I'm guessing that ain't it. ??? My example shows which key is used for which space around each item. To insert vertical space you have to use the \blank command and set a value in the optional argument, e.g. \blank[1cm]. To insert now a space of 1cm before the first item you need the "before" key with \blank as argument: \setupitemgroup[mdshw][1][before={\blank[1cm]}] 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/listin
Re: [NTG-context] (no subject)
Like this (an arrangement that uses two physical pages, that is where the \poparrangedpagesAB and \arrangedpageA / \arrangedpageB come from): \installpagearrangement 1*4*reversed {\dosetuparrangement{2}{2}{4}{3}{3}% X,Y,Total,hcutmarks,vcutmarks \pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED\poparrangedpagesAB\relax} \def\pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED#1% {\advancearrangedpageN \reportarrangedpage\arrangedpageN \ifcase\arrangedpageN \or \handlearrangedpageXandY{#1}010\arrangedpageA % 1 rot,hskip,vskip \or \handlearrangedpageXandY{#1}111\arrangedpageA % 2 \or \handlearrangedpageXandY{#1}101\arrangedpageA % 3 \or \handlearrangedpageXandY{#1}000\arrangedpageA % 4 \or \handlearrangedpageXandY{#1}000\arrangedpageB % 5 \or \handlearrangedpageXandY{#1}010\arrangedpageB % 6 \or \handlearrangedpageXandY{#1}001\arrangedpageB % 7 \or \handlearrangedpageXandY{#1}011\arrangedpageB % 8 \poparrangedpages \fi} Best wishes, Taco > On 17 Jun 2020, at 13:31, Malte Frank Gerdes wrote: > > Hi, > > I'm new to context and found this > > ``` > \installpagearrangement 1*4*reversed > {\dosetuparrangement{2}{2}{4}{3}{3}% X,Y,Total,hcutmarks,vcutmarks > > \pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED\poparrangedpagesTWO\relax} > > \def\pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED#1% > {\advancearrangedpageN > \reportarrangedpage\arrangedpageN > \ifcase\arrangedpageN > \or \handlearrangedpageXandY{#1}010\arrangedpageA % 1 rot,hskip,vskip > \or \handlearrangedpageXandY{#1}111\arrangedpageA % 2 > \or \handlearrangedpageXandY{#1}101\arrangedpageA % 3 > \or \handlearrangedpageXandY{#1}000\arrangedpageA % 4 > \poparrangedpages > \fi} > > \setuppapersize [A10][A8] > \setuparranging [1*4*reversed] > \setuplayout[margin=0pt, width=fit] > > \showframe > > \starttext > \dorecurse{8}{\vbox to \textheight{\vfill\midaligned{\tfd ABC}\vfill}\page} > \stoptext > ``` > > imposition scheme in the garden wiki and tried it out. Now i noticed > that this sets the imposition scheme for *every* page, but i would like > to have a different scheme on the second page (1*4), how do i set that > (if this is even possible)? > > The result should look like > > ``` > P4 P1 > R3 R2 > > P5 P6 > P7 P8 > ``` > > where 5-8 should be on the back of 1-4 (double sided). > > Thanks in advacne for any help :) > > Malte > ___ > 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 > ___ Taco Hoekwater Elvenkind BV ___ 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] (no subject)
Hi, I'm new to context and found this ``` \installpagearrangement 1*4*reversed {\dosetuparrangement{2}{2}{4}{3}{3}% X,Y,Total,hcutmarks,vcutmarks \pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED\poparrangedpagesTWO\relax} \def\pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED#1% {\advancearrangedpageN \reportarrangedpage\arrangedpageN \ifcase\arrangedpageN \or \handlearrangedpageXandY{#1}010\arrangedpageA % 1 rot,hskip,vskip \or \handlearrangedpageXandY{#1}111\arrangedpageA % 2 \or \handlearrangedpageXandY{#1}101\arrangedpageA % 3 \or \handlearrangedpageXandY{#1}000\arrangedpageA % 4 \poparrangedpages \fi} \setuppapersize [A10][A8] \setuparranging [1*4*reversed] \setuplayout[margin=0pt, width=fit] \showframe \starttext \dorecurse{8}{\vbox to \textheight{\vfill\midaligned{\tfd ABC}\vfill}\page} \stoptext ``` imposition scheme in the garden wiki and tried it out. Now i noticed that this sets the imposition scheme for *every* page, but i would like to have a different scheme on the second page (1*4), how do i set that (if this is even possible)? The result should look like ``` P4 P1 R3 R2 P5 P6 P7 P8 ``` where 5-8 should be on the back of 1-4 (double sided). Thanks in advacne for any help :) Malte ___ 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] wrong page for annotation and \pagenumber
On Tue, 16 Jun 2020, Pablo Rodriguez wrote: On 6/16/20 4:58 PM, Wolfgang Schuster wrote: Pablo Rodriguez schrieb am 16.06.2020 um 16:31: [...] I’m afraid that you get the same result, so there may be a bug there. There is no bug. When you take a look at my pagenumber example you see a few lines at the top show the number of the previous page, this happens because TeX collects more than necessary which means in your example above the layer is placed when TeX was still on the first page. Many thanks for your reply, Wolfgang. I’m afraid that TeX is too tricky for me in that case (or I simply think that it is misbehaving there). In your example you can add \testpage to \section to force a page break when there isn't enough space available to place the heading, this moves also the layer placement to the next page. I’m afraid this doesn’t work with my real document. I need another approach. This sample reflects my problem: \setupinteraction[state=start] %~ \showframe\showgrid \starttext \dorecurse{41}{one line\par} \ \comment[location={rightmargin}]{comment} \stoptext Since layers are problematic for the task, I insert the comments right after the text (which actually comes from \xmlflush{#1} [XML sources]). I’m afraid that the paragraph before \comment comes from \xmlflush, so I cannot avoid it. This is unproblematic for most cases, but the sample above displays the problem of adding a comment in a new paragraph. It might add a new page. To avoid this issue: how could I prevent the pagebreak before \comment and the addition of a pagebreak above? If that were possible, I could add a \blank[-2*line] that would place the comment right. Try \removeunwantedwhitespace or \blank[samepage] 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 ___
Re: [NTG-context] wrong page for annotation and \pagenumber
On 6/16/20 4:58 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 16.06.2020 um 16:31: >> [...] >> I’m afraid that you get the same result, so there may be a bug there. > > There is no bug. When you take a look at my pagenumber example you see a > few lines at the top show the number of the previous page, this happens > because TeX collects more than necessary which means in your example > above the layer is placed when TeX was still on the first page. Many thanks for your reply, Wolfgang. I’m afraid that TeX is too tricky for me in that case (or I simply think that it is misbehaving there). > In your example you can add \testpage to \section to force a page break > when there isn't enough space available to place the heading, this moves > also the layer placement to the next page. I’m afraid this doesn’t work with my real document. I need another approach. This sample reflects my problem: \setupinteraction[state=start] %~ \showframe\showgrid \starttext \dorecurse{41}{one line\par} \ \comment[location={rightmargin}]{comment} \stoptext Since layers are problematic for the task, I insert the comments right after the text (which actually comes from \xmlflush{#1} [XML sources]). I’m afraid that the paragraph before \comment comes from \xmlflush, so I cannot avoid it. This is unproblematic for most cases, but the sample above displays the problem of adding a comment in a new paragraph. It might add a new page. To avoid this issue: how could I prevent the pagebreak before \comment and the addition of a pagebreak above? If that were possible, I could add a \blank[-2*line] that would place the comment right. Many thanks for your 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 ___
Re: [NTG-context] wrong page for annotation and \pagenumber
Pablo Rodriguez schrieb am 16.06.2020 um 16:31: On 6/16/20 4:53 AM, Rudolf Bahr wrote: [...] Hi Pablo, I fear I don't understand what issue you mean, therefore I append my output here. Many thanks for your reply, Rudolf. The issue is that the layer is placed on the first page, where it should be placed on the second page. This sample shows thie problem in a simpler way: \definelayer[whatever] [x=3em, y=3em] \setupbackgrounds[page][background=whatever] \setuphead [section] [before={\testpage[2]\blank[2*big]}] \starttext \dorecurse{18}{\section{Section}} just a line \setlayerframed[whatever][foregroundstyle=\bf\ss] {layer on the last page?} \stoptext I’m afraid that you get the same result, so there may be a bug there. There is no bug. When you take a look at my pagenumber example you see a few lines at the top show the number of the previous page, this happens because TeX collects more than necessary which means in your example above the layer is placed when TeX was still on the first page. In your example you can add \testpage to \section to force a page break when there isn't enough space available to place the heading, this moves also the layer placement to the next page. 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] wrong page for annotation and \pagenumber
On 6/16/20 4:53 AM, Rudolf Bahr wrote: > [...] > Hi Pablo, > > I fear I don't understand what issue you mean, therefore I append my output > here. Many thanks for your reply, Rudolf. The issue is that the layer is placed on the first page, where it should be placed on the second page. This sample shows thie problem in a simpler way: \definelayer[whatever] [x=3em, y=3em] \setupbackgrounds[page][background=whatever] \starttext \dorecurse{18}{\section{Section}} just a line \setlayerframed[whatever][foregroundstyle=\bf\ss] {layer on the last page?} \stoptext I’m afraid that you get the same result, so there may be a bug there. Many thanks for your 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 ___
Re: [NTG-context] wrong page for annotation and \pagenumber
On Mon, Jun 15, 2020 at 02:52:49PM +0200, Pablo Rodriguez wrote: > Dear list, > > I have the following number with wrong annotation placement and wrong > page number, which would be both on the second page: > > \setupinteraction[state=start] > \definelayer[pgnumber] > \setupbackgrounds[page][background=pgnumber] > \starttext > \placelist[section][alternative=d] > \dorecurse{16}{\section{Section}} > \pagenumber/\lastpagenumber > \setlayer[pgnumber] > {\comment{\pagenumber}} > \stoptext > > Could anyone confirm the issue? > > Many thanks for your help, > > Pablo Hi Pablo, I fear I don't understand what issue you mean, therefore I append my output here. I'm using: LuaMetaTeX, Version 2.04.02 ConTeXt ver: 2020.02.17 19:36 MKIV beta fmt: 2020.2.23 Best wishes, Rudolf annotation-u-pagenumber.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] wrong page for annotation and \pagenumber
On 6/15/20 4:09 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 15.06.2020 um 14:52: >> Dear list, >> >> I have the following number with wrong annotation placement and wrong >> page number, which would be both on the second page: >> [...] >> Could anyone confirm the issue? > > \pagenumber is only reliable headers/footer texts or page backgrounds, > for everything else you need a multi pass mechanism (save the page > number in the first run and provide it in the second). Many thanks for your reply, Wolfgang. I thought this was caused by the deployment of "\placelist[section][alternative=d]". But my new sample shows clearly that this isn’t the cause. My question is now is how to get the right page for the layer in this sample: \definelayer[whatever] [x=3em, y=3em] \setupbackgrounds[page][background=whatever] \starttext \dorecurse{18}{\section{Section}} just a line \setlayerframed[whatever][foregroundstyle=\bf\ss] {layer on the last page?} \stoptext Many thanks for your 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 ___
Re: [NTG-context] wrong page for annotation and \pagenumber
Pablo Rodriguez schrieb am 15.06.2020 um 14:52: Dear list, I have the following number with wrong annotation placement and wrong page number, which would be both on the second page: \setupinteraction[state=start] \definelayer[pgnumber] \setupbackgrounds[page][background=pgnumber] \starttext \placelist[section][alternative=d] \dorecurse{16}{\section{Section}} \pagenumber/\lastpagenumber \setlayer[pgnumber] {\comment{\pagenumber}} \stoptext Could anyone confirm the issue? \pagenumber is only reliable headers/footer texts or page backgrounds, for everything else you need a multi pass mechanism (save the page number in the first run and provide it in the second). \setuppapersize[A6] \definepagestate[pagenumber] \starttext \subject{\tex{pagenumber}} \dorecurse{50}{\twodigits{\recurselevel}: \pagenumber\par} \page \subject{\tex{pagestaterealpage}} \dorecurse{50} {\twodigits{\recurselevel}: \setpagestate[pagenumber]% \pagestaterealpage{pagenumber}{\recurselevel}\par} \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 ___
[NTG-context] wrong page for annotation and \pagenumber
Dear list, I have the following number with wrong annotation placement and wrong page number, which would be both on the second page: \setupinteraction[state=start] \definelayer[pgnumber] \setupbackgrounds[page][background=pgnumber] \starttext \placelist[section][alternative=d] \dorecurse{16}{\section{Section}} \pagenumber/\lastpagenumber \setlayer[pgnumber] {\comment{\pagenumber}} \stoptext Could anyone confirm the issue? Many thanks for your 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 ___
Re: [NTG-context] \recursestring undefined when inside \dorecurse
On 6/14/2020 11:41 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \starttext \dorecurse{25}{\recurselevel\par} \doloopoverstring{a,b,c}{\recursestring} } \stoptext Both LMTX and MkIV complain about \recursestring for being undefined. I wonder whether this is inteded or it is a bug. intended, as there is no \doloopoverstring, it's \doloopoverlist {red,green,blue} { [\recursestring] } (btw, you have one } too many) - 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 ___
[NTG-context] using annotations for extended print handling
Dear list, I have an over a thousand pages document generated with ConTeXt. I need to print and chapters and part of chapters (or send to other people). /PrintPageRange is great (and you can even generate a new document containing only the pages in /PrintPageRange). But the issue here is that I would need to recompile the document again for each new required /PrintPageRange. Another approach would be to add PDF annotations (outside page boundaries) to store the desired information. So I created text annotations (using \comment) with author information composed from unit number (such as "i3", "ii9" or "iii28"), info on the unit part (such as "-explanation", "-synopsis", "-exercises", or others) and position ("-start" and "-stop"). This would make author fields such as "i3-start" (which has a corresponding "i3-stop", or "ii22-synopsis-start" (with the corresponding closing annotation). To make easier to identify these annotations, they all share the same title. As contents, all these text annotations have the page number. From the generated PDF document, I need to read all text annotations in order to extract two fields from those annotations that contain a "whatever" /Subj. These fields are /T and /Contents. I guess that the way to deal with the (over 700) annotations would be to store both fields in a Lua table. But this is only a suspicion, since I don’t know how to read the values, how to store them, or how to compare them with specific units or unit parts to get these page numbers. I mean, with a command such as \extractpages{i5,i8-exercises,i15-explanation} would get the pages for each "-start" and "-stop" that could be passed automatically to a \filterpages command. A sample that generates something similar: \setuppapersize[A8] \setupinteraction[state=start] \starttext \dorecurse{5}{\part{\romannumerals{\recurselevel}} \dorecurse{15}{\chapter{\recurselevel} \comment [title=whatever, color=yellow, %~ the following code is to have expansion in interaction author={\ctxlua{context([[\namedstructurevariable{part}{title}% \namedstructurevariable{chapter}{title}]].."-start")}}] {\pagenumber} \doloopoverlist{explanation,exercises,synopsis}{\chapter{\recurselevel} %~ I would like to use \recursestring, but it is undefined here \comment [title=whatever, color=green, author={\ctxlua{context([[\namedstructurevariable{part}{title}% \namedstructurevariable{chapter}{title}]].. [[-\recurselevel]].."-start")}}] {\pagenumber} \dorecurse{5}{\null\page} \comment [title=whatever, color=blue, author={\ctxlua{context([[\namedstructurevariable{part}{title}% \namedstructurevariable{chapter}{title}]].. [[-\recurselevel]].."-stop")}}] {\pagenumber} } \comment [title=whatever, color=red, author={\ctxlua{context([[\namedstructurevariable{part}{title}% \namedstructurevariable{chapter}{title}]].."-stop")}}] {\pagenumber} } } \stoptext Is there a way to deal with the annotations in the document generated from the code above, in the way I described before? Many thanks for your 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 ___