[Tex/LaTex] multiple subequations same line with reference compact

aligncross-referencingequationslabelssubequations

I posted a question earlier,

multiple subequations same line with reference

But I'd like to be able to combine the numbering at the end of the line for the following two cases:

Re = UL/nu , Ha = BL sqrt(sigma/(rho nu)),   Re_m = mu sigma UL      (4a,4b,4c)

And

Re = UL/nu , Ha = BL sqrt(sigma/(rho nu)),   Re_m = mu sigma UL      (4-6)

This code has all numbers, but they're in-between

\begin{subequations}
    \begin{tabularx}{\hsize}{@{}XXX@{}}
        \begin{equation}
            Re = \frac{U L}{\nu}, \label{eq:UBCs_D100}
        \end{equation} &
        \begin{equation}
            Ha = B L \sqrt{\frac{\sigma}{\rho \nu}}, \label{eq:UBCs_D200}
        \end{equation}
        \begin{equation}
            Re_m = \mu_{m} \sigma U L \label{eq:UBCs_N00}
        \end{equation}
    \end{tabularx}
\end{subequations}

Any help is greatly appreciated!

Best Answer

Hm, very unusual request ... however if you persist, try

\documentclass{article}
    \usepackage{amsmath}
    \usepackage{tabularx}
        \begin{document}
\begin{subequations}
    \begin{tabularx}{\hsize}{@{}XXXc@{}}
\begin{equation}\label{eq:UBCs_D100}
    Re = \frac{U L}{\nu},                       \notag
    \addtocounter{equation}{1}
\end{equation}  &
\begin{equation}\label{eq:UBCs_D200}
    Ha = B L \sqrt{\frac{\sigma}{\rho \nu}},    \notag
    \addtocounter{equation}{1}
\end{equation}  &
\begin{equation} \label{eq:UBCs_N00}            \notag
    Re_m = \mu_{m} \sigma U L
\end{equation}
                & (\ref{eq:UBCs_D100},\ref{eq:UBCs_D200},\ref{eq:UBCs_N00})
    \end{tabularx}
\end{subequations}
\begin{equation} \label{eq:UBCs_N100}           
    a = b
\end{equation}

From above code you should catch idea, how to manage your problem. I didn't bother with formatting as you not provide MWE (which can be compiled).

enter image description here

Edit: An another solution with better formatting of equations. Here instead tabularx is used minipages aligned at their bottom:

\documentclass{article}
    \usepackage{amsmath}
    \usepackage{tabularx}

        \begin{document}
\begin{subequations}
\setlength{\tabcolsep}{0pt}
\noindent\begin{minipage}{0.28\hsize}
\begin{equation}[b]\label{eq:UBCs_D100}
    Re = \frac{U L}{\nu},                       \notag
    \addtocounter{equation}{1}
\end{equation}
\end{minipage}\begin{minipage}[b]{0.28\hsize}
\begin{equation}\label{eq:UBCs_D200}
    Ha = B L \sqrt{\frac{\sigma}{\rho \nu}},    \notag
    \addtocounter{equation}{1}
\end{equation}
\end{minipage}\begin{minipage}[b]{0.28\hsize}
\vskip-5pt
\begin{equation} \label{eq:UBCs_N00}            \notag
    Re_m = \mu_{m} \sigma U L
\end{equation}
\end{minipage}
\hfill(\ref{eq:UBCs_D100},\ref{eq:UBCs_D200},\ref{eq:UBCs_N00})
\end{subequations}

\begin{equation} \label{eq:UBCs_N100}
    a = b
\end{equation}
    \end{document}

Result:

enter image description here

Interestingly, both solution only works with equation environment. At use of gather or other amsmath environments the sub-equations labels are lost.

Related Question