Live data from Hacker News

I hate LaTeX, I love LaTeX

commutative.xyz

191–200 of 245 posts

Re: I hate LaTeX, I love LaTeX

#191
post #3

LaTeX needs replacing with something faster and more program-y, and that isn't just a python script. LateX's successor should be opinionated, safe, easy to build in parallel, and also good at integrating with other tooling: Let a CAS generate the next equation for you, for example. Make sure that figure is never out of date (e.g. a build system rather than relying on a web of files and button clicks) Etc. This will l…

You can embed CAS-generated equations and computations in LaTeX[1]. This came in handy for undergraduate linear algebra homework that combined proofs (where I could use my existing LaTeX macros) and computations (where we were expected to use a CAS). Mathematica or Jupyter notebooks would also work, but I prefer Emacs over the notebook UI (and Jupyter didn't actually exist at the time).

[1] See, e.g., https://github.com/tmolteno/SympyTeX/

Re: I hate LaTeX, I love LaTeX

#192
post #151

Earlier quoted context omitted.

Not to mention that when it fails to compile, at least in Overleaf you get an error log that is hopelessly useless and the only thing you can do is just remove your changes until it works again. LaTeX is a cool idea, but the implementation? Absolutely horrid.

There are two big challenges: One is that TeX, the underlying executable behind LaTeX, is pushed to its limits¹ to run. The macro expansion paradigm behind LaTeX made sense in 1982 but there are a lot of decisions underlying the executable and TeX-the-language that were dictated by the computing technology of the 1970s (forget Unicode, standard ASCII wasn’t universally available when Knuth wrote TeX). The other probl…

> errors being PDF annotations so users would click on an error or warning icon in the PDF to see the message and indication of where the issue was found

This would be by far the best approach, no?

Re: I hate LaTeX, I love LaTeX

#193
post #125

Earlier quoted context omitted.

It would help Unix’s case if the glue between the parts wouldn’t be byte streams and some very crude int result code, signals, etc. A monolith can be just as composable if not more, with a much “stronger glue” in the form of language-mandated guarantees. Also, sometimes doing multiple things well is the better direction — IPC is additional complexity and essential complexity can’t be decomposed.

In Unix space we use text, almost exclusively. This byte stream thing is a windows/java bs thing.

When contributing to uutils (the coreutils written in Rust), one of the bigger pain points with cross platform support is the way that in Unix, everything, including arguments, is just bytes, while on Windows, arguments are semi-opaque text strings. E.g., the -t option in sort, join, etc. takes an arbitrary byte (other than null, which is supported via \0), so you can sort, join, etc. binary inputs. However, the -t option will not let you use a multi-byte character, even valid Unicode characters like é, which, if Unix actually used text for everything, you would expect it to. Meanwhile, on Windows, uutils still doesn't support non-ASCII byte values for -t, because Windows doesn't provide a way to represent those.

Re: I hate LaTeX, I love LaTeX

#194

Oh I remember my CS years, when all the professors were raving to me about LaTeX, and I never understood why. Sure, it might be marginally better than just using Word, although - not that much; and it’s horrible to debug, it’s horrible to actually automate, it’s horrible to actually “separate content from style”… I thought that maybe something is wrong with me and over time it will “click”… it never did. But, this ar…

Why is it not good at separating content from style?

Re: I hate LaTeX, I love LaTeX

#195
post #5

I have a related feeling about TeX. It has superb output quality but the programming is awful. When LuaTeX finally arrived a few years ago, it was possible to do almost everything you have done before in the TeX language (starting with \backslashes) in Lua. See http://wiki.luatex.org/index.php/TeX_without_TeX for an introduction. I have (shameless plug) created a database publishing software using this technique ( ht…

I feel the same way! I also feel like the LaTeX crap on top of Plain TeX is crap and it fills me with rage when I try to find info about TeX and always get back something assuming LaTeX.

Your stuff looks cool, I will take a look!

Re: I hate LaTeX, I love LaTeX

#196

Oh I remember my CS years, when all the professors were raving to me about LaTeX, and I never understood why. Sure, it might be marginally better than just using Word, although - not that much; and it’s horrible to debug, it’s horrible to actually automate, it’s horrible to actually “separate content from style”… I thought that maybe something is wrong with me and over time it will “click”… it never did. But, this ar…

It's great for writing papers. I can crack open vim rattle off an essay throw in some \par s and some \cite{sho0ngle} s, and then let all the typesetting, citation management, and whatnot get handled by the compiler.

For STEM classes, the LaTeX defaults are perfect, and I can insert tables and images and such that can be in flux over the course of writing the report, importing then from external scripts that part of my data analysis.

LaTeX only gets hairy when you start trying to fight it. If you want some that looks exactly as you imagine it, you're going to be fighting an uphill battle trying to specify exactly what you want, and constantly re-compiling. If instead, you just care about a clean, consistent, and presentable end product, then LaTeX gets you there with minimal fuss.

Re: I hate LaTeX, I love LaTeX

#197
post #6

You sometimes see people ask fairly simple Python questions on Stack Overflow, that could be solved by five lines of plain Python, and be answered with some Pandas magic incantation that happens to do what they want with one call. I always find this a bit sad, because it seems to take away the idea that programming is about assembling composable parts, replacing it by a search for the right magic thing from a box of…

> You always feel like you are trying to trick the system into doing something it was not designed for. This is one of the hallmarks of human civilization. Your hands were designed for throwing a stone at the eye of a mammoth. But you can play the violin with them! Yes; it is totally awkward and anti-natural for your hands, obviously not their intended purpose... but so beautiful!

Our hands were not designed, and they have no “intended purpose”. We have hands because throughout the extremely long line of evolutionary adaptations the individuals that had them ended up surviving and procreating, and so we ended up having them.

This is not true of a violin, which is of cause the product of intelligent design and is designed to fit our hands, no Awkwardness intended. Though naturally there are constraints dictated by the physics of the sound generation.

Re: I hate LaTeX, I love LaTeX

#198

Oh I remember my CS years, when all the professors were raving to me about LaTeX, and I never understood why. Sure, it might be marginally better than just using Word, although - not that much; and it’s horrible to debug, it’s horrible to actually automate, it’s horrible to actually “separate content from style”… I thought that maybe something is wrong with me and over time it will “click”… it never did. But, this ar…

It's great for writing papers. I can crack open vim rattle off an essay throw in some \par s and some \cite{sho0ngle} s, and then let all the typesetting, citation management, and whatnot get handled by the compiler. For STEM classes, the LaTeX defaults are perfect, and I can insert tables and images and such that can be in flux over the course of writing the report, importing then from external scripts that part of…

Why do you use \par?

Re: I hate LaTeX, I love LaTeX

#199
post #51
post #43

Jesus H Carnegie. I JUST WANT TO WRITE AN ACADEMIC ARTICLE. I mean, look at this abhorrence. And look at what you open up in a TeX file, which again is meant to represent English prose . % Options for packages loaded elsewhere \PassOptionsToPackage{unicode}{hyperref} \PassOptionsToPackage{hyphens}{url} % \documentclass[ ]{article} \usepackage{amsmath,amssymb} \usepackage{lmodern} \usepackage{iftex} \ifPDFTeX ... and…

The equation example is artificial. In practice there will be no curly brackets around these single-token sub/superscripts, nor should the \left / \right present in this example. With properly added whitespaces this equation becomes quite legible. For more complex equations people use line breaks and indentations, and/or macros.

As an example taken at random from my undergrad days, see

https://jasomill.at/metric.pdf

produced with

    \begin{align*}
      f^*(dx& \otimes dx + dy \otimes dy + dz \otimes dz)\\
      =&\ f^*(dx \otimes dx) + f^*(dy \otimes dy) + f^*(dz \otimes dz)\\
      =&\ d(f^*x) \otimes d(f^*x) + d(f^*y) \otimes d(f^*y) + d(f^*z) \otimes d(f^*z)\\
      =&\ d(x \circ f) \otimes d(x \circ f) + d(y \circ f) \otimes d(y \circ f) + d(z \circ f) \otimes d(z \circ f)\\
      =&\ df^1 \otimes df^1 + df^2 \otimes df^2 + df^3 \otimes df^3\\
      =&\ \left(\pdFOneU du + \pdFOneV dv\right) \otimes \left(\pdFOneU du + \pdFOneV dv\right)\\
      +&\ \left(\pdFTwoU du + \pdFTwoV dv\right) \otimes \left(\pdFTwoU du + \pdFTwoV dv\right)\\
      +&\ \left(\pdFThreeU du + \pdFThreeV dv\right) \otimes \left(\pdFThreeU du + \pdFThreeV dv\right)\\
      =&\ \left(\gOneOne\right) du \otimes du\\
      +&\ \left(\gOneTwo\right) \left(du \otimes dv + dv \otimes du\right)\\
      +&\ \left(\gTwoTwo\right) dv \otimes dv.
    \end{align*}
(note that, using my editor defaults, none of this equation's lines are truncated or wrapped)

The \g... and \pdF... are trivial ad hoc macros defined in the document. Producing the same document by repeatedly copy/pasting the tensor components and partial derivatives would have been considerably more time-consuming and error-prone.

Also notable is the align environment: type \\ for a manual line break and & at each point that is to be aligned.

I just tried to reproduce this with the "WYSIWYG" equation editor in Word, and I can't figure out how to do it — right-clicking on plus and equal signs gives an "Align at this Character" option, but this appears to be a special case, as the option doesn't appear when clicking on anything else in the example.

In particular, had the first line involved (implied) multiplication instead of addition, there apparently wouldn't be any acceptable point to declare alignment!?!

I'm also not sure what it means to align "at" a character, as characters have width, and characters to be aligned aren't necessarily the same width. Does it align the left sides? The right sides? The center?

Moreover, the default key bindings in the Word equation editor are counterintuitive: the usual binding for "manual line break" instead splits the equation in two and there doesn't appear to be any default binding for the "Insert Manual Break" equation editor command at all.

Sure, LaTeX has a learning curve, but it's not at all obvious to me that Word is any better in this respect.

Re: I hate LaTeX, I love LaTeX

#200
post #150

Earlier quoted context omitted.

I always like to see it the other way around, it eliminates entities that are not a good fit, and the remainder is what drives adaptation. Of course, people could argue that's just like Michelangelo [1], and we're back at 'designed'. [1] “The sculpture is already complete within the marble block, before I start my work. It is already there, I just have to chisel away the superfluous material.”

The process of evolution is more than just the elimination of unfit specimens. That suggests that a tiger is just a tiger, and the only kind of evolution that can occur in the tiger is for it to become a better (faster, stronger) tiger. But in fact there was a time when carnivores didn't even exist, and then some random genetic flux produced an animal that was inclined to start eating other animals and a new ecologic…

> That suggests that a tiger is just a tiger,

Not at all. Everything can come from variation (mutation, cross over) + elimination of the worst. It's just that 'worst' is not a global minimum. Are we as humans superior to animals in strength, agility, speed, etc? Not at all. But some distant ancestor had some bigger brain, and that gave it all the edge it needed compared to weak and dumber siblings that were eaten, while our ancestor hid on a tree.

When some animal mutated to be able to eat meat in addition to plants, it had some advantage and was less likely to be eliminated when food got scarce. That's all you need to eventually arrive at something tiger-like.

That said, some animals seem to have reached a local maximum: sharks haven't changed in millions of years, cockroaches seem pretty successful, too.

But there's nothing 'creative' about it.

Post reply on HN