3 ms·
I agree that Lua is much easier to learn, however the kind of thing that you can do with such macros purely in Lua has limits. To do anything really important i
by coliveira 5y ago
I agree that Lua is much easier to learn, however the kind of thing that you can do with such macros purely in Lua has limits. To do anything really important in LaTeX, you have to understand the LaTeX macro system, and you also need to have at last some understanding of the TeX language. You could do such things in Lua, but in that case you'll have to interface with LaTeX anyway. So in fact you're increasing the complexity of the task, because now you need to understand LaTeX and Lua.
On the other hand, if you're just manipulating text that doesn't interface with LaTeX, then you could really do that from outside LaTeX, using any kind of script language such as python or perl. That's why I think that Lua scripting is not being used outside of some niche areas.
- leephillips 5y agoIn practice this is simply not the case. Look at my first example in the article. With just a few lines we can set a paragraph to follow the shape of any mathematical function. I didn’t have to know anything about TeX macros to do this. In fact I have no idea how to do this with LaTeX or TeX macros, and I don’t think they have nontrivial mathematical functions available. The same holds with the other examples. Almost trivial using Lua scripting (not “macros”), don’t even know where to start with TeX macros.