TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've definied an environment with

\newenvironment{definiere}{\begin{leftbar} \textbf{Definition:}\newline }{\end{leftbar}}

Unfortunately sometimes this environment is spread over two pages, where the left-bar is about 2cm long and "Definition" written as header, but the actual definition itself is on the next page.

I'm using this environment mostly like this:

     WMC=\sum_{i=1}^n {c_i} \label{eq:WMC}

I can avoid this behaviour by moving paragraphs below or above the definition, but sometimes it doesn't make sense anymore. My question is, does someone see a more elegant solution to my needs?

share|improve this question
Would making it a floating environment solve your problem? – ℝaphink Apr 27 '11 at 8:58
@Raphink: How ? – adnc Apr 27 '11 at 9:00
Please state what you want not what you don't want, especially in the title. You want an environment which doesn't break over multiple pages? Then say so in the title. At the moment the title means the exact opposite for me! – Martin Scharrer Apr 27 '11 at 9:06
You are right, unfortunately I can not edit the title anymore. Sorry – adnc Apr 27 '11 at 9:08
@adnc: Of course you can edit the title: tex.stackexchange.com/posts/16729/edit – Martin Scharrer Apr 27 '11 at 9:11
up vote 5 down vote accepted

Your \textbf{Definition} is a title like a section title. Suppress the page break like \section does it:

share|improve this answer
That works great! – adnc Apr 27 '11 at 9:19

Ulrike's answer is probably the correct way of doing something like that. Another approach that seemed to work for me---you could pack everything inside a minipage. Hopefully, someone else can explain exactly why it worked.

\newenvironment{definiere}{\begin{minipage}{\textwidth}\begin{leftbar} \textbf{Definition:}\newline }{\end{leftbar}\end{minipage}}
share|improve this answer

Your Answer


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.