+3 votes
in General IT Tips by (74.2k 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 (349k points)
selected by
 
Best answer

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

+1 vote
1 answer
+2 votes
1 answer
+1 vote
1 answer
+1 vote
1 answer

...