| I'm a math professor. I've written articles, books, lecture notes, exams, exercise sheets, presentations... with latex. Hell, even a custom class for a journal I participate in. I hate this language with a passion. The design choices may have made sense in the 80s when 128 kB of RAM was considered high-end, "tooling" was an unknown term, and modern parser design an academic matter. If I have to read "Runaway argument" and sift through a hundred lines of log to find an error again I will have a stroke. LaTeX3? I have great admiration for the work they've done. But they have made at least two mistakes. 1. The fundamental mistake of insisting on backwards compatibility. Latex is choke-full of historical cruft. How many times have I read things to the effect of: "Oh, you want an inline list? And you're using the inline-list package?! You poor fool! You should be using inllst3 with the xtabl option. Holy shit, you're using hyperref too?? (Spoiler alert: everyone uses fucking hyperref.) You cretin. Well, you should load these three other packages in this specific order. Then paste these esoteric commands: \makeatletter\def\tbl@lst#1{\hy@tbl\vphantom{#2}#1\strut\lbl@lst##&!@\makeatother No, I'm not going to explain what the commands do. Figure it out. Documentation? In the texbook. It's not online, you expect Knuth to work for free? Go buy it on amazon, you freeloader." Don't get me started on how to get arXiv to accept your biblatex files. Throw all this into the trash and start anew. There's no other good way forward. 2. The superficial on creating a theoretically beautiful and consistent syntax that is designed for computers, not for humans. Seriously, go to the authors' website, the "LaTeX3 examples" page https://www.alanshawn.com/tech/2020/05/25/latex-3.html#examp.... Here's how you multiply a length by a float and store it somewhere. \cs_generate_variant:Nn \fp_set:Nn {Nx}
% #1: input name
% #2: output name
% #3: factor
\cs_set:Npn \__multiply_length:NNn #1#2#3 {
\fp_set:Nx \l_tmpa_fp {\dim_to_fp:n {#1}}
\fp_set:Nx \l_tmpb_fp {\l_tmpa_fp * #3}
\dim_set:Nx \l_tmpa_dim {\fp_to_dim:n {\l_tmpb_fp}}
\dim_set_eq:NN #2 \l_tmpa_dim
}
How anyone can look at this and think "that's the proper way of doing things" is beyond me.I've started writing stuff with msword and I honestly like it better. Even UTN28 kind of makes sense. Yes, I'm expecting a fight after writing this. |
LaTeX does not feel like a programming language. It is first and foremost designed as a macro language, which is nice for writing text, not that much for implementing algorithms.
I quite like what lualatex is doing, including a lua interpreter to add some simple code to your document, and make writing packages easier. I admit I haven't used yet, being afraid of compatibility issues. I know a friend also uses a package to interoperate with python.
This doesn't completely solve my main gripes with LaTeX though, including the slow compilation speed (while 95% could be cached), and the bad error messages, as well as the brittleness of the programming part (I ended up typesetting my manuscript in 9pt because I forgot a comma after the previous documentclass argument).
And the adoption is slow, packages stick to the most compatible baseline.
Maybe the future really is to restrict LaTeX use to minor parts of the text, like Markdown (pandoc?). But there's still some value in having a plugin system that doesn't require additional dependencies.