0

I have the formula block:

 \begin{eqnarray} \tag{A8}  
  2x+3y+4z+2u+7o+8k+90l+43+56+45p+33h \nonumber \\
  &+& 89n+90m+34j+23a+45b+56f = 0
 \end{eqnarray}

but I am not getting the required equation with name A8. If anyone can figure it out you're most welcome.

  • 5
    eqnarray doesn't accept \tag. Only use amsmath environments and never eqnarray. – egreg Aug 19 '19 at 11:09
4

You get

! Package amsmath Error: \tag not allowed here.

See the amsmath package documentation for explanation.

Only use amsmath environments to split equations across lines or to align them. Never use eqnarray. In this case, multline is the appropriate one.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{multline}
2x+3y+4z+2u+7o+8k+90l+43+56+45p+33h \\
+ 89n+90m+34j+23a+45b+56f = 0
\tag{A8}
\end{multline}

\end{document}

enter image description here

|improve this answer|||||
1

If you use the tag \nonumber, then the equation number doesn't print, please remove that command in your tag and then try, the modified tag is:

\begin{eqnarray} 
\tag{A8}  
 2x+3y+4z+2u+7o+8k+90l+43+56+45p+33h \\
&+& 89n+90m+34j+23a+45b+56f = 0\nonumber
\end{eqnarray}

Also, note that eqnarray is one of the older environment, please try with align environment which comes along with amsmath package....

Corrected tag is:

 \begin{align} 
    \tag{A8}  
     &2x+3y+4z+2u+7o+8k+90l+43+56+45p+33h \\
    &\quad + 89n+90m+34j+23a+45b+56f = 0\nonumber
    \end{align}
|improve this answer|||||
  • The multline environment is also an option here. – GuM Aug 19 '19 at 11:16
  • @GuM Thanks for your notification... – MadyYuvi Aug 19 '19 at 11:18
  • Unfortunately (for you), egreg has been swifter in catching my hint! (Hi, @egreg! ;-) – GuM Aug 19 '19 at 13:24
  • 1
    @GuM Ha ha ha, egreg is one of a legend in TeX.... – MadyYuvi Aug 19 '19 at 13:29

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.