Re: [NTG-context] No error when loading a non-existent module
On 8/26/2022 3:00 AM, Max Chernoff wrote: Hi Hans, On Thu, 2022-08-25 at 08:57 +0200, Hans Hagen wrote: On 8/25/2022 2:19 AM, Max Chernoff via ntg-context wrote: But ... you can already do \enabledirectives[logs.errors=*] or \enabledirectives[logs.errors=missing modules] Didn't know about that, thanks. However, this still continues processing the document and produces a PDF at the end. All that that seems to do is make ConTeXt exit with a non- zero status code, which is fairly easy to ignore if you're not paying attention. If someone doesn't pay that kind of attention one can wonder about the quality of the document. Is there a way to make this produce a nice little "error" PDF as soon as the error occurs just like using "\undefined" does? Only If I add it as option (directive driven, must find some good name for it). Most modules add commands and that shows immediately. Modules that kick in without some command that needs to enable something are sort of not-done or rare and experimental only and comparable to when some module patches or overloads core functionality withoutr mentioning it. Also, keep in mind that styles can also be modules and that normally shows in ta different output. and if needed can add that line to a local cont-loc.mkxl file so that it always kicks in. Didn't know about that either. Ah, that's one of the oldest features: cont-new (for patched before updates), cont-loc (for local preferences) and cont-exp (for wolfgang and me) But wouldn't it make sense for this to be an error by default? Nothing good can happen if a user loads a non-existent (or misspelled) module. Loading a non-existent file is a fatal error even in Plain TeX \nonstopmode. I think that making this an error by default would break very few working documents. In exchange, most users would get much more helpful error messages. It would never be default because it is quite possible to have cases where a module became redundant or is optional. There arte very few cases where we are not downward 'command and file' compatible (the most noticeable exceptions are when font, language and encoding subsystems fundamentally change). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] No error when loading a non-existent module
Hi Hans, On Thu, 2022-08-25 at 08:57 +0200, Hans Hagen wrote: > On 8/25/2022 2:19 AM, Max Chernoff via ntg-context wrote: > But ... you can already do > > \enabledirectives[logs.errors=*] > > or > > \enabledirectives[logs.errors=missing modules] Didn't know about that, thanks. However, this still continues processing the document and produces a PDF at the end. All that that seems to do is make ConTeXt exit with a non- zero status code, which is fairly easy to ignore if you're not paying attention. Is there a way to make this produce a nice little "error" PDF as soon as the error occurs just like using "\undefined" does? > and if needed can add that line to a local cont-loc.mkxl file so that it > always kicks in. Didn't know about that either. But wouldn't it make sense for this to be an error by default? Nothing good can happen if a user loads a non-existent (or misspelled) module. Loading a non-existent file is a fatal error even in Plain TeX \nonstopmode. I think that making this an error by default would break very few working documents. In exchange, most users would get much more helpful error messages. Thanks, -- Max ___ 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] String substitution using regular expressions and backreferences
I've attempted to apply Wolfgang's subtle suggestion of using Lua to parse the input document using a regular expression via lpeg.replacer. The replacement itself works fine; however, in doing so the XML document structure is converted to text, which means that it is no longer possible to "flush" the XML for further processing as XML. The result is that any unresolved XML tags are written verbatim to the PDF: https://i.stack.imgur.com/9ZFND.png There are two other issues with this approach. First is efficiency. Second is that the processing function would have to be called for every XML element to capture the replacement. My original post asked about applying regex word substitution in a ConTeXt way, such as: \definereplacement[SubstMac][ match={Mc([A-Z].*)}, replace={\Mac \\1} ] \definereplacement[SubstPostmeridian][ match={[Pp]\\.[Mm]\\.}, replace={\cap{pm}} ] That seems like the cleanest approach because it would work on top of XML or any other source document. Nevertheless, here is what I tried, which partially works: \startbuffer[main] “Mr. McAnulty, I presume?” Regular text. Irregular text. \stopbuffer \startxmlsetups xml:xhtml \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{html|p|em}{xml:*}\stopxmlsetups \startxmlsetups xml:html \startdocument \xmlflush{#1} \stopdocument\stopxmlsetups % Paragraphs are followed by a paragraph break, but only if not nested.\startxmlsetups xml:p \xmlfunction{#1}{p} \par\stopxmlsetups \startxmlsetups xml:em \dontleavehmode{\em\xmlflush{#1}}\stopxmlsetups \startluacode function xml.functions.p( t ) rep = { [1] = { "McAnulty", "\\Mac Anulty" } } x = lpeg.replacer( rep ):match( tostring( xml.text( t ) ) ) buffers.assign( "p", context( x ) ) context.getbuffer{ "p" } end\stopluacode \xmlregistersetup{xml:xhtml} \def\Mac{% % Determine the sizes of 'M' and 'c'. \newbox\MacMBox% \setbox\MacMBox\hbox{M}% \newbox\MacCBox% \setbox\MacCBox\hbox{c}% % % Cheat to dynamically derive the kerning size by putting Mc in a box. % \newbox\MacKernBox% \setbox\MacKernBox\hbox{\inframed[offset=\zeropoint, width=fit]{Mc}}% \def\MacDelta{\dimexpr\wd\MacKernBox-\wd\MacMBox-\wd\MacCBox\relax}% \def\MacUWidth{\dimexpr\wd\MacCBox-.75\MacDelta\relax}% \def\MacRule{\vrule width \MacUWidth height .04em depth \zeropoint \relax}% \def\MacKern{\dimexpr\wd\MacKernBox-\wd\MacMBox-\wd\MacCBox\relax}% \def\MacHeight{\dimexpr\ht\MacMBox-\ht\MacCBox\relax}% % % Write Mc, where c has a macron, to the document. % M{% \dontleavehmode{\raisebox{\MacHeight}\hbox{c}}% \kern-1.04\MacUWidth \MacRule \kern.08\MacUWidth }% }% \xmlprocessbuffer{main}{main}{} As shown in the screen shot, this doesn't correctly handle nested XML elements. Any ideas on what approach to take to perform a string replacement in ConTeXt? Thanks again! [Your] input is XML which means a lot more can be done than your simple TeX > based example demonstrates. > > Wolfgang > > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] CLD setupheadertexts
Hello! based on the answer Hans posted on my question how to correctly setup header texts in a ConTeXt Lua Document I added a section on the Wiki: https://wiki.contextgarden.net/CLD#Setting_up_Header_Texts Kind regards Willi > On 25 Aug 2022, at 19:45, Hans Hagen wrote: > > On 8/25/2022 7:32 PM, Willi Egger via ntg-context wrote: >> Hello! >> I have a ConTeXt Lua Document where I need to have headertexts. >> When running the enclosed file I get 6 pages where only page 1 and 2 have >> header texts and the others none. — Why is that? >> Thanks for hints! > you use a function but headertexts are not frozen which meand that you need > to do this: > > context.setupheadertexts( >{ >function() >context("\\bf") >context(monthname) >return true >end >}, >{ >function() >context(year) >return true >end >}, > { >function() >context("\\bf") >context(monthname) >return true >end >}, >{ >function() >context(year) >return true >end >} >) > > the "return true" makes sure that the function stays around > > I'm sure that you will wikify this ... > > Hans > > > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] C with macron
On 8/25/2022 8:01 PM, Pablo Rodriguez via ntg-context wrote: On 8/25/22 19:04, Hans Hagen via ntg-context wrote: On 8/25/2022 7:00 PM, Pablo Rodriguez via ntg-context wrote: On 8/24/22 21:07, Hans Hagen via ntg-context wrote: [...] just run the attached Many thanks, it works fine. the one in the update is more interesting I tried, but I get the following error: modules > 'gimmicks' is loaded fonts > 'fallback modern-designsize rm 12pt' is loaded tex error > tex error on line 24 in file ./a.tex: Undefined control sequence \undefined \MacAnulty \par 23 \definedfont[Serif*whatever] McAnulty\quad 24 >>\MacAnulty\par 25 \definedfont[SerifBold*whatever] McAnulty\quad The control sequence at the end of the top line of your error message was never \def'ed. You can just continue as I'll forget about whatever was undefined. mtx-context | fatal error: return code: 1 I don’t know what I may be missing. you need to process the module itself as it's just an examaple Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] C with macron
On 8/25/22 19:04, Hans Hagen via ntg-context wrote: > On 8/25/2022 7:00 PM, Pablo Rodriguez via ntg-context wrote: >> On 8/24/22 21:07, Hans Hagen via ntg-context wrote: >> [...] >>> just run the attached >> >> Many thanks, it works fine. > the one in the update is more interesting I tried, but I get the following error: modules > 'gimmicks' is loaded fonts > 'fallback modern-designsize rm 12pt' is loaded tex error > tex error on line 24 in file ./a.tex: Undefined control sequence \undefined \MacAnulty \par 23 \definedfont[Serif*whatever] McAnulty\quad 24 >>\MacAnulty\par 25 \definedfont[SerifBold*whatever] McAnulty\quad The control sequence at the end of the top line of your error message was never \def'ed. You can just continue as I'll forget about whatever was undefined. mtx-context | fatal error: return code: 1 I don’t know what I may be missing. 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 ___
[NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror
receiving incremental file list ./ ctan.lsr document-2.htm download-1.htm download-2.htm logo-ade.png logo-cts.png logo-pod.png rss.xml show-fil.pdf context/latest/ context/latest/cont-mpd.zip context/latest/cont-ppc.zip context/latest/cont-sci.zip context/latest/cont-tmf.zip context/latest/cont-tst.7z context/latest/cont-tst.tar.xz context/latest/cont-tst.zip sent 100,315 bytes received 18,190,130 bytes 4,064,543.33 bytes/sec total size is 445,900,461 speedup is 24.38 Running archiver: New dir: /var/www/aanhet.net/context//htdocs/archives/context-2022-08-25.20 131981901 /var/www/aanhet.net/context//htdocs/archives/context-2022-08-25.20/latest 126745317 /var/www/aanhet.net/context//htdocs/archives/context-2022-08-25.20/current 18956262 /var/www/aanhet.net/context//htdocs/archives/context-2022-08-25.20/alpha 126707516 /var/www/aanhet.net/context//htdocs/archives/context-2022-08-25.20/beta 404395092 /var/www/aanhet.net/context//htdocs/archives/context-2022-08-25.20 404395092 total ___ 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] CLD setupheadertexts
Hans! Thank you so much for your help and quick answer. Indeed now all header texts appear as expected :-) I will wikify this of course! Kind regards Willi > On 25 Aug 2022, at 19:45, Hans Hagen wrote: > > On 8/25/2022 7:32 PM, Willi Egger via ntg-context wrote: >> Hello! >> I have a ConTeXt Lua Document where I need to have headertexts. >> When running the enclosed file I get 6 pages where only page 1 and 2 have >> header texts and the others none. — Why is that? >> Thanks for hints! > you use a function but headertexts are not frozen which meand that you need > to do this: > > context.setupheadertexts( >{ >function() >context("\\bf") >context(monthname) >return true >end >}, >{ >function() >context(year) >return true >end >}, > { >function() >context("\\bf") >context(monthname) >return true >end >}, >{ >function() >context(year) >return true >end >} >) > > the "return true" makes sure that the function stays around > > I'm sure that you will wikify this ... > > Hans > > > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] faltal error: return code: 1
On 8/25/22 19:41, Hans Hagen via ntg-context wrote: > [...] > you're missing an \egroup > > \starttext > \doloopoverlist{\tf,\ss,\tt} >{\bgroup > \recursestring > \doloopoverlist{\tf,\it,\bf,\bi,\sc} >{\bgroup > \recursestring\dorecurse{26} >{\character{\recurselevel}̱ }\par > \egroup} > \egroup} > \stoptext Many thanks for your reply, Hans. I wonder whether mtxrun --script check should have spotted that. 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 ___
Re: [NTG-context] CLD setupheadertexts
On 8/25/2022 7:32 PM, Willi Egger via ntg-context wrote: Hello! I have a ConTeXt Lua Document where I need to have headertexts. When running the enclosed file I get 6 pages where only page 1 and 2 have header texts and the others none. — Why is that? Thanks for hints! you use a function but headertexts are not frozen which meand that you need to do this: context.setupheadertexts( { function() context("\\bf") context(monthname) return true end }, { function() context(year) return true end }, { function() context("\\bf") context(monthname) return true end }, { function() context(year) return true end } ) the "return true" makes sure that the function stays around I'm sure that you will wikify this ... Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] faltal error: return code: 1
On 8/25/2022 7:21 PM, Pablo Rodriguez via ntg-context wrote: Hans, using latest from today (and the previous one) with the following source: \starttext \doloopoverlist{\tf,\ss,\tt} {\bgroup\recursestring% \doloopoverlist{\tf,\it,\bf,\bi,\sc} {\bgroup\recursestring\dorecurse{26} {\character{\recurselevel}̱ }\par}\egroup} \stoptext I get the following error: mtx-context | fatal error: return code: 1 But when checking the sources, no error is found: $ mtxrun --script check test-file.tex no error Just in case it helps, creators are "LuaMetaTeX 2.10 20220818 + ConTeXt LMTX 2022.08.25 17:43". I don’t know whether I’m missing something (in that case, the error message should be more verbose). Many thanks for your help, you're missing an \egroup \starttext \doloopoverlist{\tf,\ss,\tt} {\bgroup \recursestring \doloopoverlist{\tf,\it,\bf,\bi,\sc} {\bgroup \recursestring\dorecurse{26} {\character{\recurselevel}̱ }\par \egroup} \egroup} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] CLD setupheadertexts
Hello! I have a ConTeXt Lua Document where I need to have headertexts. When running the enclosed file I get 6 pages where only page 1 and 2 have header texts and the others none. — Why is that? Thanks for hints! Kind regards Willi Test-headertexts.pdf Description: Adobe PDF document Test-headertexts.tex Description: Binary data ___ 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] metafun paralleled does not give a parallel path
On 8/25/2022 6:05 PM, Bruce Horrocks via ntg-context wrote: I'm seeing the line + arcs behaviour here. fixed in upload (we had a bug in mplib .. direction is now a primitive so that one was wrong) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] faltal error: return code: 1
Hans, using latest from today (and the previous one) with the following source: \starttext \doloopoverlist{\tf,\ss,\tt} {\bgroup\recursestring% \doloopoverlist{\tf,\it,\bf,\bi,\sc} {\bgroup\recursestring\dorecurse{26} {\character{\recurselevel}̱ }\par}\egroup} \stoptext I get the following error: mtx-context | fatal error: return code: 1 But when checking the sources, no error is found: $ mtxrun --script check test-file.tex no error Just in case it helps, creators are "LuaMetaTeX 2.10 20220818 + ConTeXt LMTX 2022.08.25 17:43". I don’t know whether I’m missing something (in that case, the error message should be more verbose). 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 ___
Re: [NTG-context] C with macron
On 8/25/2022 7:00 PM, Pablo Rodriguez via ntg-context wrote: On 8/24/22 21:07, Hans Hagen via ntg-context wrote: On 8/24/2022 8:45 PM, Pablo Rodriguez via ntg-context wrote: On 8/24/22 18:11, Thangalin via ntg-context wrote: Another nice solution, Pablo, thank you. The macron is shifted a little too far to the left I don’t know how ConTeXt handles it internally, but placement to main character differs with each letter: \starttext \doloopoverlist{\tf,\ss,\tt} {\bgroup\recursestring\doloopoverlist{\tf,\it,\bf,\bi,\sc} {\bgroup\recursestring\dorecurse{26} {\character{\recurselevel}̱ }\par}\egroup} \stoptext just run the attached Many thanks, it works fine. the one in the update is more interesting - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] C with macron
On 8/24/22 21:07, Hans Hagen via ntg-context wrote: > On 8/24/2022 8:45 PM, Pablo Rodriguez via ntg-context wrote: >> On 8/24/22 18:11, Thangalin via ntg-context wrote: >>> Another nice solution, Pablo, thank you. >>> >>> The macron is shifted a little too far to the left >> >> I don’t know how ConTeXt handles it internally, but placement to main >> character differs with each letter: >> >>\starttext >> \doloopoverlist{\tf,\ss,\tt} >>{\bgroup\recursestring\doloopoverlist{\tf,\it,\bf,\bi,\sc} >> {\bgroup\recursestring\dorecurse{26} >>{\character{\recurselevel}̱ }\par}\egroup} >>\stoptext > just run the attached Many thanks, it works fine. 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 ___
[NTG-context] new uplaod
Hi, I uploaded a new lmtx. Again some updated math of which details will be revealed later. Apart from some details we added suport for fourier notations. There are no high level definitions yet as we have to invent names but this is how it works (private unicode slots might change): \setupbodyfont[pagella] \starttext \setupmathdelimited [topoffset=.2\exheight] \definemathdelimited [fourier] [rule=no, left=\zerocount, right="FE944] \definemathdelimited [courier] [rule=no, left=\zerocount, right="FE946] \definemathdelimited [xourier] [rule=no, left=\zerocount, right="FE948] $ \fourier{(z+1)} $ $ \fourier{(z+1)} + \sqrt[2]{1}$ $ \fourier{(z+1)} + \courier{(z+1)} + \xourier{(z+1)} $ $ \fourier{\left(z+\frac12\right)} + \courier{\left(z+\frac12\right)} + \xourier{\left(z+\frac12\right)} $ $ \autofences \fourier{(z+\frac12)} + \courier{(z+\frac12)} + \xourier{(z+\frac12)} $ $ \widehat{x^2 + 2x + 2} $ \stoptext This example also shows a new \autofences feature and widehats (widetilde and widecheck also work that way) that overcome limitations in fonts, so \def\CrappyHack#1{\im{#1{a} + #1{a+b} + #1{a+b+c} + #1{a+b+c+d} + #1{a+b+c+d+e} + #1{a+b+c+d+e+f}}\par} \CrappyHack\widehat \CrappyHack\widetilde \CrappyHack\wideacute \CrappyHack\widecheck will work. For thise in finance we now have $ \annuity{x + 1} + \lannuity{x + 1} + \rannuity{x + 1} + \lrannuity{x + 1} $ these are basically radicals (like sqrt) with two sided symbols. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] metafun paralleled does not give a parallel path
I'm seeing the line + arcs behaviour here. ConTeXt ver: 2022.08.05 11:44 LMTX fmt: 2022.8.5 int: english/english > On 25 Aug 2022, at 13:03, Fabrice L via ntg-context > wrote: > > Hi, > >> Le 24 août 2022 à 22:50, fv leung via ntg-context a >> écrit : >> >> The following used to produce three parallel lines. >> Now it produces one straight line and two arcs. >> >> \starttext >> >> \startMPcode >> z0 = origin; >> z1 = 72dir(45); >> dotlabel.bot("z0", z0); >> draw z0--z1; >> draw (z0--z1) paralleled -15 withcolor red; >> draw (z0--z1) paralleled 15 withcolor blue; >> \stopMPcode >> >> \stoptext > > Your code produce three perfect parallels lines here, see attached pdf. > F. > > — 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] Cron /var/www/aanhet.net/context/bin/cron/context-mirror
receiving incremental file list ./ ctan.lsr document-2.htm download-1.htm download-2.htm logo-ade.png logo-cts.png logo-pod.png rss.xml show-fil.pdf context/latest/ context/latest/cont-mpd.zip context/latest/cont-ppc.zip context/latest/cont-sci.zip context/latest/cont-tmf.zip context/latest/cont-tst.7z context/latest/cont-tst.tar.xz context/latest/cont-tst.zip sent 100,337 bytes received 19,283,678 bytes 3,524,366.36 bytes/sec total size is 445,900,921 speedup is 23.00 Running archiver: New dir: /var/www/aanhet.net/context//htdocs/archives/context-2022-08-25.18 131981913 /var/www/aanhet.net/context//htdocs/archives/context-2022-08-25.18/latest 126745317 /var/www/aanhet.net/context//htdocs/archives/context-2022-08-25.18/current 18956262 /var/www/aanhet.net/context//htdocs/archives/context-2022-08-25.18/alpha 126707516 /var/www/aanhet.net/context//htdocs/archives/context-2022-08-25.18/beta 404395104 /var/www/aanhet.net/context//htdocs/archives/context-2022-08-25.18 404395104 total ___ 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] metafun paralleled does not give a parallel path
Hi,Le 24 août 2022 à 22:50, fv leung via ntg-contexta écrit :The following used to produce three parallel lines.Now it produces one straight line and two arcs.\starttext\startMPcode z0 = origin; z1 = 72dir(45); dotlabel.bot("z0", z0); draw z0--z1; draw (z0--z1) paralleled -15 withcolor red; draw (z0--z1) paralleled 15 withcolor blue;\stopMPcode \stoptextYour code produce three perfect parallels lines here, see attached pdf. F. parralel.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 / https://www.ntg.nl/mailman/listinfo/ntg-contextwebpage : https://www.pragma-ade.nl / http://context.aanhet.netarchive : https://bitbucket.org/phg/context-mirror/commits/wiki : https://contextgarden.net__ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Question to footnote settings
Hi all, I am struggling with the width of a footnote number area. I would like to ask how can I set it dynamically based on the width of the largest number on a given page. Without width I get two different footnote texts widths (compare #9+10). With width there is a redundant space on the left (see p. 1). (Number alignment to the right is required.) Thanks in advance for some hints. Tomáš MWE: \setupnotation[footnote][ alternative=left, width=1em, numbercommand={\hfill\high}, ] \starttext \showframe[text][text] \dorecurse{6}{This is a text.\footnote{\dorecurse{12}{Blah blah blah. }} } \page \dorecurse{6}{This is a text.\footnote{\dorecurse{12}{Blah blah blah. }} } \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] underbar aligns badly
Dear all, I fear I hit a bug or missed a change. \starttext \underbar{First line}\\ Second line. \stoptext With lmtx from 2022.07.24 the lines align fine. With current lmtx the first line has a small indent. Ciao! juh ___ 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] No error when loading a non-existent module
On 8/25/2022 2:19 AM, Max Chernoff via ntg-context wrote: Hi all, If you load a non-existent module, ConTeXt issues a minor warning, but otherwise proceeds as normal: MWE: \usemodule[doesnt-exist] \starttext Hello world! \stoptext I think that this behaviour should be changed so that a fatal error is issued when a loaded module cannot be found. Plain TeX, LaTeX, and OpTeX all throw an error whenever their versions of modules cannot be found, so ConTeXt is the odd one out here. There are 3 scenarios that I can think of for when you attempt to load a module, but it cannot be found: 1. A module provides some new command "\somecommand" In this case, loading the module will quietly fail, but an undefined control sequence error will be issued whenever you use "\somecommand". This disguises the root problem, which is that the module was never loaded, potentially confusing users. It doesn't tell you where to look unless we parse all files. 2. A module changes the layout of a document In this case, the layout of the document would be unchanged by the module. If you're looking at every document, then this would be obvious; however, if you're using some batch processing system, you could unknowingly send out incorrectly-styled documents quite easily. Ah ... but texies claim to see the difference so it's an exercise! 3. You load a module that provides some command, then never use it This is the only case where the new error would break any documents. However, this case should hopefully be pretty rare since it's pointless to load a module then never use any of its features. Indeed harmless. Making this change could potentially break some documents that currently work, but I think that this change is worth it, since I'd rather have something break loudly (throwing an error) rather than silently (producing a semi-corrupt document). But ... you can already do \enabledirectives[logs.errors=*] or \enabledirectives[logs.errors=missing modules] and if needed can add that line to a local cont-loc.mkxl file so that it always kicks in. However, more dangerous is when a user overloads a system macro so if you realy want to play safe: \enabledirectives[overloadmode=error] % or warning is yuour friend. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___