ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* "true" units in LuaMetaTeX
@ 2022-10-27  6:11 Max Chernoff via ntg-context
  2022-10-27  7:09 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: Max Chernoff via ntg-context @ 2022-10-27  6:11 UTC (permalink / raw)
  To: ntg-context; +Cc: Max Chernoff

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'
   
   <line 3.2> 
           \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-fleek@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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "true" units in LuaMetaTeX
  2022-10-27  6:11 "true" units in LuaMetaTeX Max Chernoff via ntg-context
@ 2022-10-27  7:09 ` Hans Hagen via ntg-context
  2022-10-27  8:22   ` Max Chernoff via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen via ntg-context @ 2022-10-27  7:09 UTC (permalink / raw)
  To: Max Chernoff via ntg-context; +Cc: Hans Hagen

On 10/27/2022 8:11 AM, Max Chernoff via ntg-context wrote:
> 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'
>     
>     <line 3.2>
>             \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?)

In a way 'true' has been dropped becauswe it doesn't do anything and I 
will likely remove that check completely (as \mag is also gone, although 
the performance hit for scanning true is neglectable in luametatex).

Anyway, I'll check it. Is anyone still using this "true" actually?

I don't check github, it's mostly there for the compile farm and 
intermediate testing (e.g. math stuff) so sending me a mail is ok. When 
there is some serious issue a mwe to the list is good enough.

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "true" units in LuaMetaTeX
  2022-10-27  7:09 ` Hans Hagen via ntg-context
@ 2022-10-27  8:22   ` Max Chernoff via ntg-context
  2022-10-27  9:09     ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: Max Chernoff via ntg-context @ 2022-10-27  8:22 UTC (permalink / raw)
  To: ntg-context; +Cc: Max Chernoff


Hi Hans,

> Anyway, I'll check it. Is anyone still using this "true" actually?

I've been playing around with LuaMetaLaTeX/LuaMetaPlain recently

   https://github.com/zauguin/luametalatex
   
and plain.tex uses truein for typesetting the footnote rule. It's trivial
to fix that specific case, but I'm finding 140 other files in TeX Live that
use the "true" dimensions, 69 of which that have been updated in the past 3
years. I doubt that anyone in ConTeXt uses the "true" dimensions though.

> I don't check github, it's mostly there for the compile farm and 
> intermediate testing (e.g. math stuff) so sending me a mail is ok. When 
> there is some serious issue a mwe to the list is good enough.

K, will do.

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "true" units in LuaMetaTeX
  2022-10-27  8:22   ` Max Chernoff via ntg-context
@ 2022-10-27  9:09     ` Hans Hagen via ntg-context
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen via ntg-context @ 2022-10-27  9:09 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 10/27/2022 10:22 AM, Max Chernoff via ntg-context wrote:
> 
> Hi Hans,
> 
>> Anyway, I'll check it. Is anyone still using this "true" actually?
> 
> I've been playing around with LuaMetaLaTeX/LuaMetaPlain recently
> 
>     https://github.com/zauguin/luametalatex
>     
> and plain.tex uses truein for typesetting the footnote rule. It's trivial
> to fix that specific case, but I'm finding 140 other files in TeX Live that
> use the "true" dimensions, 69 of which that have been updated in the past 3
> years. I doubt that anyone in ConTeXt uses the "true" dimensions though.
well, we can keep it as depricated feature (as there is no measurable 
overhead when it's not used) .. although i might come up with some plain 
mode in lmtx (when i'm really bored as it makes little sense) i'm not 
going to worry much about / cq. follow old-school usage and 
compatibility wrt dvi driver related features (i'm not even sure if 
luametatex makes sense for other macro packages but we'll see, these 
things happens outside my scope anyway)

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-27  9:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27  6:11 "true" units in LuaMetaTeX Max Chernoff via ntg-context
2022-10-27  7:09 ` Hans Hagen via ntg-context
2022-10-27  8:22   ` Max Chernoff via ntg-context
2022-10-27  9:09     ` Hans Hagen via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).