[luatex] Dimensions of subboxes
Eduardo Ochs
eduardoochs at gmail.com
Sun Apr 24 21:58:20 CEST 2022
Hi list,
I use LuaTeX a lot - I am even the author of
<http://angg.twu.net/dednat6/tug-slides.pdf>! - but I use very few of
the Lua functions that call the underlying TeX, so probably this is a
very basic question...
The code below runs
\setbox0\hbox{\hbox{$a$}\hbox{$b$}\hbox{$p$}\hbox{$q$}}
and then starts a Lua REPL:
--snip--snip--
rm -Rfv /tmp/emlua/
mkdir /tmp/emlua/
cd /tmp/emlua/
git clone https://github.com/edrx/emlua .
rm -Rfv /tmp/emlua/tex/
mkdir /tmp/emlua/tex/
cd /tmp/emlua/tex/
cp -v ../edrxlib.lua .
cp -v ../Repl1.lua .
cd /tmp/emlua/tex/
cat > a.tex <<'---'
\setbox0\hbox{\hbox{$a$}\hbox{$b$}\hbox{$p$}\hbox{$q$}}
\directlua{dofile "edrxlib.lua"}
\directlua{dofile "Repl1.lua"}
\directlua{REPL = EdrxRepl.new(); print(); REPL:repl()}
\bye
---
luatex a.tex
--snip--snip--
My question is: how do I get the dimensions of the subboxes of box0
from Lua?
Thanks in advance!
Eduardo Ochs
https://github.com/edrx/emlua#introduction
http://angg.twu.net/pict2e-lua.html
More information about the luatex
mailing list.