1

i have problems tracking down a underfull \hbox warning:

Underfull \hbox (badness 10000) has occurred while \output is active
|
\hbox(10.18913+4.36682)x418.25554
.\rule(10.18913+4.36682)x0.0

This warning is on every (fancy) page. I marked the important parts with --- lines.

I created this TeX-Header from an old university header, are there problems or mistakes in it?

Dominik

Here is the 'full' file:

\showboxdepth=\maxdimen
\showboxbreadth=\maxdimen

\pdfoutput=1
\pdftrue
\message{pdfLaTeX}
\documentclass[pdftex,11pt,a4paper,twoside,ngerman]{scrbook}
\usepackage{float}
\usepackage[pdftex]{thumbpdf}
\usepackage[pdftex]{pdflscape}
\usepackage[pdftex]{graphicx}
\usepackage[pdftex]{hyperref}
\usepackage{pdfpages}
\pdfoutput=1
\pdfcompresslevel=9
\DeclareGraphicsExtensions{.pdf,.jpg,.png}

% 
\hypersetup
{
 pdfauthor = {\Autor},
 pdftitle = {\Arbeitstitel},
 pdfsubject = {\Arbeitsbezeichnung, Name},
 pdfproducer = {LaTeX},
 pdfview = FitV,
 pdfstartview = FitV,
 pdfhighlight = /I,
 pdfborder = 0 0 0,
 colorlinks = false,
 bookmarksopen,
 bookmarksopenlevel = 1,
 bookmarksnumbered = false,
 plainpages = false
}%
% 
\usepackage[a4paper,left=3.5cm,right=2.5cm,bottom=3.5cm,top=3cm]{geometry}
\setlength{\headheight}{15pt}
% 
% 
\usepackage{amsmath,amssymb}
\usepackage{flafter}    %float never appears before its position
% 
% 
\usepackage[absolute,overlay]{textpos}
\setlength{\TPHorizModule}{1mm}
\setlength{\TPVertModule}{\TPHorizModule}
\textblockorigin{0mm}{0mm}
\usepackage{fix-cm}

\usepackage{scrhack}
% 
% 
\usepackage[german,main=ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ae,aecompl}
% 
% 
\usepackage[numbers,sort,square]{natbib}
% 
% 
\usepackage[babel,german=quotes]{csquotes}
% 
% 
\usepackage{url}
% 
% 
\usepackage[margin=0pt,font=small,labelfont=bf]{caption}
% 
% 
\usepackage{booktabs}
% 
% 
\usepackage{eurosym}
% 
% 
\usepackage[onehalfspacing]{setspace}
\AfterTOCHead{\singlespacing}
\recalctypearea
% 
\renewcommand{\topfraction}{0.9}
\renewcommand{\bottomfraction}{0.8}

\parindent=0cm

% |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
% -------------------------------------------------------------------
% Header & Footer
\usepackage[automark,nouppercase]{scrpage2}

\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\ #1}{}} 

\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}

\renewcommand{\headfont}{\normalfont\itshape\fontsize{11}{12}\selectfont}
\renewcommand{\pnumfont}{\normalfont\upshape\fontsize{11}{12}\selectfont}


\newpagestyle{fancy}{(0pt,0pt)                          % Outer header line
                {\pagemark \hfill \headmark}   % Even page header
                {\headmark \hfill \pagemark}   % Odd page header
                {}                            % Onesided page header
                (\textwidth,0.5pt)}                 % Inner header line
                {(0pt,0pt)                 % Inner footer line 
                {}                   % Even page footer
                {}                   % Odd page footer
                {}                  % Onesided page footer
                (0pt,0pt)}                  % Outer footer line

\renewpagestyle{plain}{(0pt,0pt)              % Outer header line
                  {}     % Even page header
                  {}      % Odd page header
                  {}                % Onesided page header
                  (0pt,0pt)}              % Inner header line
                  {(0pt,0pt)     % Inner footer line 
                  {}             % Even page footer
                  {}             % Odd page footer
                  {}             % Onesided page footer
                  (0pt,0pt)}              % Outer footer line

\pagestyle{empty}
% -------------------------------------------------------------------
% |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
% 
% 
\usepackage{listings}

\lstdefinestyle{C++}
{
language=C++,
backgroundcolor=\color{BrightGray},
keywordstyle=\tt\bfseries,  %\color{TUGreen}\bfseries,
commentstyle=\color{DarkGray},
stringstyle=\color{red},
showstringspaces=false,
basicstyle=\small\color{black},
numbers=left,
captionpos=b,
tabsize=4,
breaklines=true
}
%
% 
\usepackage[plain,chapter]{algorithm}
\usepackage{algorithmic}

\usepackage{enumerate}
%
% 
\renewcommand{\algorithmicrequire}{\textit{Eingabe:}}
\renewcommand{\algorithmicensure}{\textit{Ausgabe:}}
\floatname{algorithm}{Algorithmus}
\renewcommand{\listalgorithmname}{Algorithmenverzeichnis}
\renewcommand{\algorithmiccomment}[1]{\color{grau}{// #1}}
%
% 
\usepackage{esvect}
\usepackage{paralist}
\usepackage{todonotes}
\usepackage{mathtools}
\usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,factor=1100,stretch=10,shrink=10]{microtype}

\usepackage{subcaption}

\usepackage{makeidx}
\makeindex

\usepackage{tikz}    

\addto\captionsngerman{
    \renewcommand{\figurename}{Abb.}
    \renewcommand{\tablename}{Tab.}
}

\usepackage{lipsum}

\begin{document}
\pagestyle{fancy}
\lipsum
\end{document}
1

The problem was in the style redefinition. Tex give a underfull warning when the {} blocks have no content. To fix it fill them with an non visible whitespace -> \hfill

\newpagestyle{fancy}{(0pt,0pt)                          % Outer header line
            {\pagemark \hfill \headmark}   % Even page header
            {\headmark \hfill \pagemark}   % Odd page header
            {\hfill}                            % Onesided page header
            (\textwidth,0.5pt)}                 % Inner header line
            {(0pt,0pt)                 % Inner footer line 
            {\hfill}                   % Even page footer
            {\hfill}                   % Odd page footer
            {\hfill}                  % Onesided page footer
            (0pt,0pt)}                  % Outer footer line

\renewpagestyle{plain}{(0pt,0pt)              % Outer header line
              {\hfill}     % Even page header
              {\hfill}      % Odd page header
              {\hfill}                % Onesided page header
              (0pt,0pt)}              % Inner header line
              {(0pt,0pt)     % Inner footer line 
              {\hfill}             % Even page footer
              {\hfill}             % Odd page footer
              {\hfill}             % Onesided page footer
              (0pt,0pt)}              % Outer footer line

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.