3

I'm writing a Master's thesis, and my supervisor insists that each figure or table should have its own page. Unfortunately I have two tables back-to-back that will fit very nicely on one page, and nothing I do can make it otherwise. I have tried using

\setcounter{topnumber}{1}
\setcounter{bottomnumber}{1}
\setcounter{totalnumber}{1}
\renewcommand{\topfraction}{0.01}
\renewcommand{\bottomfraction}{0.01}
\renewcommand{\textfraction}{0.01}
\renewcommand{\floatpagefraction}{0.01}

in my preamble as I have seen suggested elsewhere, but the darn tables still cling to each other like they are drowning (totalnumber only applies to text pages, if I understand correctly).

I have also tried \FloatBarrier between tables 1 and 2 but this leads to an improperly filled text page (pg. 3). (Pg 1 is text, pg 2 is Figure 1, Pg 3 is half text, half empty, Table 1 appears on pg 4, and all the text in subsection{One} after Table 1 is moved to page 5, and Table 2 is moved to page 6.) This is unacceptable too.

I have also tried moving the text in between the two tables, but because this is the beginning of a chapter and section, I wind up with the first table appearing before the text that calls it, which is also unacceptable.

How do I get the two tables and figure 2 to appear separately on three consecutive pages, and have properly filled text pages? Said another way, pg 1: text; pg 2: figure 1; pg 3: text, pg 4: table 1, pg 5: table 2, pg 6: figure 2.

Here's my MWE (including my full preamble in case something is interfering):

\documentclass[12pt]{report}
\usepackage{textcomp, graphicx, rotating, amsmath, booktabs, setspace, url, caption, titlesec, fancyhdr}
\usepackage[section]{placeins}
\usepackage[compress]{natbib}
\captionsetup[figure]{name={Fig.}}
\bibpunct{(}{)}{;}{a}{,}{,}
\urlstyle{same}
\doublespacing

\titleformat{\chapter}[display]{\bfseries\centering}{\huge Chapter \thechapter}{1em}{\Huge}
\titlespacing{\chapter}{0cm}{0cm}{1.5cm}

\pagestyle{fancy}
\lhead{} \chead{} \rhead{\thepage}
\lfoot{} \cfoot{} \rfoot{}
\renewcommand{\headrulewidth}{0pt}

\begin{document}
\thispagestyle{fancy}

\chapter{Three}

About 70 words of text.

\section{One}

Figure 1, placed here because that's the only way I could get the float on page 2!

\subsection{One}

About 100 words of text that in short succession call table 1, table 2, and figure 2.

\begin{table}[p]
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{p{3cm} p{2.5cm} c p{4cm}}
\toprule
Station Name & Location & Data Range & Normals \\
\midrule
Cameron Falls & 49$^\circ$09'38'' N, 88$^\circ$21'00" W & 1924-1998 & 1961-1990, 1971-2000, 1981-2010 \\
Cameron Falls (AUT) & 49$^\circ$09'14'' N, 88$^\circ$20'41'' W & 1998-2017 & - \\
Thunder Bay A & 48$^\circ$22'10'' N, 89$^\circ$19'38'' W & 1953-2012 & 1961-1990, 1971-2000 \\
Thunder Bay CS & 48$^\circ$22'10'' N, 89$^\circ$19'38'' W & 2000-2017 & - \\
\bottomrule
\end{tabular}
\caption{The first table.
\label{stationstable}}
\end{table}

\begin{table}[p]
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{l c c c}
\toprule
Month & Mean Air Temp. (\textcelsius{}) & Precipitation (mm) & Snow Fall (cm) \\
\midrule
January & -16.2 & 55.4 & 55.4 \\
February & -13.1 & 32.2 & 29.8 \\
March & -6.5 & 30.2 & 23.4 \\
April & 1.7 & 43.6 & 13.9 \\
May & 8.7 & 62.9 & 1.2 \\
June & 14.0 & 86.3 & 0.0 \\
July & 17.1 & 91.3 & 0.0 \\
August & 16.8 & 94.3 & 0.1 \\
September & 11.3 & 99.4 & 0.9 \\
October & 4.7 & 91.8 & 11.6 \\
November & -4.0 & 73.8 & 43.8 \\
December & -11.9 & 63.7 & 58.1 \\
\bottomrule
\end{tabular}
\caption{The second table.
\label{CFclimatetable}}
\end{table}

Figure 2.

80 words of text.

Another table.

The rest of my chapter.

\end{document}

This is my first time posting a question, so let me know if there are changes I should make.

Thanks in advance!

  • 2
    you could put \clearpage between the tables. – David Carlisle May 6 '18 at 20:04
  • Thanks @gusbrs! @DavidCarlisle putting \clearpage has the same effect as \FloatBarrier, which surprised me because I expected \clearpage to create a page break and \FloatBarrier not to. Either way a gap appears on pg 3. – sailleway May 6 '18 at 20:48
  • Properly filled text pages? But with what text in your MWE? As first float cannot be placed in first page, the it is "properly filled" with all the text available, then what? The floats only have the end of the document. Try this: Load the package lipsum in the preamble to write painlessly some dummy text, then remove any float option and any setting of topnumber, etc. (just use the defaults), then just write \lipsum[1] after the first and \lipsum[2-12] after the second \end{table} Now are only one table in each page and all pages are filled properly. Right? – Fran May 7 '18 at 0:45
