This came up while trying to answer another question, and concerns tex.hashtokens() in LuaTeX. Consider the following document:
\documentclass{beamer}
\begin{document}
\message{The meaning of (\string\beamertemplatenavigationsymbolsempty) is (\meaning\beamertemplatenavigationsymbolsempty)}
\directlua{
for i,v in pairs(tex.hashtokens()) do
if v:find('beamertemplatenavigation') then
print('found:', v)
end
end
}
\message{The meaning of (\string\beamertemplatenavigationsymbolsempty) is still (\meaning\beamertemplatenavigationsymbolsempty)}
\end{document}
When run with lualatex on my system (“This is LuaHBTeX, Version 1.12.0 (TeX Live 2020)”), this prints (with a newline I added for clarity):
The meaning of (\beamertemplatenavigationsymbolsempty) is (macro:->\setbeamertemplate {navigation symbols}{})
found: beamertemplatenavigationsymbolsvertical
found: beamertemplatenavigationsymbolshorizontal
The meaning of (\beamertemplatenavigationsymbolsempty) is still (macro:->\setbeamertemplate {navigation symbols}{})
The macro \beamertemplatenavigationsymbolsempty clearly exists, so why doesn't the Lua code find it? Have I misunderstood something?
I get similar results with MiKTeX 20.11.
hash_extra=0 lualatex foo.tex, and it seems to show all entries now.) – ShreevatsaR Dec 11 '20 at 17:41