# Customize equation numbering for Equation environment?

I want to manually label equation number ? For example I want to label this equation 3.1 instead of (1) which automatically pops up. Is it also possible in split environment as well or not ?

$$\log \mu_{ijk}= \lambda + \lambda_i ^I + \lambda_j ^J+\lambda_k ^K+\lambda_{ij} ^{IJ}+\lambda_{ik} ^{IK}+\lambda_{jk} ^{JK}+\lambda_{ijk} ^{IJK} \label{eq:3.1}$$

-
try tag{\thesection.\theequation}; I think this has been asked before somewhere... –  cmhughes Mar 10 at 2:21

You can use \tag:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\log \mu_{ijk}= \lambda + \lambda_i ^I + \lambda_j ^J+\lambda_k ^K+\lambda_{ij} ^{IJ}+\lambda_{ik} ^{IK}+\lambda_{jk} ^{JK}+\lambda_{ijk} ^{IJK} \tag{3.1}\label{eq:3.1}$$
\end{document}


-
Excellent !! How to do the exact same thing in equation and split environment together ? –  user35571 Mar 10 at 2:36

I guess you are looking for a way to number your equations "within" sections, that is, add the section number before the equation number.

This can be done automatically if you add the line

\numberwithin{equation}{section}


in your preamble, without any manual intervention.

MWE:

\documentclass{article}
\usepackage{amsmath}
\numberwithin{equation}{section}

\begin{document}

\section{Test}
Some text

\section{Another Test}
Some text

\section{An equation}
$$\log \mu_{ijk}= \lambda + \lambda_i ^I + \lambda_j ^J+\lambda_k ^K+\lambda_{ij} ^{IJ}+\lambda_{ik} ^{IK}+\lambda_{jk} ^{JK}+\lambda_{ijk} ^{IJK} \label{eq:3.1}$$

\end{document}


Output:

-

THis worked for me Thank you

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\tag{3.1} \begin{split} \log \mu_{ijk}= \lambda + \lambda_i ^I + \lambda_j ^J+\lambda_k ^K+\lambda_{ij} ^{IJ}+\lambda_{ik} ^{IK}+\lambda_{jk} ^{JK}+\lambda_{ijk} ^{IJK} \tag{3.1}\label{eq:3.1} \end{split}$$
\end{document}

-