방정식 번호를 케이스 방정식의 동일한 줄로 강제 지정

방정식 번호를 케이스 방정식의 동일한 줄로 강제 지정

열이 너무 좁아서 전체 방정식을 감당할 수 없는 것 같습니다.

\begin{equation}
        R(p_i|G) =
        \begin{cases}
            ep_{p_i} + (1- UA(p_i|G))\cdot ({r_G - ep_{p_i}})
            &\text{ if } ep \leq r_G \\
            ep_{p_i} + UA(p_i|G)\cdot ({r_G - ep_{p_i}})
            &\text{ if } ep > r_G 
        \end{cases}
        \label{eq:dis}
    \end{equation}

결과는 다음과 같습니다.

여기에 이미지 설명을 입력하세요

질문: (7)을 방정식과 같은 줄로 강제하려면 어떻게 해야 합니까?

답변1

이 같은?

여기에 이미지 설명을 입력하세요

\documentclass[twocolumn]{article}
\usepackage{amsmath} % for '\text' macro
\newcommand\mcr[1]{\multicolumn{1}{@{}r@{}}{#1}} % handy shortcut macro

\begin{document}
\begin{equation}
\medmuskip=2mu   % reduce spacing around binary operators
\thickmuskip=3mu % reduce spacing around relational operators
\renewcommand\arraystretch{1.5}
R(p_i\mid G) =
\left\{\begin{array}{@{}l@{}}
   \textit{ep}_{p_i} + (1- \textit{UA}(p_i\mid G)) ({r_G - \textit{ep}_{p_i}})\\
   \mcr{\text{if  $\textit{ep} \leq r_G$}} \\[1ex]
   \textit{ep}_{p_i} + \textit{UA}(p_i\mid G) ({r_G - \textit{ep}_{p_i}}) \\
   \mcr{\text{ if $\textit{ep} > r_G$}}
   \end{array}\right.
        \label{eq:dis}
    \end{equation}
\end{document}

관련 정보