# How reduce badbox sensitivity locally?

In my document I have a Underfull \vbox (badness 2662). I want to ingnore this specific badbox but none of the others. Therefore, I want to make LaTeX locally less sensitive to badboxes. I tried

\vbadness=3000
<some code>


where the last command is intended to turn the "ignore badboxes mode" off again. However, I then get a lot of "badness < 100 or somehing like that" messages, which I didn't get before. I suppose \vbadness=0 is somewhat too little.

What's LaTeX's default mode, I mean, if I don't interfere at all which is the badness threshold under which LaTeX doesn't complain?

-
@egreg answered the question as asked but it is hard to think of a situation where you know which box it is but you can not make it less bad: you just have to add some stretchable vertical space to the box, it may not make a visible difference as TeX is stretching anyway but complaining about it, if you add some glue it won't complain. –  David Carlisle Feb 22 at 19:42
That sounds interesting and is possibly a better solution than to interfere with TeX's badness assessment. Could you possibly give an example of how your solution would work? The point is I am not even sure what "my box" is!? I just suspect that the problem occurs within a certain align environment ... maybe I should go more into the details: I have an align environment with 3 lines. As usual I set \allowdisplaybreaks to the hightes value, i.e. 4. The environment is at the end of a page. Without my interfering I get an overfull \vbox which looks really bad. ... cont'd in next comment! –  lpdbw Feb 22 at 20:23
Continued from previous comment: ... Therefore, I forbid a pagebreak after the 2nd line by using \\*. As a result, the page is broken after the first line and I get an underfull \vbox, probably in this first line ... but I am not quite sure. –  lpdbw Feb 22 at 20:30

You should revert to the previous value; either reset the parameter in a group, or do

\edef\prevvbadness{\the\vbadness}\vbadness=3000
<code>


The default value of \vbadness in LaTeX is 1000, but with the code above you don't need to know.

Usually the route

\begingroup\vbadness=3000
<code>
\endgroup


is preferable, but I understand that in some cases one can prefer not to enter a group.

-
What could be a disadvantage of putting it into a group? –  lpdbw Feb 22 at 19:10
the group scope affects the macro layer so it isn't always easy to add a group just around the box in a way that doesn't change the definitions seen by following code. On the other hand almost all vertical boxes in latex are made by variants of \parbox in which case there is already a local group you can use. –  David Carlisle Feb 22 at 19:30