[luatex] tex.hashtokens documentation

Hans Hagen pragma at wxs.nl
Thu Jan 12 16:21:30 CET 2017


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.

the next version will return indexed tables for tex.primitives, 
tex.extraprimities and tex,hashtokens (and one can use token.create to
expand the names to property tables)

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
-----------------------------------------------------------------


More information about the luatex mailing list