4

I have several equations, I want to label equation 1 and 2 to be (eqt1) and (eqt2), any other equations after it use normal equation number, say (1), (2), (3),... How to do it in latex?

E.g.

\begin{align}
 1+1=2 (eqt1)
\end{align}

\begin{align}
 2+3=5 (eqt2)
\end{align}

\begin{align}
 3+3=6 (1)
\end{align}

\begin{align}
 4+3=7 (2)
\end{align}

2 Answers2

6

With amsmath package, you can achieve it with tag environment.

\documentclass[10pt,a4paper]{article}
\usepackage{amsmath}

\begin{document}
    \begin{align}
\label{e1}  1+1=2 \tag{eqt1}
    \end{align}

    \begin{align}
\label{e2}  2+3=5 \tag{eqt2}
    \end{align}

    \begin{align}
\label{e3}  3+3=6 
    \end{align}

    \begin{align}
\label{e4}  4+3=7 
    \end{align}
    I am referring \eqref{e1}, \eqref{e2}, \eqref{e3}, \eqref{e4}. 
\end{document}

Which would give you

enter image description here

5

Another possibility, using the same equation counter as the default: mathtools has a \newtagform command, which can be used to customise the appearance of the equation number, and a \usetagform command which can be used within the document body:

\documentclass[10pt,a4paper]{article}
\usepackage{mathtools}
\newtagform{eqt}{(eqt\,}{)}

\begin{document}

\usetagform{eqt}
    \begin{align}
\label{e1} 1+1=2
    \end{align}

    \begin{align}
\label{e2} 2+3=5
    \end{align}

\usetagform{default}
    \begin{align}
\label{e3} 3+3=6
    \end{align}

    \begin{align}
\label{e4} 4+3=7
    \end{align}

\end{document} 

enter image description here

Bernard
  • 271,350
  • The OP asked for (eqt1), (eqt2), (1), (2). You have given them (eqt1), (eqt2), (3), (4). You would need to reset the counter after (eqt2) to give the behaviour asked for – lioness99a Jan 11 '19 at 13:39
  • 1
    This was not quite clear to me. I indeed mentioned that in what I propose, both types of equation share the same counter – only the formatting differs. – Bernard Jan 11 '19 at 13:46
  • They said they wanted to have (eqt1) and (eqt2) and then start counting from (1) again. Your answer continues counting after (eqt2) with (3) so you need to include \setcounter{equation}{0} at that point to get the behaviour the OP wanted – lioness99a Jan 11 '19 at 14:02