2

I've a problem with the following piece of code:

%%%PREAMBOLO%%%

%Classe Documento
\documentclass[10pt, a5paper]{article}

%Pacchetti per Layout Pagina
\usepackage{geometry}                                   %Controllare il manuale del pacchetto "geometry" per le opzioni di layout. Sono moltissime.
\geometry{
    top=1cm,
    bottom=2cm,
    left=1cm,
    right=1cm,
    heightrounded
}

%Pacchetti per le Codifiche Font
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{lmodern}

%Pacchetti per Formule
\usepackage{bm}                                             %Per poter formattare del testo matematico in nero all'interno del nome delle divisioni.
\usepackage{mathrsfs}                                       %Per l'alfabeto corsivo (cfr. Fourier).
\usepackage{amsmath}                                        %Per poter inserire del testo nelle formule Display.
\usepackage{amsthm}                                     %Per usare ambienti specifici, ad esempio "proof".
\usepackage{amssymb}                                    %Per poter usare 'Uguale per Definizione".
\usepackage{mathtools}                                  %Per poter usare l'Ambiente "dcases" e per poter usare la Dichiarazione "\DeclarePairedDelimiter{a}{b}{c}".
\allowdisplaybreaks[1]                                      %Per consentire la divisione automatica degli ambienti "align". [Opzione] è la permissività della divisione. [1] significa: "dividi ma solo se strettamente necessario".
\numberwithin{equation}{subsection}                 %Imposta la numerazione delle formule al livello delle "subsections"

%Pacchetti per le Tabelle
\usepackage{booktabs}
\usepackage{pdflscape}                                  %Consente di disporre le tabelle in orientamento "landscape".
\usepackage{longtable}                                  %Aggiunge un "environment" che permette alle tabelle di disporsi su più pagine.

%Pacchetti per i Link
\usepackage{hyperref}
\hypersetup{
colorlinks=true,                                            %Consente la colorazione dei link.
    linkcolor=blue,                                         %Colora i link dell'indice e dei riferimenti di blu.
    urlcolor=red,                                           %Colora gli U.R.L. di rosso.
linktoc=all                                                 %Imposta la quantità di link nell'indice. "all" significa: "crea link per ogni divisione".
}

%Nuovi Comandi
\DeclareMathOperator{\mcm}{mcm}
\DeclareMathOperator{\mcd}{MCD}
\DeclareMathOperator{\Log}{Log}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\arctantwo}{arctan_2}
\DeclareMathOperator{\arccot}{arccot}
\DeclareMathOperator{\arcsec}{arcsec}
\DeclareMathOperator{\arccsc}{arccsc}
\DeclareMathOperator{\sech}{sech}
\DeclareMathOperator{\csch}{csch}
\DeclareMathOperator{\arsinh}{arsinh}
\DeclareMathOperator{\arcosh}{arcosh}
\DeclareMathOperator{\artanh}{artanh}
\DeclareMathOperator{\arcoth}{arcoth}
\DeclareMathOperator{\arsech}{arsech}
\DeclareMathOperator{\arcsch}{arcsch}
\DeclareMathOperator{\settsinh}{settsinh}
\DeclareMathOperator{\settcosh}{settcosh}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}       %Crea il Simbolo di "Valore Assoluto"
\DeclarePairedDelimiter{\norma}{\lVert}{\rVert}     %Crea il Simbolo di "Norma"

%%%INIZIO DOCUMENTO%%%

\begin{document}

