在框架定理环境之前和之后添加垂直空间

在框架定理环境之前和之后添加垂直空间

我希望我的类似定理的环境能够被框架起来,因为这是让它们从正文中脱颖而出的有效方法。

根据Gonzalo Medina 的回答针对这个问题框定理陈述,包\newmdtheoremenv中的命令mdframed是可行的方法。

但是,我发现这种框架定理环境前后的垂直空间不足(见下文)。我查看了文档,mdframed但没有找到任何可以解决这个问题的方法。

我是否遗漏了文档中的某些内容?

如何以一种简单、有效(自动)的方式解决这个问题?

mdframed是否有其他更适合框架定理环境的包?

在此处输入图片描述

\documentclass{book}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mdframed}
\theoremstyle{definition}
\newmdtheoremenv{assum}{Assumption}[chapter]

\begin{document}

\chapter{Fluid mechanics}

\section{Fields}

The following fields are of particular interest:
\begin{itemize}
    \item $\rho$: fluid density (time-dependent scalar field);
    \item $p_{\text{tot}}$: total pressure in the fluid (time-dependent scalar field);
    \item $v$: velocity of the fluid parcels (time-dependent vector field).
\end{itemize}    

\begin{assum}[Differentiability of tensor fields]
    \label{assum:differentiability}
    All tensor fields of interest are differentiable (weakly, at least).
\end{assum}

Assumption~\ref{assum:differentiability} blah blah

\subsubsection{Mass-continuity equation}

The mass-continuity equation is derived from the principle of conservation of mass:
\begin{assum}[Conservation of mass]
    \label{assum:conservation_of_mass}
    Fluid density $\rho$ is a conserved quantity within fluid parcels:
if $V_{\text{fp}}(t)$ delimits a region of space occupied by a fluid parcel
at time $t$, then
    \begin{equation}
        \frac{\mathrm{d}\phantom{t}}{\mathrm{d}t}
\iiint_{ V_{\text{fp}}(t)} \rho \, \mathrm{d}V = 0\,.
    \end{equation}
\end{assum}
blablah

\end{document}

答案1

是的,您错过了可以将选项传递给环境;特别是您可以使用skipabove=<length>, skipbelow=<length>

\newmdtheoremenv[skipabove=\topsep,skipbelow=\topsep]{assum}{Assumption}[chapter]

你的例子:

\documentclass{book}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mdframed}
\theoremstyle{definition}
\newmdtheoremenv[skipabove=\topsep,skipbelow=\topsep]{assum}{Assumption}[chapter]

\begin{document}

\chapter{Fluid mechanics}

\section{Fields}

The following fields are of particular interest:
\begin{itemize}
    \item $\rho$: fluid density (time-dependent scalar field);
    \item $p_{\text{tot}}$: total pressure in the fluid (time-dependent scalar field);
    \item $v$: velocity of the fluid parcels (time-dependent vector field).
\end{itemize}    

\begin{assum}[Differentiability of tensor fields]
    \label{assum:differentiability}
    All tensor fields of interest are differentiable (weakly, at least).
\end{assum}

Assumption~\ref{assum:differentiability} blah blah

\subsubsection{Mass-continuity equation}

The mass-continuity equation is derived from the principle of conservation of mass:
\begin{assum}[Conservation of mass]
    \label{assum:conservation_of_mass}
    Fluid density $\rho$ is a conserved quantity within fluid parcels: if $V_{\text{fp}}(t)$ delimits a region of space occupied by a fluid parcel at time $t$, then
    \begin{equation}
        \frac{\mathrm{d}\phantom{t}}{\mathrm{d}t} \iiint_{ V_{\text{fp}}(t)} \rho \, \mathrm{d}V = 0\,.
    \end{equation}
\end{assum}
blablah

\end{document}

在此处输入图片描述

这回答了你的前两个问题;关于第三个问题,如果你的框架必须允许分页符,那么可能性基本上是mdframedframed;这个问题对它们进行了比较:framed 还是 mdframed?(优点/缺点)

相关内容