There's an analogous situation (or a continuation of this same situation, given the overlap in user base) for those who've invested decades in building a personal set of Emacs configuration files. Again, I've got thousands of lines of *.el files (many of them devoted to my idiosyncratic use of LaTeX) in my Emacs configuration. Of projects looking to replace the aged Elisp engine and create a modern implementation aren't going to get much consideration if it would mean replacing that (literally decades of) work in a different language. That's why I continue to be interested in Guile Emacs---less because of Guile (although I have no issues replacing Elisp with a modern Scheme), but because they've always made it clear that an ability to re-use Elisp configuration files was a primary design goal.
Good thing you didn't bother, because it's absolutely not worth it. I chose LuaTeX initially precisely because it seemed more convenient to write commands in Lua than in plain LaTeX, but it turned into a total nightmare. Issues crop up as soon as you try to do something with text that embeds LaTeX macros, and the errors you get are even more byzantine than the ones you'd get by writing "normal" LaTeX code.
IMHO the very idea of embedding an external language into LaTeX is pointless, for the simple reason that LaTeX isn't markup, but code, and that it's pretty much impossible to parse it into a representation that makes sense and could be manipulated like, say, the HTML DOM. The only sane way to automate things is to write your documents in some language or markup that can be compiled to LaTeX, or to use a template engine.
The biggest thing LuaTeX gives you is variou hooks and access to various data structures used internally by the typesetting engine, so that you can work with them directly instead of having to do everything in a roundabout way through macro expansion. If all you need is text expansion then sure, just use TeX/LaTeX macros. (You mentioned "try to do something with text that embeds LaTeX macros"; I think working at the text level like that is a sign that your problem, or at least your solution, may not be a good fit for what LuaTeX gives.)
Here are a couple of my answers where LuaTeX was valuable; you can find hundreds more (IMO) by others:
- https://tex.stackexchange.com/a/379802 Avoid getting short words at line edges: Note that the macro-level solution runs into issues with \ref etc (just as you said about text that embed LaTeX macros), but the LuaTeX solution works perfectly in all cases
- https://tex.stackexchange.com/a/401315 Letter-spacing
- https://tex.stackexchange.com/a/403353 Typesetting on a poster with some image cut out
- https://tex.stackexchange.com/a/416772 Doing text replacements based on TeX macro state (maybe this could be done without LuaTeX?)
- https://tex.stackexchange.com/a/414013 Inserting random kerning
I do completely agree with your recommendation of generating TeX/LaTeX if possible (and keeping the macros/LaTeX to a minimum).
Regarding Lua, I think it is a strange idea from the point of view of the typical LaTeX package writer. Not only you need to learn Lua, but you also have to write packages that are accepted only by this implementation of LaTeX. This is a clear disadvantage if you want to have a widely used package.
Absolutely true.
I would posit that most people writing LaTeX aren't writing up papers in it either (Most journals prefer or require Word these days).
ConText isn't just for books though..it's great for any sort of thing with formatting...like, say, a resume.
what exactly do you think they're writing in it then? business cards?
as the other commenter said: publishing across math/physics/cs i have never seen a journal not prefer latex to word. and while ieee accepts word it most certainly prefers latex:
https://www.nature.com/srep/author-instructions/submission-g...
"Whilst Microsoft Word is preferred we also accept LaTeX, or PDF format."
In general Word has eaten up everything that isn't hard core math.
(PS: All the IEEE journals accept Word.
I know that for some journals (osapublishing.org, which is optics so engineering/physics) this came at a time when they moved all their content to be accessible as html. I remember reading somewhere (maybe in their style guides) that they said that word allows them to extract the relevant information more easily, so I suspect that MS made some sort of publishing toolchain for this usecase and the publishers lapped it up.
I know that a significant portion of colleagues still prefer to write their documents in latex, and the journals still accept them.
it’s probably true that most papers aren’t written in LaTeX but I’m confident most people writing in LaTeX are writing scientific papers.
> care about the technical level of its implementation
It's not about the implementation, it's about the interface.
Arxiv does of course, most notably. But it’s not a journal.
What? I have papers there and they insisted on latex.
https://www.siam.org/publications/journals/siam-journal-on-m...
> Authors of accepted papers must submit TeX files to SIAM for typesetting. Authors are highly encouraged to prepare their papers using SIAM's standard LaTeX 2e macros. Note that the SIAM office will format Plain TeX and AMSTeX files to LaTeX 2e. The LaTeX 2e macro package and documentation are available here or by email request.
Each journal I've checked on their site (admittedly, only 4 or 5) seems to mandate TeX.
E.g. https://www.siam.org/publications/journals/siam-journal-on-a...
> Authors of accepted papers must submit TeX files to SIAM for typesetting. Authors are highly encouraged to prepare their papers using SIAM's multimedia LaTeX 2e macros. Note that the SIAM office will format Plain TeX and AMSTeX files to LaTeX 2e. The LaTeX 2e macro package and documentation are available here or by email request.
TeX is still pretty darn good though.
Is it easy to convert LaTeX to ConTeXt?
(Well, technically, the same language, but imagine all the std. library functions are different).
They're also very different philosophies.
LaTeX tries to do do everything semantically, and hide the details.
CoNTeXt otoh admits that concreteness matters, so you generally say what you want. Think "empahasis" vs "bold, underlined, 15pt text".
This isn't like going from gif to png.
It's more like going from bmp to svg.
Since then LaTeX has basically kept on stagnating in the name of backwards compatibility, while ConTeXt keeps on progressing; it already broke backwards compatibility several times (it's latest implementation is called LMTX).
But the inertia is so powerful that nobody except TeX geeks even knows what ConTeXt is. How does that happen?
Sidenote: it's not just about ConTeXt, even LuaTeX, the latest (but not new anymore) implementation of TeX in general, is being ignored by scientific publishers.
Meanwhile, ConTeXt is mostly used for demanding typesetting of books.
And, BTW, using ConTeXt (or LuaTeX) doesn't even necessarily mean writing TeX anymore, it's possible to drive the engines through the Lua C API, or with XML, etc.
ConTeXt links:
https://wiki.contextgarden.net/Main_Page
https://en.wikipedia.org/wiki/ConTeXt
Mailing list: https://mailman.ntg.nl/mailman/listinfo/ntg-context