5

I know that the tag command from amsmath should be used to name equations (see below a mwe).

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
  c^2 &= a^2 + b^2
  \tag{Pythagoras' theorem}
  \label{eq:pit}
\end{align}
\end{document}

But if I like to use the breqn package the tag command won't work.

\documentclass{article}
\usepackage{amsmath}
\usepackage{breqn}
\begin{document}
\begin{dmath}
  c^2 = a^2 + b^2
  \tag{Pythagoras' theorem}
  \label{eq:pit}
\end{dmath}
\end{document}

))

I get the below error when try to compile the mwe above.

! Package amsmath Error: \tag not allowed here.

See the amsmath package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.7   \tag
          {Pythagoras' theorem}
? 
! Emergency stop.
 ...                                              

l.7   \tag
          {Pythagoras' theorem}
\tag cannot be used at this point. If you don't understand why
you should consult the documentation.
But don't worry: just continue, and I'll forget what happened. 

1 Answer 1

7

There's no \tag command available with breqn; you have rather to use the number= key; I've added other equation to show that the numbering is independent of it.

\documentclass{article}
\usepackage{amsmath}
\usepackage{breqn}

%%% This code is provisional, in case you update
%%% to the last version of the expl3 bundle, waiting
%%% for an update to breqn (more precisely, flexisym)
\ExplSyntaxOn
\cs_set_eq:NN \int_eval:w \__int_eval:w
\cs_set_eq:NN \int_eval_end: \__int_eval_end:
\ExplSyntaxOff
%%% End of provisional code

\begin{document}
\begin{dmath}
1=1
\end{dmath}
\begin{dmath}[number={Pythagoras' theorem}]
  c^2 = a^2 + b^2
  \label{eq:pit}
\end{dmath}
\eqref{eq:pit}
\begin{dmath}
1=1
\end{dmath}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .