# Best Practices Compilation in Math Mode [closed]

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:

1. 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}


1. 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}


2. 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 \left and \right or 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}


3. 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}


1. The eternal divide between in-line a/b vs \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.

## closed as too broad by cfr, David Carlisle, Zarko, Stefan Pinnow, MicoJun 24 '18 at 18:32

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• First of all: Do not use $$! – TeXnician Jun 24 '18 at 17:13 • in addition (and more important) than not using $$ never leave a blank line before a math display. – David Carlisle Jun 24 '18 at 17:33
• It completely messes up the spacing making a spurious "white" paragraph before the display. – David Carlisle Jun 24 '18 at 17:37
• see for example tex.stackexchange.com/a/298141/1090 – David Carlisle Jun 24 '18 at 17:38
• it is almost always better to use a fixed size such as \bigl rather than \left if 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