문장 분할 및 번호 매기기

문장 분할 및 번호 매기기

다음 코드가 있습니다.

\usepackage{amsmath, amsthm}
\begin{document}
        \begin{align}
       \begin{split}
    Case 1:\\
       \text{5 is a square modulo q and 29 is not a square modulo q from which we obtain} \label{529spilt}\\
    q \equiv \pm 1 \pmod{5} \,\, \text{and} \,\,  q \equiv 2,3,8,10,11,12,14,15,17,18,19,21,26,27 \pmod{29}\\
    Case 2:\\
    \text{5 is not a square modulo q and 29 is a square modulo q from which we obtain} \\
    q \equiv \pm 2 \pmod{5}  \,\, \text{and} \,\,  q \equiv 1,4,5,6,7,9,13,16,20,22,23,24,25,28 \pmod{29}
       \end{split}
    \end{align}
\end{document}

이 문장들에 번호를 매기고 싶어서 align 환경을 사용했는데 꽤 지저분해졌습니다. (첨부된 이미지 참조) 더 좋은 글쓰기 방법이 있나요?여기에 이미지 설명을 입력하세요

답변1

방정식인 것처럼 큰 텍스트 덩어리에 레이블을 지정하고 싶은지 잘 모르겠지만 여기에 다른 버전이 있습니다.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{equation} \label{529spilt}
\begin{minipage}{0.8\displaywidth}
Case 1: $5$ is a square modulo $q$ and $29$ is not a square modulo $q$
from which we obtain \\[.5\abovedisplayskip]
\hspace*{1.5em}$q \equiv \pm 1 \pmod{5}$ and \\
\hspace*{1.5em}$q \equiv 2,3,8,10,11,12,14,15,17,18,19,21,26,27 \pmod{29}$

\vspace{.5\belowdisplayskip}

Case 2: $5$ is not a square modulo $q$ and $29$ is a square modulo $q$
from which we obtain \\[.5\abovedisplayskip]
\hspace*{1.5em}$q \equiv \pm 2 \pmod{5}$ and \\
\hspace*{1.5em}$q \equiv 1,4,5,6,7,9,13,16,20,22,23,24,25,28 \pmod{29}$
\end{minipage}
\end{equation}

\end{document}

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

다음은 다른 깨달음입니다.

\documentclass{article}

\usepackage{amsmath}
\usepackage{lipsum} % just for the example

\begin{document}

\lipsum[2]

\begin{subequations}\label{529spilt}
\begin{description}
\item[Case 1:] $5$ is a square modulo $q$ and $29$ is not a square modulo $q$
from which we obtain
\begin{align}
q &\equiv \pm 1 \pmod{5} \quad\text{and} \\
q &\equiv 2,3,8,10,11,12,14,15,17,18,19,21,26,27 \pmod{29}
\intertext{%
  \item[Case 2:] $5$ is not a square modulo $q$ and $29$ is a square modulo $q$
  from which we obtain
}
q &\equiv \pm 2 \pmod{5} \quad\text{and} \\
q &\equiv 1,4,5,6,7,9,13,16,20,22,23,24,25,28 \pmod{29}
\end{align}
\end{description}
\end{subequations}

\lipsum[3]

\end{document}

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

답변2

flalignamsmath 및 다음을 기반으로 한 솔루션은 다음 \shortintertext과 같습니다 mathtools.

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{mathtools}

\begin{document}

Text text text text text text text text text text text text text text text text text text text.
\begin{flalign}
  \shortintertext{\parbox{\linewidth}{\emph{Case 1:}
    \\ $ 5 $ is a square modulo $ q $ and $ 29 $ is not a square modulo $ q $ from which we obtain}}%
    \notag%
  & & & q \equiv \pm 1 \pmod{5}\enspace \text{and}\enspace q \equiv 2,3, 8,10, 11, 12, 14, 15, 17, 18, 19, 21, 26, 27 \pmod{29}& & \\[-0.3\baselineskip]
\label{foo} \\[-0.7\baselineskip]
  \shortintertext{\parbox{\linewidth}{\emph{Case 2:}\\
    $ 5 $ is not a square modulo $ q $ and $ 29 $ is a square modulo $ q $ from which we obtain}}%
    \notag%
  & & & q \equiv \pm 2 \pmod{5}\enspace \text{and}\enspace q \equiv 1, 4, 5, 6, 7, 9, 13, 16, 20, 22, 23, 24, 25, 28 \pmod{29}& &
\end{flalign}

\end{document}

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

관련 정보