5

I'm making a workbook for students. I'd like to create a practice-problem theorem environment that includes empty space after the theorem environment.

So far I have:

\newtheoremstyle{exampstyle}
  {} % Space above
  {2in} % Space below
  {} % Body font
  {} % Indent amount
  {\bfseries} % Theorem head font
  {.} % Punctuation after theorem head
  {.5em} % Space after theorem head
  {} % Theorem head spec (can be left empty, meaning `normal')
\theoremstyle{exampstyle} 

And it functions relatively well. However, I lose the 2 inches of workspace if the theorem is towards the bottom of the page. How do I force LaTeX to keep the 2 inches, even if it means an awkward empty space at the top of the next page? I suppose I need something like \vspace* but that returned an error when trying that:

  {\vspace*{2in}} % Space below

Any suggestions? Thanks!

2 Answers 2

3

If you don't mind using ntheorem

\documentclass{article}
\usepackage{ntheorem}

% combined with the ntheorem default, the following
% four lines reproduces your theorem style.
\theorembodyfont{\normalfont}
\theoremseparator{.\hspace{0.5em}}
\theorempreskip{}
\theorempostskip{}

% Instead of using postskip, we use ntheorem's postwork command
% to add vspace*
\theorempostwork{\vspace*{2in}}

% define the new theorem
\newtheorem{exampstyle}{Example}

% lipsum loaded for blind text
\usepackage{lipsum}

\begin{document}
\begin{exampstyle}
        \lipsum[1]
\end{exampstyle}
\begin{exampstyle}
        \lipsum[1]
\end{exampstyle}
\begin{exampstyle}
        \lipsum[2]
\end{exampstyle}
\begin{exampstyle}
        \lipsum[2]
\end{exampstyle}
\begin{exampstyle}
        \lipsum[1]
\end{exampstyle}
\end{document}

Page 1 of output


Page 2 of output


Page 3 of output

2

You could use needspace for this, which would force a page break if you don't have (say) 2in below the theorem, after which you can insert a \vspace*{2in}:

enter image description here

\documentclass{article}

\usepackage{amsthm,needspace}

\newtheoremstyle{exampstyle}
  {} % Space above
  {} % Space below
  {} % Body font
  {} % Indent amount
  {\bfseries} % Theorem head font
  {.} % Punctuation after theorem head
  {.5em} % Space after theorem head
  {} % Theorem head spec (can be left empty, meaning `normal')
\theoremstyle{exampstyle}
\newtheorem{theoremA}{Theorem}

\newenvironment{theorem}{%
  \begin{theoremA}%
}{%
  \end{theoremA}
  \needspace{2in}% If less than 2in left on page, issue a page break
  \vspace*{2in}% Insert 2in of vertical space, even at top of page
}%

\usepackage{lipsum}

\begin{document}

\lipsum[1-3]

\begin{theorem}
\lipsum[1]
\end{theorem}

Something following.

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .