[NTG-context] Bug in lmt_arrow
Hi, There is a bug in lmt_arrow. If given a "non-cycle" path, lmt_arrow completes the cycle. \starttext \startMPcode newpath p; ahfactor := 5; p := origin .. (1cm, 1cm) .. (2cm, 0); draw lmt_arrow [ path = p, location = "percentage", percentage = 50, alternative = "curved", ] withpen pencircle scaled 1bp; \stopMPcode \stoptext With 2021.11.11, I get the attached file. Note that lmt_arrow has drawn the "cycle" version of the path, even though p does not have a cycle. I have looked at the code and cannot figure out why this is happening. Thanks, Aditya test.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] minimum working example plus (output)
Here is the minium not-working example which I took from the Wikigarden a few minutes ago. \def\T#1{% \startitemize[#1,joinedup] \item This is a bullet of type #1. \stopitemize } \starttext \dorecurse{9}{\T\recurselevel} \stoptext Compiling this into a pdf file with context produces an error. I've pasted the complete context typesetting run to show the error, in hopes that it will shed some light on what's wrong with my setup. I have a feeling that the stand along install is missing some vital part of the installation regarding fonts, and that it's not noticed by the majority of you since those items are still on your system from legacy versions. Regards - * OS: ubuntu 20.04.3 LTS * Context current version: 2021.11.13 20:36 $ context bullet-style-example-iteration.lmtx resolvers | formats | executing runner 'run luametatex format': /opt/context-lmtx/tex/texmf-linux-64/bin/luametatex --jobname="./bullet-style-example-iteration.lmtx" --fmt=/opt/context-lmtx/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/opt/context-lmtx/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui --c:currentrun=1 --c:fulljobname="./bullet-style-example-iteration.lmtx" --c:input="./bullet-style-example-iteration.lmtx" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/opt/context-lmtx/tex/texmf-linux-64/bin" system > callbacks > not registering frozen 'local_box_filter' system > system > ConTeXt ver: 2021.11.13 20:36 LMTX fmt: 2021.11.13 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/opt/context-lmtx/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 1, order 1, name '/opt/context-lmtx/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './bullet-style-example-iteration', input './bullet-style-example-iteration.lmtx', result './bullet-style-example-iteration' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './bullet-style-example-iteration.lmtx' fonts > preloading latin modern fonts (second stage) fonts > defining > font with asked name 'lmroman12-regular' is not found using lookup 'file' fonts > defining > unable to define 'lmroman12-regular' as 'modern-designsize-12pt-rm-tf-0--0' fonts > defining > forced type 'otf' of 'latinmodern-math-regular' not found fonts > defining > unable to define 'latinmodern-math-regular.otf' as 'modern-designsize-12pt-mm-mr--3' fonts > defining > unable to define 'latinmodern-math-regular.otf' as 'modern-designsize-12pt-mm-mr--2' fonts > defining > unable to define 'latinmodern-math-regular.otf' as 'modern-designsize-12pt-mm-mr--1' fonts > defining > unable to define 'latinmodern-math-regular.otf' as 'modern-designsize-12pt-mm-mb--3' fonts > defining > unable to define 'latinmodern-math-regular.otf' as 'modern-designsize-12pt-mm-mb--2' fonts > defining > unable to define 'latinmodern-math-regular.otf' as 'modern-designsize-12pt-mm-mb--1' fonts > 'fallback modern-designsize rm 12pt' is loaded tex error > tex error on line 9 in file ./bullet-style-example-iteration.lmtx: \textfont0 is undefined in (text) char, font id 0, character 63) \textormathchar ...ar \scratchcounter \else \ifconditional \prefermathovertextchar \setfontid \fontid \textfont \c_font_fam_mr \fi \iffontchar \font \scratchcounter \char \scratchcounter \else \normalstartimath \char \scratchcounter \normalstopimath \fi \fi \endg ... \symb_place_indeed #1->\settrue \c_symb_found \begingroup \the \everysymbol \csname \??symbol #1\endcsname \relax \endgroup \symb_place_retry #1->\ifcsname \??symbol :#1\endcsname \symb_place_indeed {:#1} \else #1\fi \currentsymbol \setfalse \c_symb_found \the \t_symb_setups \ifconditional \c_symb_found \else \symb_place_retry \currentsymbol \fi \symb_place_argument #1->\dontleavehmode \edef \currentsymbol {#1}\ifcsname \??symbol \currentsymbolset :#1\endcsname \symb_place_indeed {\currentsymbolset :#1}\else \symb_place_normal \fi \symb_place_indeed #1->\settrue \c_symb_found \begingroup \the \everysymbol \csname \??symbol #1\endcsname \relax \endgroup ... \dorecurse{9}{\T\recurselevel} 1 2 \def\T#1{% 3 \startitemize[#1,joinedup] 4 \item This is a bullet of type #1. 5 \stopitemize 6 } 7 8 \starttext 9 >>\dorecurse{9}{\T\recurselevel} 10 \stoptext "Somewhere in the math formula just ended, you used the stated character from an undefined font
Re: [NTG-context] LMTX error processing Adobe Arabic Naskh font
Problems I and II are apparently solved in the latest update. As for III, the following works: \definefont[ARABICFONT][file:almfixed.otf*arabic at 28pt] \noheaderandfooterlines \setupwhitespace[big] % \starttext \startTEXpage[offset=1ex] % \setupdirections[bidi=global,method=one] \righttoleft % \setupalign[r2l] % \dontleavehmode \setupalign[r2l] \ARABICFONT \utfchar{"062E}\utfchar{"064E}\utfchar{"200D} \stopTEXpage % \stoptext As Hans explained off-list, TEXpage interacts with hmode and vmode in ways that may appear unpredictable in some circumstances. In this case the circumstance is % \setupdirections[bidi=global,method=one] Uncommenting this line will bring the bidi issue back, but it's not needed for the desired result. Best wishes Idris On Wed, 10 Nov 2021 09:00:26 -0700, Idris Samawi Hamid ادريس سماوي حامد via ntg-context wrote: Dear Hans and gang, Consider the following MWE: == \definefont[ARABICFONT][file:Adobe_Naskh.ttf*arabic at 28pt] % \definefont[ARABICFONT][file:Amiri-Regular_0.ttf*arabic at 28pt] % \definefont[ARABICFONT][file:Scheherazade-Regular.ttf*arabic at 28pt] % \definefont[ARABICFONT][file:UthmanTN1_Ver10.otf*arabic at 28pt] % \definefont[ARABICFONT][file:almfixed.otf*arabic at 28pt] \disabledirectives[filters.utf.reorder] \noheaderandfooterlines \setupwhitespace[big] % \setupinterlinespace[line=4.2ex] \starttext % \startTEXpage[offset=1ex] \setupdirections[bidi=global,method=one] \righttoleft \ARABICFONT خَ % a خَل % \stopTEXpage \stoptext == Three bugs: I. If we use start|stoptex and comment start|stopTeXpage, then both lines 19 and 21 give an error: === tex error > tex error on line 20 in file ./test.tex: lua error: callback error: [string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to index a number value (local 'chainstep') stack traceback: [string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in upvalue 'chainrun' [string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in function <[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514> (...tail calls...) [string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in upvalue 'chainrun' [string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in local 'handler' [string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in field '?' ...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in upvalue 'nodes_handlers_characters' [string "local tonut = nodes.tonut..."]:23: in function <[string "local tonut = nodes.tonut..."]:12> (...tail calls...) 10 \setupwhitespace[big] 11 % \setupinterlinespace[line=4.2ex] 12 13 \starttext 14 % \startTEXpage[offset=1ex] 15 \setupdirections[bidi=global,method=one] 16 \righttoleft 17 \ARABICFONT 18 19 خَ 20 >> 21 خَل 22 23 % \stopTEXpage 24 \stoptext === Comment line 19 and yu will get virtually the same error. II. Using start|stopTeXpage, only line 21 gives the error: === tex error > tex error on line 22 in file ./test.tex: lua error: callback error: [string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to index a number value (local 'chainstep') stack traceback: [string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in upvalue 'chainrun' [string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in function <[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514> (...tail calls...) [string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in upvalue 'chainrun' [string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in local 'handler' [string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in field '?' ...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in upvalue 'nodes_handlers_characters' [string "local tonut = nodes.tonut..."]:23: in function <[string "local tonut = nodes.tonut..."]:12> (...tail calls...) 12 13 % \starttext 14 \startTEXpage[offset=1ex] 15 \setupdirections[bidi=global,method=one] 16 \righttoleft 17 \ARABICFONT 18 19 خَ % a 20 21 خَل 22 >> 23 \stopTEXpage 24 % \stoptext === III Let us switch to almfixed: If you comment line 21 and use only line 19, then there is no tex error, but the result is rendered incorrectly - see test-broken.pdf. For the correct result, see test-correct.pdf (add a space and any letter - uncomment the end of line 19). Adobe Naskh is not publicly available. The four commented fonts are publicly available and generate no tex errors. Best wishes Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512 ___ If your question is of interest to others as
[NTG-context] new upload
Hi, I uploaded a new lmtx versions. It mostly concerns new math lfg file functionality (and control) that Mikael Sundqvist and I are currently working on so there might be subtle differences in math, which is, unless there are bugs, intentional and for the best. At some point there will be additional test files in the distribution and a chapter on fonts in the math manual (the deadline is next years ctx meeting). If you have wishes wrt fonts you can tell us and we'll take them into account (if possible) but we need proper (real) minimal examples, and not for only one font as we're looking at: cambria (the reference font, very little tweaking needed) modern (which has some properties different from other gyre fonts) modernlatin (the boldened aka bachotex version) dejavu (a gyre font but different from other gyre fonts) pagella (a gyre font, all have subtle differences) schola (a gyre font, all have subtle differences) termes (a gyre font, all have subtle differences) bonum (a gyre font, all have subtle differences) lucida (commercial but rather cheap from tug) xits(is that one still used?) libertinus (a mixed bag) stix-two(a mixed bag) asana (we might drop it because of quality reasons) ebgaramond (this one is quite cambria conforming) minion (tricky because commercial and not generally available) Maybe later the newlatin modern will get a lfg too but it's beta and we 'modernlatin' anyway which uses our normal lm lgf file as it's A runtime derived font and therefore fully compatible. The bold (heavy) math fonts also are dealt with automagically. For practical reasons we might freeze fonts in the distribution and only update when explicitly checked for changes (and/or I might cook up version support in the lfg file assuming version checking is doable as often version strings are somewhat messy). We're not that bound to conventions (in the perspective of tex usage) and can "fix" them once and for all (read: we can divert from how these fonts are currently tuned for usage and expectations in e.g. latex and plain tex) so feel free to suggest esthetical pleasing options. If needed we can add variants (for which we can extend the lfg format). We also have plenty of yet unused (detailed) control in the engine. We can for instance have specific parameter sets / finetuning defined in the lfg files too but I don't know how useful and in demand that is (Mikael is looking into that). (I'm sure Aditya has some wishes. We'll deal with Euler later as that's a virtual mix and virtual opentype might be redone later because we can simply matters a bit due to the fact that we have some more and better trickery wrt virtual fonts now.) More in due time (as it's a tedious and somewhat boring job that demands lots of testing and investigation), 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 ___