[NTG-context] "true" units in LuaMetaTeX
Hi Hans, The unit scanner in LuaMetaTeX fails for any of the "true" dimensions. With this test file: \starttext \vrule width 1truein height 1pt depth 0pt\relax \vrule width 1in height 1pt depth 0pt\relax \stoptext I get this output: tex error > tex error on line 2 in file ./lmtx-true.tex: Valid keyword expected, likely 'true' \vrule width 1truei n height 1pt depth 0pt\relax 1 \starttext 2 >> \vrule width 1truein height 1pt depth 0pt\relax 3 4 \vrule width 1in height 1pt depth 0pt\relax 5 \stoptext 6 I was able to fix this with the patch at the end of the email. (Also, how do you want patches sent? Via email to the mailing list, emailed directly to you, as a pull request on GitHub, or something else?) Thanks, -- Max -- >8 -- From 69f186daa9b3bf53697e6edf1bd9b066d64b35fe Mon Sep 17 00:00:00 2001 From: Max Chernoff <49086429+gucci-on-fl...@users.noreply.github.com> Date: Wed, 26 Oct 2022 23:45:19 -0600 Subject: [PATCH] Fix scanning of "true" units --- source/tex/texscanning.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tex/texscanning.c b/source/tex/texscanning.c index 7f78d80..98a9c41 100644 --- a/source/tex/texscanning.c +++ b/source/tex/texscanning.c @@ -2304,6 +2304,7 @@ typedef enum scanned_unit { static int tex_aux_scan_unit(halfword *num, halfword *denom, halfword *value, halfword *order) { + AGAIN: do { tex_get_x_token(); } while (cur_cmd == spacer_cmd); @@ -2327,7 +2328,6 @@ static int tex_aux_scan_unit(halfword *num, halfword *denom, halfword *value, ha goto BACK_TWO; } cur_cs = save_cur_cs; - AGAIN: switch (chrone) { case 'p': case 'P': switch (chrtwo) { -- 2.37.3 ___ 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] Missing parinitskips in \normalizelinemode=0
Hi Hans, > i'll bypass that warnign when the mode is zero I saw that you made that change in the latest upload, thanks. Unfortunately, I'm still getting the same output: luatex warning > linebreak: list seems already prepared luatex warning > linebreak: [ leftinit | rightinit | leftfill | rigthfill ] expected nil Also, what's causing me issues isn't the warning but rather that tex.linebreak is returning nil instead of an info table as the second return value. > btw, you need to work with a copy of the list Now that you point that out, I'm actually surprised that that example worked at all. The real code does use a copy of the list though (and also uses the proper callback interfaces instead of "system.callbacks. permitoverloads") 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] \autoinsertnextspace regression / discrepancy, mkiv to lmtx
On 2022-10-26 07:43, Hans Hagen via ntg-context wrote: On 10/26/2022 1:52 AM, Rik Kabel via ntg-context wrote: The following example produces different results when processed by LMTX and MkIV. In particular, a space between the X and Y is not auto-inserted by LMTX, while it is by MkIV. \starttexdefinition TEST #1 #1\autoinsertnextspace \stoptexdefinition \tt \starttext \TEST{X} \emph{Y} \stoptext The MkIV result is the correct result (in my opinion). more a side effect ... we lookahead and \emph is not some character I made a variants that does abetter job on that \starttexdefinition TEST #1 #1% \autoinsertedspace % subtle name change \stoptexdefinition but you have to wait till we update, Hans Thank you in advance for the upcoming fix. Can you tell us (me) why you chose to create a new macro, \autoinsertedspace, instead of changing the code for \autoinsertnextspace in LMTX? Do you see a circumstance under which the current LMTX behavior of \autoinsertnextspace is desirable or required? Will the new macro be available under MkIV? -- Rik ___ 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] \autoinsertnextspace regression / discrepancy, mkiv to lmtx
On 10/26/2022 1:52 AM, Rik Kabel via ntg-context wrote: The following example produces different results when processed by LMTX and MkIV. In particular, a space between the X and Y is not auto-inserted by LMTX, while it is by MkIV. \starttexdefinition TEST #1 #1\autoinsertnextspace \stoptexdefinition \tt \starttext \TEST{X} \emph{Y} \stoptext The MkIV result is the correct result (in my opinion). more a side effect ... we lookahead and \emph is not some character I made a variants that does abetter job on that \starttexdefinition TEST #1 #1% \autoinsertedspace % subtle name change \stoptexdefinition but you have to wait till we update, 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 ___