Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start new section at top of page, not below a figure [closed]

Tags:

latex

When I use more than one figure per section in LATEX, I am no longer able to dictate that the section number start just after a page break. I've been struggling with this for a while. If there are any LATEX wizards out there, your help would be much appreciated.

In the file referenced below, it is section 2 that I am struggling with. The final document is much, much longer than this and this problem happens several times, but I thought for the sake of clarity I would create a simpler version that still exhibits the problem.

zip file containing everything

\documentclass{article}
\usepackage{graphicx}   
\usepackage{placeins}

\widowpenalty=2000
\clubpenalty=2000

\begin{document}

\section{}


\begin{figure} [h]
  \center
  \includegraphics[width=12cm]{Figure}
  \label{fig:example}
\end{figure}
\FloatBarrier

My goal is to have section 2 start on a new page.
$$\\$$

\begin{figure} [h]
  \center
  \includegraphics[width=14cm]{Figure}
  \label{fig:example}
 \end{figure}


\newpage
\pagebreak [4]
$$\\$$


\section{}

\begin{figure} [h]
  \center
  \includegraphics[width=14cm]{Figure}
  \label{fig:example}
\end{figure}


This is the body text for section 2.


\end{document}

Figure.jpg

like image 769
Alan Thomason Avatar asked Dec 24 '22 12:12

Alan Thomason


1 Answers

Have you tried \clearpage instead of \newpage?

like image 70
Jean-Claude Colette Avatar answered Dec 31 '22 15:12

Jean-Claude Colette