1

I have a lengthy two-column document where some of the figures end up taking up the entire column (centered in the column), but there ought to be room for text either above or below the figure. Help?

Here's an example: example

The preamble is reasonably straightforward:

\documentclass[letterpaper,twocolumn]{article}
\usepackage{amsmath}
\usepackage{luatextra}
\usepackage{hyperref}
\usepackage{fontspec}
\usepackage{listings}
\usepackage[margin=1in]{geometry}
\usepackage{unicode-math}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage{siunitx}
\usepackage{topcapt}
\usepackage[version=4]{mhchem}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{TeX Gyre Termes}
\setmonofont{TeX Gyre Cursor}
\setmathfont{TeX Gyre Termes Math}
\renewcommand\thesection       {\Roman{section}}
\newcommand{\matr}[1]{\mathbf{#1}}
\renewcommand{\vec}[1]{\bf{#1}}

%float placement parameters
\renewcommand{\topfraction}{.85}
\renewcommand{\bottomfraction}{.7}
\renewcommand{\textfraction}{.15}
\renewcommand{\floatpagefraction}{.66}
\renewcommand{\dbltopfraction}{.66}
\renewcommand{\dblfloatpagefraction}{.66}
\setcounter{topnumber}{9}
\setcounter{bottomnumber}{9}
\setcounter{totalnumber}{20}
\setcounter{dbltopnumber}{9}

and the offending figure is defined as:

\begin{figure}[tbp]
  \centering
  \includegraphics[width=\linewidth]{spectra.pdf}
  \caption{K, Th, and U basis spectra. Although drawn as smooth curves, the
      x-axis (energy deposited) is divided into 0.012 MeV wide channels,
      and the corresponding y-axis value is the average number of counts
      recorded during a one-second measurement having an energy that falls
      within that channel.  Solid curves correspond to \ce{NaI}, while
      dotted curves correspond to \ce{CeBr3}. The dashed K curve in the top
      panel corresponds to a Radian-sized \ce{NaI} spectrum that has had
      the count rate in each channel multiplied by a factor of 1.3 (so that
      the low-energy peak roughly overlaps those of its larger breathren).
      The bottom panel is just a blow-up of the high-energy portion of the
  spectra presented in the top panel. Vertical dashed lines indicate window
  boundaries (see Sec.\ \ref{sec:fitting}) with the lower limit of each
  window located at 0.072, 0.372, 0.696, 1.032, 1.344, 1.548, 1.944, and
  2.208 MeV.}
  \label{fig:basisspectra}
\end{figure}

Thanks!

  • Welcome to TeX. SE! Change float position option to [htb], see, what happens if you remove "float placement parameters" and off-topic: move hyperref package on the end of the document preamble. – Zarko Mar 08 '17 at 05:30
  • Also, make sure the images themselves are not providing excess white space. – John Kormylo Mar 08 '17 at 15:36
  • Yep. Dropping the "p" from [tbp] solved the problem. Thanks!

    Incidentally, Mittelbach's article on float placement (https://www.latex-project.org/publications/tb111mitt-float.pdf) really helped, since I then realized what I was seeing was the figures being moved to "float columns".

    – Grant Goodyear Mar 08 '17 at 16:28

0 Answers0