I consider myself a relatively experienced latex user. I am looking for best practices for math mode in LaTeX. Looking around the exchange I couldn't find a post that captures this question broadly. Specifically, I am looking for recommendations and best practice guidelines for things such as:
What is the right way to wrap a sum formula with parenthesis / curly brackets? Do you include the sub / sup parts or not?
\documentclass{standalone} \begin{document} $$ \left\{\sum_{s\in T}s \Bigm| T \subseteq S\right\} $$ $$ \Bigl\{\sum_{s\in T}s \Bigm| T \subseteq S\Bigr\} $$ \end{document}
Should one always include punctuation (comma in the example) after a centered equation?
\documentclass{standalone} \begin{document} $$ S = \{s_1, \ldots, s_n\}, $$ \end{document}Do you try to increase the size of parentheses / brackets when you are surrounding a square root environment? If so, do you simply let latex automatically adjust the sizes with
\leftand\rightor do you manually adjust by picking the size yourself?\documentclass{standalone} \begin{document} $$ O(\sqrt{n}) $$ $$ O\left(\sqrt{n}\right) $$ $$ O\bigl(\sqrt{n}\bigr) $$ \end{document}Is it considered bad practice to manually change spacing via
\!,or\,type commands?\documentclass{standalone} \begin{document} $$ O\left(\max\left\{\frac{\log n }{nm}\right\}^{n}\right) $$ $$ O\!\left(\!\max\left\{\frac{\log n }{n\,m}\right\}^{\!n}\right) $$ \end{document}
The eternal divide between in-line
a/bvs\frac{a}{b}:\documentclass{standalone} \begin{document} Sometime something $a/b$ someplace somewhat. Sometime something $\frac{a}{b}$ someplace somewhat. \end{document}
These are just some of the questions that come to mind right now, but this is the general spirit. I would love to have a resource with a compilation of such best practices. By the way, I am sure some of these questions have been answered here somewhere, with this post I am not only interested in the answers to these questions.





$$! – TeXnician Jun 24 '18 at 17:13\documentclass[letterpaper,USenglish]{oasics-v2018}template and interestingly enough\[ \]does not center equations like$$ $$does. Not sure why, didn't look into it, I just used$$ $$but I will remember to use\[ \]and\( \)in the future! Thank you! – kxk Jun 24 '18 at 17:16$$never leave a blank line before a math display. – David Carlisle Jun 24 '18 at 17:33\biglrather than\leftif you know the size in advance and if you do that many of the negative space fixes you show are not needed. – David Carlisle Jun 24 '18 at 17:40\[doesn't center the way$$does, that is because you are using a document class that specifies left aligned equations, but$$does not honour the document class setting as it is not a supported latex construct. – David Carlisle Jun 24 '18 at 17:45$...$if you wish, as this is just equivalent to\(...\). It is only$$....$$which should not be used. – cfr Jun 24 '18 at 17:47