LWN: Comments on "LuaTeX comes of age" https://lwn.net/Articles/731581/ This is a special feed containing comments posted to the individual LWN article titled "LuaTeX comes of age". en-us Fri, 19 Sep 2025 15:39:06 +0000 Fri, 19 Sep 2025 15:39:06 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net LuaTeX comes of age https://lwn.net/Articles/848165/ https://lwn.net/Articles/848165/ Hybbel <div class="FormattedComment"> <font class="QuotedText">&gt; using TeX and it failed miserably - all the table packages could really deal only with simplest layouts</font><br> <p> Tables in LaTeX is still a mess. It can be seen by the number of packages that do table typesetting. Each solves a particular aspect of the madness, but there is not a single one that can be used for every occasion. tabu I think was the most advanced, but now it is not supported. Whenever the are a lot of tables, it&#x27;s always a voodoo dance.<br> </div> Thu, 04 Mar 2021 13:40:30 +0000 LuaTeX comes of age https://lwn.net/Articles/733282/ https://lwn.net/Articles/733282/ nix <div class="FormattedComment"> In a similar but inverted vein, there was PassiveTeX, because *obviously* TeX macros are the right tool to use for XSL processing.<br> </div> Fri, 08 Sep 2017 21:37:53 +0000 LuaTeX comes of age https://lwn.net/Articles/732821/ https://lwn.net/Articles/732821/ michal_h21 <div class="FormattedComment"> Yes, tex4ht uses real TeX interpreter, it only inserts html codes in some macros such as sections or lists to add some meaning to the output. It also supports conversion of generated DVI to images, which is useful for various diagrams. <br> <p> I've also created experimental project which uses Lua callbacks instead of the DVI processing, but the downside is that it doesn't support tex4ht features which requires some DVI tricks, such as the image processing or some tricks with math. <br> <p> It can be found here: <a rel="nofollow" href="https://github.com/michal-h21/lua4ht">https://github.com/michal-h21/lua4ht</a><br> </div> Mon, 04 Sep 2017 10:56:40 +0000 LuaTeX comes of age https://lwn.net/Articles/732776/ https://lwn.net/Articles/732776/ marm <div class="FormattedComment"> Please send me an e-mail to mj@ucw.cz and I will reply when it's ready.<br> </div> Sun, 03 Sep 2017 10:06:25 +0000 LuaTeX comes of age https://lwn.net/Articles/732716/ https://lwn.net/Articles/732716/ callegar If I remember correctly also tex4ht used the "real" tex interpreter. In that case there was an auxiliary program to "disassemble" the dvi stream. Being able to do the same /inside/ luatex with no external programs and working at the TeX list level seems a very nice improvement! Looking forward to try it! Sat, 02 Sep 2017 16:54:27 +0000 LuaTeX comes of age https://lwn.net/Articles/732706/ https://lwn.net/Articles/732706/ leephillips <div class="FormattedComment"> I'd be really interested in staying informed about progress on this project. Any way of doing that?<br> </div> Sat, 02 Sep 2017 13:28:12 +0000 LuaTeX comes of age https://lwn.net/Articles/732705/ https://lwn.net/Articles/732705/ marm <div class="FormattedComment"> Ad 5) I have a soon-to-be published experimental code which bends LuaTeX to produce HTML/EPUB instead of PDF. It still has a number of ugly corner cases (mostly due to limitations and bugs of EPUB readers), but overall it works quite well.<br> <p> Unlike usual TeX-to-anything convertors, it does not try to parse the source file. Instead, it lets the TeX engine interpret macros and build paragraphs and then it uses Lua code to disassemble the resulting lists and translate them to HTML.<br> </div> Sat, 02 Sep 2017 12:58:05 +0000 LuaTeX comes of age https://lwn.net/Articles/732654/ https://lwn.net/Articles/732654/ callegar <div class="FormattedComment"> Thanks for the quick and helpful answer.<br> <p> With respect to point 2) you are certainly right to say that you should select fonts that have good glyph coverage. Unfortunately, in many cases the choice is severely conditioned by other people choices and/or by the need to rely on free fonts that match sufficiently well some professional font. In these cases having partial glyph coverage is unfortunately quite frequently. I got the feeling that the ucharclasses package might help, but when I tested it did not work right. Time to test again, probably.<br> </div> Sat, 02 Sep 2017 06:48:21 +0000 LuaTeX comes of age https://lwn.net/Articles/732623/ https://lwn.net/Articles/732623/ sfeam I also have been using LuaTeX (via LyX + texlive) for a while now. I can't answer any of your questions, but at least with regard to point 2 (missing glyphs in fonts) I have had the opposite experience. In fact the reason I started using LuaTeX in the first place was that it solved a problem I had been having with xetex/pdftex that some glyphs in embedded pdf figures would disappear after processing even though the pdf figure displayed correctly when viewed on its own. For whatever reason, LuaTeX has been more successful in retrieving, converting, or whatever it does when encountering an uncommon glyph. Fri, 01 Sep 2017 16:57:55 +0000 LuaTeX comes of age https://lwn.net/Articles/732619/ https://lwn.net/Articles/732619/ leephillips <div class="FormattedComment"> Many interesting questions here. Right now I have a minute to try to reply to a few:<br> <p> 1) I've seen claims that the slowness you've discovered is mostly in the font loading routines. I think this has a good chance of being fixed some day not too far off.<br> <p> 2) If you're going to use Unicode you need to make sure that you've selected fonts that have good glyph coverage. But I think you can do what you want ("Use this font as the main font, but take the Greek characters from that font") with some fontspec commands (can be used with XeTeX as well as LuaTeX, but you may need to specify font names differently in the two cases), like:<br> <p> \newfontfamily\greekfont[Script=Greek]{fontname}<br> <p> 4) This has been improving; I think we will eventually have full microtype support in LuaTeX.<br> <p> 5) In <a href="https://lwn.net/Articles/640302/">https://lwn.net/Articles/640302/</a>, I show automated network graph layouts, which are done behind the scenes with Lua scripting. I think some of your other ideas are being worked on. These are hard problems!<br> <p> </div> Fri, 01 Sep 2017 16:29:50 +0000 LuaTeX comes of age https://lwn.net/Articles/732597/ https://lwn.net/Articles/732597/ callegar <div class="FormattedComment"> I am using it extensively, since TeXLive 2016, which I have in Ubuntu 17.04, and I am finding some minor problems not knowing whether they originate from my own ignorance or not, so I take the occasion to ask:<br> <p> 1) Slowliness. This seems to be (at least partially, but probably in a major way) dependent on the fonts being used. Conversely xetex is incredibly fast with the same fonts. Is there any fundamental reason why LuaTex cannot be speed competitive with xetex? Is the slowliness of LuaTex under consideration now that the goal of reaching function-completeness is reached? I have a feeling that being so computationally intensive, LuaTex won't find much space on cloud based LaTeX implementations such as Overleaf, Sharelatex, etc. (because the same hardware handles way less users with lualatex than with pdflatex). This could severely hinder the LuaTex acceptance.<br> <p> 2) Missing glyphs in fonts. Many widely used fonts miss some glyph sets. Typically, some popular fonts miss Greek letters, which are an important part of scientific typesetting. When using things like Word or Libreoffice, you do not even notice this fact, because the missing glyphs are seamlessly taken from other fonts. Is there a similar mechanism in LuaTex? Can I say "Use this font as the main font, but take the Greek characters from that font"?<br> <p> 3) Conversion of legacy classes to luatex. Is there some "porting" guide? I'd be delighted to see the IEEEtran class ported to lualatex.<br> <p> 4) Full microtype support. Is there some fundamental reason why some microtype features cannot be supported in LuaTex? I know that this is true for xetex, and I wonder if it is only a matter of time for microtype to catch up or if luatex misses some features that pdftex had.<br> <p> 5) "killer" luatex packages. So far, the set of packages using luatex is still very small and, most important, too thin to offer many compelling reasons for using luatex over xetex if you just seek unicode support. I wonder if luatex packages are on development for "fixing" things that so far proved too hard to address seamlessly in tex. I am thinking of things like:<br> <p> - typesetting on a grid (which improves appearance when printing on thin paper); <br> <p> - balanced colunms on the last page; <br> <p> - correct handling and ordering of wide floats in two column mode;<br> <p> - better support for multipage tables with automatically computed column widths (which incidentally would greatly benefit things like sphynx); <br> <p> - shaded/boxed text that supports page/column breaks without glitches;<br> <p> - margin comments that know how to push both the comment and the related text on the next page when the comment would come too low on the page (preferring a shorter page to a page with a broken margin paragraph)<br> <p> - frame based formatting with frames that flow one into the other;<br> <p> - figures anchored to the page with text flowing around them (which is in fact a special case of the previous point). <br> <p> For all these things (pdf)latex has some packages, but all of them have broken corner cases. The ugly of working with current latex is precisely that too often you run in some corner case causing you to spend a huge amount of time to work it around.<br> <p> I am also curious at how the luatex authors consider projects like "sile" where the premise is that "Most of the development of TeX since Knuth’s era has involved removing his early decisions and replacing them with technologies which have become the industry standard [... so that ...] the parts of TeX that people actually use are 1) the box-and-glue model, 2) the hyphenation algorithm, and 3) the line-breaking algorithm".<br> </div> Fri, 01 Sep 2017 10:34:44 +0000 LuaTeX comes of age https://lwn.net/Articles/732082/ https://lwn.net/Articles/732082/ daurnimator <div class="FormattedComment"> <font class="QuotedText">&gt; The version that I'm using returns results if I prepend "=", but not "`".</font><br> <p> Yep, sorry that's what I meant to write but got caught up in formatting.<br> </div> Sat, 26 Aug 2017 13:47:40 +0000 LuaTeX comes of age https://lwn.net/Articles/732081/ https://lwn.net/Articles/732081/ leephillips <div class="FormattedComment"> Thanks for these useful comments!<br> <p> Glad to know that 5.3 returns results in the REPL. My experiments were with 5.2.4.<br> <p> The version that I'm using returns results if I prepend "=", but not "`".<br> <p> "Concatenating in a loop in lua is bad for performance."<br> <p> True, just as in Python. I do it your way if the string will be of significant size.<br> Also, this way I could include the example without explaining tables (crucial for<br> using Lua non-trivially, but not needed for these simple examples).<br> <p> <p> </div> Sat, 26 Aug 2017 13:39:05 +0000 LuaTeX comes of age https://lwn.net/Articles/732072/ https://lwn.net/Articles/732072/ daurnimator <blockquote>Its JIT compiler and advanced garbage collection make for good performance in both time and space.</blockquote> <p>LuaJIT is a separate codebase from 'normal' (PUC-Rio) Lua.</p> <blockquote>unlike Python and Lisp, typing a something won't return its result unfortunately; you need to use the print statement.</blockquote> <p>This is only true in old lua versions 5.1 and 5.2. In 5.3 (released 2015) the output will be printed by default.</p> <p>Additionally, in lua 5.1 and 5.2 you can prefix a line in the REPL with <code>`</code> to have the result printed</p> <blockquote><code>shape = shape.." "..indent.."cm "..length.."cm"</code></blockquote> <p>Concatenating in a loop in lua is bad for performance. Consider building a table and then using <code>table.concat</code> instead. <blockquote><code>GLYPH = node.id("glyph")</code></blockquote> Make sure to use <code>local</code>! Sat, 26 Aug 2017 07:57:28 +0000 Incorrect information in LuaTeX comes of age https://lwn.net/Articles/732030/ https://lwn.net/Articles/732030/ tferro <div class="FormattedComment"> What! "C code"? It should have been written in WEB! :-)<br> <p> Damn kids are on my lawn again.....<br> </div> Fri, 25 Aug 2017 16:14:24 +0000 Small extension language https://lwn.net/Articles/731878/ https://lwn.net/Articles/731878/ canatella <div class="FormattedComment"> If you enjoy ruby, nowadays there is mruby: <a href="https://github.com/mruby/mruby">https://github.com/mruby/mruby</a> which clocs at 16610.<br> </div> Thu, 24 Aug 2017 15:08:25 +0000 Incorrect information in LuaTeX comes of age https://lwn.net/Articles/731845/ https://lwn.net/Articles/731845/ leephillips <div class="FormattedComment"> Another advantage for embedding that I didn't mention is that multiple Lua intrepreters can be run in the same process; each interpreter can run independently in a separate thread. Compare the "global interpreter lock" that exists in (most standard implementations of) Python, for example. (Comparing Python because it's also a popular language for embedding scripting when size constraints are not severe.)<br> </div> Thu, 24 Aug 2017 13:12:28 +0000 Incorrect information in LuaTeX comes of age https://lwn.net/Articles/731839/ https://lwn.net/Articles/731839/ eru <div class="FormattedComment"> That is still a quite small footprint compared to most alternatives. A few years ago, I wanted to allow user-written hooks to one (inhouse) program I am maintaining, and researched a bit the available extension languages. Of the languages I looked at, which were sufficiently capable, Lua was the only one whose implementation did not totally dwarf the original application.<br> </div> Thu, 24 Aug 2017 12:24:19 +0000 Incorrect information in LuaTeX comes of age https://lwn.net/Articles/731736/ https://lwn.net/Articles/731736/ leephillips <div class="FormattedComment"> Replying to my own comment:<br> <p> I downloaded the Lua source and used cloc (<a href="http://cloc.sourceforge.net/">http://cloc.sourceforge.net/</a>) to compile these statistics:<br> <p> The source directory contains 14585 lines of C code and (in addition) 2481 lines of comments; there are also 2010 lines of code in the C/C++ header files and 1132 lines of comments in those files.<br> <p> Thanks for your comment, which inspired me to get the accurate numbers.<br> <p> </div> Wed, 23 Aug 2017 12:48:59 +0000 Incorrect information in LuaTeX comes of age https://lwn.net/Articles/731735/ https://lwn.net/Articles/731735/ leephillips <div class="FormattedComment"> I've seen figures ranging from less than the one I quoted to more than the one you found. I guess it depends on whether you count the core language or include the standard library (and headers, comments, etc.).<br> </div> Wed, 23 Aug 2017 12:02:49 +0000 Incorrect information in LuaTeX comes of age https://lwn.net/Articles/731733/ https://lwn.net/Articles/731733/ pravinkc <div class="FormattedComment"> Lua source is 24K lines of C<br> <a href="https://www.lua.org/about.html">https://www.lua.org/about.html</a><br> </div> Wed, 23 Aug 2017 10:15:35 +0000 LuaTeX comes of age https://lwn.net/Articles/731723/ https://lwn.net/Articles/731723/ Cyberax <div class="FormattedComment"> This is seriously cool. Are there any examples of table-based data formatting with callbacks? <br> <p> About 10 years ago I tried to do huge (50-500 pages) reports using TeX and it failed miserably - all the table packages could really deal only with simplest layouts. E.g. dynamic column sizing for each page was not implemented consistently, ditto for row interleaving.<br> </div> Tue, 22 Aug 2017 23:30:31 +0000