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}
  • 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
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.

  • Worked perfectly! But wait, what did you do at a high level? Why do we need those %? – Holmes.Sherlock Apr 21 '15 at 15:02
  • 1
    @Holmes.Sherlock see tex.stackexchange.com/questions/7453/… – 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

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.