2 ms·
You can do Lua scripting a the user level (\directlua{...}). But you have to know the Lua interface. What purpose is having Lua inside your document? Do some ca
by patrickg 16y ago
You can do Lua scripting a the user level (\directlua{...}). But you have to know the Lua interface. What purpose is having Lua inside your document? Do some calculations? Yes, that's easy. Do complex algorithms for placing floats? Then you need to replace a lot of TeX/LaTeX code anyway and then I wouldn't speak of user level. What you can do easily from inside Lua: shuffle nodes (nodelists) around. Everything you see on a page is represented by a node. So you can reposition anything. That requires a lot of knowledge of the internal representation of nodes and the LuaTeX API, but once you grok it, it is much fun to do these things.
And no, Knuth is definitely not the only one using plain TeX. Yes, it is a niche.