ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: witiko@gmail.com
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: In LuaMetaTeX, `\read` sometimes doesn't grab the entire balanced text
Date: Tue, 23 Sep 2025 09:14:14 -0000	[thread overview]
Message-ID: <175861885487.2547.5587108795209483374@cgl.ntg.nl> (raw)
In-Reply-To: <175831839816.2547.17497282640946726671@cgl.ntg.nl>

I am seeing some other issues with `\read` as well. For example, `\def\first{hello  world}` (notice the two spaces) will store 11 tokens "hello␣world" in `\first` but storing `hello  world` in a text file named `example.txt` and reading that file with `\newread\example \openin\example=example.txt \read\example to\second` in LuaMetaTeX stores 13 tokens "hello␣␣world\n" in `\second`. LuaTeX and other TeX engines would store just 12 tokens "hello␣world\n". This is less of an issue than the one described in the original post and can likely be fixed by using `\scantokens` on `\second`.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2025-09-23  9:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-19 21:46 [NTG-context] " witiko
2025-09-20 10:15 ` [NTG-context] " Hans Hagen via ntg-context
2025-09-20 10:51   ` Joseph Wright
2025-09-21 18:37     ` Hans Hagen via ntg-context
2025-09-23  9:14 ` witiko [this message]
2025-09-23  9:49   ` Hans Hagen via ntg-context
2025-09-23 10:09     ` witiko
2025-09-23 11:27       ` Hans Hagen via ntg-context
2025-09-23 11:40         ` witiko
2025-09-23 12:58           ` Hans Hagen via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=175861885487.2547.5587108795209483374@cgl.ntg.nl \
    --to=witiko@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).