\begin{landscape}
\paragraph{Sviluppi di Maclaurin delle Funzioni Principali} \mbox{} \\
    Gli Sviluppi di Maclaurin possono essere usati SOLO SE $x=0$.\\
    Nel caso di Funzioni Composte, per la funzione interna deve valere $f(x) = 0$.
    \vspace{-3mm}
    \begin{center}
        \begin{longtable}{ l l l }
            \toprule                            %È questa "toprule" che da problemi di "underfull \vbox".
            \text{Funzione}             &\text{Primi Termini dello Sviluppo}                                                                                                                &\text{Termine Generale}\\
            \midrule
            $e^x$                           &$1 + x + \dfrac{x^2}{2!} + \dfrac{x^3}{3!} + \cdots$                                                                               &$\sum \limits_0^\infty \dfrac{1}{n!}x^n$\\ [2ex]
            $\ln(1+x)$                      &$x - \dfrac{x^2}{2} + \dfrac{x^3}{3} - \dfrac{x^4}{4} + \cdots$                                                                &$\sum \limits_1^\infty (-1)^{n-1}\dfrac{1}{n}x^n$\\
            \midrule
            $\sin x$                            &$x - \dfrac{x^3}{3!} + \dfrac{x^5}{5!} - \dfrac{x^7}{7!} + \cdots$                                                         &$\sum \limits_0^\infty (-1)^n\dfrac{1}{(2n+1)!}x^{2n+1}$\\ [2ex]
            $\cos x$                            &$1 - \dfrac{x^2}{2!} + \dfrac{x^4}{4!} - \dfrac{x^6}{6!} + \cdots$                                                         &$\sum \limits_0^\infty (-1)^n\dfrac{1}{(2n)!}x^{2n}$\\ [2ex]
            $\tan x$                            &???                                                                                                                                                        &$\sum \limits_1^\infty (-4)^n\dfrac{B_{2n} \cdot (1-4^n)}{(2n)!}x^{2n-1}$\\ [2ex]
            $\sec x$                            &???                                                                                                                                                        &$\sum \limits_0^\infty (-1)^n\dfrac{E_{2n}}{(2n)!}x^{2n}$\\
            \midrule
            $\arcsin x$                     &???                                                                                                                                                        &$\sum \limits_0^\infty \dfrac{(2n)!}{4^n \cdot (n!)^2 \cdot (2n+1)}x^{2n+1}$\\ [2ex]
            $\arccos x$                     &???                                                                                                                                                        &???\\
            $\arctan x$                     &$x - \dfrac{x^3}{3} + \dfrac{x^5}{5} - \dfrac{x^7}{7} + \cdots$                                                                &$\sum \limits_0^\infty (-1)^n\dfrac{1}{2n + 1}x^{2n+1}$\\
            \midrule
            $\sinh x$                       &$x + \dfrac{x^3}{3!} + \dfrac{x^5}{5!} + \dfrac{x^7}{7!} + \cdots$                                                         &$\sum \limits_0^\infty \dfrac{1}{(2n+1)!}x^{2n+1}$\\ [2ex]
            $\cosh x$                       &$1 + \dfrac{x^2}{2!} + \dfrac{x^4}{4!} + \dfrac{x^6}{6!} + \cdots$                                                         &$\sum \limits_0^\infty \dfrac{1}{(2n)!}x^{2n}$\\ [2ex]
            $\tanh x$                       &???                                                                                                                                                        &$\sum \limits_1^\infty \dfrac{B_{2n} \cdot 4^n \cdot (4^n -1)}{(2n)!} x^{2n-1}$\\
            \midrule
            $\arsinh x$                     &???                                                                                                                                                        &$\sum \limits_0^\infty (-1)^n\dfrac{(2n)!}{4^n \cdot (n!)^2 \cdot (2n+1)}x^{2n+1}$\\ [2ex]
            $\arcosh x$                     &???                                                                                                                                                        &???\\
            $\artanh x$                     &???                                                                                                                                                        &$\sum \limits_0^\infty \dfrac{1}{2n + 1}x^{2n+1}$\\
            \midrule
            $(1 + x)^\alpha$                &$1 + \alpha x + \dfrac{\alpha(\alpha - 1)}{2!}x^2 + \dfrac{\alpha(\alpha - 1)(\alpha - 2)}{3!}x^3 + \cdots$        &$\sum \limits_0^\infty \dbinom{\alpha}{n}x^n$\\ [2ex]
            $\dfrac{1}{1+x}$            &$1 - x + x^2 - x^3 + \cdots$                                                                                                                   &$\sum \limits_0^\infty (-1)^n x^n$\\ [2ex]
            $\dfrac{1}{\sqrt{1+x}}$ &$1 - \dfrac{1}{2}x + \dfrac{3}{8}x^2 - \dfrac{5}{16}x^3 + \cdots$                                                              &$1 + \sum \limits_0^\infty (-1)^n\dfrac{(2n-1)!!}{(2n)!!}x^{n+1}$\\ [2ex]
            $\sqrt{1+x}$                    &$1 + \dfrac{1}{2}x - \dfrac{1}{8}x^2 + \dfrac{1}{16}x^3 + \cdots$                                                          &$1 + \sum \limits_0^\infty (-1)^{n+1}\dfrac{(2n-3)!!}{(2n)!!}x^{n+1}$\\
            \bottomrule
        \end{longtable}
    \end{center}
