From: Max Chernoff via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Max Chernoff <mseven@telus.net>
Subject: Re: Callbacks (and nodes) in LuaMetaTeX
Date: Wed, 25 May 2022 04:07:53 -0600 [thread overview]
Message-ID: <8a20b158-5948-c86d-ea36-e0542173b273@telus.net> (raw)
In-Reply-To: <07198d83-401b-6db6-a0c0-103246b18d93@telus.net>
Hi list,
I haven't had any luck solving any of the issues from my previous email:
[NTG-context] Callbacks in LuaMetaTeX
https://mailman.ntg.nl/pipermail/ntg-context/2022/105566.html
Admittedly, my problems are fairly obscure (and likely self-inflicted),
but any suggestions would be greatly appreciated. I've updated my
ConTeXt installation to the latest version (mkxl 2022.05.11 11:36), but
this doesn't seem to have changed anything.
Further to the previous email, I have one (semi-related) additional
question:
6. The LuaTeX manual says that the subtype of "ins" nodes is a number
corresponding to the insert class. This appears to work correctly.
The LuaMetaTeX manual says the same thing about "insert" nodes;
however, the subtype of "insert" nodes appears to always be zero.
Using this code:
\startluacode
local traverse_id = node.traverse_id or node.traverseid
local insert = node.id"insert" or node.id"ins"
function test(head)
for n in traverse_id(insert, head) do
inspect(n)
print(n.subtype)
end
return head
end
nodes.tasks.appendaction("finalizers", "after", "test")
\stopluacode
\starttext
One \footnote{Two} \insert123{Three} Four.
\stoptext
In MkIV I get:
<node 1048 < 1842 > 1917 : ins 132>={
["attr"]="<list>",
["cost"]=0,
["depth"]=221327,
["head"]="<list>",
["height"]=790454,
["next"]="<node 1848 < 1917 > nil : ins 123>",
["prev"]="<node 1989 < 1048 > 1842 : hlist 1>",
["subtype"]=132,
["type"]="ins",
}
132
<node 1848 < 1917 > nil : ins 123>={
["attr"]="<list>",
["cost"]=0,
["depth"]=1073741823,
["head"]="<list>",
["height"]=553344,
["prev"]="<node 1074 < 1848 > 1923 : glue 13>",
["subtype"]=123,
["type"]="ins",
}
123
but in MkXL I get:
<node : 3370 <= 3238 => 3385 : insert 0>={
["attr"]="<attribute>",
["depth"]=221327,
["height"]=790454,
["id"]="insert",
["list"]="<node : nil <= 2573 => nil : hlist line>",
["next"]="<node>",
}
0
<node : 3238 <= 3385 => nil : insert 0>={
["attr"]="<attribute>",
["height"]=553344,
["id"]="insert",
["list"]="<node : nil <= 3223 => nil : hlist line>",
}
0
Is there any way to get an insert's class from its node in MkXL?
Please let me know if you have any ideas for this or any of the earlier
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 / 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
___________________________________________________________________________________
prev parent reply other threads:[~2022-05-25 10:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-02 4:08 Callbacks " Max Chernoff via ntg-context
2022-05-25 10:07 ` Max Chernoff via ntg-context [this message]
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=8a20b158-5948-c86d-ea36-e0542173b273@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).