7 ms·
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
by hfkwer 3y ago
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#examples 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.
- fabiensanglard 3y agoI have written three books in Latex and I also hate it. I am thinking of a fourth one but I don't think I can take another of these night trying to figure out why the lines in a table don't connect. At this point I will try anything else.
- chungy 3y ago> I've started writing stuff with msword and I honestly like it better. Give TeXmacs a try. You don't need to suffer between Word and LaTeX :)
- hfkwer 3y agoThe appeal of word isn't the WYSIWYG aspect. It's that... it. just. works. You want a table? There's only one way to make a table, and it works. You want to insert an image? It f*cking works. You want to format running headers a certain way? Believe it or not, it works! No weird incompatibilities between packages. No delving through the depth of 1990-era latex library code to figure out where the weird space comes from. Everything just works! And there's documentation online! Written for humans! Trust me, writing code is not the issue with latex. I've written C++ code for embedded MCUs. I've taught python to undergrads. The pain does not even compare.
- chungy 3y agoThe disadvantage of Word is that it has absolutely terrible output and quite a lot of use cases are hard or impossible to use in it. Don't let the name fool you. TeXmacs won't make you write (La)TeX. You'll get tables that work, images that work, hyperlinks that work, running headers that work, math that works, kerning that words, hyphenation and justification that work. (From math forward are major failure points in Word)
- eldaisfish 3y ago>The disadvantage of Word is that it has absolutely terrible output This is a moot point if most people are reluctant to pick up latex and those who do are greeted by often unreadable, esoteric code that produces error messages such as "badness". This is the problem with latex and its derivatives, not their output.
- chungy 3y agoTeXmacs isn't a derivative of LaTeX. It has an unfortunate name. It is a WYSIWYG editor that produces comparable output. It does support some subset of (La)TeX backslash commands as convenience, but requires none of them. Basically you get all the advantages of Word, all the advantages of (La)TeX, and none of the disadvantages of either.
- MayeulC 3y agoOh, I'm with you on a lot of things here, and I've just typeset my PhD manuscript with it, being a longtime (10 years) user. 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.
- bee_rider 3y agoThe only thing I really don’t like about LaTeX is the slow compilations, which could I guess be solved by caching or breaking up my file. OTOH, I’m of sure to what extent this slow compilation is actually just a symptom of something bad in the language. I’ve included a bunch of packages in my file, which probably slow down compilation, due to the fact that they have to deal with ancient cruft.
- chaxor 3y agoThere's a modern way of doing things now that's much simpler. Just use markdown, and then convert to PDF with pandoc. Oh, right, you want to be able to comment on it in a nice way, and not everyone in the group is super familiar with git, so you can just use a self hosted overleaf for the comments. Oh, that's actually for latex, so just use markdown->latex->pdf, and now everyone can comment easily. Oh shoot, nevermind, the latex comments aren't the original source, so the comments won't sync right. Easy, just make a custom script to make the comments as part of a git commit to the repo with the markdown, in a format that can re-apply the comments when they're pulled and synced with the latex. Sure, that will work :/. You want easy version control of image placement too? No problem, markdown can work with css as well, so just add that into your markdown file wherever needed. This is so much easier, right? Right?
- thangalin 3y agoMy Typesetting Markdown series goes into creating a number of scripts that use pandoc, knitr, and a YAML interpolator to do just that: https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-part-1/ https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdow... Later, I wrote KeenWrite, which is both a GUI and command-line application for converting Markdown documents to PDF. KeenWrite separates the content layer from the presentation layer and uses ConTeXt to do so. I've tried to keep my software backwards compatible with pandoc. https://github.com/DaveJarvis/keenwrite https://github.com/DaveJarvis/keenwrite
- bobbylarrybobby 3y agoHa, glad to see I'm not the only one. LaTeX math is great, the rest should be thrown out. Something like Asciidoctor is perfectly fine for creating “serious” documents and supports LaTeX.
- diarrhea 3y agoGreat rant, and on the money. Made my day! Thank you.
- SantalBlush 3y agoI may be crazy, but I would love a functional language that compiles to LaTeX, BibTeX, and pgfplots--like the Elm language, but for typesetting. At least that way, once a document compiles, we could get some guarantees about its behavior, no matter what data we feed to it. Overflows would be handled however we define them, and the document would still produce something. The reason I say this is because every document I produce in the TeX family needs to be tweaked slightly depending on the text and data I compile with it, or else it either won't compile or something will get visually screwed up. At least with strong typing I can get useful error messages and better control of the behavior throughout the whole document.
- WillAdams 3y agoIt's an interesting idea --- fundamentally a typeset document is nothing but nested key value pairs where there are: - tags/formatting large --> small, document --> paragraph --> character-level - content which is tagged I find that if one just finds all the "right" packages and uses appropriate markup it mostly "just works", if one then adds a pair of packages: - one which defines all the additional markup beyond the initial author markup as empty commands - a second which redefines all those commands to achieve the formatting
- coliveira 3y agoLatex doesn't require you to learn how to multiply two lengths! The beauty of LaTex is that it makes the simple things easy and hard things possible. If you don't like programming in TeX, great, just use a package that does what you want or use the defaults of the language. People who really care about the fine details of how the document looks can count on the TeX engine to do that (after reading Knuth's book). Everybody else can still take advantage of the great quality of the results.
- IshKebab 3y agoI would try Lyx. No need to deal with Latex errors and its equation editor is actually worth using (unlike literally every other equation editor). TeXmacs is another option. No idea if it's any good - I always ignored it based on the name because it sounds like some kind of Emacs based Latex editor but it's actually nothing to do with Emacs and not based on Latex. Terrible name. Might be good though.
- esalman 3y agoWhile we're at it let's stop using PDF files too /s
- nequo 3y agoThere's a variant of arXiv.org called ar5iv.org which renders papers in HTML5 instead of PDF. It is very handy when reading papers in a browser and it is generated from the same LaTeX files. You just need to replace the "x" with "5" in the URL: https://arxiv.org/abs/1807.11408 https://arxiv.org/abs/1807.11408 https://ar5iv.org/abs/1807.11408 https://ar5iv.org/abs/1807.11408
- esalman 3y agoNice, thanks. I knew of arxiv vanity as well- https://www.arxiv-vanity.com/papers/1708.06733/ https://www.arxiv-vanity.com/papers/1708.06733/
- kaba0 3y agoWhy would I want completely broken layouting instead of artfully crafted one? PDF does its job absolutely well, sure it won’t accommodate to your screen but there is no automatic way of laying out the content in a way that it makes sense both semantically, and from a design perspective. That figure 10 pages down is completely useless, I want to see it when it is referenced in the text. I really have a hard time reading anything that requires more formatting that a novel in anything else than properly rendered PDF.
- nequo 3y agoI don't really understand. Which figure is 10 pages down in the example that I linked?
- hfkwer 3y agoNot sure why you're being sarcastic. PDF is terrible for anything other than printing documents.
- 3y ago
- kaba0 3y agoYou might like Typst. It is a new language, new tooling that actually learned its lessons, and while its community won’t magically replace all the cruft that came from the LaTeX world overnight, I think it might have already managed to get a critical mass and it can be the next chapter of scientific papers (among other use cases)
- pjmlp 3y agoWhen I was into my UNIX phase, I was deep into LaTeX, wrote several assignments in it, including my graduation project reports and thesis. Nowadays, I rather use a WYSIWYG editor, even if it takes a bit longer to type equations (when needed).