\end{landscape}

\end{document}

When I compile the code I get the following badbox message:

Underfull \vbox (badness 10000) detected at line 107

Line 107 is the line of the bottomrule.
I tried to comment every line, looking for the line that cause the badbox, and it turned out that it is caused by the toprule at the beginning of the table.
Do you have any suggestion about why this happens?

Thanks in advance.

P.S.: if you have any suggestion to make the code more elegant, please let me know. Please consider that I need both the "center" and the "ladscape" environments.
P.P.S.: Sorry for the poor indentation but I have no idea about what happened. In my editor it is fine.

5
  • it (always) helps if you make your example a complete document that demonstrates the problem, the box is underfull as it does not fit the page but you have given no indication of your page size. unrelated (probably) but don't put longtable in a center environment, it will not centre it, it just adds spurious vertical space. Aug 24, 2015 at 18:01
  • Sorry but I simply couldn't insert the complete document. It's a 156 pages book hahaha. Anyway the page size is A5 (but I'm considering switching to a B5). I'll try to put the table in a separate document to see what happens and I'll let you know. Thanks
    – Furio
    Aug 24, 2015 at 18:07
  • No! that would not help:-), the idea is that you generate a small one page document that just shows the problem, that is you wrap the above by \documentclass{article} and the smallest number of packages needed to run the example, and check that it generates the warning. If it does not then the posted code is no help to anyone trying to help, and you should adjust the example until it does make the warning. Aug 24, 2015 at 18:10
  • Done. Same error though...
    – Furio
    Aug 26, 2015 at 13:31
  • And same behaviour: the badbox is still caused by the toprule. I tried two things: remove the center environment, and encrease the size of the page, but in both cases nothing changed.
    – Furio
    Aug 26, 2015 at 13:43

1 Answer 1

1

In this case I wouldn't worry about it too much even though TeX is telling you the badness is 10000 (infinitely bad) it is essentially spurious just booktabs rules not fully playing with longtable, it isn't affecting the output.

But don't put longtable in a center environment, it has no effect on the horizontal alignment, just adds spurious vertical space that you were trying to correct with a negative skip before the table.

If I remove that, and add a heading that is copied on to page 2, then the warning goes but that is more luck than anything else.

%Classe Documento

\documentclass[10pt, a5paper]{article}

%Pacchetti per Layout Pagina
\usepackage{geometry}                                   %Controllare il manuale del pacchetto "geometry" per le opzioni di layout. Sono moltissime.
\geometry{
    top=1cm,
    bottom=2cm,
    left=1cm,
    right=1cm,
    heightrounded
}

%Pacchetti per le Codifiche Font
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{lmodern}

%Pacchetti per Formule
\usepackage{bm}                                             %Per poter formattare del testo matematico in nero all'interno del nome delle divisioni.
\usepackage{mathrsfs}                                       %Per l'alfabeto corsivo (cfr. Fourier).
\usepackage{amsmath}                                        %Per poter inserire del testo nelle formule Display.
\usepackage{amsthm}                                     %Per usare ambienti specifici, ad esempio "proof".
\usepackage{amssymb}                                    %Per poter usare 'Uguale per Definizione".
\usepackage{mathtools}                                  %Per poter usare l'Ambiente "dcases" e per poter usare la Dichiarazione "\DeclarePairedDelimiter{a}{b}{c}".
\allowdisplaybreaks[1]                                      %Per consentire la divisione automatica degli ambienti "align". [Opzione] è la permissività della divisione. [1] significa: "dividi ma solo se strettamente necessario".
\numberwithin{equation}{subsection}                 %Imposta la numerazione delle formule al livello delle "subsections"

