Re: [NTG-context] fallbacks
I believe it's a bug. https://github.com/contextgarden/context/blob/d025bcdf995be6951f69fed6869048ab22491b9e/tex/context/base/mkxl/font-col.lmt#L278 the newchar[] table, which should contain all chars supported by the fallback termes font if I'm not mistaken, turns out to have only 392 chars within 0x20-0x30C, far away from 0x2329-0x232A. On Sun, 23 Apr 2023 at 03:26, Thomas A. Schmitz via ntg-context < ntg-context@ntg.nl> wrote: > Thank you, Pablo, but that doesn't help. I know how to use fallback > fonts. I was wondering if the check key is working as it should. > > Thomas > > On 4/22/23 20:33, Pablo Rodriguez via ntg-context wrote: > > Hi Thomas, > > > > I don’t know what check does (maybe just check?), but the standard > > behaviour with \definefallbackfamily is only to fall back when the > > character is missing from the main font. > > > > To force all characters from the range in the fallback font, "force=yes" > > is required. > > > > Here you have a minimal sample (which doesn‘t use "preset=range:greek"), > > adding "force=yes" gets all Greek glyphs from GFS Heraklit: > > > >\definefallbackfamily [presentation] [serif] [GFSHeraklit] > >[range={greekandcoptic, greekextended}] > >\definefontfamily [presentation] [serif] [TeXGyrePagella] > >\setupbodyfont [presentation,12pt] > > > >\starttext > >Pπμᾷσδ > >\stoptext > > > > Just in case it might help, > > -- > Prof. Dr. Thomas A. Schmitz > Institut für Klassische und Romanische Philologie > Universität Bonn > Am Hof 1e > 53113 Bonn > http://www.philologie.uni-bonn.de/de/personal/schmitz > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] horizontal space in CJK document
Thanks, but I guess the space width would be fixed. I just found a hack: 口口\hspace[big]\hbox{}口口 does the trick. On Tue, 21 Feb 2023 at 06:46, fv leung via ntg-context wrote: > Maybe the ideographic space U+3000 works. > > 在 2023年2月21日週二 03:42,Sylvain Hubert via ntg-context > 寫道: > >> Dear list, >> >> Does anyone know how to insert a horizontal space in a CJK document with >> \setscript[hanzi]? >> >> \setscript[hanzi] >> \definefontfamily[mainface][rm][notoserifcjkhk][] >> \setupbodyfont[mainface] >> \starttext >> 口口\hspace[big]口口 % with \setscript[hanzi], the \hspace is ignored >> >> \dorecurse{100}{口} % without \setscript[hanzi], the line is not properly >> wrapped >> \stoptext >> >> Many thanks, >> Sylvain >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : https://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : https://contextgarden.net >> >> ___ >> > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] horizontal space in CJK document
Dear list, Does anyone know how to insert a horizontal space in a CJK document with \setscript[hanzi]? \setscript[hanzi] \definefontfamily[mainface][rm][notoserifcjkhk][] \setupbodyfont[mainface] \starttext 口口\hspace[big]口口 % with \setscript[hanzi], the \hspace is ignored \dorecurse{100}{口} % without \setscript[hanzi], the line is not properly wrapped \stoptext Many thanks, Sylvain ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How to prevent \subject from being the last line
On Mon, 20 Feb 2023 at 23:22, Pablo Rodriguez via ntg-context < ntg-context@ntg.nl> wrote: > On 2/20/23 15:47, Sylvain Hubert via ntg-context wrote: > > [...] > > Btw, just in case if anyone shares this idea: is it possible to have a > > zulip channel for ConTeXt? It's free for open source projects, has a > > interface for existing mailing lists, and has a reasonable builtin > > search engine, which could serve as another de-facto documentation, > > considering the fact that very few of the massive useful use cases asked > > in the mailing lists so far have been transcribed into official > > documentations. > > Hi Sylvain, > > one main documentation source is the wiki. > > Sorry, but I‘m afraid it is hard for me to understand how adding another > information source for ConTeXt is a gain. > It's a gain exactly because it's not another information source. The posts are synced. It's just a modern and imo better UI for the mailing list, with more pleasant searching and tracking UX. > Best, > > Pablo > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How to prevent \subject from being the last line
Thanks, Pablo and Bruce. Both solutions work well. > I had similar issues with \section and only the Latin script was involved. Btw, just in case if anyone shares this idea: is it possible to have a zulip channel for ConTeXt? It's free for open source projects, has a interface for existing mailing lists, and has a reasonable builtin search engine, which could serve as another de-facto documentation, considering the fact that very few of the massive useful use cases asked in the mailing lists so far have been transcribed into official documentations. On Mon, 20 Feb 2023 at 05:22, Pablo Rodriguez via ntg-context < ntg-context@ntg.nl> wrote: > On 2/19/23 20:34, Sylvain Hubert via ntg-context wrote: > > Dear list, > > > > I have a long document (A4 * 170 pages) with some CJK fonts, where some > > of the \subject{...} are placed at the end of the corresponding pages, > > which looks awkward. How can one flush those last-line titles to the > > next pages? > > Hi Sylvain, > > the hard part for the rest of us is figuring out what you may have on > your screen. > > \setuphead[subject][before={\blank[preference]}] might help. > > Another approach would be \setuphead[subject][after={\blank[samepage, > line]}]. > > I mean, either you set a preference for breaking pages before \subject > or you force \subject to be on the same page with next paragraph. > > Nothing prevents you from doing both. > > BTW, default values for before and after in \setuphead[subject] are > \blank[2*big] and \blank (respectively [copied from strc-def.mkxl]). > > > Currently I don't have a MWE, as trivial filling-up with 1-2 pages of > > \lipsum doesn't reproduce the problem. I'm optimistically asking without > > MWE, but if it is necessary anyway, please tell me and I will obfuscate > > the 170-page document and find a way to upload it. > > I hope it might help. It is not clear for me whether the CJK fonts are > only for fragments in these languages or the main text is written in any > of these languages. > > I had similar issues with \section and only the Latin script was involved. > > Again, I hope it might help, > > Pablo > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] How to prevent \subject from being the last line
Dear list, I have a long document (A4 * 170 pages) with some CJK fonts, where some of the \subject{...} are placed at the end of the corresponding pages, which looks awkward. How can one flush those last-line titles to the next pages? Currently I don't have a MWE, as trivial filling-up with 1-2 pages of \lipsum doesn't reproduce the problem. I'm optimistically asking without MWE, but if it is necessary anyway, please tell me and I will obfuscate the 170-page document and find a way to upload it. Many thanks, Sylvain ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] TOC colors and in-page anchors
(heartbeat packet) I think some kind of modern issue tracker on e.g. https://github.com/contextgarden/context-mirror would be generally helpful. On Wed, 28 Sept 2022 at 23:31, Pablo Rodriguez via ntg-context < ntg-context@ntg.nl> wrote: > On 9/28/22 12:20, Sylvain Hubert via ntg-context wrote: > > Thanks for the pointers, but unfortunately I cannot reproduce the second > > fix with either the system pdf viewer or the browser one. > > Hi Sylvain, > > it seems that ConTeXt is basically ignoring "focus=standard" in lists. > > Compare both links here: > > \setupinteraction[state=start, > color=darkred, > contrastcolor=darkred, > focus=standard] > \starttext > \completecontent > \section[a]{b} > \about[a] > \stoptext > > And this is a regression. I think it was introduced in latest from > 2022.07.06 21:42, since latest from 2022.05.11 11:36 has no issue with > this. > > Hans, could you see what preventing this from working as expected? > > Many thanks for your help, > > Pablo > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] TOC colors and in-page anchors
Thanks for the pointers, but unfortunately I cannot reproduce the second fix with either the system pdf viewer or the browser one. \usemodule[ipsum] \setupinteraction[state=start,focus=standard] \starttext \completecontent \section{s1}\ipsum \section{s2}\ipsum \section{s3}\ipsum \section{s4}\ipsum \section{s5}\ipsum \section{s6}\ipsum \stoptext context version: 2022.09.11 20:44 The viewer is on 'Continuous Scoll' mode both before and after the click, but clicking s4 still jumps to the beginning of page 2. On Wed, 28 Sept 2022 at 16:43, Bruce Horrocks wrote: > > > > On 28 Sep 2022, at 09:18, Sylvain Hubert via ntg-context < > ntg-context@ntg.nl> wrote: > > > > Dear list, > > > > \usemodule[ipsum] > > \setupinteraction[state=start] > > > > \starttext > > \completecontent > > \section{s1}\ipsum > > \section{s2}\ipsum > > \section{s3}\ipsum > > \section{s4}\ipsum > > \section{s5}\ipsum > > \section{s6}\ipsum > > \stoptext > > > > In the table of contents, s1 and s2 (at page 1) are rendered in red, > while others in green. > > > > Moreover, when I click s4, it jumps to page 2 without locating the > section precisely within the page. > > This is not the case when using the latex hyperref package. > > > > Does anyone know how to make the colors uniform and the links precise? > > > > Any help is appreciated. > > The colour change is because those links are on the same page that you are > jumping to. When you have more text in your document they will be > consistent. You can override the colors with > \setupinteraction[state=start,color=black] for example if you wish. > > You need focus=standard to jump direct but only when the viewer is in > scrolling mode. It's explained on the Wiki. > <https://wiki.contextgarden.net/Command/setupinteraction> > > — > Bruce Horrocks > Hampshire, UK > > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] TOC colors and in-page anchors
Dear list, \usemodule[ipsum] \setupinteraction[state=start] \starttext \completecontent \section{s1}\ipsum \section{s2}\ipsum \section{s3}\ipsum \section{s4}\ipsum \section{s5}\ipsum \section{s6}\ipsum \stoptext In the table of contents, s1 and s2 (at page 1) are rendered in red, while others in green. Moreover, when I click s4, it jumps to page 2 without locating the section precisely within the page. This is not the case when using the latex hyperref package. Does anyone know how to make the colors uniform and the links precise? Any help is appreciated. Sylvain ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Roman PDF labels
Dear List, Do we have something like "\pagenumbering{roman}" in latex, which sets the pdf labels (page numbers for pdf viewers, not the ones rendered in the footer) to roman numbers? Here's a MWE for latex: \documentclass{report} \usepackage{hyperref} \begin{document} \pagenumbering{roman} \tableofcontents \listoffigures \listoftables \pagenumbering{arabic} \chapter{Abc} \end{document} Thanks! Best, Sylvain ___ 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] textbackground for text of different size
Dear List, the red highlight block in the following example is not covering the two 40pt characters: \definetextbackground[important][frame=no,background=color,backgroundcolor=red] \starttext abc\important{123{\switchtobodyfont[40pt]45}xy}z \stoptext Is there an option that fixes this? Thanks! Best, Sylvain ___ 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] positioning of metapost figure
Thanks Hans! On Sun, 12 Sept 2021 at 19:02, Hans Hagen wrote: > On 9/12/2021 6:54 PM, Sylvain Hubert via ntg-context wrote: > > Dear List, > > > > The following code draws a circle at the center of the page, ignoring > > the "shifted" part. > > > > \startuniqueMPgraphic{concept} > > draw fullcircle scaled 1cm shifted (10cm,10cm); > > \stopuniqueMPgraphic > > \defineoverlay[concept][\uniqueMPgraphic{concept}] > > \setupbackgrounds[page][background=concept] > > \starttext > > . > > \stoptext > > > > How should the metapost background figure be positioned correctly? > > \startuniqueMPgraphic{concept} > StartPage; > draw fullcircle scaled 1cm shifted (10cm,10cm); > draw Page withpen pencircle scaled 5mm; > StopPage; > \stopuniqueMPgraphic > > - >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] positioning of metapost figure
Dear List, The following code draws a circle at the center of the page, ignoring the "shifted" part. \startuniqueMPgraphic{concept} draw fullcircle scaled 1cm shifted (10cm,10cm); \stopuniqueMPgraphic \defineoverlay[concept][\uniqueMPgraphic{concept}] \setupbackgrounds[page][background=concept] \starttext . \stoptext How should the metapost background figure be positioned correctly? Thanks! Best, Sylvain ___ 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] Weird error when using \startformula inside lua
The problem also concerns \starttyping: \starttext . \startluacode context([[ \starttyping \stoptyping ]]) \stopluacode \stoptext tex error > runaway error: end of file encountered mtx-context | fatal error: return code: 256 % \starttext . \startluacode context([[ \starttyping foobar \stoptyping ]]) \stopluacode \stoptext tex error > tex error on line 5 in file ./test.tex: lua error: registered function call [1041]: ...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:534: invalid value (nil) at index 3 in table for ' concat' stack traceback: [C]: in function 'table.concat' ...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:534: in upvalue 'pickup' ...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:677: in function <...mtx/tex/texmf-context/tex/context/base/mkxl/buff-ini.lmt:668> (...tail calls...) Sylvain On Sat, 11 Sept 2021 at 05:12, Aditya Mahajan via ntg-context < ntg-context@ntg.nl> wrote: > I sometimes define lua functions for showing out worked out calculations. > The following minimal example shows that > > context([[\startformula ... \stopformula]]) > > fails in LMTX with an error message: > > tex error > tex error on line 3 in file ./test.tex: Undefined > control sequence \undefined > > MWE: > > \startluacode > thirddata = thirddata or {} > > local comment = [[ > This is a famous formula > \startformula > a^2 + b^2 = c^2 > \stopformula > ]] > > function thirddata.explanation() > context(comment) > end > > \stopluacode > > \starttext > \ctxlua{thirddata.explanation()} > \stoptext > > The actual use case is more complicated (where I use templates, so I don't > want to convert everything to context.startformula() etc.). The example > compiles with MkIV but not LMTX. > > Any idea what is going on? > > 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 > > ___ > ___ 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] Equation alignment
Dear List, The following example of equation alignment copied from An Excursion is not reproducible under my context 2021.03.05 shipped with texlive 2021: \starttext \startformula \eqalign{ ax^2+bx+c &= 0 \cr x &= \frac{-b \pm \sqrt{b^2-4ac}}{2a} \cr } \stopformula \stoptext Both ampersands are rendered literally. Does anyone know how to properly typeset aligned equations? Thanks! Sylvain ___ 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] features of fallback font
Dear List, I'm using the chinese simsun font that has no builtin SerifBold. I'm trying to define a fakebold feature for it, but the following code does not work: \definefontfeature[fakebold][effect={width=0.3, delta=0}] \definefontfallback [sunfallback] [name:simsun] [cjkunifiedideographs] \definefontfallback [sunbffallback] [name:simsun] [cjkunifiedideographs][features=fakebold] \definefontsynonym [Serif] [modern] [fallbacks=sunfallback] \definefontsynonym [SerifBold] [modern] [fallbacks=sunbffallback] \starttext 人 foo \bf 人 bar % bar is bold, the second 人 is not \stoptext Does anyone know how to define features for fallback font? Thanks! Best, Sylvain ___ 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] Remove vertical space around typing
Dear List, How should we remove the vertical space above and below the following typing? \starttext Remove space below \starttyping some code \stoptyping \stoptext Thanks! Best, Sylvain ___ 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 of inner item group
Thanks but I believe 'distance' means ' * <--> text', while margin means '<--> * text'. On 07/09/2021, fv leung via ntg-context wrote: > Use > > distance=... > > instead of > > margin=... > > . > > 在 2021年9月7日週二 16:58,Sylvain Hubert via ntg-context 寫道: > >> Dear List, >> >> Does anyone know how to set the margin of an inner item group? The >> natural way does not seem to work: >> >> \showframe >> \starttext >> \startitemize[margin=5em] >> \item 1 >> \startitemize[margin=10em] >> \item 1 >> \item 2 >> \item 3 >> \stopitemize >> \item 2 >> \item 3 >> \stopitemize >> \stoptext >> >> In the doc above, only the outer item group has a margin. >> >> Any help will be appreciated. >> >> Best, >> Sylvain >> >> ___ >> 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] itemize problems
This works, thanks! On 07/09/2021, fv leung via ntg-context wrote: > Use > > \startitemize[A,text][lefttext=,righttext=,stopper=] > > then. > > Maybe that's the new way. > > Sylvain Hubert via ntg-context 於 2021年9月7日 週二 > 下午4:32寫道: > >> Thanks, but this doesn't seem to work on my laptop: >> >> \starttext >> \startitemize[A,text][left=,right=,stopper=] >> \item 1 >> \item 2 >> \stopitemize >> \stoptext >> >> %output: (A) 1 (B) 2 >> >> On 07/09/2021, fv leung via ntg-context wrote: >> > I add >> > >> > left=,right=, >> > >> > in the second option group. >> > >> > 在 2021年9月7日週二 07:02,Sylvain Hubert via ntg-context >> 寫道: >> > >> >> A few more information: >> >> >> >> For the 1st problem: >> >> >> >> It seems that \setupitemize accepts two option groups, to which >> >> n,packed and margin belong accordingly. However, >> >> \setupitemize[n][margin=2em] does not seem to work. >> >> >> >> For the 2nd problem: >> >> >> >> \setupitemize[columns,one], although doing nothing in theory, seems to >> >> fix the problem. >> >> >> >> For the 4th problem: >> >> >> >> I've found that we can do \setupitemize[A,text] which makes it like >> >> >> >> (A.) 0 (B.) 1 (C.) 2 (D.) 3 >> >> >> >> The problem now is, how can we remove the parentheses around the item >> >> labels? >> >> >> >> On 07/09/2021, Sylvain Hubert wrote: >> >> > Dear List, >> >> > >> >> > Here's a collection of four problems about item groups that I've >> >> > just >> >> > encountered. >> >> > >> >> > 1. 'n' and 'packed' not playing well with other options. >> >> > >> >> > This works: >> >> > >> >> > \defineitemgroup[myitems][itemize][margin=2em,before=before] >> >> > \setupmyitems[n,packed] >> >> > >> >> > \starttext >> >> > text >> >> > \startmyitems >> >> > \item 1 >> >> > \item 2 >> >> > \stopmyitems >> >> > \stoptext >> >> > >> >> > This does not: >> >> > >> >> > >> >> > \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed] >> >> > >> >> > This does not either: >> >> > >> >> > \defineitemgroup[myitems][itemize] >> >> > \setupmyitems[n,packed,margin=2em,before=before] >> >> > >> >> > Is there a rule for this glitch which makes it worth memorizing, or >> >> > is >> >> > this just a bug? >> >> > >> >> > 2. 'before' not working in nested item groups. >> >> > >> >> > \starttext >> >> > \startitemize[before=before1] >> >> > \item 1 >> >> > \startitemize[before=before2] >> >> > \item 2 >> >> > \stopitemize >> >> > \stopitemize >> >> > \stoptext >> >> > >> >> > Both before1 and before2 should appear, but only before1 is shown. >> >> > >> >> > 3. How to wrap the line under the bulletin or number? >> >> > >> >> > To be more precise, the current wrapping behavior of, say, "\item 0 >> >> > 1 >> >> > 2 3 4 5 6 7 8 9" is: >> >> > >> >> > * 0 1 2 3 4 5 6 7 >> >> > 8 9 >> >> > >> >> > How can we remove the indentation of the second line and make it >> >> > like >> >> > >> >> > * 0 1 2 3 4 5 6 7 >> >> > 8 9 >> >> > >> >> > 4. How to put the items on the same line? >> >> > >> >> > That is, for "\item 0 \item 1 \item 2", I would like it to be like >> >> > >> >> > * 0 * 1 * 2 >> >> > >> >> > instead of >> >> > >> >> > * 0 >> >> > * 1 >> >> > * 2 >> >> > >> >> > My context version: 2021.03.05 19:11, texlive. >>
[NTG-context] margin of inner item group
Dear List, Does anyone know how to set the margin of an inner item group? The natural way does not seem to work: \showframe \starttext \startitemize[margin=5em] \item 1 \startitemize[margin=10em] \item 1 \item 2 \item 3 \stopitemize \item 2 \item 3 \stopitemize \stoptext In the doc above, only the outer item group has a margin. Any help will be appreciated. Best, Sylvain ___ 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] error: (nodes): fuzzy token cleanup in whatsit node
Dear List, I think I've just encountered a fragile bug. It is only reproducible with exactly the same layout as the doc below. Any insertion or removal of an item that changes the pagination would let the document compile. \defineitemgroup[choice][itemize] \setupchoice[packed,columns,one] \setupchoice[before={\blank[medium]}] \starttext .\blank[32*big] \startitemize \item 0 \startchoice[text] \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \blank[6*big] \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \blank[6*big] \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \stopitemize \stoptext test.log: open source > level 1, order 1, name '/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv' system > system > ConTeXt ver: 2021.03.05 19:11 MKIV fmt: 2021.4.24 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name '/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/cont-new.mkiv' system > beware: some patches loaded from cont-new.mkiv close source> level 2, order 2, name '/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 'test', input './test', result 'test' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name '/home/me/code/qs-cs/test.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded backend > xmp > using file '/home/me/apps/texlive/2021/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml' pages > flushing realpage 1, userpage 1, subpage 1 pages > flushing realpage 2, userpage 2, subpage 2 ! error: (nodes): fuzzy token cleanup in whatsit node with type whatsit and subtype 29 Could anyone reproduce or explain this bug? Thanks! Sylvain ___ 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] itemize problems
Thanks, but this doesn't seem to work on my laptop: \starttext \startitemize[A,text][left=,right=,stopper=] \item 1 \item 2 \stopitemize \stoptext %output: (A) 1 (B) 2 On 07/09/2021, fv leung via ntg-context wrote: > I add > > left=,right=, > > in the second option group. > > 在 2021年9月7日週二 07:02,Sylvain Hubert via ntg-context 寫道: > >> A few more information: >> >> For the 1st problem: >> >> It seems that \setupitemize accepts two option groups, to which >> n,packed and margin belong accordingly. However, >> \setupitemize[n][margin=2em] does not seem to work. >> >> For the 2nd problem: >> >> \setupitemize[columns,one], although doing nothing in theory, seems to >> fix the problem. >> >> For the 4th problem: >> >> I've found that we can do \setupitemize[A,text] which makes it like >> >> (A.) 0 (B.) 1 (C.) 2 (D.) 3 >> >> The problem now is, how can we remove the parentheses around the item >> labels? >> >> On 07/09/2021, Sylvain Hubert wrote: >> > Dear List, >> > >> > Here's a collection of four problems about item groups that I've just >> > encountered. >> > >> > 1. 'n' and 'packed' not playing well with other options. >> > >> > This works: >> > >> > \defineitemgroup[myitems][itemize][margin=2em,before=before] >> > \setupmyitems[n,packed] >> > >> > \starttext >> > text >> > \startmyitems >> > \item 1 >> > \item 2 >> > \stopmyitems >> > \stoptext >> > >> > This does not: >> > >> > >> > \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed] >> > >> > This does not either: >> > >> > \defineitemgroup[myitems][itemize] >> > \setupmyitems[n,packed,margin=2em,before=before] >> > >> > Is there a rule for this glitch which makes it worth memorizing, or is >> > this just a bug? >> > >> > 2. 'before' not working in nested item groups. >> > >> > \starttext >> > \startitemize[before=before1] >> > \item 1 >> > \startitemize[before=before2] >> > \item 2 >> > \stopitemize >> > \stopitemize >> > \stoptext >> > >> > Both before1 and before2 should appear, but only before1 is shown. >> > >> > 3. How to wrap the line under the bulletin or number? >> > >> > To be more precise, the current wrapping behavior of, say, "\item 0 1 >> > 2 3 4 5 6 7 8 9" is: >> > >> > * 0 1 2 3 4 5 6 7 >> > 8 9 >> > >> > How can we remove the indentation of the second line and make it like >> > >> > * 0 1 2 3 4 5 6 7 >> > 8 9 >> > >> > 4. How to put the items on the same line? >> > >> > That is, for "\item 0 \item 1 \item 2", I would like it to be like >> > >> > * 0 * 1 * 2 >> > >> > instead of >> > >> > * 0 >> > * 1 >> > * 2 >> > >> > My context version: 2021.03.05 19:11, texlive. >> > >> > Any help with any of the problems above would be greatly appreciated. >> > >> > Best, >> > Sylvain >> > >> >> ___ >> 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] error: (nodes): fuzzy token cleanup in whatsit node ...
% context version: 2021.03.05 19:11 % This seems to be a bug of a very subtle layout problem. % Inserting or removing anything will likely to suppress the bug \defineitemgroup[choice][itemize] \setupchoice[packed,columns,one] \setupchoice[before={\blank[medium]}] \starttext .\blank[32*big] \startitemize \item 0 \startchoice[text] \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \blank[6*big] \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \blank[6*big] \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \item 0 \startchoice \item 0 \item 0 \item 0 \item 0 \stopchoice \stopitemize \stoptext % ! error: (nodes): fuzzy token cleanup in whatsit node with type whatsit and subtype 29mtx-context | fatal error: return code: 256 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] itemize problems
A few more information: For the 1st problem: It seems that \setupitemize accepts two option groups, to which n,packed and margin belong accordingly. However, \setupitemize[n][margin=2em] does not seem to work. For the 2nd problem: \setupitemize[columns,one], although doing nothing in theory, seems to fix the problem. For the 4th problem: I've found that we can do \setupitemize[A,text] which makes it like (A.) 0 (B.) 1 (C.) 2 (D.) 3 The problem now is, how can we remove the parentheses around the item labels? On 07/09/2021, Sylvain Hubert wrote: > Dear List, > > Here's a collection of four problems about item groups that I've just > encountered. > > 1. 'n' and 'packed' not playing well with other options. > > This works: > > \defineitemgroup[myitems][itemize][margin=2em,before=before] > \setupmyitems[n,packed] > > \starttext > text > \startmyitems > \item 1 > \item 2 > \stopmyitems > \stoptext > > This does not: > > \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed] > > This does not either: > > \defineitemgroup[myitems][itemize] > \setupmyitems[n,packed,margin=2em,before=before] > > Is there a rule for this glitch which makes it worth memorizing, or is > this just a bug? > > 2. 'before' not working in nested item groups. > > \starttext > \startitemize[before=before1] > \item 1 > \startitemize[before=before2] > \item 2 > \stopitemize > \stopitemize > \stoptext > > Both before1 and before2 should appear, but only before1 is shown. > > 3. How to wrap the line under the bulletin or number? > > To be more precise, the current wrapping behavior of, say, "\item 0 1 > 2 3 4 5 6 7 8 9" is: > > * 0 1 2 3 4 5 6 7 > 8 9 > > How can we remove the indentation of the second line and make it like > > * 0 1 2 3 4 5 6 7 > 8 9 > > 4. How to put the items on the same line? > > That is, for "\item 0 \item 1 \item 2", I would like it to be like > > * 0 * 1 * 2 > > instead of > > * 0 > * 1 > * 2 > > My context version: 2021.03.05 19:11, texlive. > > Any help with any of the problems above would be greatly appreciated. > > Best, > Sylvain > ___ 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] itemize problems
Dear List, Here's a collection of four problems about item groups that I've just encountered. 1. 'n' and 'packed' not playing well with other options. This works: \defineitemgroup[myitems][itemize][margin=2em,before=before] \setupmyitems[n,packed] \starttext text \startmyitems \item 1 \item 2 \stopmyitems \stoptext This does not: \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed] This does not either: \defineitemgroup[myitems][itemize] \setupmyitems[n,packed,margin=2em,before=before] Is there a rule for this glitch which makes it worth memorizing, or is this just a bug? 2. 'before' not working in nested item groups. \starttext \startitemize[before=before1] \item 1 \startitemize[before=before2] \item 2 \stopitemize \stopitemize \stoptext Both before1 and before2 should appear, but only before1 is shown. 3. How to wrap the line under the bulletin or number? To be more precise, the current wrapping behavior of, say, "\item 0 1 2 3 4 5 6 7 8 9" is: * 0 1 2 3 4 5 6 7 8 9 How can we remove the indentation of the second line and make it like * 0 1 2 3 4 5 6 7 8 9 4. How to put the items on the same line? That is, for "\item 0 \item 1 \item 2", I would like it to be like * 0 * 1 * 2 instead of * 0 * 1 * 2 My context version: 2021.03.05 19:11, texlive. Any help with any of the problems above would be greatly appreciated. Best, Sylvain ___ 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] \usemodule[chinese] not found
Thanks Hans! On 06/09/2021, Hans Hagen via ntg-context wrote: > On 9/6/2021 6:51 PM, Sylvain Hubert via ntg-context wrote: >> Dear List, >> >> I'm trying to typeset an item group (itemize) with chinese numbering. It >> is suggested in multiple older documentations and answers that >> \startitemize[c] should be used, for which \usemodule[chinese] is >> required. >> >> But I can no longer find the 'chinese' module neither in texlive, in >> lmtx, nor on the website. Has this module been removed or replaced by >> something else? > we moved on to unicode etc etc > > \starttext > > \startitemize[cn] > \startitem x \stopitem > \stopitemize > > \stoptext > > but it assumes a font that has chinese > > - >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] \usemodule[chinese] not found
Dear List, I'm trying to typeset an item group (itemize) with chinese numbering. It is suggested in multiple older documentations and answers that \startitemize[c] should be used, for which \usemodule[chinese] is required. But I can no longer find the 'chinese' module neither in texlive, in lmtx, nor on the website. Has this module been removed or replaced by something else? Thanks! Best, Sylvain ___ 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] Automatically adjust number of table columns
Dear List, I'm trying to make "\startchoice", "\stopchoice", and "\choice", such that: \startchoice \choice -1 \choice 0 \choice 1 \choice N/A \stopchoice results in (_ for whitespace) A. -1__B. 0__C. 1__D. N/A while \startchoice \choice not so short choice \choice must wrap here \choice another choice \choice yet another choice \stopchoice results in A. not so short choiceB. must wrap here C. another choice___D. yet another choice In another word, it should have the same effect as the addData() function in the page below (save as whatever.html and open it) table { width: 100%; border: 1px solid black; } #root { width: 10cm; } function make(tag, children) { const node = document.createElement(tag); for (const c of children) { if (typeof c === "string") { node.appendChild(document.createTextNode(c)); } else { node.appendChild(c); } } return node; } function addData(data) { const root = document.getElementById("root"); let table = make("table", [make("tr", data.map(d => make("td", [d])))]); root.appendChild(table); if (table.scrollWidth <= root.offsetWidth) { return; } root.removeChild(table); table = make("table", [ make("tr", [make("td", [data[0]]), make("td", [data[1]])]), make("tr", [make("td", [data[2]]), make("td", [data[3]])]), ]); root.appendChild(table); if (table.scrollWidth <= root.offsetWidth) { return; } root.removeChild(table); table = make("table", data.map(d => make("tr", [make("td", [d])]))); root.appendChild(table); } addData(["1".repeat(10), "2".repeat(10), "3".repeat(10), "4".repeat(10), ]); addData(["1".repeat(20), "2".repeat(20), "3".repeat(20), "4".repeat(20), ]); addData(["1".repeat(30), "2".repeat(30), "3".repeat(30), "4".repeat(30), ]); Does anyone have an idea how it can be implemented in context? Thanks in advance! Best, Sylvain ___ 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 ___