배열 내부에서 방정식 수집

배열 내부에서 방정식 수집

나는 테이블에 몇 가지 연습 문제에 대한 해결책을 갖고 싶습니다. 다음 코드를 사용하여 두 개의 배열을 사용하고 방정식을 나누는 것만으로도 성공했습니다.

\documentclass{article}
\usepackage{amssymb,amsmath}

\begin{document}
\noindent \textbf{1.3 (4)}
$$\begin{array}{cccccc}
\textbf{(a)} & 13\equiv b \pmod{8} & \textbf{(b)} & 52\equiv b\pmod{9} & \textbf{(c)} & -8\equiv b\pmod{10}\\
& 13=8\cdot 1 +5 & & 52=9\cdot 5 +7 & & -8=10\cdot (-1) +2\\
& \therefore 13\bmod 8= 5 & & \therefore 52\bmod 9= 7 & & \therefore -8\bmod 10= 2 \\
& \therefore \text{ s{\"a}tt } b=5 & & \therefore \text{ s{\"a}tt } b=7 & & \therefore \text{ s{\"a}tt } b=7\\
\end{array}$$
$$\begin{array}{ccccccc}
\textbf{(d)} & 14\equiv b\pmod{14} & \textbf{(e)} & 8\equiv b\pmod{12} & \textbf{(f)} & -23\equiv b\pmod{11}\\
 & 14=14\cdot 1 +0 & & 8=12\cdot 0 +8 & & -23=11\cdot (-3) +10\\
 & \therefore 14\bmod 14= 0 & & \therefore 8\bmod 12= 8 & & \therefore -23\bmod 11= 10\\
 &\therefore \text{ s{\"a}tt } b=0 & & \therefore \text{ s{\"a}tt } b=8 & & \therefore \text{ s{\"a}tt } b=10\\
\end{array}$$
\end{document}

그러나 수집된 방정식을 하나의 배열에 삽입하여 이를 수행할 수 있는지 알고 싶습니다. (이것이 방정식을 분할하는 대신 함께 유지할 수 있도록 이것이 나에게 더 적합하기 때문입니다.) 다음 코드를 시도했지만 작동하지 않습니다.

\documentclass{article}
\usepackage{amssymb,amsmath}

\begin{document}
\noindent \textbf{1.3 (4)(a)}
$$\begin{array}{ccc}
\begin{gather*}
13\equiv b \pmod{8}\\
13=8\cdot 1 +5\\
\therefore 13\bmod 8= 5\\
\therefore \text{ s{\"a}tt } b=5\\
\end{gather*} &
\begin{gather*}
52\equiv b\pmod{9}\\
52=9\cdot 5 +7\\
\therefore 52\bmod 9= 7\\
\therefore \text{ s{\"a}tt } b=7\\
\end{gather*} &
\begin{gather*}
-8\equiv b\pmod{10}\\
-8=10\cdot (-1) +2\\
\therefore -8\bmod 10= 2\\
\therefore \text{ s{\"a}tt } b=7\\
\end{gather*}\\
\begin{gather*}
14\equiv b\pmod{14}\\
14=14\cdot 1 +0\\
\therefore 14\bmod 14= 0\\
\therefore \text{ s{\"a}tt } b=0\\
\end{gather*} &
\begin{gather*}
8\equiv b\pmod{12}\\
8=12\cdot 0 +8\\
\therefore 8\bmod 12= 8\\
\therefore \text{ s{\"a}tt } b=8\\
\end{gather*}&
\begin{gather*}
-23\equiv b\pmod{11}\\
-23=11\cdot (-3) +10\\
\therefore -23\bmod 11= 10\\
\therefore \text{ s{\"a}tt } b=10\\
\end{gather*}
\end{array}$$
\end{document}

답변1

배열이 이미 수학 모드에 있으므로 수학 모드에 다시 중첩할 수 없습니다. 노력하다:

\documentclass{article}
\usepackage{amssymb,amsmath}

\begin{document}
\noindent \textbf{1.3 (4)(a)}
\[\setlength\arraycolsep{12pt} % more space between columns
\begin{array}{ccc}
\begin{gathered}% it is designed for use inside math environment
13\equiv b \pmod{8}\\
13=8\cdot 1 +5\\
\therefore 13\bmod 8= 5\\
\therefore \text{ s{\"a}tt } b=5\\
\end{gathered} % <---
&   \begin{gathered} % <---
    52\equiv b\pmod{9}\\
    52=9\cdot 5 +7\\
    \therefore 52\bmod 9= 7\\
    \therefore \text{ s{\"a}tt } b=7\\
    \end{gathered} % <---
    &   \begin{gathered} % <---
        -8\equiv b\pmod{10}\\
        -8=10\cdot (-1) +2\\
        \therefore -8\bmod 10= 2\\
        \therefore \text{ s{\"a}tt } b=7\\
        \end{gathered} % <---                                  \\
% second row
\begin{gathered} % <---
14\equiv b\pmod{14}\\
14=14\cdot 1 +0\\
\therefore 14\bmod 14= 0\\
\therefore \text{ s{\"a}tt } b=0\\
\end{gathered} % <---
&    \begin{gathered} % <---
     8\equiv b\pmod{12}\\
     8=12\cdot 0 +8\\
     \therefore 8\bmod 12= 8\\
     \therefore \text{ s{\"a}tt } b=8\\
     \end{gathered} % <---
     &    \begin{gathered} % <---
          -23\equiv b\pmod{11}\\
          -23=11\cdot (-3) +10\\
          \therefore -23\bmod 11= 10\\
          \therefore \text{ s{\"a}tt } b=10\\
          \end{gathered} % <---
\end{array}
\]
\end{document}

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

관련 정보