ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \scantokens in luametatex
@ 2020-08-13 12:31 Marcel Fabian Krüger
  2020-08-13 14:44 ` Hans Hagen
  2020-08-14 18:33 ` Marcel Fabian Krüger
  0 siblings, 2 replies; 3+ messages in thread
From: Marcel Fabian Krüger @ 2020-08-13 12:31 UTC (permalink / raw)
  To: ConTeXt users list

Hi,

in the current luametatex upload, \scantokens (and also \scantextokens)
behave odd: They seem to act like \detokenize, except that spaces get
catcode other instead of catcode space:

\starttext
\edef\abc{\scantokens{\relax}}
\abc
\edef\abc{\scantextokens{\relax}}
\abc
\stoptext

used to result in an empty output file but with luametatex, it  writes \relax \relax to the output.

\starttext
\def\showsecond#1{\show}
\edef\abc{\scantokens{a b}}
\expandafter\showsecond\abc
\edef\abc{\detokenize{a b}}
\expandafter\showsecond\abc
\stoptext

prints

> the character  
> blank space  

Best regard,
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] 3+ messages in thread

* Re: \scantokens in luametatex
  2020-08-13 12:31 \scantokens in luametatex Marcel Fabian Krüger
@ 2020-08-13 14:44 ` Hans Hagen
  2020-08-14 18:33 ` Marcel Fabian Krüger
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2020-08-13 14:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 8/13/2020 2:31 PM, Marcel Fabian Krüger wrote:

> in the current luametatex upload, \scantokens (and also \scantextokens)
> behave odd: They seem to act like \detokenize, except that spaces get
> catcode other instead of catcode space:
> 
> \starttext
> \edef\abc{\scantokens{\relax}}
> \abc
> \edef\abc{\scantextokens{\relax}}
> \abc
> \stoptext
> 
> used to result in an empty output file but with luametatex, it  writes \relax \relax to the output.
i'll look at it (i probably forget to set the catcodetable)

here is the generalized case:

     \def\foo{!}

     \edef\abc{\tokenized catcodetable \catcodetable {a\relax \foo}} \abc
     \edef\abc{\tokenized catcodetable -1            {a\relax \foo}} \abc

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] 3+ messages in thread

* Re: \scantokens in luametatex
  2020-08-13 12:31 \scantokens in luametatex Marcel Fabian Krüger
  2020-08-13 14:44 ` Hans Hagen
@ 2020-08-14 18:33 ` Marcel Fabian Krüger
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Fabian Krüger @ 2020-08-14 18:33 UTC (permalink / raw)
  To: ConTeXt users list

Thank you for fixing this!

On Thu, Aug 13, 2020 at 02:31:51PM +0200, Marcel Fabian Krüger wrote:
> Hi,
> 
> in the current luametatex upload, \scantokens (and also \scantextokens)
> behave odd: They seem to act like \detokenize, except that spaces get
> catcode other instead of catcode space:
> 
> \starttext
> \edef\abc{\scantokens{\relax}}
> \abc
> \edef\abc{\scantextokens{\relax}}
> \abc
> \stoptext
> 
> used to result in an empty output file but with luametatex, it  writes \relax \relax to the output.
> 
> \starttext
> \def\showsecond#1{\show}
> \edef\abc{\scantokens{a b}}
> \expandafter\showsecond\abc
> \edef\abc{\detokenize{a b}}
> \expandafter\showsecond\abc
> \stoptext
> 
> prints
> 
> > the character  
> > blank space  
> 
> Best regard,
> 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] 3+ messages in thread

end of thread, other threads:[~2020-08-14 18:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-13 12:31 \scantokens in luametatex Marcel Fabian Krüger
2020-08-13 14:44 ` Hans Hagen
2020-08-14 18:33 ` Marcel Fabian Krüger

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