On 1/3/2017 1:53 PM, David Carlisle wrote:
9.3.11.7 tex.hashtokens

for i,v in pairs (tex.hashtokens()) do ... end

Returns a name and token table pair (see section ?? about token tables)


This (using luatex1.01 from experimental branch) appears to return
tables consisting of three integers, that is (I think) the old token
table table structure.

eg

for i,v in pairs (tex.hashtokens()) do
for ii,vv in pairs(v) do
print(i .. ': ' .. ii .. ' - ' .. vv)
end
end

produces lots of entries like

Umathbinpunctspacing: 1 - 102
Umathbinpunctspacing: 2 - 71
Umathbinpunctspacing: 3 - 14200

It's just for debugging so not sure what I should ask for, whether
tex.hashtokens() should return the (new) token structure or if the
documentation here should just say it returns a table of three
integers rather than referencing the token table.

indeed it's the old interface (but one can create a token from the name) ... maybe a flat name-only table makes more sense

Hans


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------

Reply via email to