Overleaf
Need to learn how to use this tool properly.
This automatically adds the numbers as well
Common things
- Add a new page? Use
\clearpage
or\newpage
\begin{gather} is the same? But just use align.
\begin{align}
\sum_{i=1}^{n+12} \sum_{j=389}^{20100} \sum_{k = 2i}^{3i} c = \\
c \sum_{i=1}^{n+12} \sum_{j=389}^{20100} \sum_{k = 2i}^{3i} 1 = \\
c \sum_{i=1}^{n+12} \sum_{k = 2i}^{3i} \sum_{j=389}^{20100} 1
\end{align}
If you don’t want the equations numbered (align adds next to the first equation, etc.), use \begin{align*}
.
Align
vs equation
equation
 “squeezes” the math (i.e. uses less white space between symbols) in order to avoid badboxes but align
 does not.
\documentclass[11pt,draft]{article}
\usepackage{amsmath}
\begin{document}
Using ``equation'':
\begin{equation*}
1+2+3+4+5+6+7+8+9+10
= 11+12+13+14+15+16+17+18+19+20+21
\end{equation*}
Using ``align'':
\begin{align*}
1+2+3+4+5+6+7+8+9+10
= 11+12+13+14+15+16+17+18+19+20+21\\
\end{align*}
\end{document}
Some Templates
Hash table
Put this before the \begin{document}
\usepackage{array}
\newenvironment{hashtable}[1][]
{\begin{tabular}[#1]{
@{}
> {\small} r <{\normalsize~\rlap{\fbox{\strut~~}}$~~$~}
@{} l @{}}}
{\end{tabular}}
Usage
\begin{hashtable}
0 & $\rightarrow 20 \rightarrow 10$ \\
1 \\
2 \\
3 & $\rightarrow 13$ \\
4 & $\rightarrow 17$ \\
\end{hashtable}