0

I'm really puzzled. I spent hours and hours starting a special pocket book configuration, font sizes, margins (almost zero), headers and footers...

I debugged all the hbox and vbox overfull and underfull. Until I got the only message I'm satisfied:

  • 0 errors, 0 warnings, 0 badboxes, figure 1:

0 errors, 0 warnings, 0 badboxes

Then I wrote 3 chapters, with 4 sections, of course, still tweaking when needed, until I got satisfied with the "sample version" of the book.

This sample version will be sent for free, while I write the other chapters and sections. So I decided to "freeze" the tex as is, call it another file name, while I work on the other.

I just, I swear to you, I just copied the file with another name. You can see the names and the errors in the images below:

The original gives no badboxes. I opened the new file in another "tab" in KILE editor (debian/linux) and compiled, and surprised I saw:

  • 0 errors, 0 warnings, 52 badboxes, figure 2:

0 errors, 0 warnings, 52 badboxes

I've tried everything now. I've read all questions here and in other sites. I've tried:

  • cleaning auxiliary files
  • adding code to the preamble:

  • the obvious:

\hbadness=10000 % more than 10000 supress all warnings underfull hbox badness
\vbadness=10000 % more than 10000 supress all warnings underfull hbox badness
  • from other questions here:
\raggedbottom
\vbadness=\maxdimen
  • tip from another site
\usepackage{microtype}
  • changing lower spaces:
 \usepackage{setspace}
 \setstretch{0.15}
  • changing fuzz and other variables:
 \hfuzz=20pt
 \vfuzz=20pt
 \overfullrule=0pt
 \emergencystretch20pt   % More blank space to put in to lines
 \tolerance10000          % value for degree of inadequate line filling
 \setlength{\emergencystretch}{3em}
  • doing this trick to set the number of lines:
 \setlength{\dimen0}{\textheight}
 \addtolength{\dimen0}{-\topskip}
 \divide\dimen0\baselineskip
 \setlength{\textheight}{\number\dimen0 \baselineskip}
 \addtolength{\textheight}{\topskip}
  • Changing font size to test

All to no avail. Besides, the file should be exactly the same. I even was so astonished that I thought the "copy" command failed, then I just "control-a / control-c" in the old file's tab window in kile and "control-a control-v" in the new tab, to be sure I had the exact same file.

I can still compile the old file with no badboxes. But the new file has this 52 badboxes that doesn't seem to diminish.

Some of the options above gave me some hope. Changing font size to a greater one gives me 67 badboxes. Using setstretch got me to 48. And I think that is about it.

Seriously, I don't care about the warnings in the sense that I would need to change the wording or insert a newline here and there. I just want the warnings to disappear (and the text to be the same).

Thanks any help.

11
  • Yes, same machine @egreg. Same everything. Same directory, so it sees the same subdirectory where the images are
    – DrBeco
    Jul 2, 2019 at 22:35
  • Sure thing. Let me do that and report back. I also "include" c sources with the lstlistings package and a "reference.tex" at the end. Maybe the last tex needs to "recompile" as well?
    – DrBeco
    Jul 2, 2019 at 22:38
  • Diff show nothing different, appart from those commented lines quoted in the question, of attempts to try to solve the problems.
    – DrBeco
    Jul 2, 2019 at 22:40
  • 3
    the overfull message clearly shows the file name: benante2019_linguagem_C_exercicios_resolvidos_amostra. You are using it somewhere. Jul 2, 2019 at 22:53
  • 1
    you are presumably putting the filename in the page head? since it is showing the filename as overfull while the output is active Jul 3, 2019 at 0:12

2 Answers 2

3

You provided no test file but you are getting the filename in an overfull box on every page and you mentioned you are using crop so I assume you have

enter image description here

with the filename on every page from

\documentclass{article}

\usepackage[paperwidth=5cm,paperheight=5cm,pdftex=false]{geometry}
\usepackage[a4,pdftex,center]{crop}
\begin{document}
\crop[cam,info]


fooo

\clearpage

baaar

\end{document}

If you make the page small enough or the filename long enough, it will not fit in the space.

Note here that I am setting a small logical page size (5cm wide) on a larger actual page (A4) if you specify the same page size then crop will put the crop corners at the physical corners of the page so the info block will be off the top of the page, although tex still "prints" it, and it will still be reported as overfull if too wide, even though it will be cropped by your pdf viewer and not shown.

8
  • I think you solve the mystery. As you provided much more insight than my own answer, I'll accept yours. Thanks
    – DrBeco
    Jul 3, 2019 at 15:31
  • Is there an option to crop to not write the filename?
    – DrBeco
    Jul 3, 2019 at 15:31
  • 1
    @DrBeco use noinfo instead of info, see the crop manual, but why use crop at all? do you need it? Jul 3, 2019 at 15:36
  • Not really. It was a hack. I need the small lines draw in the border, only. That is because the ereader I'm testing moves the text to the center of the page if the page has just one small paragraph and all blank. But with border, it honors the text position. I tried fancybox but it is too ugly. Crop is simple and almost invisible. I also have another solution at work. (Next comment)
    – DrBeco
    Jul 3, 2019 at 15:39
  • @DrBeco there really was litle mysery even just from the initial screenshot of the warning it was clear that you were putting the filename in the page heading, that that was from crop rather than from fancyhdr settings was deduced later from comments as you didn't put that information in the question. Jul 3, 2019 at 15:41
0

I don't know exactly what the implications are, but from my tests, removing and commenting all packages, I got this results:

Total of 52 warnings referring the filename being to big to fit the page, even that I never wrote it on the contents of the book.

Removing package and results follow as:

  • package import : less 2 warnings
  • package include : less 2 warning
  • package lstlisting: less 8 warnings
  • package fancyhdr: less 6 warnings
  • package crop: warnings goes to zero. Re-adding and removing next.
  • package geometry: warnings goes to zero. Re-adding and and trying something else.

Next I decided to set the page to the original size without the geometry package, to check it. The page is 9cm x 12cm, but I figured a7paper would do. Class book won't accept it, but class scrbook did.

  • Removing geometry and setting the page size with:

    \documentclass[a7paper,10pt,openany]{scrbook} : total warnings citing the filename is 62 now.

  • Removing finally the last package, crop. Warnings drops to zero.

Final configuration: no packages at all, just a7paper, no warnings. Adding package crop gives warning about filename size not fitting.

Weird conclusion: in a small page, with a big filename, package crop gives warnings of badbox about the filename, even though the filename was never written inside the document.

7
  • 1
    The count of warnings is completely meaningless, what matters is what the warnings say, and you haven't shown any log file. Jul 3, 2019 at 7:05
  • 1
    By default crop does write the filename on every page Jul 3, 2019 at 7:50
  • Log files are linked in the comments below the question. But during my tests I was not only "counting" warning messages, but I was also disregarding the ones that did not mention the file name.
    – DrBeco
    Jul 3, 2019 at 15:29
  • "By default crop does write the filename on every page" @DavidCarlisle . That will definitely solve the mystery
    – DrBeco
    Jul 3, 2019 at 15:29
  • @DrBeco as I mentioned those links to the full logs are not usable (blacklisted site) Jul 3, 2019 at 15:57

You must log in to answer this question.

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