From: Max Chernoff via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Max Chernoff <mseven@telus.net>
Subject: LuaMetaTeX insert nodes patch
Date: Fri, 16 Sep 2022 17:39:28 -0600 [thread overview]
Message-ID: <dbbd150a6d81a150236749cf5edce41e5b03fa78.camel@telus.net> (raw)
Hi Hans,
I see that you've released the LuaMetaTeX source code, yay! I'm really
impressed with how easy it is to build, and with how quickly it builds.
Can you please apply this patch to the LuaMetaTeX source code:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git source/lua/lmtnodelib.c source/lua/lmtnodelib.c
index ff98a70..1aade86 100644
--- source/lua/lmtnodelib.c
+++ source/lua/lmtnodelib.c
@@ -6557,10 +6557,7 @@ static int nodelib_common_getfield(lua_State *L, int direct, halfword n)
break;
case insert_node:
if (lua_key_eq(s, index)) {
- halfword index = lmt_tohalfword(L, 3);
- if (tex_valid_insert_id(index)) {
- insert_index(n) = index;
- }
+ lua_pushinteger(L, insert_index(n));
} else if (lua_key_eq(s, cost)) {
lua_pushinteger(L, insert_float_cost(n));
} else if (lua_key_eq(s, depth)) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This should fix the following minimal example:
\startluacode
local insert = node.new "insert"
insert.index = 4
print(insert.index)
\stopluacode
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-09-16 23:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=dbbd150a6d81a150236749cf5edce41e5b03fa78.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).