Live data from Hacker News

The Art of LaTeX: Common mistakes and advice for typesetting proofs

fanpu.io

31–40 of 149 posts

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#31
post #24
post #21

Some of the images don't appear to render for me. Also, the author includes an example of \int xyzdx and makes a note of using appropriate spacing. It is my impression that commonly the differential operator is typeset differently, that is: \mathrm{d}x . Otherwise, great tips.

In physics, it's \mathrm dx. In mathematics, it's dx.

It would appear that it is even more complicated than that and so depends on nationality, the field in question etc.: https://tex.stackexchange.com/a/88961/31889

TIL

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#32
post #6
post #5

Earlier quoted context omitted.

Realized I misunderstood your question. IMO the main design problem with LaTeX from a usage-standpoint is that there are too many ways of achieving the same thing, and oftentimes none of them is a clear winner. It's still the best option for a usable, programmable typesetting language that we have (i.e writing for-loops to draw structured graphs in TikZ...)

My personal beef with LaTeX, other than the utterly atrocious syntax, is that it a.) endlessly barfs on your terminal during its normal operation and b.) does not respond to normal terminal interaction upon an error (wth is it expecting? I interactively edit and correct mistakes!?). So it's scroll blindness and flailing all the way, a kludgy, rickety mess. Not to mention its utter mess of a package management system.

It should be noted that TeX wa s of course designed to actually be interactive and stop letting you fix errors.

I went through the texbook by Knuth last year and my eyes were opened (also note that I am an incurable (La)TeX fan so my opinion is biased)

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#33
post #27
post #25

Earlier quoted context omitted.

What a great summary! Unfortunately, many discussions of TeX vs alternatives are somewhat thin on details and are instead trading on emotions. As you mentioned in your comment, the choices made by Knuth are far from random. He even made it possible for anyone to change them! Not many people using TeX know that the choice of the backslash as an 'escape' character may be easily changed. Even the necessity of curly brac…

Asciidoc, TexMacs, LyX, reStructuredText, Markdown (admittedly, only ish). None of them have become the standard. But some of the ones above - though excluding Markdown - are a complete replacement. Actually, even Markdown stands a chance if supplemented with enough HTML and CSS. HTML and CSS have practically replaced most non-maths uses of Latex.

How many of those rely on LaTeX syntax extensions to render equations?

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#34

LaTeX is great, but God forbid you want to move a figure up a centimeter on the page. That'll cost you an hour of reading through StackExchange threads, and you'll probably come up empty.

Just don't use figure when you don't want them to float, but just use \includegraphics or whatever environment you're using? Floating figures are a pain in the ass in any system, as their positioning relies on the rest of the text already being formatted but simultaneously mess with that same formatting.

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#35
post #27

Earlier quoted context omitted.

Asciidoc, TexMacs, LyX, reStructuredText, Markdown (admittedly, only ish). None of them have become the standard. But some of the ones above - though excluding Markdown - are a complete replacement. Actually, even Markdown stands a chance if supplemented with enough HTML and CSS. HTML and CSS have practically replaced most non-maths uses of Latex.

How many of those rely on LaTeX syntax extensions to render equations?

I can't speak for most of them because I haven't used them, but I know that TexMacs doesn't use LaTeX under the hood.

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#36
Most of this is good advice, but I don't see the \mathbbm vs. \mathbb distinction as anything other than subjective taste.

Also, I use things like

  \newcommand{\abs}[1]{\left| #1 \right|}
in the preamble. This way, I can use \abs{...} without any asterisks, and it automatically adjusts its size. In the 1% situations where I don't want it to adjust the size, I write the delimiters manually.

Making maths look good in LaTeX is pretty well-understood these days; authors who don't are usually just being lazy. The big undocumented mess with LaTeX is making bibliographies work correctly. The "standard" bibtex workflow is broken in many ways, and I have never seen a tutorial on how to fix it. With bibliographies being such a minuscule part of a mathematical paper, I'm not surprised that no one cares, but the result is lots of references that are imprecise, missing important info or plain wrong.

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#37
post #27

Earlier quoted context omitted.

Asciidoc, TexMacs, LyX, reStructuredText, Markdown (admittedly, only ish). None of them have become the standard. But some of the ones above - though excluding Markdown - are a complete replacement. Actually, even Markdown stands a chance if supplemented with enough HTML and CSS. HTML and CSS have practically replaced most non-maths uses of Latex.

How many of those rely on LaTeX syntax extensions to render equations?

The LaTeX formula language is a separate thing from the rest of LaTeX: It's become the standard for formulas. There are some editors that can speed up writing those formulas. Asciidoc also offers an alternative formula language.

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#38
post #24
post #21

Some of the images don't appear to render for me. Also, the author includes an example of \int xyzdx and makes a note of using appropriate spacing. It is my impression that commonly the differential operator is typeset differently, that is: \mathrm{d}x . Otherwise, great tips.

In physics, it's \mathrm dx. In mathematics, it's dx.

Historically, by which I mean professional typeset documents in early 20th century, it was upright d in both. It's often italic dx in maths now probably just because doing it right is tricky (at least non-zero effort) in LaTeX.

In many articles, there isn't even spacing around differentials. That doesn't mean that is correct too. It just means that, like upright d, the author has more pressing issues than small details of typesetting.

It similar to how vectors (in physics / applied maths) are represented by upright bold letter. Historically, these were bold-italic - the same as how most variables are italic. But early versions of TeX only supported fonts in regular, italic and bold - no bold italic variants existed (even now, bold italics are not universally available for Greek characters). So people used upright bold for vectors, and now it's assumed that it was deliberate.

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#39
post #19
post #9

TeXmacs allows you to typeset beautiful proofs via a WYSIWYG editor without the pain of TeX/LaTeX. Note that its name is doubly misleading since it is not based on TeX nor Emacs. It is however inspired by both. TeXmacs produces documents of similar quality to TeX/LaTeX.

Is there an equivalent of \NewCommand in TexMacs? I can't find anything by Googling.

There is a good introduction in Chapter 12 of The Jolly Writer: https://www.scypress.com/book_info.html

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#40
post #29

Several of the images are broken links. Perhaps an example of Muphry's Law?

Should be fixed now. First time hearing about Muphry's Law, definitely gave me a chuckle!

Works now. I do very little writing that requires math, although I did have occasion to present Muller’s Recurrence for a discussion on floating point arithmetic. The tip "Expressions Should Be Punctuated Like Sentences" is a good one, and generalizes somewhat to inline code or any inline figure or table in writing.
Post reply on HN