I have an environment set up of longtables
that I use as "tips"-boxes and exercises in my book. The left column shows only one word rotated (tips, exercise or whatever) while the right contains the rest of the text. Now the problem is that the right column is a single cell so (xe)latex decides to put the table on a new page if it is too big. Here is an example of what I mean:
So how can I make it start on the current page and break whenever necessary, then continue on the next page?
My code for the table:
\documentclass[11pt]{book}
\usepackage{longtable}
\usepackage{array}
\usepackage{rotating}
\usepackage{lipsum}
\newcolumntype{M}[1]{>{%
\parskip=0.5\baselineskip%
\advance\parskip by 0pt plus 2pt
\setlength{\parfillskip}{30pt plus 1fil}}m{#1}}
\newenvironment{exercise}[1]
{
\begin{longtable}{m{0.05\textwidth}|M{0.85\textwidth}}
\rotatebox{90}{\textbf{Övning}} & \textbf{#1} \newline
}
{\end{longtable}
\bigskip
}
\begin{document}
\lipsum
\begin{exercise}{1}
\lipsum
\end{exercise}
\end{document}
\documentclass
so that those trying to help don't have to recreate it. – Peter Grill Oct 21 '11 at 18:49longtable
or would you consider an answer involvingmdframed
? – cmhughes Oct 21 '11 at 18:54