2

I'm writing a chemistry thesis and my experimental basically consists of section headings (naming the compound), followed immediately by a wrapfigure (an eps of the compound structure), followed by the experimental procedure and characterisation data (which wrap around the structure). However, if there isn't enough space between where the wrapfigure is called and the end of the page:

(a) if the figure is floating, it is pushed onto the next page, beside the next paragraph which is invariably a new compound, so it overlaps with the structure that is supposed to be there,

(b) if the figure is non-floating, it hangs below the lower margin on that page and pointless whitespace is created on the next page where the image is hypothetically "hanging."

\documentclass{book}

\usepackage{color,graphicx}
\usepackage{float}
\usepackage{wrapfig}

\title{Thesis}
\author{}

\begin{document}

\chapter{Experimental}

In our previous papers, we reported the palladium-catalyzed cross-coupling reaction of stuff. The compounds are readily accessible by hydroboration of alkenes and alkynes, the stereochemistry of 1-alkenyl groups both on boron and halides are completely retained in the products, many functional groups including ester, ketone, and aldehyde are tolerated, and high turnovers of the palladium catalysts are observed.

In our previous papers, we reported the palladium-catalyzed cross-coupling reaction of stuff. The compounds are readily accessible by hydroboration of alkenes and alkynes, the stereochemistry of 1-alkenyl groups both on boron and halides are completely retained in the products, many functional groups including ester, ketone, and aldehyde are tolerated, and high turnovers of the palladium catalysts are observed.

In our previous papers, we reported the palladium-catalyzed cross-coupling reaction of stuff. The compounds are readily accessible by hydroboration of alkenes and alkynes, the stereochemistry of 1-alkenyl groups both on boron and halides are completely retained in the products, many functional groups including ester, ketone, and aldehyde are tolerated, and high turnovers of the palladium catalysts are observed.

In our previous papers, we reported the palladium-catalyzed cross-coupling reaction of stuff. The compounds are readily accessible by hydroboration of alkenes and alkynes, the stereochemistry of 1-alkenyl groups both on boron and halides are completely retained in the products, many functional groups including ester, ketone, and aldehyde are tolerated, and high turnovers of the palladium catalysts are observed.

\subsection{Toluenesulfonic acid 2-azidoethyl ester}

\begin{wrapfigure}{L}{0.18\textwidth}
    \includegraphics[scale=0.65]{img.eps}
\end{wrapfigure}

In our previous papers, we reported the palladium-catalyzed cross-coupling reaction of stuff. The compounds are readily accessible by hydroboration of alkenes and alkynes, the stereochemistry of 1-alkenyl groups both on boron and halides are completely retained in the products, many functional groups including ester, ketone, and aldehyde are tolerated, and high turnovers of the palladium catalysts are observed.  In our previous papers, we reported the palladium-catalyzed cross-coupling reaction of stuff. The compounds are readily accessible by hydroboration of alkenes and alkynes, the stereochemistry of 1-alkenyl groups both on boron and halides are completely retained in the products, many functional groups including ester, ketone, and aldehyde are tolerated, and high turnovers of the palladium catalysts are observed.

\subsection{Toluenesulfonic acid 2-azidoethyl ester}

\begin{wrapfigure}{L}{0.18\textwidth}
    \includegraphics[scale=0.65]{img.eps}
\end{wrapfigure}

In our previous papers, we reported the palladium-catalyzed cross-coupling reaction of stuff. The compounds are readily accessible by hydroboration of alkenes and alkynes, the stereochemistry of 1-alkenyl groups both on boron and halides are completely retained in the products, many functional groups including ester, ketone, and aldehyde are tolerated, and high turnovers of the palladium catalysts are observed.  In our previous papers, we reported the palladium-catalyzed cross-coupling reaction of stuff. The compounds are readily accessible by hydroboration of alkenes and alkynes, the stereochemistry of 1-alkenyl groups both on boron and halides are completely retained in the products, many functional groups including ester, ketone, and aldehyde are tolerated, and high turnovers of the palladium catalysts are observed.

\end{document}

I don't know how to add img.eps on here... but I assume anything would work. To see the non-floating case the optional argument [L] is changed to [l].

1
  • I should comment that I can only see two ways this might be fixed: (1) some way of making the floating wrapfigure start immediately on the next page (which is somewhat better than waiting for the next paragraph which always causes an image clash) or (2) some way of forcing a bad page break prior to offending section headings (is there a way to automate this?)
    – bsd
    Commented Jun 13, 2011 at 18:48

1 Answer 1

4

You could use the nobottomtitles option from the titlesec package. Add to the preamble:

\usepackage[nobottomtitles*]{titlesec}

With this option, titles close to the bottom margin will be moved to the next page. You can control the minimal space required in the bottom margin not to move the title using \renewcommand{\bottomtitlespace}{<length>} (default value is .2\textheight.)

2
  • Thanks! Actually already had the titlesec package for other reasons. This stops a lot of the instances in my document, but not all... it's hard to set the "ideal" threshold height because some of my structures are very small (short) and some very tall.
    – bsd
    Commented Jun 13, 2011 at 20:27
  • @bsd: Well, some fine-tuning aspects require human intervention anyway. Commented Jun 13, 2011 at 20:33

You must log in to answer this question.

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