Skip to main content
Fixing a site bug of disappearing double backslashes: https://tex.meta.stackexchange.com/questions/7168/double-backslashes-disappear-from-code
Source Link
ShreevatsaR
  • 47.7k
  • 10
  • 122
  • 157

I have created a minimal working example (MWE) consisting of a section and a longtabu table.

\documentclass{report} \usepackage{longtable,tabu} \begin{document} An initial line of text \vskip 47.5em % Offset the section to close to the bottom of the page \section{Test section} \begin{longtabu}{l X} \textbf{Column 1} & \textbf{Column 2} \ \\  \hline   \  \\  \endhead Cell 1 & Cell 2 \  \\ \end{longtabu} Additional content \end{document} 

In the compiled document, which becomes two pages long, the section heading ends up at the end of the first page while the table (longtabu) ends up at the other. Why doesn't LaTeX prevent that a page break is inserted directly after the section heading, and how can it be fixed? If LaTeX has to break the page before the table has been finished, I want the page break to be inserted before the section heading.

Ideally, I want to obtain the same result as if a clearpage had been inserted right before the section heading started, if there would otherwise have been a page break between the section heading and the table.

I have created a minimal working example (MWE) consisting of a section and a longtabu table.

\documentclass{report} \usepackage{longtable,tabu} \begin{document} An initial line of text \vskip 47.5em % Offset the section to close to the bottom of the page \section{Test section} \begin{longtabu}{l X} \textbf{Column 1} & \textbf{Column 2} \  \hline   \  \endhead Cell 1 & Cell 2 \  \end{longtabu} Additional content \end{document} 

In the compiled document, which becomes two pages long, the section heading ends up at the end of the first page while the table (longtabu) ends up at the other. Why doesn't LaTeX prevent that a page break is inserted directly after the section heading, and how can it be fixed? If LaTeX has to break the page before the table has been finished, I want the page break to be inserted before the section heading.

Ideally, I want to obtain the same result as if a clearpage had been inserted right before the section heading started, if there would otherwise have been a page break between the section heading and the table.

I have created a minimal working example (MWE) consisting of a section and a longtabu table.

\documentclass{report} \usepackage{longtable,tabu} \begin{document} An initial line of text \vskip 47.5em % Offset the section to close to the bottom of the page \section{Test section} \begin{longtabu}{l X} \textbf{Column 1} & \textbf{Column 2} \\  \hline \\  \endhead Cell 1 & Cell 2 \\ \end{longtabu} Additional content \end{document} 

In the compiled document, which becomes two pages long, the section heading ends up at the end of the first page while the table (longtabu) ends up at the other. Why doesn't LaTeX prevent that a page break is inserted directly after the section heading, and how can it be fixed? If LaTeX has to break the page before the table has been finished, I want the page break to be inserted before the section heading.

Ideally, I want to obtain the same result as if a clearpage had been inserted right before the section heading started, if there would otherwise have been a page break between the section heading and the table.

Notice removed Draw attention by StrawberryFieldsForever
Bounty Ended with jonalv's answer chosen by StrawberryFieldsForever
added 216 characters in body
Source Link

I have created a minimal working example (MWE) consisting of a section and a longtabu table.

\documentclass{report} \usepackage{longtable,tabu} \begin{document} An initial line of text \vskip 47.5em % Offset the section to close to the bottom of the page \section{Test section} \begin{longtabu}{l X} \textbf{Column 1} & \textbf{Column 2} \ \hline \ \endhead Cell 1 & Cell 2 \ \end{longtabu} Additional content \end{document} 

In the compiled document, which becomes two pages long, the section heading ends up at the end of the first page while the table (longtabu) ends up at the other. Why doesn't LaTeX prevent that a page break is inserted directly after the section heading, and how can it be fixed? If LaTeX has to break the page before the table has been finished, I want the page break to be inserted before the section heading.

Ideally, I want to obtain the same result as if a clearpage had been inserted right before the section heading started, if there would otherwise have been a page break between the section heading and the table.

I have created a minimal working example (MWE) consisting of a section and a longtabu table.

\documentclass{report} \usepackage{longtable,tabu} \begin{document} An initial line of text \vskip 47.5em % Offset the section to close to the bottom of the page \section{Test section} \begin{longtabu}{l X} \textbf{Column 1} & \textbf{Column 2} \ \hline \ \endhead Cell 1 & Cell 2 \ \end{longtabu} \end{document} 

