방정식을 왼쪽 정렬하는 방법

방정식을 왼쪽 정렬하는 방법

내 문서에서 아래 방정식을 사용하고 있습니다. 기본적으로 중앙에 정렬됩니다. 나는 방정식을 왼쪽 정렬하고 싶습니다.문서의 모든 방정식이 아닌 이 방정식만. 아무도 그것이 어떻게 이루어질 수 있는지 말해 줄 수 있습니까?

\begin{equation}
d_j =
  \begin{cases}
    newval_i,  & \quad i = j\\
    randval_k, & \quad k = j\\
    bestval_j, & \quad \text{otherwise}
  \end{cases}
\end{equation}

답변1

fleqn환경(에서 ) 에 방정식을 중첩할 수 있습니다 nccmath. 이 환경은 왼쪽 여백으로부터의 거리에 대한 선택적 인수를 허용합니다( 0 pt기본적으로):

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[showframe]{geometry}
\usepackage{mathtools, nccmath}

\begin{document}

\begin{equation}
d_j =
  \begin{cases}
    \text{newval}_i, & \quad i = j\\
    \text{randval}_k, & \quad k = j\\
    \text{bestval}_j, & \quad \text{otherwise}
  \end{cases}
\end{equation}

\begin{fleqn}
\noindent\texttt{With fleqn: }
\begin{equation}
d_j =
  \begin{cases}
    \text{newval}_i, & \quad i = j\\
    \text{randval}_k, & \quad k = j\\
    \text{bestval}_j, & \quad \text{otherwise}
  \end{cases}
\end{equation}
\end{fleqn}

\begin{fleqn}[3em]
\noindent\texttt{With fleqn and optional argument [3em]: }
\begin{equation}
d_j =
  \begin{cases}
    \text{newval}_i, & \quad i = j\\
    \text{randval}_k, & \quad k = j\\
    \text{bestval}_j, & \quad \text{otherwise}
  \end{cases}
\end{equation}
\end{fleqn}

    \end{document} 

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

관련 정보