Category LuaTeX

Creating graphics with LuaTeX nodes

Introduction In this post I’ll give a very simple example of how you can use LuaTeX’s node machinery to create graphics. The example really is very basic but, hopefully, indicates what could be achieved with more sophisticated code. I hope…

Lua code to process a LuaTeX node list

Introduction LuaTeX provides access to the deepest internal structures of the TeX engine: nodes, the fundamental building blocks created and assembled by the typesetting engine. I won’t try to explain nodes in detail here but instead refer you to an…

Hopefully useful example of \directlua{} expansion

The following example may help to understand a little more about \directlua{} expansion. \documentclass[11pt,twoside]{article} \begin{document} \def\xx{Hello} \def\yy{(} \def\zz{)} \newcommand{\hellofromTeX}[1]{ \directlua{ function Hello(str) tex.print(str) end \xx\yy#1\zz }}   \hellofromTeX{“Hello World”} \end{document} Here’s how it works. Code within \directlua{} is expanded according…

LuaTeX can connect to networks

One feature of LuaTeX which might prove useful in some circumstances is its ability to connect to networks through TCP This facility is due to the luasocket TCP/IP networking library which is built into the executable. In addition to the…