In the compiled document, which becomes two pages long, the section heading ends up at the end of the first page while the table (longtabu) ends up at the other. Why doesn't LaTeX prevent that a page break is inserted directly after the section heading, and how can it be fixed? If LaTeX has to break the page before the table has been finished, I want the page break to be inserted before the section heading.

Ideally, I want to obtain the same result as if a clearpage had been inserted right before the section heading started, if there would otherwise have been a page break between the section heading and the table.

I have created a minimal working example (MWE) consisting of a section and a longtabu table.

\documentclass{report} \usepackage{longtable,tabu} \begin{document} An initial line of text \vskip 47.5em % Offset the section to close to the bottom of the page \section{Test section} \begin{longtabu}{l X} \textbf{Column 1} & \textbf{Column 2} \ \hline \ \endhead Cell 1 & Cell 2 \ \end{longtabu} Additional content \end{document} 

In the compiled document, which becomes two pages long, the section heading ends up at the end of the first page while the table (longtabu) ends up at the other. Why doesn't LaTeX prevent that a page break is inserted directly after the section heading, and how can it be fixed? If LaTeX has to break the page before the table has been finished, I want the page break to be inserted before the section heading.

Ideally, I want to obtain the same result as if a clearpage had been inserted right before the section heading started, if there would otherwise have been a page break between the section heading and the table.

added 216 characters in body
Source Link

I have created a minimal working example (MWE) consisting of a section and a longtabu table.

\documentclass{report} \usepackage{longtable,tabu} \begin{document} An initial line of text \vskip 47.5em % Offset the section to close to the bottom of the page \section{Test section} \begin{longtabu}{l X} \textbf{Column 1} & \textbf{Column 2} \ \hline \ \endhead Cell 1 & Cell 2 \ \end{longtabu} \end{document} 

In the compiled document, which becomes two pages long, the section heading ends up at the end of the first page while the table (longtabu) ends up at the other. Why doesn't LaTeX prevent that a page break is inserted directly after the section heading, and how can it be fixed? If LaTeX has to break the page before the table has been finished, I want the page break to be inserted before the section heading.

Ideally, I want to obtain the same result as if a clearpage had been inserted right before the section heading started, if there would otherwise have been a page break between the section heading and the table.

I have created a minimal working example (MWE) consisting of a section and a longtabu table.

\documentclass{report} \usepackage{longtable,tabu} \begin{document} An initial line of text \vskip 47.5em % Offset the section to close to the bottom of the page \section{Test section} \begin{longtabu}{l X} \textbf{Column 1} & \textbf{Column 2} \ \hline \ \endhead Cell 1 & Cell 2 \ \end{longtabu} \end{document} 

In the compiled document, which becomes two pages long, the section heading ends up at the end of the first page while the table (longtabu) ends up at the other. Why doesn't LaTeX prevent that a page break is inserted directly after the section heading, and how can it be fixed? If LaTeX has to break the page before the table has been finished, I want the page break to be inserted before the section heading.

I have created a minimal working example (MWE) consisting of a section and a longtabu table.

\documentclass{report} \usepackage{longtable,tabu} \begin{document} An initial line of text \vskip 47.5em % Offset the section to close to the bottom of the page \section{Test section} \begin{longtabu}{l X} \textbf{Column 1} & \textbf{Column 2} \ \hline \ \endhead Cell 1 & Cell 2 \ \end{longtabu} \end{document} 

In the compiled document, which becomes two pages long, the section heading ends up at the end of the first page while the table (longtabu) ends up at the other. Why doesn't LaTeX prevent that a page break is inserted directly after the section heading, and how can it be fixed? If LaTeX has to break the page before the table has been finished, I want the page break to be inserted before the section heading.

Ideally, I want to obtain the same result as if a clearpage had been inserted right before the section heading started, if there would otherwise have been a page break between the section heading and the table.

edited title
Link
Loading
Changed example code to a minimal working example (MWE)
Source Link
Loading
Notice added Draw attention by StrawberryFieldsForever
Bounty Started worth 50 reputation by StrawberryFieldsForever
Tweeted twitter.com/#!/StackTeX/status/370201504441204736
added 15 characters in body; edited title
Source Link
Loading
added 57 characters in body
Source Link
Loading
Source Link
Loading