1

Is there any style guide for LaTeX? I'm searching for something like PEP8 for Python.
I think that the guide should specify:

  • where to put spaces and where not, e.g. what's better $a+b$ or $a + b$?
  • what to avoid, e.g. it's better to write '' or `` than "
  • etc.

I'm especially interested in such a guide for math mode

  • https://tex.stackexchange.com/questions/378395/good-practice-rules-for-writing-clean-latex or https://tex.stackexchange.com/questions/288382/automatic-style-guide-for-latex would be possible dupes (and arguably are dupes of each other) – Joseph Wright May 05 '21 at 07:58
  • BTW, using 'real' quotes in place of " isn't a style thing: LaTeX doesn't use " as that doesn't output proper typographic quotes. So in US English you want `` ... ''. – Joseph Wright May 05 '21 at 08:00
  • Re: quotes in particular, the BCP is (IMO) to use \enquote{} from the csquotes package, which will not just use the correct quotation marks for the current language but also handle nested quotes. – chsk May 05 '21 at 08:11
  • See also questions about linters and prettifiers like https://tex.stackexchange.com/questions/163/is-there-a-program-equivalent-to-lint-for-latex, https://tex.stackexchange.com/questions/254539/latextidy-in-emacs, https://tex.stackexchange.com/questions/30595/is-there-such-a-thing-as-a-latex-code-formatter. – Marijn May 05 '21 at 19:32

0 Answers0