[luatex] math list?

Yannis Haralambous yannis.haralambous at telecom-bretagne.eu
Sun Oct 16 19:13:10 CEST 2011


Hi,

I'm using

for t in node.traverse(h) do
     texio.write_nl(string.rep("...",prof) .. 'NODE type=' ..  node.type(t.id) .. ' subtype=' .. t.subtype )
end

in the pre_linebreak_filter to display all nodes in an hlist. This works well.

My question is: how to access math lists? When there is math in my document I get only one node, of type "math" (subtype 1),
I guess that behind that node there is an mlist, but how can I traverse it?

I found the mlist_to_hlist() method, but when I do

for x in node.traverse(node.mlist_to_hlist(t,"text",true)) do
     		texio.write_nl('in MATH list ' .. string.rep("...",prof) .. 'NODE type=' ..  node.type(x.id) .. ' subtype=' .. x.subtype )
     	end

I get the following error:

! This can't happen (mlist1).
l.14 
I'm broken. Please show this to someone who can fix can fix

And even if I manage to convert the mlist into a hlist to traverse it, the question is: how do I get back to the mlist? (since I want
to replace some glyphs by others).

thanks in advance for any help…

Yannis

-- 
-------------------------------------------------------
Yannis Haralambous
Directeur d'études
Institut Télécom, Télécom Bretagne
Département Informatique
UMR CNRS 3192 Lab-STICC
Technopôle Brest Iroise
CS 83818, 29238 Brest Cedex 3, France
Tel: +33 2 29 00 14 27
Fax: +33 2 29 00 12 82
Email: yannis.haralambous at telecom-bretagne.eu
Internet: http://omega.enstb.org/yannis
ICBM address: 48°21'31.57"N 4°34'16.76"W
Twitter: y_haralambous
-------------------------------------------------------
...pour distinguer l'extérieur d'un aquarium,
mieux vaut n'être pas poisson

...the ball I threw while playing in the park
has not yet reached the ground

Es gab eine Zeit, wo ich nur ungern über Schubert sprechen,
nur Nächtens den Bäumen und Sternen von ihm vorerzählen mögen.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Yannis Haralambous.vcf
Type: text/directory
Size: 508 bytes
Desc: not available
URL: <http://tug.org/pipermail/luatex/attachments/20111016/0896bbf2/attachment.bin>
-------------- next part --------------



More information about the luatex mailing list