1

As is shown in my code, I used eqnarray but got two numbers. So I tried the method here by using equation and array instead. But I got error messages: "Package array Error: Illegal pream-token (\max): `c' used." and "Extra alignment tab has been changed to \cr."

As for the second error, I checked this but was still confused. The incorrect example in that link has different numbers of "&" across lines, but my code does not have such a problem.

My code is as follows.

          \documentclass[notitlepage, 12pt]{amsart}
          \usepackage{amsthm, amsmath, amsaddr, amssymb, graphicx, dsfont,}
          \DeclareMathOperator*{\argmax}{arg\,max}
            \DeclareMathOperator{\ima}{Im}
         \newcommand{\namedthm}[2]{\theoremstyle{plain}
        \newtheorem*{thm#1}{Theorem #1}\begin{thm#1}#2\end{thm#1}}
            \usepackage{float}
     \usepackage{tabularx}
      \usepackage{array, makecell}
      \NewExpandableDocumentCommand\mcc{O{1}m}%
                         {\multicolumn{#1}{c}{#2}}




            \begin{document}

\begin{eqnarray} \max{0, \alpha_g-\beta_g} \leq d_g \leq \min{\alpha_g, 1-\beta_g} &&\quad \mbox{ and } \ \quad \max{0, \alpha_b-\beta_b} \leq d_b \leq \min{\alpha_b, 1-\beta_b}.&& \end{eqnarray}\bigskip

\begin{equation} \begin{array} \max{0, \alpha_g-\beta_g} \leq d_g \leq \min{\alpha_g, 1-\beta_g} &&\quad \mbox{ and } \ \quad \max{0, \alpha_b-\beta_b} \leq d_b \leq \min{\alpha_b, 1-\beta_b}.&& \quad \max{0, \alpha_b-\beta_b} \leq d_b \leq \min{\alpha_b, 1-\beta_b}. \end{array} \end{equation}

\end{document}

Ypbor
  • 399

2 Answers2

4

I'd like to suggest you employ either a split or an aligned environment inside an equation environment. That way, that material will be typeset in display-style math mode, and you'll obtain more generous line spacing than using an array environment would offer by default.

enter image description here

\documentclass[notitlepage, 12pt]{amsart}
\begin{document}

\begin{equation} \begin{split} \max{0, \alpha_g-\beta_g} & \leq d_g \leq \min{\alpha_g, 1-\beta_g} , \text{ and} \ \max{0, \alpha_b-\beta_b} & \leq d_b \leq \min{\alpha_b, 1-\beta_b} ,. \end{split} \end{equation}

\begin{equation} \begin{aligned} \max{0, \alpha_g-\beta_g} & \leq d_g \leq \min{\alpha_g, 1-\beta_g} , \ \max{0, \alpha_b-\beta_b} & \leq d_b \leq \min{\alpha_b, 1-\beta_b}, \text{ and} \ \max{0, \alpha_b-\beta_b} & \leq d_b \leq \min{\alpha_b, 1-\beta_b},. \end{aligned} \end{equation}

\end{document}

Mico
  • 506,678
2

I'm not very sure if this is what you want. If not, you can use images to illustrate the effect you desire. This will help facilitate our communication.

\documentclass{amsart}
\begin{document}
\begin{equation}
\begin{array}{ll}
\max\{0, \alpha_g-\beta_g\} \leq d_g \leq \min\{\alpha_g, 1-\beta_g\}  & \text{and} \\
\max\{0, \alpha_b-\beta_b\} \leq d_b \leq \min\{\alpha_b, 1-\beta_b\}. &            \\
\end{array}
\end{equation}
\begin{equation}
\begin{array}{ll}
\max\{0, \alpha_g-\beta_g\} \leq d_g \leq \min\{\alpha_g, 1-\beta_g\}  & \text{and} \\
\max\{0, \alpha_b-\beta_b\} \leq d_b \leq \min\{\alpha_b, 1-\beta_b\}  & \text{and} \\
\max\{0, \alpha_b-\beta_b\} \leq d_b \leq \min\{\alpha_b, 1-\beta_b\}. &            \\
\end{array}
\end{equation}
\end{document}

enter image description here

Clara
  • 6,012