# number a system of 4 equations in 2 lines

I have written 4 equations in two lines and I want to give a single number for all of them without changing their format. My code for the equations is the following:

\begin{center}
$\dot{R}=\frac{66}{364}\ P_R+ \frac{\partial V}{\partial P_R}$\qquad
$\dot{\theta}=2P_{\theta}(\frac{13}{168r^2}-\frac{33}{364R^2})+\frac{\partial V}{\partial P_{\theta}}$
\end{center}
\begin{center}
$\dot{P_{\theta}}=-\frac{\partial V}{\partial \theta}$\qquad
$\dot{P_R}=\frac{66P^2_{\theta}}{364R^3}-\frac{\partial V}{\partial R}$
\end{center}


Any help will be much appreciated.

• Have a look at the gather and aligned environments in amslatex. (Search for gather amsmath)
– JPi
May 6, 2015 at 12:47

If you want to have some more alignment than you have right now I would recommend the following approach:

% arara: pdflatex

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\begin{alignedat}{2} \dot{R}&=\frac{66}{364}\,P_R+ \frac{\partial V}{\partial P_R} \qquad &\dot{\theta}&=2P_{\theta}\Bigl(\frac{13}{168r^2}-\frac{33}{364R^2}\Bigr)+\frac{\partial V}{\partial P_{\theta}}\\ \dot{P_{\theta}}&=-\frac{\partial V}{\partial \theta} &\dot{P_R}&=\frac{66P^2_{\theta}}{364R^3}-\frac{\partial V}{\partial R} \end{alignedat}
\end{document}


You may align to the very left or very right of every term by moving the & symbols there, of course.

You could use an aligned environment inside an equation environment.

\documentclass{article}
\usepackage{amsmath} % for 'aligned' environment
\begin{document}
\begin{aligned} \dot{R}&=\frac{66}{364}\, P_R+ \frac{\partial V}{\partial P_R} &\qquad \dot{\theta}&=2P_{\theta}\Bigl(\frac{13}{168r^2}-\frac{33}{364R^2}\Bigr) +\frac{\partial V}{\partial P_{\theta}} \\ \dot{P_{\theta}}&=-\frac{\partial V}{\partial \theta} & \dot{P_R}&=\frac{66P^2_{\theta}}{364R^3}-\frac{\partial V}{\partial R} \end{aligned}
\end{document}


Instead of all those math ($…$) and center environments, and since you do not seem to wish any particular alignment, I would recommand an equation environment combined with a gathered environment (with a bit of additional vertical space here between the two lines, but it's not mandatory) from the amsmath package. It does the same job, but much more shortly and elegantly, I think.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\begin{gathered} \dot{R}=\frac{66}{364}\ P_R+ \frac{\partial V}{\partial P_R}\qquad \dot{\theta}=2P_{\theta}(\frac{13}{168r^2}- \frac{33}{364R^2})+\frac{\partial V}{\partial P_{\theta}}\\[1ex] \dot{P_{\theta}}=-\frac{\partial V}{\partial \theta}\qquad \dot{P_R}=\frac{66P^2_{\theta}}{364R^3}-\frac{\partial V}{\partial R} \end{gathered}$$
\end{document}


Here is one way, using a stack. The top set are your originals; the bottom set are my replacement, "without changing their format," as requested.

\documentclass{article}
\usepackage{stackengine}
\stackMath
\begin{document}

\begin{center}
$\dot{R}=\frac{66}{364}\ P_R+ \frac{\partial V}{\partial P_R}\qquad \dot{\theta}=2P_{\theta}(\frac{13}{168r^2}-\frac{33}{364R^2})+\frac{\partial V}{\partial P_{\theta}}$
\end{center}
\begin{center}
$\dot{P_{\theta}}=-\frac{\partial V}{\partial \theta}\qquad \dot{P_R}=\frac{66P^2_{\theta}}{364R^3}-\frac{\partial V}{\partial R}$
\end{center}

$$\stackanchor[10pt]{ \dot{R}=\frac{66}{364}\ P_R+ \frac{\partial V}{\partial P_R}\qquad \dot{\theta}=2P_{\theta}(\frac{13}{168r^2}-\frac{33}{364R^2})+\frac{\partial V}{\partial P_{\theta}} }{ \dot{P_{\theta}}=-\frac{\partial V}{\partial \theta}\qquad \dot{P_R}=\frac{66P^2_{\theta}}{364R^3}-\frac{\partial V}{\partial R} }$$
\end{document}


For a slightly altered presentation, here is a tabular stack, wherein the columns are individually centered:

\documentclass{article}
\usepackage{tabstackengine}
\stackMath
\begin{document}
$$\setstacktabulargap{2em} \tabularstackanchor[10pt]{cc}{ \dot{R}=\frac{66}{364}\ P_R+ \frac{\partial V}{\partial P_R}& \dot{\theta}=2P_{\theta}(\frac{13}{168r^2}-\frac{33}{364R^2})+\frac{\partial V}{\partial P_{\theta}} }{ \dot{P_{\theta}}=-\frac{\partial V}{\partial \theta}& \dot{P_R}=\frac{66P^2_{\theta}}{364R^3}-\frac{\partial V}{\partial R} }$$
\end{document}