%Pacchetti per le Tabelle
\usepackage{booktabs}
\usepackage{pdflscape}                                  %Consente di disporre le tabelle in orientamento "landscape".
\usepackage{longtable}                                  %Aggiunge un "environment" che permette alle tabelle di disporsi su più pagine.

%Pacchetti per i Link
\usepackage{hyperref}
\hypersetup{
colorlinks=true,                                            %Consente la colorazione dei link.
    linkcolor=blue,                                         %Colora i link dell'indice e dei riferimenti di blu.
    urlcolor=red,                                           %Colora gli U.R.L. di rosso.
linktoc=all                                                 %Imposta la quantità di link nell'indice. "all" significa: "crea link per ogni divisione".
}

%Nuovi Comandi
\DeclareMathOperator{\mcm}{mcm}
\DeclareMathOperator{\mcd}{MCD}
\DeclareMathOperator{\Log}{Log}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\arctantwo}{arctan_2}
\DeclareMathOperator{\arccot}{arccot}
\DeclareMathOperator{\arcsec}{arcsec}
\DeclareMathOperator{\arccsc}{arccsc}
\DeclareMathOperator{\sech}{sech}
\DeclareMathOperator{\csch}{csch}
\DeclareMathOperator{\arsinh}{arsinh}
\DeclareMathOperator{\arcosh}{arcosh}
\DeclareMathOperator{\artanh}{artanh}
\DeclareMathOperator{\arcoth}{arcoth}
\DeclareMathOperator{\arsech}{arsech}
\DeclareMathOperator{\arcsch}{arcsch}
\DeclareMathOperator{\settsinh}{settsinh}
\DeclareMathOperator{\settcosh}{settcosh}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}       %Crea il Simbolo di "Valore Assoluto"
\DeclarePairedDelimiter{\norma}{\lVert}{\rVert}     %Crea il Simbolo di "Norma"

%%%INIZIO DOCUMENTO%%%

\begin{document}

\begin{landscape}
\paragraph{Sviluppi di Maclaurin delle Funzioni Principali} \mbox{} \\
    Gli Sviluppi di Maclaurin possono essere usati SOLO SE $x=0$.\\
    Nel caso di Funzioni Composte, per la funzione interna deve valere $f(x) = 0$.

        \begin{longtable}{ l l l }
            \toprule                            %È questa "toprule" che da problemi di "underfull \vbox".
            \text{Funzione}             &\text{Primi Termini dello Sviluppo}                                                                                                                &\text{Termine Generale}\\
            \midrule
