+3 votes
in General IT Tips by (29.7k points)

After writing some mathematical expressions, I want to add space between comment and expression.

E.g.

\begin{align*}

f(x) &= x^2-2x+1 (it's a comment) \\

\end{align*}

The above latex code does not put space between "(it's a comment) " and function?  How can I add space?

1 Answer

+2 votes
by (51.1k points)

You can use \quad for single spacing and \qquad for double spacing.

For single spacing

\begin{align*}
f(x) &= x^2-2x+1 \quad (it's a comment) \\
\end{align*}


for double spacing

\begin{align*}
f(x) &= x^2-2x+1 \qquad (it's a comment) \\
\end{align*}

Related questions


...