[Tex/LaTex] Aligning the equations and equation numbers correctly

equationsminipage

I have the following code

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}
\begin{minipage}{16cm}
Maximization:\\
\begin{minipage}{7.6cm}
\begin{align}
&\sup_{{g_0}\in\mathcal{G}_0} P_F(\delta,g_0)\nonumber\\
&\mbox{s.t.} \quad  g_0>0 , \Upsilon(g_0)=\int_{\mathbb{R}}g_0\mbox{d}\mu=1,\nonumber
\end{align}
\end{minipage}
\begin{minipage}{7.6cm}
\begin{align}\label{equation311}
&\sup_{{g_1}\in\mathcal{G}_1} P_M(\delta,g_1)\nonumber\\
&\mbox{s.t.} \quad  g_1>0, \Upsilon(g_1)=\int_{\mathbb{R}}g_1\mbox{d}\mu=1.\nonumber
\end{align}
\end{minipage}
\end{minipage}
\begin{minipage}{16cm}
Minimization:\\
\begin{equation}
\min_{\delta\in\Delta} P_E(\delta,\hat{g}_0,\hat{g}_1)
\end{equation}
\end{minipage}
\end{document}

and I use

\documentclass[12pt,twoside,a4paper]

Here is the outputenter image description here

Problems are as follows:

The equation number is outside the text and the formulas are also almost overlapping with the text, including 'Maximization:'. I want a normal vertical space of say equation environment in all cases. I don't want to arrange the vspaces and hspaces by hand because it won't be accurate, especially for the equation number which must be aligned with all other equation numbers in the text.

One more thing: Although I use align environment $\sup$ and "s.t." are als not well aligned, as it can be seen in the figure.

What is the best way of solving this problem?

Best Answer

Rather than fight with minipage environments, you could try turning it round like this:

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\begin{equation}
    \begin{aligned}
        \text{Maximization:}\quad &
        \begin{aligned}
            &\sup_{g_0\in\mathcal{G}_0} P_F(\delta,g_0) 
             \quad \text{s.t. $g_0>0$, $\Upsilon(g_0)=\int_{\mathbb{R}}g_0\,\mathrm{d}\mu=1$}\\
            &\sup_{g_1\in\mathcal{G}_1} P_M(\delta,g_1) 
             \quad \text{s.t. $g_1>0$, $\Upsilon(g_1)=\int_{\mathbb{R}}g_1\,\mathrm{d}\mu=1$}
        \end{aligned}
        \\[12pt]
        \text{Minimization:}\quad &\min_{\delta\in\Delta} P_E(\delta,\hat{g}_0,\hat{g}_1)
    \end{aligned}
\end{equation}


\end{document}
Related Question