space in latex overleaf code example
Example 1: give space in latex
Horizontal \hspace{1cm} spaces can be inserted manually. Useful
to control the fine-tuning in the layout of pictures.
Left Side \hfill Right Side
Example 2: space latex math
Spaces in mathematical mode.
\begin{align*}
f(x) &= x^2\! +3x\! +2 \\
f(x) &= x^2+3x+2 \\
f(x) &= x^2\, +3x\, +2 \\
f(x) &= x^2\: +3x\: +2 \\
f(x) &= x^2\; +3x\; +2 \\
f(x) &= x^2\ +3x\ +2 \\
f(x) &= x^2\quad +3x\quad +2 \\
f(x) &= x^2\qquad +3x\qquad +2
\end{align*}