GeneralPagebreak problem.

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Mathias
Posts: 1
Joined: Wed Nov 26, 2008 7:00 pm

Pagebreak problem.

Post by Mathias »

Hi everyone.

I'm quite new to LaTeX, and I'm a new member of this community, so I hope this is the right place to post my problem.

I'm working on a document, based on the Information Mapping-rules. With i-mapping, you have to write a keyword at the left side of the document, and the explenation of that word at the right side. You can see an exemple of my document right here: http://plan.hetinstituut.be/businessplan.pdf.

I've wrote a new LaTeX-command, called 'imap'. This is my code:

Code: Select all

\newcommand{\imap}[2]{\begin{minipage}{0.2\textwidth}\begin{flushleft}\textbf{#1}\end{flushleft}\end{minipage}
\begin{minipage}{0.8\textwidth}\hline\#2\end{minipage}}
This works pretty well, but there's only one problem. All information in a minipage is kept on one page. If the page is quite full, there is no problem (see page 4 in the document). But when there are a lot of minipages on one page, but with only a little bit of content, there is too much white space on the page. I.e. page 5 in my document.

Can anyone help me to resolve this problem? Is there a better way to do this, instead of using minipages?

Thanks in advance!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Pagebreak problem.

Post by localghost »

Mathias wrote:[…] Can anyone help me to resolve this problem? Is there a better way to do this, instead of using minipages?[…]
The issue with the extended white space could be solved by the \raggedbottom command in the preamble. Another way of organizing would be to use the threeparttable package. My first idea was to take the packages array, booktabs and longtable and combine them. Perhaps you can test that by yourself and play around a little bit.

Supplement:
I guess I found a solution based on the above mentioned combination of the three packages. The source could become a little bit confusing with longer text passages.

Code: Select all

\documentclass[11pt,a4paper]{report}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage[centering,includeheadfoot,margin=2cm]{geometry}
\usepackage[bottom,flushmargin,hang,multiple]{footmisc}
\usepackage{array,booktabs,longtable}
\usepackage{lmodern}
\usepackage{blindtext}

\parindent0em

\begin{document}
  \begin{longtable}{@{}m{0.2\linewidth}m{0.77\linewidth}@{}}\toprule
     Blindtext & \begin{minipage}{\linewidth}\blindtext\footnote{\blindtext}\end{minipage} \\ \midrule
     Blindtext & \blindtext \\ \midrule
     Blindtext & \blindtext \\ \midrule
     Blindtext & \blindtext \\ \midrule
     Blindtext & \blindtext \\ \midrule
     Blindtext & \blindtext \\ \midrule
     Blindtext & \blindtext \\ \midrule
     Blindtext & \blindtext \\ \midrule
     Blindtext & \blindtext \\ \bottomrule
  \end{longtable}
\end{document}
You will only have to interrupt the longtable environment when starting a new section.

Best regards and welcome to the board
Thorsten¹
Post Reply