How to define a multipage environment not interrupted by tables and figures?

Posted by Egon Willighagen on Stack Overflow See other posts from Stack Overflow or by Egon Willighagen
Published on 2010-06-13T14:23:51Z Indexed on 2010/06/13 14:32 UTC
Read the original article Hit count: 300

Filed under:
|

I have defined a new LaTeX environment for excursions in a book chapter I am writing. The environment is multipage and often includes inline images. Moreover, I am using the shaded environment to give the environment a background colour to make it stand out a bit.

However, the environment, as shown below, is split up by floating tables and images, which makes the flow of the environment visually more difficult to follow. For example, it is now difficult to see if that floating image or table is part (the missing background colour does not help). So, I like to extend my environment to disallow it to be interrupted by floating elements, but do not know how to get that done.

\newcounter{bioclipse}
\def\thebioclipse{\thechapter-\arabic{bioclipse}}
\newenvironment{bioclipse}[2][]{\begin{small}\begin{shaded}\refstepcounter{bioclipse} \par\medskip\noindent%
   \textbf{Bioclipse Excursion~\thebioclipse #1: #2
   \vspace{0.1cm} \hrule \vspace{0.1cm}}
   \rmfamily}{\medskip \end{shaded}\end{small}}

Any solution to disallow interruption is fine, even if the background colour is done differently.

© Stack Overflow or respective owner

Related posts about latex

Related posts about environment