[NTG-context] Using a system font
Minimum working example: \starttext I want to use the Mathjax_Fraktur font, which the font-manager on Ubuntu reports that it has. {\switchtobodyfont[Mathjax_Fraktur] .. but, this text doesn't show up in Mathjax_Fraktur.} \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] Why are endnotes not working with ConTeXt-SBL?
This actually seems to be rooted in a more general problem with the publications support module. Why does invoking the fastsetup for citations work within the default footnote setup, but not within endnotes flushed via \placenotes[footnote]? If I modify the original MWE to use ConTeXt's default btx rendering, I get the same error: ``` \startbuffer [bib] @Book{clark1989, author = {Clark, William}, title = {Railroads \word{and} railroad towns \word{in} New Mexico}, publisher = {New Mexico Magazine}, year = {1989}, address = {Albuquerque, New Mexico}, isbn = {9780937206126} } \stopbuffer \usebtxdataset[bib.buffer] \setupbtx[dataset=default] \setupnote[footnote][location=none] % commenting out this line will produce footnotes that expand the citation correctly \starttext \input knuth \cite[alternative=footnote][clark1989] \page \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext ``` If it helps, the relevant code in publications support is the following block in publ-imp-cite.mkvi: ``` \startsetups \s!btx:\s!cite:footnote \startfootnote \fastsetup{btx:cite:entry} \stopfootnote \stopsetups ``` The \fastsetup{btx:cite:entry} doesn't expand to anything if the footnote is flushed as an endnote via \placenotes[footnote]. Does anyone have any idea why this happens and how to fix it? Joey On Sat, Dec 25, 2021 at 3:34 PM Joey McCollum wrote: > A reasonable solution for the time being would be to check if the > righttext argument is empty, and add a final period in the footnote only if > it is not (with the assumption being that the user would provide > punctuation in any righttext for footnote/endnote citations). I've pushed > the following change to the GitHub repo, if you'd like to pull and use it: > > ``` > % Inline footnote citation setup (with intelligent trailing punctuation > replacement) > \startsetups btx:sbl:cite:footnote > \removeunwantedspaces > > \doifinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} > \begingroup > \letbtxparameter{punct}\empty % don't pass the trailing punctuation down > to the inline setup > \startfootnote > \Word{\fastsetup{btx:sbl:cite:inline}}% capitalize the first word in > the footnote (needed to render "Ibid." and "Idem" correctly) > % Add a closing period if there is no righttext > \doif{\btxparameter{righttext}}{\empty} { > \btxperiod > } > \stopfootnote > \endgroup > > \doifnotinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} > \stopsetups > ``` > > This should allow your script to compile, but unfortunately, it doesn't > seem to make endnotes work, at least not when I try it. For some reason, > the macro \Word{\fastsetup{btx:sbl:cite:inline}} is expanding to nothing > inside the \startfootnote ... \stopfootnote environment. I have no idea why > this is happening, so any ideas are appreciated. > > Joey > > On Sat, Dec 25, 2021 at 1:11 PM Joey McCollum > wrote: > >> Joel, >> >> You may not have done anything wrong; this may be an issue with >> ConTeXt-SBL. In my code for the btx:sbl:cite:footnote setup in >> publ-imp-sbl.mkvi, I added a comment to this effect: >> >> ``` >> \startsetups btx:sbl:cite:footnote >> \removeunwantedspaces >> >> \doifinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} >> \begingroup >> \letbtxparameter{punct}\empty % don't pass the trailing punctuation >> down to the inline setup >> \let\doifendswithpunctelse\btx_sbl_doifendswithpunctelse % why is this >> necessary? For some reason, \btx_sbl_doifendswithpunctelse is not >> recognized within the footnote environment... >> \startfootnote >> \Word{\fastsetup{btx:sbl:cite:inline}}% capitalize the first word in >> the footnote (needed to render "Ibid." and "Idem" correctly) >> % Add a closing period, unless the righttext ends with punctuation >> \doifendswithpunctelse{\btxparameter{righttext}} { >> \removeunwantedspaces >> } { >> \removeunwantedspaces >> \btxperiod >> } >> \stopfootnote >> \endgroup >> >> \doifnotinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} >> \stopsetups >> ``` >> >> I define the \btx_sbl_doifendswithpunctelse macro earlier in the module. >> Initially, when I tried to invoke this macro within the \startfootnote ... >> \stopfootnote environment (to conditionally add a period at the end of a >> footnote citation if it does not have a righttext ending with punctuation), >> I got the same error you got, but for \btx_sbl_doifendswithpunctelse. I >> wasn't sure why this was happening, so I tried defining a new >> \doifendswithpunctelse macro. Unfortunately, based on your e-mail, it looks >> like this doesn't actually fix the problem. >> >> Any help from other developers would be appreciated here! Unfortunately, >> I don't have a MWE replicating the problem
Re: [NTG-context] startlines with long lines that break and indent
juh via ntg-context schrieb am 26.12.2021 um 17:36: Hi all, I am looking for a way to make startstoplines likes this: This is a long line that breaks, the second line, the third line. So if a line in the poem is too long it shall break and indent. Short version: \setuplines [ before={\blank\startnarrow[default=left,left=1cm]}, after={\stopnarrow\blank}, indenting={yes,-1cm}] \showframe[text][text] \starttext before \startlines text \dorecurse{10}{ text} text \dorecurse{40}{ text} text \dorecurse{10}{ text} \stoplines after \stoptext Long version: \definemeasure[Indentation][1cm] \definenarrower [LinesIndentation] [ before=\blank, after=\blank, default=left, left=\measure{Indentation}] \definelines [Poem] [ before=\startLinesIndentation, after=\stopLinesIndentation, indenting={yes,-\measure{Indentation}}] \showframe[text][text] \starttext before \startPoem text \dorecurse{10}{ text} text \dorecurse{40}{ text} text \dorecurse{10}{ text} \stopPoem after \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] startlines with long lines that break and indent
On 2021-12-26 11:36, juh via ntg-context wrote: Hi all, I am looking for a way to make startstoplines likes this: This is a long line that breaks, the second line, the third line. So if a line in the poem is too long it shall break and indent. TIA juh You can play with something based on the following, which I made it following suggestions from others. There may well be other ways, but this works for me. \define\Poemindent{3em} \define\Poeminset{14em} \definedelimitedtext[Poe] \setupwhitespace[medium] \showframe \startbuffer[Poem] This is a long line that breaks, the second line, the third line. The second stanza starts. \stopbuffer \setupdelimitedtext[Poe][ rightmargin=\Poeminset, leftmargin={\dimexpr\Poemindent+\Poeminset\relax}, before={\setuplines[ before=, inbetween={\blank[small]}, after=, ] \startlines \setupindenting[-\Poemindent,yes] \startparagraph}, after=\stopparagraph \stoplines, ] \starttext \startparagraph Here comes a poem – watch the lines break! \stopparagraph \startPoe \inlinebuffer[Poem] \stopPoe \startparagraph Now, it is gone. Good-bye. \stopparagraph \stoptext -- Rik ___ 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] startlines with long lines that break and indent
Hi all, I am looking for a way to make startstoplines likes this: This is a long line that breaks, the second line, the third line. So if a line in the poem is too long it shall break and indent. TIA juh ___ 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] Errors in source files return success
On Thu, 18 Nov 2021 19:27:25 +0100 Marco Patzer via ntg-context wrote: > Is there a way to return failure if *any* error is encountered or > do they need to be enabled each individually? A solution is to use patterns (supported in the upcoming upload): \enabledirectives [logs.errors=*] Alternatively use a compile-time switch: context --errors='*' This will make the return value reflect the presence of an error. Further reading: https://wiki.contextgarden.net/Running_ConTeXt#--errors 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 ___
Re: [NTG-context] Contextual removal of some ligatures using fonts.handlers.otf.addfeature (LuaTeX 1.13.2)
On 12/25/2021 11:52 PM, Thomas Savary via ntg-context wrote: Hi Bruce and Hans ! Thank you very much for your answers, that helped me a lot. In fact, though I would love to switch to ConTeXt one day, I am still using LuaLaTeX — I am a slow learner and I know it will take me months to be able to achieve what I need for my job with ConTeXt and can do with LuaLaTeX and the Memoir class for the time being (despite sometimes being irritated by LaTeX limitations or oddities). keep in mind that context font handling and latex font handling can differ (and not all that is possible in context is in the generic font loader code); also, in (esp in lmtx) some solutions are not bound to fonts I need the EB Garamond variable font for future jobs, but this font, provided by Google Fonts, is such a mess : kerning problems, unusable OpenType features that have to be rewritten from scratch, shifts in glyphs table… For sure, the original font by Georg Duffner was much better, but I need the variable version. Lots of fixing necessary, but thanks to fonts.handlers.otf.addfeature I have almost succeeded to make it a usable Garamond. a probably more reliable solution is to 'remove bad stuff' from the loaded font by running over the features and removing bad matches (which is less sensitive for order) Of course, it would be best to help Google improving this font, but I don’t have time yet. is that really a google font? afaik it doesn't originate there (unless it among those things that google grabs - and at some point possible discards) The actual problem was with the italic ligatures "a_s", "e_s", "é_s", "i_s" and "u_s", that should occur only at the end of words and not everywhere. Instead of removing the unwanted ligatures, I chose another way as soon as I understood how to fully use “current” to describe not only a single glyph, but a string if necessary — for instance, current={ { "a", "e", "eacute", "i", "u"}, {"s"} } ok, good that you got it working 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 ___