我使用minipage
它来防止在某件事的中间出现分页符。大多数情况下,它是为了防止在某些“小”枚举列表的中间出现分页符,因为枚举列表从一页开始并继续到下一页看起来很丑陋。
我尝试了其他解决方案,例如如何防止在逐项列表之前出现分页符?但这对我来说不起作用,因为我的实际长文档中的一个枚举列表中间仍然有分页符。
minipage
适用于所有情况,但我有一个小问题。它使枚举列表看起来“很糟糕”。上下间距丢失(即使我在 minpage 之前和之后都有空行),整个列表移位现在比以前更加向右,这并不好。
这是一个 MWE,带有和不带有小页面显示效果。
我的问题是,如何使枚举列表看起来与不使用 minipage 时相同,但仍使用 minipage 来防止分页?我更喜欢使用 minipage 的解决方案,而不必修复枚举列表本身,因为我将 minipage 用于其他我不想在中间分页的东西,而不仅仅是列表。很久以前我曾经使用过samepage
包,但我遇到了一些问题,所以我停止使用它。
使用 minipage
不使用 minipage(格式更好)
代码
\documentclass[12pt]{article}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{amsmath}
\usepackage{xspace}
\usepackage{theorem}
\begin{document}
Knowing the order of the poles of $r$ and $\mathcal{O}(\infty)$ is all what
is needed to determine the necessary conditions for each case. These conditions are
the following
\begin{minipage}{\textwidth}
\begin{enumerate}
\item Case $1$. Either no pole exists, or if poles exist, the order must be either one or even.
If $\mathcal{O}(\infty)$ is less $3$, then it must be even otherwise it can be even or odd.
\item Case $2$. $r$ must have at least one pole which is either of order 2 or odd order greater than 2.
There are no conditions on $\mathcal{O}(\infty)$.
\item Case $3$. $r$ must have a pole of either order $1$ or $2$. No other order is allowed.
$\mathcal{O}(\infty)$ must be at least $2$.
\end{enumerate}
\end{minipage}
If the conditions for each case are not satisfied then there is no need to try that
case as there will be no Liouvillian solution to the DE.
\end{document}
这是我的实际文档的屏幕截图,显示了不使用时枚举列表跨越一页的情况minipage
答案1
与列表无关,小页面的定位类似于字母,因此这里它开始一个段落,因此缩进\parindent
,并且由于它是全宽的,因此它会以相同的量形成一条超满的行。
不要忽视警告!
Overfull \hbox (17.62482pt too wide) in paragraph at lines 14--26
\documentclass[12pt]{article}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{amsmath}
\usepackage{xspace}
\usepackage{theorem}
\begin{document}
Knowing the order of the poles of $r$ and $\mathcal{O}(\infty)$ is all what
is needed to determine the necessary conditions for each case. These conditions are
the following
\begin{center}
\begin{minipage}{\textwidth}
\begin{enumerate}
\item Case $1$. Either no pole exists, or if poles exist, the order must be either one or even.
If $\mathcal{O}(\infty)$ is less $3$, then it must be even otherwise it can be even or odd.
\item Case $2$. $r$ must have at least one pole which is either of order 2 or odd order greater than 2.
There are no conditions on $\mathcal{O}(\infty)$.
\item Case $3$. $r$ must have a pole of either order $1$ or $2$. No other order is allowed.
$\mathcal{O}(\infty)$ must be at least $2$.
\end{enumerate}
\end{minipage}
\end{center}
If the conditions for each case are not satisfied then there is no need to try that
case as there will be no Liouvillian solution to the DE.
\end{document}