[luatex] Getting all symbols

Reinhard Kotucha reinhard.kotucha at web.de
Tue Jun 12 22:45:00 CEST 2012


On 2012-06-12 at 16:29:09 +0200, Sensei wrote:

 > On 6/12/12 11:48am, Ulrike Fischer wrote:
 > > The thread starts here
 > > http://tug.org/mailman/htdig/luatex/2011-July/003115.html
 > >
 > > And Hans answer is here
 > > http://tug.org/mailman/htdig/luatex/2011-July/003125.html
 > >
 > >
 > > If I process the following document with
 > >
 > > "lualatex test>  output.txt"
 > >
 > > I get a list of about 3500 commands in output.txt
 > >
 > > \documentclass{article}
 > >
 > > \begin{document}
 > > \directlua{
 > >   for name in pairs(tex.hashtokens()) do
 > >       print(name)
 > >   end}
 > > \end{document}
 > >
 > > Addings fontspec leds to 14.000 commands.
 > 
 > 
 > Thanks for the info!
 > 
 > I am puzzled by the output, though. When I dump the contents to a file, 
 > with the following:
 > 
 > \documentclass{article}
 > 
 > \begin{document}
 > \directlua{
 >   local f = io.open("hash.txt", "w")
 >   for name in pairs(tex.hashtokens()) do
 >       f:write(name .. ";;;;")
 >   end
 >   f:close()}
 > \end{document}
 > 
 > 
 > 
 > I can't open it with ease with a text editor: it complains it has a 
 > corrupt UTF-8 enconding. 

When I run Ulrike's example with plain TeX, I get two lines containing
the byte sequence EF BF BF, which is probably the culprit.

It certainly doesn't come from plain.tex, but maybe from hyphenation
pattern loading.  Or it's used by TeX internally.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the luatex mailing list