2

I'm writing on overleaf.com and tried \tag#, where is the number of the equation. Here's exactly what I did: $$E=\vec p^2+m^2 \tag1$$. Any ideas on how to do it?

PS: I should say I'm not positive wether it really is math mode. I'm just repeating everything I see on physics and math stackexchange pages and this is the first time it doesn't work.

1
  • Did you load the amsmath package? Commented Oct 3, 2016 at 12:16

1 Answer 1

3

Physics.SE and Math.SE both use MathJax to render their math content. This requires the use of the following syntax

$$
  <math>
$$

for display math content, and $<math>$ for inline math content. While this does work for MathJax, you need a little more in order to write an equation with tags using Overleaf:

enter image description here

\documentclass{article}

\usepackage{amsmath}

\setlength{\parindent}{0pt}% Just for this example

\begin{document}

Display equation without label:
\[
  f(x) = ax^2 + bx + c
\]
The above is similar to
\begin{equation*}
  f(x) = ax^2 + bx + c.
\end{equation*}

Display equation with label to \eqref{eqn:quadratic1}:
\begin{equation}
  f(x) = ax^2 + bx + c \label{eqn:quadratic1}
\end{equation}

Display equation with custom label to \eqref{eqn:quadratic2}:
\begin{equation}
  f(x) = ax^2 + bx + c \tag{quadratic} \label{eqn:quadratic2}
\end{equation}

\end{document}

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.