\endhead
            $e^x$                           &$1 + x + \dfrac{x^2}{2!} + \dfrac{x^3}{3!} + \cdots$                                                                               &$\sum \limits_0^\infty \dfrac{1}{n!}x^n$\\ [2ex]
            $\ln(1+x)$                      &$x - \dfrac{x^2}{2} + \dfrac{x^3}{3} - \dfrac{x^4}{4} + \cdots$                                                                &$\sum \limits_1^\infty (-1)^{n-1}\dfrac{1}{n}x^n$\\
            \midrule
            $\sin x$                            &$x - \dfrac{x^3}{3!} + \dfrac{x^5}{5!} - \dfrac{x^7}{7!} + \cdots$                                                         &$\sum \limits_0^\infty (-1)^n\dfrac{1}{(2n+1)!}x^{2n+1}$\\ [2ex]
            $\cos x$                            &$1 - \dfrac{x^2}{2!} + \dfrac{x^4}{4!} - \dfrac{x^6}{6!} + \cdots$                                                         &$\sum \limits_0^\infty (-1)^n\dfrac{1}{(2n)!}x^{2n}$\\ [2ex]
            $\tan x$                            &???                                                                                                                                                        &$\sum \limits_1^\infty (-4)^n\dfrac{B_{2n} \cdot (1-4^n)}{(2n)!}x^{2n-1}$\\ [2ex]
            $\sec x$                            &???                                                                                                                                                        &$\sum \limits_0^\infty (-1)^n\dfrac{E_{2n}}{(2n)!}x^{2n}$\\
            \midrule
            $\arcsin x$                     &???                                                                                                                                                        &$\sum \limits_0^\infty \dfrac{(2n)!}{4^n \cdot (n!)^2 \cdot (2n+1)}x^{2n+1}$\\ [2ex]
            $\arccos x$                     &???                                                                                                                                                        &???\\
            $\arctan x$                     &$x - \dfrac{x^3}{3} + \dfrac{x^5}{5} - \dfrac{x^7}{7} + \cdots$                                                                &$\sum \limits_0^\infty (-1)^n\dfrac{1}{2n + 1}x^{2n+1}$\\
            \midrule
            $\sinh x$                       &$x + \dfrac{x^3}{3!} + \dfrac{x^5}{5!} + \dfrac{x^7}{7!} + \cdots$                                                         &$\sum \limits_0^\infty \dfrac{1}{(2n+1)!}x^{2n+1}$\\ [2ex]
            $\cosh x$                       &$1 + \dfrac{x^2}{2!} + \dfrac{x^4}{4!} + \dfrac{x^6}{6!} + \cdots$                                                         &$\sum \limits_0^\infty \dfrac{1}{(2n)!}x^{2n}$\\ [2ex]
            $\tanh x$                       &???                                                                                                                                                        &$\sum \limits_1^\infty \dfrac{B_{2n} \cdot 4^n \cdot (4^n -1)}{(2n)!} x^{2n-1}$\\
            \midrule
            $\arsinh x$                     &???                                                                                                                                                        &$\sum \limits_0^\infty (-1)^n\dfrac{(2n)!}{4^n \cdot (n!)^2 \cdot (2n+1)}x^{2n+1}$\\ [2ex]
            $\arcosh x$                     &???                                                                                                                                                        &???\\
            $\artanh x$                     &???                                                                                                                                                        &$\sum \limits_0^\infty \dfrac{1}{2n + 1}x^{2n+1}$\\
            \midrule
            $(1 + x)^\alpha$                &$1 + \alpha x + \dfrac{\alpha(\alpha - 1)}{2!}x^2 + \dfrac{\alpha(\alpha - 1)(\alpha - 2)}{3!}x^3 + \cdots$        &$\sum \limits_0^\infty \dbinom{\alpha}{n}x^n$\\ [2ex]
            $\dfrac{1}{1+x}$            &$1 - x + x^2 - x^3 + \cdots$                                                                                                                   &$\sum \limits_0^\infty (-1)^n x^n$\\ [2ex]
            $\dfrac{1}{\sqrt{1+x}}$ &$1 - \dfrac{1}{2}x + \dfrac{3}{8}x^2 - \dfrac{5}{16}x^3 + \cdots$                                                              &$1 + \sum \limits_0^\infty (-1)^n\dfrac{(2n-1)!!}{(2n)!!}x^{n+1}$\\ [2ex]
            $\sqrt{1+x}$                    &$1 + \dfrac{1}{2}x - \dfrac{1}{8}x^2 + \dfrac{1}{16}x^3 + \cdots$                                                          &$1 + \sum \limits_0^\infty (-1)^{n+1}\dfrac{(2n-3)!!}{(2n)!!}x^{n+1}$\\
            \bottomrule
        \end{longtable}

\end{landscape}

\end{document}
1
  • Well, thinking a little about that, maybe the header was exactly the reason of the badbox, and not just for luck. I mean, I didn't think about that, but if I have a table that spans across multiple pages, then I definitely want the header of the table on all of them. The "indefinitely" could be because it is not a matter of a determined quantity of points missing on the page, but rather a problem of the table conceptually missing some part. Anyway, thank you very much. You've been extremely helpful.
    – Furio
    Aug 27, 2015 at 13:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .