在下面的例子中,您会注意到,当在\pagebreak
定理之后立即使用 a 时,定理环境之后会添加一个不需要的垂直空白,而实际上不应该这样做。
\documentclass[11pt,fleqn]{book}
\usepackage[showframe,top=3.4cm,bottom=3.4cm,left=3cm,right=3cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsthm}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{blindtext}
%----------------------------------------------
\theoremstyle{plain}
\newmdtheoremenv{theoreme}{Theorem}
\begin{document}%
\flushbottom
%----------------------------------------------
\chapter{Title}
%----------------------------------------------
\blindtext[3]
\begin{theoreme}text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text\end{theoreme}
\pagebreak % TO BE COMMENTED FOR TESTING
text
\end{document}
%----------------------------------------------
带有分页符
无分页符
答案1
正如 Barbara Beeton 所说,这是预期的行为。但是,您可以通过\unskip
在 之前添加以下内容来规避这种情况\pagebreak
:
egreg 建议的替代方案是\addpenalty{-10000}
而不是组合。本质上包括和(没有参数)\unskip\pagebreak
的代码本质上是。\addpenalty
\unskip
\pagebreak
\penalty-10000
\documentclass[11pt,fleqn]{book}
\usepackage[showframe,top=3.4cm,bottom=3.4cm,left=3cm,right=3cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsthm}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{blindtext}
%----------------------------------------------
\theoremstyle{plain}
\newmdtheoremenv{theoreme}{Theorem}
\begin{document}%
\flushbottom
%----------------------------------------------
\chapter{Title}
%----------------------------------------------
\blindtext[3]
\begin{theoreme}text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text\end{theoreme}
\unskip\pagebreak % TO BE COMMENTED FOR TESTING
text
\end{document}
%----------------------------------------------