TITLE: LaTeX tricks that save time in typesetting
QUESTION [82 upvotes]: In ${\rm\LaTeX}$ typesetting, when we repeat a long and complex formula in long documents, it is appropriate to create a new command that just by calling this new command we get the desired output. For example, I have used the following math expression in my previous document frequently:
$$\{a^1,a^2,\ldots,a^n\}$$
For doing this in usual way, we need to press 22 keys on keyboard (and think about $(\frac{\partial}{\partial x^1}, \cdots,\frac{\partial}{\partial x^n})$ and other terrible formulas). Of course we can do this by copy and paste from similar one in the text. it is much better to define the following new command on preamble
\newcommand{\set}[1]{\setaux#1\relax}
\def\setaux#1#2#3\relax{%
  \{ {#1}#2 1,
  \ifnum\pdfstrcmp{#3}{3}=0
    {#1}#2 2
  \else
    \ldots
  \fi
  , {#1}#2{#3} \}
}

and just by typing \set{a^n} in our text we get the same output.

Question: What are your favorite ${\rm\LaTeX}$ tricks that save your time in long document typesetting?

REPLY [5 votes]: A really useful website is GroupNames created by Tim Dokchitser https://people.maths.bris.ac.uk/~matyd/GroupNames/
It lists all finite groups of order $n$ with $n \leq 500$, with the exception of $n=256,384$, and has great search features. When you click on a group, you are given all sorts of useful information about that group (this is often way quicker than using a computational algebra system such as Magma or Sage). In particular, there is the option to export the latex code for the subgroup lattice and the character table. The latter saved me a ton of time when teaching a course on representation theory of finite groups!

REPLY [5 votes]: Detexify http://detexify.kirelabs.org/classify.html
allows your to draw the symbol you want and then it will output a list of the most probable latex commands for that symbol.