Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want my theorem-like environments to be framed, as it's an effective way of making them stand out from the main text.

According to Gonzalo Medina's answer to the question box around theorem statement, the \newmdtheoremenv command from the mdframed package is the way to go.

However, I find that vertical space before and after such framed-theorem environments is lacking (see below). I looked into the mdframed documentation but did not find anything to fix this.

Did I miss something in the documentation?

How would you fix this in an easy and efficient (automatic) way?

Is a package other than mdframed more appropriate for framed-theorem environments?

enter image description here

\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}
share|improve this question

1 Answer 1

up vote 6 down vote accepted

Yes, you missed that you can pass options to the environment; in particular you can use skipabove=<length>, skipbelow=<length>:

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

Your example:

\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}

enter image description here

This answers your two first questions; regarding the third one, if your frames must allow page breaks, the possibilities are basically mdframed or framed; this question compares them: framed or mdframed? (Pros/Cons).

share|improve this answer
    
Thanks! You're the fastest gun in the West! –  Jubobs Apr 5 '13 at 20:54
    
@Jubobs You're welcome! I updated my answer answering your third question. Let me see if I can find the question I am talking about. –  Gonzalo Medina Apr 5 '13 at 21:08
    
@Jubobs found it! Link provided! –  Gonzalo Medina Apr 5 '13 at 21:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.