2

I am looking for a way to have several equations in the same line, and being able to reference them. I know this can be done for multiple rows with eqnarray, but I want it in one line.

I have the following workaround, which is not good:

\begin{equation}
\label{eqs}
\mbox{\textbf{(i)}}   \ \ x>y  \ \ \ \ \ \  
\mbox{\textbf{(ii)}}  \ \ y>z  \ \ \ \ \ \ 
\mbox{\textbf{(iii)}} \ \ z>a  \ \ \ \ \ \ 
\end{equation}

equation reference (\ref{eqs}\textbf{(i)}), (\ref{eqs}\textbf{(ii)}), (\ref{eqs}\textbf{(iii)}).

This looks as:

enter image description here

Is there a proper way of achieving this?

splinter
  • 163

1 Answers1

1

Here is one approach using enumitem hiding the list in an mbox:

Sample output

\documentclass{article}

\usepackage{enumitem}

\newlist{eqlist}{enumerate*}{1}
\setlist[eqlist]{itemjoin=\quad,mode=unboxed,label=(\roman*),ref=\theequation(\roman*)}

\begin{document}

\setcounter{equation}{17}

\begin{equation}
  \label{eq:three}
  \mbox{%
  \begin{eqlist}
  \item\label{eqi:th-one} \( x>y\),
  \item\label{eqi:th-two} \( y>z\),
  \item\label{eqi:th-three} \( \displaystyle z>\int_{0}^{1} e^{x^{2}}dx \).
  \end{eqlist}}
\end{equation}
Referencing (\ref{eqi:th-two}).

\end{document}

However, this will not work with amsmath (because of the multiple label commands) and does not allow multiple lines. A varation solving both problems is the following, based on minipage:

Second sample

\documentclass{article}

\usepackage{enumitem,amsmath}

\newlist{eqlist}{enumerate*}{1}
\makeatletter
\setlist[eqlist]{itemjoin=\quad,mode=unboxed,label=(\roman*),
  ref=\theequation(\roman*),before={\let\label\ltx@label}}
\makeatother

\begin{document}

\setcounter{equation}{17}

\begin{equation}
  \label{eq:three}
  \begin{minipage}{.8\linewidth}\centering
  \begin{eqlist}
  \item\label{eqi:th-one} \( x>y\),
  \item\label{eqi:th-two} \( y>z\),
  \item\label{eqi:th-three} \( \displaystyle z>\int_{0}^{1}
    e^{x^{2}}dx \),\endgraf
    \item\label{eqi:th-four} \( \displaystyle a = \int_{U} \frac{\cos
      x}{\sin y}\,dx\,dy\).
  \end{eqlist}
\end{minipage}
\end{equation}
Referencing \eqref{eqi:th-two} and \eqref{eqi:th-four}.

\end{document}
Andrew Swann
  • 95,762