The Lingua Franca of LaTeX (2019)

(increment.com)

27 points | by ripe 2 days ago ago

11 comments

  • kumarvvr a day ago ago

    LaTeX has a huge learning curve, and a mess of online information.

    I tried to use it to generate automated reports, and was frustrated at every turn. My usage scenario was a completely offline system to generate reports of a few dozen pages, which included graphics, tables and other visualizations.

    1. The whole system download is about 1 or more Gigs. 2. Each report is accompanied by half a dozen files. 3. The choice of packages to use, and the versons to use, is all confusing, with various books and site using various packages, often further customized. 4. The syntax is confusing and jarring, at least to me.

    Finally, I ended up using simple template tools to generate HTML with proper semantic structing and CSS print media queries to generate my reports.

    I do appreciate the fact that my requirement does not involve laying out content over multiple pages, something which LaTeX is good at. That is very difficult to achieve with HTML and CSS.

    But, for use cases where each document page is independent, HTML, CSS and print media queries are great.

    You can also use all the exciting javascript visualization libraries to generate awesome graphics.

    • volemo 18 hours ago ago

      > 1. The whole system download is about 1 or more Gigs.

      For me that’s one of the beauties of the tool: you install the 6 GB and get everything. It’s not like e.g. Rust where you get 1.2 GB of compiler and co. but then have to download more and more crates to actually do the job.

  • tnelsond4 9 hours ago ago

    I really like troff and how much lighter it is, I just wish it had proper Unicode support for obscure Asian scripts. I haven't tried latex's Unicode support, but I've used Sile and it requires some manual hacking.

  • pjmlp 18 hours ago ago

    When I was at CERN during the early 2000's, the use of LaTeX was already slowing down. On my ATLAS TDAQ/HLT section, most folks were using one of the required Word templates, or FrameMaker, only a few hardliners were still going with LaTeX.

  • dhosek a day ago ago

    The article, sadly, gives an example that completely messes up the example of LaTeX’s input formatting (sigh).

    I think the problem with a lot of would-be LaTeX successors is that they tend to miss two key things:

    1. The document markup language of LaTeX is pretty good. Yes, it’s not as lightweight as Markdown, but the cost is paid back in expressiveness.

    2. Programming the TeX engine is a mess. I’ve seen a number of people who’ve done things like translated tex.web into rust over the course of a weekend and similar such things. The problem is that the program was developed under the constraints of 1979–1982 computer hardware, when even 7-bit ASCII was not universally implemented on systems and it has a number of constraints that a modern developer would not face and design decisions that don’t make sense with modern development processes and capabilities. Too much of the system is tightly coupled with other parts so things like parsing end up being a real challenge (LaTeX, within the limitations of what was possible in the 1980s, did a decent job of trying to standardize syntax while Knuth’s original markup tended to be somewhat inscrutable to a non-technical (non-TeXnical?) person. One of the most glaring cases being the difference between, plain TeX’s \centerline{…} vs {\bf …}¹ (LaTeX 2.09 retained the plain TeX font selection commands, but LaTeX 2e regularized them with other LaTeX syntax so now you can write \textbf{…} instead of {\bf …} (also, the 2e syntax disentangled weight and shape selectors so that \textbf{\textit …}} produces bold italic while {\bf {\it …}} produces non-bold italic, but that’s a different can of worms). Add in that TeX can change its parsing rules on the fly (and not always transparently) which makes doing things like including \verb for verbatim text in the argument to another command break.²

    I think an ideal LaTeX-successor would retain the document markup language almost exactly so that a LaTeX document, at least within the \begin{document}…\end{document} section would require little or no changes to still be typeset with its successor (albeit with the likelihood of different formatting) but provide easier customization and abandon the macro-expansion language of TeX which, while it’s kind of intellectually satisfying to work with, is so unlike any other programming language that it presents an almost impassible barrier to entry.

    1. The other dramatic difference being Knuth’s preference of {1 \over 2} vs the LaTeX \frac{1}{2}. The former has the advantage of being closer to how one would read a fraction, but has the complication of requiring the enclosing braces which again creates inconsistent formatting.

    2. And to make things somewhat worse, in the years since the initial release of LaTeX2e, LaTeX has required an extended TeX engine which does allow some limited ability to do things like include a \url{…} command in the argument to another command in a way that allows the \url to include special characters, but because of the weight of backwards compatibility this feature is (a) not always consistently functional and (2) doesn’t extend to \verb and friends so those still end up complicating matters.

    • WillAdams a day ago ago

      Well, LaTeX3 was sort of what you describe, but has been dropped:

      https://www.latex-project.org/latex3/

      If nothing else, the support for Unicode via UTF-8 has been a big win, and the new programming model and Lua allow some pretty cool stuff, if I do say so myself --- I'm still impressed by Alan Xiang's solution here:

      https://tex.stackexchange.com/questions/722886/how-to-write-...

      I agree that the preamble stuff is kind of a trainwreck --- I've always held that someone needs to put together a templated version where quite a large number of options are available, but commented out, so that one could work up a version of a document by just uncommenting the appropriate lines --- it really feels like something which LyX should have done.

      The problem of course is the old greybeards are accustomed to tomes such as:

      https://ctan.math.washington.edu/tex-archive/macros/latex/co...

      • volemo 18 hours ago ago

        > Alan Xiang's solution here

        Pure witchcraft!

    • sinnsro 13 hours ago ago

      I want to think that ConTeXt is that successor. While has a slightly different markup from LaTeX but is still familiar enough, I find it typesetting/markup to be both consistent and flexible.

      It has the added bonus of being a monolithic tool —it packs everything one needs to typeset a document— but it is not as adopted as LaTeX, so there is not a lot of material on it.

    • SkiFire13 18 hours ago ago

      I have to make the mandatory mention of Typst, I found it to cover almost all the markup capabilities that Latex has, while being much more approachable, especially to programmers used to other scripting languages (e.g. Javascript).

    • BrenBarn 18 hours ago ago

      > The document markup language of LaTeX is pretty good. Yes, it’s not as lightweight as Markdown, but the cost is paid back in expressiveness.

      This is sort of true, but the huge caveat it's a very leaky abstraction. There is no LaTeX without TeX, and somebody has to drop down to the TeX level to write the LaTeX packages everyone needs. LaTeX is good if you know with absolute certainty that you have a package in hand to do everything you need to do. Every time you bump against some unexpected obstacle, you have to either pray and search for a package, or pray even more and try to cobble together a solution from existing parts.

      • WillAdams 12 hours ago ago

        Yeah, I referenced this fact in a joke ages ago:

        https://tex.stackexchange.com/a/121652/31151

        (context is, working in book composition is like to being a ``galley slave'')

        >using LaTeX, an oar is provided and there're lots of nifty customizations and improvements already available, and one can impress additional oars from CTAN, however on a semi-random basis, adding one oar will break other oars, sometimes leaving one adrift or run aground. One can enchant a set of oars to accomplish a given journey, easing the piloting requirement, and the navigation charts are decent and obstacles are fairly well-known.