# How to refer a equation written inside a item in enumerate in LaTeX?

I want to refer to an equation written inside the enumerate.

\section{}\label{}

\begin{enumerate}
\item
\item   $$\label{eq:1} a + b = c \eqref{eq:1}$$

$$\label{eq:2} a + d = e \eqref{eq:2}$$

\item
\item
\end{enumerate}


But this results in

a + b = c    (2)
a + d = e    (2)


just (2) for both the equations as it the item number inside the enumerate which contains the equation. What I want is atleast (2.1) or (2.2) or better would be

a + b = c    (3.6.2.1)
a + d = e    (3.6.2.2)


(Chapter.section.item.1 ) and (Chapter.section.item.2 ) .

I also want to refer to this equation later.

• Welcome to TeX SX! Could you post a compilable code? Sep 14 '17 at 14:37
• Works fine here in article/report, both equation number and reference are correct, so to work out what is wrong you would need to make a complete example that demonstrates the problem. (By the way, \numberwithin{equation}{section}, assuming you have \usepackage{amsmath}, will give equation numbers chapter.section.equation.) Sep 14 '17 at 14:41
• it's very peculiar to have both a label and \eqref referring to that same label within the same equation. the equation environment alone should produce a printed equation number, and \eqref is meant to be used outside that environment, in text referring to the equation. (there are other peculiarities, but without a compilable example, trying to say anything more would just be guessing.) Sep 14 '17 at 16:17

If you want to include the enumerate index in the equation number, you can use the following (unless you also use a package which replaces the enumi counter).

\documentclass{article}
\usepackage{amsmath}
\usepackage{showframe}
\begin{document}
\section{}\label{}

\begin{enumerate}
\renewcommand{\theequation}{\theenumi.\arabic{equation}}%
\item
\item  $$\label{eq:1} a + b = c \eqref{eq:1}$$

$$\label{eq:2} a + d = e \eqref{eq:2}$$

\item
\item
\end{enumerate}
\end{document}