ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Max Chernoff via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Max Chernoff <mseven@telus.net>
Subject: Accessing inserts from Lua in LuaMetaTeX
Date: Mon, 15 Aug 2022 00:18:19 -0600	[thread overview]
Message-ID: <7f95f02c30da08b771b063440945115b93435d71.camel@telus.net> (raw)

Hi all,

I'm trying to manipulate some inserts from Lua in LuaMetaTeX, and I'm
having some problems that I'm not having with LuaTeX. 

First, how do I get an insert's class/type from the "insert" nodes on
the page? With LuaTeX, the insert's class/type is the same as the
subtype of the "ins" nodes, but the subtype of the "insert" nodes is
always zero in LuaMetaTeX, so I'm not sure how to get the class/type.

Second, how do I get the head of the insert box from Lua? With LuaTeX,
from TeX you would use "\box<class>" and from Lua you can use
"tex.box[<class>]". With LuaMetaTeX, you use "\insertbox<class>" from
TeX, but I'm not sure how to get at the insert box from Lua.

The context for both of these is that my module lua-widow-control
sometimes moves a line containing footnotes to the next page, so I need
to do some surgery to make sure that the "footnote marks" stay with the
"footnote text". This is tricky but doable with LuaTeX, but I can't seem
to get it to work with the new inserts in LuaMetaTeX, hence the above
questions.

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
___________________________________________________________________________________

             reply	other threads:[~2022-08-15  6:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15  6:18 Max Chernoff via ntg-context [this message]
2022-08-15 14:24 ` Hans Hagen via ntg-context
2022-08-16  1:56 Max Chernoff 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=7f95f02c30da08b771b063440945115b93435d71.camel@telus.net \
    --to=ntg-context@ntg.nl \
    --cc=mseven@telus.net \
    /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).