0

I am using LaTeX with Emacs for the first time. I am getting the following error message:

! Missing $ inserted

This is the code I put in:

center\[
$$Q(t) = Pi a^2 \sqrt{2gh}$$

]

What am I doing wrong?

1

2 Answers 2

1

As far as I understand, you would like to achieve something like the following:

\[
Q(t) = \Pi a^2 \sqrt{2gh}
\]

I replaced the $$ in your code with \[ and \] respectively. Please see e.g. this thread for some detailed explanations on why the use of \[ and \] is preferable to $$ in LaTeX.

1
  • However, I do agree with @jjlin that tex.stackexchange.com would be a better place for your question.
    – user49897
    Mar 3, 2016 at 8:20
0

It's only a single '$' at each side. Although if you're trying to center the equation anyway, your best bet would be to use

\begin{equation*}
Q(t) = \Pi a^2 \sqrt{2gh}
\end{equation*}

This will center it on its own line, and the * simply says not to number the equation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.