5 ms·
LaTeX has a number of issues: - Compilation feels almost non-deterministic at times. You should not have to recompile your document 2 or 3 times to get the fi
by Enginerrrd 5y ago
LaTeX has a number of issues:
- Compilation feels almost non-deterministic at times. You should not have to recompile your document 2 or 3 times to get the final behavior, yet that's pretty standard practice. References / bibliographies don't work the first time through, and often you compile the bibliography separately, which is just crazy to me.
- Compilation errors are really non-helpful. In programming, if I omit one side of a bracket or parentheses somewhere, I'll almost certainly get an error with a reference to the line number right at or below the issue. GOOD LUCK finding a missing bracket in a LaTeX document based on the error messages when compilation fails.
- Lots of pretty simple behavior that really should be standardized and built in requires additional packages. The real problem comes when combining multiple packages... It's like how medications interact. It's almost hopelessly intractable to try and predict how multiple packages will interact with each other, so the way you do a simple thing in one document may change in another document depending on the combination of packages.
- >What you describe as "a complex hack of internals" is usually in practice a 30 second visit to Stack Exchange and a cut and paste.
I'm with the person you were replying to on this. There's a lot of really hacky stuff to get a result that really should have been built in. Like, a built in quote or excerpt for example, should just be a standard style like: /begin{quote} Quote \end{quote}. But instead you have to do it as a \parbox[center]{hope-you-guessed-a-good-width-mm}{Quote}.
- It's a small thing, but the way you do quotes is pretty silly. Not a fan of `` '' instead of "". If that's really how I have to do it without including additioanl packages, why not at least have a built-in like: \lquote and \rquote ?
I am normally a person that is deeply opposed to language updates, unnecessary feature updates, new frameworks, etc. But in the case of LaTeX, it's one of the most obvious examples I can think of where it's desperately needed.
- mcswell 5y ago"You should not have to recompile your document 2 or 3 times... References / bibliographies don't work the first time through..." If you think about it, you'll probably see why. Cross-references can't be set until you know what they refer to, which may be later on in the doc ("see section 8 below"), and setting such references (or citations) can change the page numbering. If the multiple passes (which are analogous to the multiple passes a compiler makes) bother you, then use a tool that hides them from your eyes, like arara. That's probably what Word does under the hood.
- colejohnson66 5y agoI think what OP is suggesting is that the multiple passes should be done by the executable itself. They shouldn’t have to be abstracted away be some other tool. TeX already does two or so passes for layout IIRC.
- DemocracyFTW 5y agoThis, totally. Nobody cares—or should be forced to care—whether a given compiler does something in a single or multiple passes, what counts is ergonomics and overall speed. FWIW when I still worked with TeX (XeLaTeX) I soon built my own wrapper for the executable that simply compared the sha1sum of the relevant *.aux file from before with that from after the run and would loop until the checksum wouldn't change any more.
- gjvc 5y agoSeems like rubber [1] is a commonly-used wrapper for this sort of thing. Works well in a makefile. [1] https://gitlab.com/latex-rubber/rubber/ https://gitlab.com/latex-rubber/rubber/
- linspace 5y ago> Compilation errors are really non-helpful. In programming, if I omit one side of a bracket or parentheses somewhere, I'll almost certainly get an error with a reference to the line number right at or below the issue. GOOD LUCK finding a missing bracket in a LaTeX document based on the error messages when compilation fails. You are right but I think is not trivial to solve because contrary to programming languages LaTeX is interleaved with natural language and so almost everything is possible. Maybe the best approximation is to have heuristics. For example start with a valid document, introduce errors and train a neural network to identify the problem. Overkill?
- DemocracyFTW 5y agoWhile we're already using machine learning and neural networks to solve this problem, why not use a blockchain? /s TeX being "interleaved with natural language" is not at all at the heart of the problem IMO. Every HTML document does so, too. The real problem lies much deeper. TeX uses recursive rewrites of the code that is the document to achieve what it does, without properly keeping track of where it is and what it does. There is no technical necessity for doing so, but the technique introduces huge complexity costs. On a somewhat related note, TeX's syntax at its very heart is also not trivial to parse short of executing (compiling) a given document (i.e. TeX's syntax itself is Turing-complete). This has been done only because the author got carried away by the coolness factor of it. Already a few years after TeX came out, Leslie Lamport implemented LaTeX on top of TeX to make TeX more approachable to less dedicated / insanely gifted users; he chose to dial back on this very aspect—the inscrutable syntax—and proposed a much more regular syntax as a convention.
- linspace 5y agoTex being Turing complete is what allowed LaTeX in the first place. HTML not being Turing complete requires Javascript and CSS separately. Do you find them easier? Maybe, I'm not sure, but you cannot escape your language being Turing complete because the range of possible documents is so vast.
- DemocracyFTW 5y ago