4

If you need to have one table per page, consume the entire page.

\documentclass[12pt]{report}
\usepackage{textcomp, graphicx, rotating, amsmath, booktabs, setspace, url, caption, titlesec, fancyhdr}
\usepackage[section]{placeins}
\usepackage[compress]{natbib}
\captionsetup[figure]{name={Fig.}}
\bibpunct{(}{)}{;}{a}{,}{,}
\urlstyle{same}
\doublespacing

\titleformat{\chapter}[display]{\bfseries\centering}{\huge Chapter \thechapter}{1em}{\Huge}
\titlespacing{\chapter}{0cm}{0cm}{1.5cm}

\pagestyle{fancy}
\lhead{} \chead{} \rhead{\thepage}
\lfoot{} \cfoot{} \rfoot{}
\renewcommand{\headrulewidth}{0pt}

\begin{document}
\thispagestyle{fancy}

\chapter{Three}

About 70 words of text.

\section{One}

Figure 1, placed here because that's the only way I could get the float on page 2!

\subsection{One}

About 100 words of text that in short succession call table 1, table 2, and figure 2.

\begin{table}[p]
\begin{minipage}[c][\textheight][c]{\textwidth}
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{p{3cm} p{2.5cm} c p{4cm}}
\toprule
Station Name & Location & Data Range & Normals \\
\midrule
Cameron Falls & 49$^\circ$09'38'' N, 88$^\circ$21'00" W & 1924-1998 & 1961-1990, 1971-2000, 1981-2010 \\
Cameron Falls (AUT) & 49$^\circ$09'14'' N, 88$^\circ$20'41'' W & 1998-2017 & - \\
Thunder Bay A & 48$^\circ$22'10'' N, 89$^\circ$19'38'' W & 1953-2012 & 1961-1990, 1971-2000 \\
Thunder Bay CS & 48$^\circ$22'10'' N, 89$^\circ$19'38'' W & 2000-2017 & - \\
\bottomrule
\end{tabular}
\caption{The first table.
\label{stationstable}}
\end{minipage}
\end{table}

\begin{table}[p]
\begin{minipage}[c][\textheight][c]{\textwidth}
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{l c c c}
\toprule
Month & Mean Air Temp. (\textcelsius{}) & Precipitation (mm) & Snow Fall (cm) \\
\midrule
January & -16.2 & 55.4 & 55.4 \\
February & -13.1 & 32.2 & 29.8 \\
March & -6.5 & 30.2 & 23.4 \\
April & 1.7 & 43.6 & 13.9 \\
May & 8.7 & 62.9 & 1.2 \\
June & 14.0 & 86.3 & 0.0 \\
July & 17.1 & 91.3 & 0.0 \\
August & 16.8 & 94.3 & 0.1 \\
September & 11.3 & 99.4 & 0.9 \\
October & 4.7 & 91.8 & 11.6 \\
November & -4.0 & 73.8 & 43.8 \\
December & -11.9 & 63.7 & 58.1 \\
\bottomrule
\end{tabular}
\caption{The second table.
\label{CFclimatetable}}
\end{minipage}
\end{table}

Figure 2.

80 words of text.

Another table.

The rest of my chapter.

\end{document}
0

A solution to left stacked floats scattered one per page is just use the \setcounter{topnumber}{1} and the add only the option [t], no need of inflate the float until it take all the page. It work while there are text to "fill properly" (Otherwise, simply the floats are staked, no matter the float options). Take your time to understand the float behavior in How to influence the position of float environments like figure and table in LaTeX?

As the type of float is irrelevant, to simplify the code I have used the same small figure float ten times at the end of first page (just to simplify the code, using the macro \topimage) followed by a long text of 26 paragraphs (just to simplify again, using lipsum package) . The result is that the first eight images are placed in top of pages 2-9, but the last two are stacked because are not enough text (but if you add some more paragraphs, your supervisor will be happy).

\documentclass[12pt]{report}
\usepackage{graphicx}
\setcounter{topnumber}{1}
% just to simplify the dummy text to commands
\usepackage{lipsum} 
% just to simplify the example float to a command
\def\topimage{%
\begin{figure}[t]\centering%
\includegraphics[scale=.5]{example-image}%
\end{figure}}
\begin{document}
\chapter{Three}
% Eight floats, only one per page  
\topimage
\topimage
\topimage
\topimage
\topimage
\topimage
\topimage
\topimage
% there are not enough text for these float, so they will be  stacked
\topimage
\topimage
\lipsum[1-26]
\end{document}

mwe

Said that, for the more usual case that is not strictly necessary one top float per page my suggestion is left the floats without any options and a with a reasonable amount of text between floats, so they can be aesthetically distributed. For example, replacing the content of the above example by this...

\chapter{Three}
\lipsum[1-2]
\topimage
\lipsum[1-3]
\topimage
\lipsum[1-3]
\topimage
\lipsum[1-3]
\topimage
\lipsum[1-3]
\topimage
\lipsum[1-3]

.. will produce also one top float per page even if you remove \setcounter{topnumber}{1} and the [t] option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.