2

I would like help understanding why increasing the proportion of the page available for text produces an overfull \hbox error. In the output, this results in my preliminary markers being skewed right.

The problem doesn't seem to affect regular text or (as far as I'm aware) headers/footers. Rather, it seems to affect only text added by packages such as prelim2e which add text below the page footer, for example.

Here's a minimal example:

\documentclass{article}
\usepackage{url,svn-multi}
    \svnidlong
        {$HeadURL: file:///svn/myproject/tweaked-branch/usr/local/texlive/current/texmf-dist/tex/latex/something/something.sty $}
        {$LastChangedBy: cfr $}
        {$LastChangedRevision: 19567 $}
        {$LastChangedDate: 2014-04-16 19:46:05 +0100 (Mer, 16 Ebr 2014) $}
% \usepackage{geometry}
\usepackage[hscale=.875]{geometry}
\usepackage{prelim2e}
\makeatletter
  \AtBeginDocument{%
    \renewcommand{\PrelimText}{\centering \small \textsf{Draft --- pdf\LaTeX{}ed --- \today}}%
    \@ifpackageloaded{svn-multi}{%
        \newsavebox{\prelimtxt}
        \sbox{\prelimtxt}{%
            \parbox{\textwidth}{%
                    \urlstyle{sf}%
                    \centering \small \textsf{Draft --- \today\ --- Revision \svnrev\ --- \svnyear--\svnmonth--\svnday\ \svnhour:\svnminute:\svnsecond}\\[1em]
                    \centering \tiny \textsf{\svnkw{HeadURL}}%
                    }% end parbox
            }% end sbox
        \renewcommand{\PrelimText}{\usebox{\prelimtxt}}
        }{}}
\makeatother
\usepackage{kantlipsum}
\begin{document}
\kant[1-5]
\end{document}

Overfull hbox error with marker skewed right

If I merely load geometry but do not change the defaults, I do not get the error and the preliminary marker is (at least closer to being) correctly centred:

No error

If I don't load geometry at all, I get no error but the preliminary marker is skewed to the left rather than the right:

No error without marker skewed left

I guess what is puzzling to me (and which probably reveals my naivete) is that prima facie I would expect providing more room for text to reduce overfull hboxes at least for single lines where the problem isn't merely an artefact of altered line breaking. If the box isn't overfull in less space, how does it become overfull in more?

cfr
  • 198,882
  • We could put \kern-0.0625\textwidth in front of the \parbox command, but it would be only workaround not a real solution. – Malipivo Apr 19 '14 at 07:30

0 Answers0