ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \Umathcodenum and get...dir in lmtx
@ 2020-05-28 14:03 Marcel Fabian Krüger
  2020-05-28 15:41 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Marcel Fabian Krüger @ 2020-05-28 14:03 UTC (permalink / raw)
  To: ConTeXt users list

Hi,

I had two issues with luametatex:

The manual documents getters and setters for the directions:

The direction states can be queried and set with:
tex.gettextdir() tex.getpardir()          tex.setmathdir(<number>)
tex.getlinedir() tex.settextdir(<number>) tex.setpardir(<number>)
tex.getmathdir() tex.setlinedir(<number>) 

While there is no problem with the set...dir commands, the get...dir
commands don't actually exists. (They can be implemented using tex.get,
but it would be nice if either they were added to luametatex or if they
were removed from te documentation to avoid confusion.)

Additionally the scanning variant of \Umathcodenum seems broken:

Take the example document

\starttext
\directlua{
  print('gettextdir:', tex.gettextdir)
}
\the\Umathcodenum`a
\stoptext

It works in ConTeXt mkiv, but in lmtx it shown a (non-informative) error:

  gettextdir:	nil

  tex error       > tex error on line 5 in file ./contfail.tex: ! This can't happen (scan char)

  l.5 \the\Umathcodenum`a
                       

  1     \starttext
  2     \directlua{
  3       print('gettextdir:', tex.gettextdir)
  4     }
  5 >>  \the\Umathcodenum`a
  6     \stoptext
  7     


  I'm broken. Please show this to someone who can fix me.


  mtx-context     | fatal error: return code: 256

(\Umathcodenum`a=123 seems to work though)

Also especially these "This can't happen" errors a a it of pain debug
without having the option to look into the source which I can't find
anywhere. Has that been released? Is it still planned to make it
available at some point?


Best regards,
Marcel Krüger
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: \Umathcodenum and get...dir in lmtx
  2020-05-28 14:03 \Umathcodenum and get...dir in lmtx Marcel Fabian Krüger
@ 2020-05-28 15:41 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2020-05-28 15:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 5/28/2020 4:03 PM, Marcel Fabian Krüger wrote:
> Hi,
> 
> I had two issues with luametatex:
> 
> The manual documents getters and setters for the directions:
> 
> The direction states can be queried and set with:
> tex.gettextdir() tex.getpardir()          tex.setmathdir(<number>)
> tex.getlinedir() tex.settextdir(<number>) tex.setpardir(<number>)
> tex.getmathdir() tex.setlinedir(<number>)
> 
> While there is no problem with the set...dir commands, the get...dir
> commands don't actually exists. (They can be implemented using tex.get,
> but it would be nice if either they were added to luametatex or if they
> were removed from te documentation to avoid confusion.)

they're cheap to add (but linedir is just text dir and boxdir can be get 
otherwise as with all these other box properties)

> Additionally the scanning variant of \Umathcodenum seems broken:
> 
> Take the example document
> 
> \starttext
> \directlua{
>    print('gettextdir:', tex.gettextdir)
> }
> \the\Umathcodenum`a
> \stoptext
> 
> It works in ConTeXt mkiv, but in lmtx it shown a (non-informative) error:
> 
>    gettextdir:	nil
> 
>    tex error       > tex error on line 5 in file ./contfail.tex: ! This can't happen (scan char)

the scanning part is ok, but the serializer ignores that one (i'll add it)

>    l.5 \the\Umathcodenum`a
>                         
> 
>    1     \starttext
>    2     \directlua{
>    3       print('gettextdir:', tex.gettextdir)
>    4     }
>    5 >>  \the\Umathcodenum`a
>    6     \stoptext
>    7
> 
> 
>    I'm broken. Please show this to someone who can fix me.
> 
> 
>    mtx-context     | fatal error: return code: 256
> 
> (\Umathcodenum`a=123 seems to work though)
> 
> Also especially these "This can't happen" errors a a it of pain debug
> without having the option to look into the source which I can't find

normally can't happens are not supposed to show up in a run as they 
indicate a not-yet-taken-care-of situation (which can happen when one 
adds a primitive)

> anywhere. Has that been released? Is it still planned to make it
> available at some point?
sure, when we have organized the repositories which is part of a larger 
reorganization effort which takes time (and motivation) which is kind of 
fuzzy this year (i originally planned early this year, then around bt, 
now we're somewhat later .. we'll see when)

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
___________________________________________________________________________________

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

end of thread, other threads:[~2020-05-28 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 14:03 \Umathcodenum and get...dir in lmtx Marcel Fabian Krüger
2020-05-28 15:41 ` Hans Hagen

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).