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}
1
  • 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, 2015 at 13:19

1 Answer 1

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.

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

You must log in to answer this question.

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