3 ms·
For programmers today, an option to consider is to use plain TeX directly, by writing in Markdown or whatever, and generating the `.tex` file via a preprocessor
by svat 4y ago
For programmers today, an option to consider is to use plain TeX directly, by writing in Markdown or whatever, and generating the `.tex` file via a preprocessor program. After all, the facilities that LaTeX was written to provide (automatic section numbering, references, etc) can just as well (or even, more sanely) be done outside the TeX engine.
There is a catch or two:
• Writing the preprocessor will still be a bit of work — I think a promising approach is to use Pandoc, but no one has yet merged a plain TeX writer into the Pandoc repo (https://github.com/jgm/pandoc/issues/4341 https://github.com/jgm/pandoc/issues/4341 — I was briefly interested a couple of years ago, and may look into it again: it doesn't seem like a lot of work honestly).
• The main reason people use LaTeX is because of all the packages in its ecosystem that do various tweaks to the typesetting. (This is also the main problem with LaTeX: TeX itself is good; LaTeX itself is mostly fine; it's the menagerie of packages of varying quality and conflicting effects that cause all the problems that LaTeX users usually complain about.) And in the LaTeX ecosystem, there does not exist a culture of teaching how to do things without the package (just as "You might not need jQuery" is not written by the jQuery authors), so if some LaTeX package looks attractive to you, you're back to LaTeX package hell. I have some ideas here of making it easier to "steal" from a LaTeX package by showing the equivalent "generated" TeX, but they require a bit of work hacking on the TeX engine, and have never got around to it.
Anyway, in the meantime, writing in Markdown and using Pandoc to generate a LaTeX file remains a good approach IMO.