フレーム定理環境の前後に垂直スペースを追加する

フレーム定理環境の前後に垂直スペースを追加する

定理のような環境をフレームに入れたいと思っています。これは、定理をメインのテキストから目立たせる効果的な方法だからです。

によるとゴンサロ・メディナの回答質問に対して定理の記述を囲むボックス、パッケージ\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}

ここに画像の説明を入力してください

これで最初の2つの質問への回答になります。3つ目の質問に関して、フレームで改ページを許可する必要がある場合、基本的には次のmdframedように なります。framed; この質問はそれらを比較します:framed か mdframed か? (長所/短所)

関連情報