Live data from Hacker News

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

fanpu.io

61–70 of 149 posts

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

#61
Many LaTeX tricks only get passed down from advisors to students, or from collaborators to collaborators. Rarely someone would look for how to improve their typesetting when all they want is to quickly communicate content.

It be nice if content and typesetting can be completely separated, where I just write content, and something (LaTeX, AI, some manual typesetter) does all the typesetting.

Also, should I be the one controlling how the reader consume my content? Maybe the reader prefers another font? Or the reader is viewing in a kindle so pdf page size should be different?

This would be impossible unless the reader have my LaTeX source code and compile it themselves. But it is super simple for epub, or html webpage (by modifying the css).

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

#63
post #24

Earlier quoted context omitted.

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 detai…

Not really. It has nothing to do with LaTeX. Most of them are italic in mathematics . For example, in Hermite's textbook (1882) (https://gallica.bnf.fr/ark:/12148/bpt6k97981084/f31.item.tex...), page 13, the dω is italic. In Klein's Lectures on Mathematics (1894) (https://www.mathunion.org/fileadmin/ICM/Proceedings/ICM1893....) page 20, the dx is italic. In Goursat's textbook (1933) (https://gallica.bnf.fr/ark:/12148/bpt6k9454797/f107.item), the dx is also italic.

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

#64
Usw autoref instead of ref and it will add the "Figure ", " Chapter " etc automatically. And for Differentials, dwfine a semantic macro like \dd from the physics package. I find quotes are besr left to csquotes, which lets you define the type of quotes and show they nest in the preamble.

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

#65
post #48
post #41

Earlier quoted context omitted.

The way I see it, this only proves my point. As you write: '...None of them have become the standard...' and this is at the center of the argument. TeX may not be ideal but it strikes the correct balance to become and stay standard for so many years. One can do pretty much anything in bare Postscript (and I am ashamed to admit, I have) or even 'handmade' PDF but it does not make it a good alternative to TeX. I have e…

I disagree. I think Latex will soon become legacy like Cobol. HTML and CSS basically do a lot more than Latex does - except for maths things - and are far more widely known, and far more forgiving. Also importantly, they support hyperlinks, animations, and inline interactive scripts. It seems that HTML and CSS with the appropriate CSS styles and shorthands (like Markdown) could eat up everything that Latex does and m…

I have heard HTML/CSS mentioned as an alternative and I pray every day this time will never come. Even taking all the complaints leveled at LaTeX at face value, using HTML/CSS looks like pure hell to me. Allow me to elaborate.

1. You mentioned forgiving. One may not like the style of TeX error messages but its tracing facilities are extensive and given enough time and perseverance one can track nearly any layout issue down an correct it. Compare this to CSS silently ignoring incorrect syntax, having different syntax across browsers, etc. I would take strict syntax checking over this mess any day.

2. Many complained that LaTeX has more than one way of achieving the same result. True but how many ways are there of centering a div on a page? I can list six off the top of my head and there are probably more.

3. You casually mentioned '...except for maths things...' but this is far from minor. I cringe when I read engineering papers not written in TeX: the formulas are so ugly that they border on unreadable.

4. CSS may be wider known but unlike TeX CSS is a moving target. Being designed by a committee it carries all the flaws, like kludgy design in the name of 'compatibility', poor choices of syntax to make it appeal to a wider audience, etc. The designers of CSS are so enamored with the 'cascade' but in practice it is rarely used as intended. The 'important!' kludge as a perfect testament to this.

5. LaTeX syntax may be unappealing to some but HTML takes it to a whole other level: whitespace that affects the layout yet no easy way of getting rid of it (HTML style comments are a torture device); too verbose... one may not like the backslash but what about ? Five extra symbols!

6. LaTeX engines produce full featured PDF so hyperlinks are not a problem (most LaTeX documents have them). Yes, CSS has so called 3D graphics but it is anything but programmer friendly. What good are 3D transforms if one cannot even use simple lighting effects programmatically; c'mon, at least give me Lambert reflection! Incidentally, inline JavaScript can be included in pdf documents produced by LateX as well (although ... why?)

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

#66
post #64

Usw autoref instead of ref and it will add the "Figure ", " Chapter " etc automatically. And for Differentials, dwfine a semantic macro like \dd from the physics package. I find quotes are besr left to csquotes, which lets you define the type of quotes and show they nest in the preamble.

Wish I knew about autoref earlier, it also increases the area spanned by the hyperlink generated to the entirety of "Figure 1" instead of just "1" in the case of ref.

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

#67
post #61

Many LaTeX tricks only get passed down from advisors to students, or from collaborators to collaborators. Rarely someone would look for how to improve their typesetting when all they want is to quickly communicate content. It be nice if content and typesetting can be completely separated, where I just write content, and something (LaTeX, AI, some manual typesetter) does all the typesetting. Also, should I be the one…

To a certain degree, the LaTeX environment is already like that. I designed my custom resume style years ago and rarely touch it. I often tweak the actual content which gets poured into the style to produce the final document. The few changes I’ve made to the style have never affected the (separate) content either.

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

#68
post #61

Many LaTeX tricks only get passed down from advisors to students, or from collaborators to collaborators. Rarely someone would look for how to improve their typesetting when all they want is to quickly communicate content. It be nice if content and typesetting can be completely separated, where I just write content, and something (LaTeX, AI, some manual typesetter) does all the typesetting. Also, should I be the one…

> This would be impossible unless the reader have my LaTeX source code and compile it themselves. But it is super simple for epub, or html webpage (by modifying the css).

Well ..., wouldn't the html page be the source code in this case? Also, in most cases changing the look of a LaTeX document is as simple as changing the docuent class or switching to a different package. Also, modifying CSS is anything but simple in some cases, especially when the original style is not ideal.

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

#69
Does anyone know of similar lists of best practices, but for humanities? E.g. for writing papers, study notes, presentation slides, etc.

I use org-mode to produce Latex, and find myself always needing to remove the TOC, for example. The borders are always too wide, etc.

This is one that has some nice tips, wondering if there are others: https://www.colinmclear.net/posts/teaching-notes/

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

#70
post #61

Many LaTeX tricks only get passed down from advisors to students, or from collaborators to collaborators. Rarely someone would look for how to improve their typesetting when all they want is to quickly communicate content. It be nice if content and typesetting can be completely separated, where I just write content, and something (LaTeX, AI, some manual typesetter) does all the typesetting. Also, should I be the one…

> Many LaTeX tricks only get passed down from advisors to students, or from collaborators to collaborators.

Which is a great point on why the average quality of LaTeX homework submissions by undergraduates without any research experience usually makes for a less-than-ideal grading experience. And this is not about the nit-picky mistakes, but the visually glaring ones.

Post reply on HN