我在使用 minipage 并排放置文本和数组时遇到问题。我意识到错误是由于定理环境造成的,因为没有这个它就可以工作。这就是我得到的
代码如下
\documentclass{article}
\usepackage{amsthm, amsmath, amssymb, mathtools, thmtools}
\usepackage{graphicx}
\theoremstyle{definition}
\declaretheorem[name=Theorem]{theorem}
\begin{document}
\begin{theorem}
\begin{minipage}[c]{0.55\textwidth}
Group of Integers modulo $n$ consists of the set \[\{0, 1, 2, \dots, n - 1\}\] with the
operation of addition modulo $n.$ Imagine the numbers 0 through $n - 1$ to be points on the unit circle, each
one separated from the next by an arc of length $2\pi / n.$ To add two numbers $h$ and $k,$ start with $h$
and move clockwise through an arc of $k$ times $2\pi / n.$ The sum $h + k$ will be one of the numbers 0
through $n - 1.$ From geometrical considerations it is clear that this kind of addition is associative. Zero
is the identity element of this group and $n - h $ is the inverse of $h$ [for $h + (n - h) = n,$ which
coincides with 0]. This group, the group of integers modulo $n,$ is represented by the symbol $Z_n.$
\end{minipage}
\hspace*{\fill}
\begin{minipage}[c]{0.4\textwidth}
\begin{equation*}
\begin{array}{c|cccccc}
+_{6} & 0 & 1 & 2 & 3 & 4 & 5 \\ \hline
0 & 0 & 1 & 2 & 3 & 4 & 5 \\
1 & 1 & 2 & 3 & 4 & 5 & 0 \\
2 & 2 & 3 & 4 & 5 & 0 & 1 \\
3 & 3 & 4 & 5 & 0 & 1 & 2 \\
4 & 4 & 5 & 0 & 1 & 2 & 3 \\
5 & 5 & 0 & 1 & 2 & 3 & 4
\end{array}
\end{equation*}
\end{minipage}
\end{theorem}
\end{document}
答案1
由于定理是使用列表实现的,因此\item
隐藏在标题中,我们可以作弊。
尝试\item
在第一个小页面之前添加另一个。
现在允许警告 larex 在定理标题和其余部分之间分页。
答案2
我猜你更喜欢这样的东西:
\documentclass{article}
\usepackage{amsthm, amsmath, amssymb, mathtools, thmtools,array}
\usepackage{graphicx}
\theoremstyle{definition}
\declaretheorem[name=Theorem]{theorem}
\begin{document}
\vspace{\topsep}
\begin{minipage}[t]{0.55\textwidth}
\begin{theorem}
Group of Integers modulo $n$ consists of the set \[\{0, 1, 2, \dots, n - 1\}\] with the
operation of addition modulo $n$. Imagine the numbers 0 through $n - 1$ to be points on
the unit circle, each one separated from the next by an arc of length $2\pi / n$. To add
two numbers $h$ and $k$, start with $h$ and move clockwise through an arc of $k$ times
$2\pi / n$. The sum $h + k$ will be one of the numbers $0$ through $n - 1$. From
geometrical considerations it is clear that this kind of addition is associative. Zero
is the identity element of this group and $n - h $ is the inverse of $h$ [for
$h + (n - h) = n$, which coincides with $0$]. This group, the group of integers modulo
$n$, is represented by the symbol $Z_n$.
\end{theorem}
\end{minipage}
\hspace*{\fill}%
\raisebox{-1.2ex}{$
\begin{array}[t]{c|cccccc}
+_{6} & 0 & 1 & 2 & 3 & 4 & 5 \\ \hline
0 & 0 & 1 & 2 & 3 & 4 & 5 \\
1 & 1 & 2 & 3 & 4 & 5 & 0 \\
2 & 2 & 3 & 4 & 5 & 0 & 1 \\
3 & 3 & 4 & 5 & 0 & 1 & 2 \\
4 & 4 & 5 & 0 & 1 & 2 & 3 \\
5 & 5 & 0 & 1 & 2 & 3 & 4
\end{array}
$}\par\vspace{\topsep}
\end{document}
如果你喜欢居中对齐:
\documentclass{article}
\usepackage{amsthm, amsmath, amssymb, mathtools, thmtools,array}
\usepackage{graphicx}
\theoremstyle{definition}
\declaretheorem[name=Theorem]{theorem}
\begin{document}
\vspace{\topsep}
\begin{minipage}{0.55\textwidth}
\begin{theorem}
Group of Integers modulo $n$ consists of the set \[\{0, 1, 2, \dots, n - 1\}\] with the
operation of addition modulo $n$. Imagine the numbers 0 through $n - 1$ to be points on
the unit circle, each one separated from the next by an arc of length $2\pi / n$. To add
two numbers $h$ and $k$, start with $h$ and move clockwise through an arc of $k$ times
$2\pi / n$. The sum $h + k$ will be one of the numbers $0$ through $n - 1$. From
geometrical considerations it is clear that this kind of addition is associative. Zero
is the identity element of this group and $n - h $ is the inverse of $h$ [for
$h + (n - h) = n$, which coincides with $0$]. This group, the group of integers modulo
$n$, is represented by the symbol $Z_n$.
\end{theorem}
\end{minipage}
\hspace*{\fill}%
$\begin{array}{c|cccccc}
+_{6} & 0 & 1 & 2 & 3 & 4 & 5 \\ \hline
0 & 0 & 1 & 2 & 3 & 4 & 5 \\
1 & 1 & 2 & 3 & 4 & 5 & 0 \\
2 & 2 & 3 & 4 & 5 & 0 & 1 \\
3 & 3 & 4 & 5 & 0 & 1 & 2 \\
4 & 4 & 5 & 0 & 1 & 2 & 3 \\
5 & 5 & 0 & 1 & 2 & 3 & 4
\end{array}
$\par\vspace{\topsep}
\end{document}
行内公式后的标点符号应放在公式之外:$Z_n$.
而不是$Z_n.$