3

I am getting an annoying Underfull \hbox (badness 10000) detected on this MWE. Can anybody please look into it?

\documentclass[10pt,stdletter]{newlfm}

\namefrom{FROM\_PERSON}

\addrfrom{FROM\_ADDRESS}

\addrto{TO\_ADDRESS}

\greetto{GREETINGS,}
\closeline{CLOSING}


\begin{document}
\begin{newlfm}


LETTER\_BODY\_HERE

\end{newlfm}
\end{document}
sherlock
  • 1,463
  • 2
  • 15
  • 21
  • What do you want to do about it? TeX reports 'badness' of above 1000. This class creates an infinitely bad box in its view. You could set \hbadness=10000 to get rid of that one line, but I wouldn't recommend it. – jon Apr 21 '15 at 13:19

1 Answers1

5

It's always a missing %....

\documentclass[10pt,stdletter]{newlfm}
\makeatletter
\renewcommand{\@zfancyvbox}[2]{%%%%%%%%%%%%%%%%%%%%%%%%
\gdef\@zpqutil{1pt}%
\setbox0\vbox{#2}\ifdim\ht0>#1\relax%%%%%%%%%%%%
\setlength{\@utill}{\the\ht0}%
\addtolength{\@utill}{-#1}%
\addtolength{\@utill}{5.0pt}%
\txa{utill:\the\@utill}%
\xdef\@zpqutil{\the\@utill}%
\txa{@zpqutil:\@zpqutil}%
\fi
}%
\makeatother
\namefrom{FROM\_PERSON}

\addrfrom{FROM\_ADDRESS}

\addrto{TO\_ADDRESS}

\greetto{GREETINGS,}
\closeline{CLOSING}

\begin{document}
\begin{newlfm}


LETTER\_BODY\_HERE



\end{newlfm}
\end{document}

But you should report it to the class maintainer.

David Carlisle
  • 757,742
  • Worked perfectly! But wait, what did you do at a high level? Why do we need those %? – sherlock Apr 21 '15 at 15:02
  • 1
    @Holmes.Sherlock see http://tex.stackexchange.com/questions/7453/what-is-the-use-of-percent-signs-at-the-end-of-lines – David Carlisle Apr 21 '15 at 15:24
  • Just out of curiosity: Where is/was the percent sign missing? (I assume it is still missing in the code you posted) – Jan Apr 21 '15 at 16:15
  • @Jan No, I added them, specifically the first %%%%%%%%%%%%% but basically any line not ending with a command sequence should have a % if you do not want to add a space to the output (the original code adds exactly two spaces) – David Carlisle Apr 21 '15 at 16:24