Live data from Hacker News

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

fanpu.io

131–140 of 149 posts

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

#131
post #127

Not a single mention of 'hbox' (I opened and immediately grepped) - surely the primary issue (or seemingly non-issue but annoying error/warning) anyone runs into is 'overfull hbox', typically without any idea what an hbox even is anyway.

The linked post is not a comprehensive manual of LaTeX but just a collection of typesetting tips that the author found interesting.

TeX is at heart a system for setting, breaking and laying out boxes. Each character (e.g. 'T' from font Helvetica, say) is a box, a paragraph is a sequence of these boxes (with "glue" for the words), which is broken into lines (each line is a hbox), which are assembled into paragraphs and pages (vboxes).

It is a remarkable evolution in patterns of computer usage (since the 1970s/early 1980s when TeX was written) that people today expect to use programs without even skimming the manual (e.g. this is covered on page 27–28 of The TeXbook). Using TeX without caring about boxes and glue is missing the point, I think. (Surely there are alternative simpler programs if one doesn't want to be bothered about the finer points of typesetting.)

Anyway, see e.g.

https://texfaq.org/FAQ-overfull

https://tex.stackexchange.com/questions/35/what-does-overful...

https://tex.stackexchange.com/questions/138/what-are-underfu...

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

#132
#1 on my list has got to be the myriad of LaTeX-writers who think that math variables can be longer than a single letter. That is, they write things like:

    $foo + bar$
... not realizing that LaTeX is typesetting these to imply f times o times o + b times a times r. It looks horrible. A simple fix would be:

    $\text{\it foo} + \text{\it bar}$

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

#133
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.

the [physics package] (https://ctan.org/pkg/physics) provides for differential with a \dd command with a roman d, it also has several other useful macros

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

#134

I have a question: if what you have to write in order to create your beautiful and aesthetically pleasing proof, and thereby "establish your ethos and character" (presumably as a righteous and good), is an ugly and fragile instance of a poorly designed, inherently unreadable, archaic language that embodies none of the characteristics you are after, can the result really be "a work of art that combines both the precis…

You're crapping on a thing that Knuth and friends made and gave you for free. Are you about to go write something better?

I don't think the fact that Knuth wrote it and gave it away has anything to do with the question I was asking. If anything, the fact that it's free may contribute to its ubiquity and longevity, notwithstanding its poor design and other undesirable characteristics.

But none of that was the point of my question. The article on which the original post was made was effusive about how elegant and beautiful LaTeX output is, and how virtuous an author is for creating such works of art. It almost made it an obligation of anyone who writes math to love the look of LaTex. I'm asking, notwithstanding the output, if the input and process are a mess, is this really such a virtuous thing?

I personally think not. Obviously, some others disagree.

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

#135

I have a question: if what you have to write in order to create your beautiful and aesthetically pleasing proof, and thereby "establish your ethos and character" (presumably as a righteous and good), is an ugly and fragile instance of a poorly designed, inherently unreadable, archaic language that embodies none of the characteristics you are after, can the result really be "a work of art that combines both the precis…

> RE: ugly and fragile instance of a poorly designed, inherently unreadable, archaic language That's a lot of hate for LaTeX, and some of it is warranted, but you have to think of the results, not the source... It's not the source code that people are in love with, but the result (rendered PDF or via MathJax/KaTeX on the web). The "ugly" markup syntax allows you to produce beautiful, versatile, well designed, readabl…

> That's a lot of hate for LaTeX, and some of it is warranted, but you have to think of the results, not the source

I cannot think of the results separately from the source. I am not wired to appreciate Potemkin beauty.

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

#137
post #127

Not a single mention of 'hbox' (I opened and immediately grepped) - surely the primary issue (or seemingly non-issue but annoying error/warning) anyone runs into is 'overfull hbox', typically without any idea what an hbox even is anyway.

Yeah! When I make my book into PDFs, I get a ton of those yet see no issues visually.

If you look carefully, you should be able to see that the mentioned line slightly overreaches the edge of the page.

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

#138
post #75

I really wish there was a way to have shared editing on a doc, similar to google docs, that used LaTex. I often have to share docs for work (in google docs) and the lack of a clear way to format as eloquently as LaTex makes me not even try.

Overleaf ( https://overleaf.com/ ) is pretty popular for this, and also tracks things like edit history

Unfortunately, it doesn't allow you to bring your own editor, so I have to put up with its half-assed implementation of Vim.

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

#139

I have a question: if what you have to write in order to create your beautiful and aesthetically pleasing proof, and thereby "establish your ethos and character" (presumably as a righteous and good), is an ugly and fragile instance of a poorly designed, inherently unreadable, archaic language that embodies none of the characteristics you are after, can the result really be "a work of art that combines both the precis…

> RE: ugly and fragile instance of a poorly designed, inherently unreadable, archaic language That's a lot of hate for LaTeX, and some of it is warranted, but you have to think of the results, not the source... It's not the source code that people are in love with, but the result (rendered PDF or via MathJax/KaTeX on the web). The "ugly" markup syntax allows you to produce beautiful, versatile, well designed, readabl…

> you have to think of the results, not the source

You can. But it's equally valid to look at the source and say "this should have been replaced long ago"

Which is really has, except for tiny markets.

No reason it can't be improved on drastically.

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

#140
post #104

> Macros can also take arguments to be substituted within the definition. Some journals ask you to submit your manuscript in plain LaTeX, without defining your own macros.

since a macro is just a macro, isn't it fairly easy to just inline the macro's then?
Post reply on HN