5

I write this code

\begin{eqnarray}
\frac{\partial\rho_{11}}{\partial t}&=& i \Omega(rho_{12}-rho_{21}) \\  
\frac{\partial\rho_{22}}{\partial t}&=&-i \Omega(rho_{12}-rho_{21}) \\
\frac{\partial\rho_{12}}{\partial t}&=& -i \Omega \rho_{12}-i\Omega (\rho_{22}-\rho_{11})\\
\frac{\partial\rho_{21}}{\partial t}&=& -i \Omega \rho_{21}+i\Omega (\rho_{22}-\rho_{11})
 \end{eqnarray}

the result is like this enter image description here

But I want the numbering equations be like this (1.18a) (1.18b) (1.18c) (1.18d)

3
5

First off: Don't use the eqnarray environment. Use the align environment of the amsmath package instead.

Second, to achieve your specific equation numbering objective, you should use the subequations environment, also provided by the amsmath package.

Finally, I recommend you insert a \phantom{-} directive at the start of the right hand side (RHS) of the first equation, to better align it relative to the three other RHSs. The instruction \phantom{-} inserts horizontal whitespace equivalent to what would be occupied by a unary minus symbol.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\numberwithin{equation}{section}  % just for this example
\begin{document}
\section{Some section}            % create a dummy section
\setcounter{equation}{17}         % just for this example
\begin{subequations}
\begin{align}
\frac{\partial\rho_{11}}{\partial t}
    &= \phantom{-}i \Omega(\rho_{12}-\rho_{21}) \\ 
\frac{\partial  \rho_{22}}{\partial t}
    &= -i \Omega(\rho_{12}-\rho_{21})\\
\frac{\partial\rho_{12}}{\partial t}
    &= -i \Omega \rho_{12}-i\Omega (\rho_{22}-\rho_{11})\\
\frac{\partial\rho_{21}}{\partial t}
    &= -i \Omega \rho_{21}+i\Omega (\rho_{22}-\rho_{11})
\end{align}
\end{subequations}
\end{document}

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.