4

I know there are plenty of questions about this kind of warning but I've not been able to find my answer in any of them.

I've used a code to avoid \cleardoublepage and \clearpage after every chapter...it worked just fine in the first document but not in the second, infact I'm getting the text of the chapter broken in two pieces...one with its chapter title and half blank page, the other attached to the following chapters in a newpage.

Like Page 1:

first title

a few line long text a few line long text a few line long text a few line long text a few line long text a few line long text a few line long text a few line long text a few line long text a few line long text v a few line long text a few line long text

Page 2:

a few line long text a few line long text a few line long text a few line long text

title 1

title 2

This is the warning showed by the compiler

Overfull \vbox (195.80104pt too high) has occurred while \output is active [] [2]

Here is the code:

\documentclass[12pt,a4paper]{report}
\usepackage[italian]{babel}
\usepackage{booktabs}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{remreset}
\usepackage{etoolbox}
\title{\Huge\textbf{Report}}
\author{di \textbf{Mengops}}

\makeatletter
\renewcommand \thesection {\@arabic\c@section}
\@removefromreset{section}{chapter}
\makeatother
%remove "chapter"

\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother
%avoid new page

\begin{document}
\maketitle 

\chapter*{first title}
Per i seguenti circuiti abbiamo calcolato il punto di BIAS. \textbf{Punto di Bias} ovvero il punto di Lavoro del BJT. La sua scelta è cruciale poichè va ad influire sulla capacità del circuito di amplificare il segnale di Input. Con un solo transistor (\textbf{Alplificatore di classe A}) si sceglie il punto di BIAS a metà della Retta di Carico in modo da poter amplificare in egual modo sia il segnale positivo che quello negativo.

\chapter*{title 1}

{\Large
\begin{tabular}{c|c|c|c}
table
\end{tabular}\par}


\chapter*{title 2}

{\Large
\begin{tabular}{c|c|c|c}
\hline
\multicolumn{4}{c}{Tabella Circuito 1}\\
\hline
 & Teorico& Reale& Spice\\
\hline
$R_B$& $2.2 M\Omega$& $2.237 M\Omega$& $2.2 M\Omega$\\
\hline
$R_C$& $5.6 k\Omega$& $5.555 k\Omega$& $56 k\Omega$\\
\hline
$I_B$& $5 \mu A$& $k\Omega$& $5.15622 \mu A$\\
\hline
$I_C$& $1 \mu A$& $k\Omega$& $1.082 \mu A$\\
\hline
$V_{RC}$& $V$& $7.079 V$& $6.0594 V$\\
\hline
$V_{RB}$& $11.3 V$& $11.388 V$& $11.344 V$\\
\hline
$V_{BE}$& $0.7 V$& $0.615 V$& $0.656 V$\\
\hline
$V_{CE}$& $V$& $4.896 V$& $5.94 V$\\
\hline
\end{tabular}\par}

\end{document}

What did I do wrong? Is there any way to fix this?

  • But your example code doesn't reproduce the problem. Can you replace it with an example generating the warning? Perhaps one of the tables if too long and gets pushed (and pushes everything after it) to the next page? – Gonzalo Medina May 5 '14 at 23:06
  • The warning wasn't present when the code contained only the tables without the \clearpage omission option ...could it still be the probem? yes the two tables are very long – Mengops May 5 '14 at 23:12
  • 1
    If the table after the first chapter is too long to fit in the remaining space, since tabular doesn't admit page breaks, the warning is generated and the tabular it will be pushed to the next page; this of course, makes all the text following the tabular to be pushed also, leaving a white gap on the first page. – Gonzalo Medina May 5 '14 at 23:17
  • 2
    You should consider either surrounding the tabular inside a floating table environment, so it will float to a page where it fits (possibly the last page), or using longtable to allow page breaks instead of tabular. – Gonzalo Medina May 5 '14 at 23:19
5

If one of the tabulars after the \chapter is too long to fit in the remaining space of the page, since tabular doesn't admit page breaks, the warning is generated since LaTeX can't fit the table in the page, and the tabular will be pushed to the next page; this of course, makes all the text following the tabular to be pushed also, leaving a white gap on the page.

You should consider either surrounding the tabular inside a floating table environment, so it will float to a page where it fits (possibly the last page), or using longtable from the longtable package to allow page breaks instead of tabular.

Here's your code using longtable with l option for left alignment (of course, the alignment option can be changed to c (which is the default) or r):

\documentclass[12pt,a4paper]{report}
\usepackage[italian]{babel}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{remreset}
\usepackage{etoolbox}
\title{\Huge\textbf{Report}}
\author{di \textbf{Mengops}}

\makeatletter
\renewcommand \thesection {\@arabic\c@section}
\@removefromreset{section}{chapter}
\makeatother
%remove "chapter"

\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother
%avoid new page

\begin{document}
\maketitle 

\chapter*{first title}
Per i seguenti circuiti abbiamo calcolato il punto di BIAS. \textbf{Punto di Bias} ovvero il punto di Lavoro del BJT. La sua scelta è cruciale poichè va ad influire sulla capacità del circuito di amplificare il segnale di Input. Con un solo transistor (\textbf{Alplificatore di classe A}) si sceglie il punto di BIAS a metà della Retta di Carico in modo da poter amplificare in egual modo sia il segnale positivo che quello negativo.

\chapter*{title 1}

{\Large
\begin{tabular}{c|c|c|c}
table
\end{tabular}\par}


\chapter*{title 2}


{\Large
\begin{longtable}[l]{c|c|c|c}
\hline
\multicolumn{4}{c}{Tabella Circuito 1}\\
\hline
 & Teorico& Reale& Spice\\
\hline
$R_B$& $2.2 M\Omega$& $2.237 M\Omega$& $2.2 M\Omega$\\
\hline
$R_C$& $5.6 k\Omega$& $5.555 k\Omega$& $56 k\Omega$\\
\hline
$I_B$& $5 \mu A$& $k\Omega$& $5.15622 \mu A$\\
\hline
$I_C$& $1 \mu A$& $k\Omega$& $1.082 \mu A$\\
\hline
$V_{RC}$& $V$& $7.079 V$& $6.0594 V$\\
\hline
$V_{RB}$& $11.3 V$& $11.388 V$& $11.344 V$\\
\hline
$V_{BE}$& $0.7 V$& $0.615 V$& $0.656 V$\\
\hline
$V_{CE}$& $V$& $4.896 V$& $5.94 V$\\
\hline
\end{longtable}\par}

\end{document}

enter image description here

Not related to the question, but the booktabs package might be of interest for you; it offers you some features to increase the quality of your tables (it discourages the use of vertical rules).

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.