Do I have to care about bad boxes? Announcing the arrival of Valued Associate #679: Cesar...

Married in secret, can marital status in passport be changed at a later date?

How to get a single big right brace?

Trying to enter the Fox's den

How to break 信じようとしていただけかも知れない into separate parts?

When speaking, how do you change your mind mid-sentence?

What is the definining line between a helicopter and a drone a person can ride in?

How do I overlay a PNG over two videos (one video overlays another) in one command using FFmpeg?

Would I be safe to drive a 23 year old truck for 7 hours / 450 miles?

What combination of kingdom cards makes for the fewest number of turns to end the game?

How to renew schengen visas

What documents does someone with a long-term visa need to travel to another Schengen country?

How to mute a string and play another at the same time

Why these surprising proportionalities of integrals involving odd zeta values?

Is there a way to convert Wolfram Language expression to string?

Why are two-digit numbers in Jonathan Swift's "Gulliver's Travels" (1726) written in "German style"?

How do I deal with an erroneously large refund?

Does using the inspiration rules for character defects tend to encourage players to display MGS?

When does Bran Stark remember Jamie pushing him?

Alternative to "rest in peace" (RIP)

Determine the generator of an ideal of ring of integers

“Since the train was delayed for more than an hour, passengers were given a full refund.” – Why is there no article before “passengers”?

Why does BitLocker not use RSA?

Are bags of holding fireproof?

IC on Digikey is 5x more expensive than board containing same IC on Alibaba: How?



Do I have to care about bad boxes?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)The Badness of BadboxesWhat are underfull hboxes and vboxes and how can I get rid of them?What does “overfull hbox” mean?How to avoid using sloppy document-wide to fix overfull hbox problems?flushbottom vs raggedbottomHow do you suppress specific warnings generated by pdflatex?How can I typeset the reduced Planck constant (ℏ)?badness messages when changing from report to book classJustified text and multicolumn size in tabularxHow to fix the Underfull vbox badness has occurred while output is active on my memoir chapter style?What is the command to highlight bad boxes in pdf?How to avoid bad boxes in the index?Why does the compiler keeps telling me (forever) to rerun because labels have changed?How to disable / suppress bad box warnings within a longtable?Suppress pdflatex warning about missing eps fileWhat does this bad box signify? And how to get rid of it?1 warning 4 badboxes, no output file, how to fix it?How should I use the fbox command correctly to avoid producing a Bad Box message?Vimtex: how to display error messages?Tex version and overfull boxes












105















When I compile my PDF from LaTeX source, do I have to care about all the messages (currently 28) about 'bad boxes'?



The PDF seems fine to me.










share|improve this question

























  • Genearlly: Yes, you have to. It really depends on what boxes are these.

    – yo'
    Apr 5 '12 at 11:03






  • 1





    It's going to depend mainly on how large the "bad" boxes are. Are you using the microtype package and its protrusion feature? If so, getting messages about overfull boxes (of width usually no larger than 1 or 2 pt) is quite normal.

    – Mico
    Apr 5 '12 at 11:05






  • 7





    If you are expecting 2pt overfull, then you can set hfuzz=2pt and tex will then warn you if it is more than that.

    – David Carlisle
    Apr 5 '12 at 12:42






  • 3





    i don't see it mentioned elsewhere, but when using the picture environment, an overfull box message will result if the width specification for the picture is larger than the text width -- even if the content of the picture is well within the text width. no end of headaches. be careful.

    – barbara beeton
    Apr 5 '12 at 13:29






  • 4





    possible duplicate of What are underfull hboxes and vboxes and how can I get rid of them?

    – lockstep
    Apr 5 '12 at 14:24
















105















When I compile my PDF from LaTeX source, do I have to care about all the messages (currently 28) about 'bad boxes'?



The PDF seems fine to me.










share|improve this question

























  • Genearlly: Yes, you have to. It really depends on what boxes are these.

    – yo'
    Apr 5 '12 at 11:03






  • 1





    It's going to depend mainly on how large the "bad" boxes are. Are you using the microtype package and its protrusion feature? If so, getting messages about overfull boxes (of width usually no larger than 1 or 2 pt) is quite normal.

    – Mico
    Apr 5 '12 at 11:05






  • 7





    If you are expecting 2pt overfull, then you can set hfuzz=2pt and tex will then warn you if it is more than that.

    – David Carlisle
    Apr 5 '12 at 12:42






  • 3





    i don't see it mentioned elsewhere, but when using the picture environment, an overfull box message will result if the width specification for the picture is larger than the text width -- even if the content of the picture is well within the text width. no end of headaches. be careful.

    – barbara beeton
    Apr 5 '12 at 13:29






  • 4





    possible duplicate of What are underfull hboxes and vboxes and how can I get rid of them?

    – lockstep
    Apr 5 '12 at 14:24














105












105








105


50






When I compile my PDF from LaTeX source, do I have to care about all the messages (currently 28) about 'bad boxes'?



The PDF seems fine to me.










share|improve this question
















When I compile my PDF from LaTeX source, do I have to care about all the messages (currently 28) about 'bad boxes'?



The PDF seems fine to me.







boxes warnings






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 22 mins ago









David Carlisle

500k4211471897




500k4211471897










asked Apr 5 '12 at 9:58









RabarberskiRabarberski

3,32463043




3,32463043













  • Genearlly: Yes, you have to. It really depends on what boxes are these.

    – yo'
    Apr 5 '12 at 11:03






  • 1





    It's going to depend mainly on how large the "bad" boxes are. Are you using the microtype package and its protrusion feature? If so, getting messages about overfull boxes (of width usually no larger than 1 or 2 pt) is quite normal.

    – Mico
    Apr 5 '12 at 11:05






  • 7





    If you are expecting 2pt overfull, then you can set hfuzz=2pt and tex will then warn you if it is more than that.

    – David Carlisle
    Apr 5 '12 at 12:42






  • 3





    i don't see it mentioned elsewhere, but when using the picture environment, an overfull box message will result if the width specification for the picture is larger than the text width -- even if the content of the picture is well within the text width. no end of headaches. be careful.

    – barbara beeton
    Apr 5 '12 at 13:29






  • 4





    possible duplicate of What are underfull hboxes and vboxes and how can I get rid of them?

    – lockstep
    Apr 5 '12 at 14:24



















  • Genearlly: Yes, you have to. It really depends on what boxes are these.

    – yo'
    Apr 5 '12 at 11:03






  • 1





    It's going to depend mainly on how large the "bad" boxes are. Are you using the microtype package and its protrusion feature? If so, getting messages about overfull boxes (of width usually no larger than 1 or 2 pt) is quite normal.

    – Mico
    Apr 5 '12 at 11:05






  • 7





    If you are expecting 2pt overfull, then you can set hfuzz=2pt and tex will then warn you if it is more than that.

    – David Carlisle
    Apr 5 '12 at 12:42






  • 3





    i don't see it mentioned elsewhere, but when using the picture environment, an overfull box message will result if the width specification for the picture is larger than the text width -- even if the content of the picture is well within the text width. no end of headaches. be careful.

    – barbara beeton
    Apr 5 '12 at 13:29






  • 4





    possible duplicate of What are underfull hboxes and vboxes and how can I get rid of them?

    – lockstep
    Apr 5 '12 at 14:24

















Genearlly: Yes, you have to. It really depends on what boxes are these.

– yo'
Apr 5 '12 at 11:03





Genearlly: Yes, you have to. It really depends on what boxes are these.

– yo'
Apr 5 '12 at 11:03




1




1





It's going to depend mainly on how large the "bad" boxes are. Are you using the microtype package and its protrusion feature? If so, getting messages about overfull boxes (of width usually no larger than 1 or 2 pt) is quite normal.

– Mico
Apr 5 '12 at 11:05





It's going to depend mainly on how large the "bad" boxes are. Are you using the microtype package and its protrusion feature? If so, getting messages about overfull boxes (of width usually no larger than 1 or 2 pt) is quite normal.

– Mico
Apr 5 '12 at 11:05




7




7





If you are expecting 2pt overfull, then you can set hfuzz=2pt and tex will then warn you if it is more than that.

– David Carlisle
Apr 5 '12 at 12:42





If you are expecting 2pt overfull, then you can set hfuzz=2pt and tex will then warn you if it is more than that.

– David Carlisle
Apr 5 '12 at 12:42




3




3





i don't see it mentioned elsewhere, but when using the picture environment, an overfull box message will result if the width specification for the picture is larger than the text width -- even if the content of the picture is well within the text width. no end of headaches. be careful.

– barbara beeton
Apr 5 '12 at 13:29





i don't see it mentioned elsewhere, but when using the picture environment, an overfull box message will result if the width specification for the picture is larger than the text width -- even if the content of the picture is well within the text width. no end of headaches. be careful.

– barbara beeton
Apr 5 '12 at 13:29




4




4





possible duplicate of What are underfull hboxes and vboxes and how can I get rid of them?

– lockstep
Apr 5 '12 at 14:24





possible duplicate of What are underfull hboxes and vboxes and how can I get rid of them?

– lockstep
Apr 5 '12 at 14:24










2 Answers
2






active

oldest

votes


















108














It is worth noting that TeX doesn't make the value judgements here.



The user, or more likely, the class file on behalf of the user, has set constraints on the amount by which boxes may overflow, the amount of stretching allowed on short pages etc. TeX only warns if these user-set constraints are exceeded.



So if you are setting difficult material with lots of big unbreakable chunks, that means that the constraints are probably wrong. (They were designed mostly for copy that is mostly text that can be hyphenated and with enough interword stretch to get tight fitting boxes.)



Rather than TeX trying to meet un-achievable constraints and then complaining about failing to meet them, it is better to modify (relax) the constraints. But before doing that you should make sure that they really are un-achievable and it is not just user error preventing tex from finding a good layout.



Some general notes added as requested:



Settings that only affect warning messages.



There are several setting that only affect the messages that TeX sends
out. For example if you know that some boxes will be overfull by 2pt
(and you don't mind this) but you want to be warned for a box that is
1cm too full then set



hfuzz=2pt


this will make no difference to the typesetting, but will suppress
warnings for boxes that are only slightly overfull.



vfuzz


is the same thing for vertical boxes.



Similar are hbadness and vbadness which are a measure of how
bad a box is, typically how much white space has had to be stretched.
the exact number is not usually that relevant but 0 is good and 10000
is infinitely bad (TeX's badness calculation arbitrarily forces any
very bad boxes to this amount).



The parameter tolerance is what tells Tex how much stretching
should be allowed. TeX tries to line-break a paragraph in such a way
as to keep the badness below the specified tolerance.



Good typographic quality would indicate that you shouldn't ignore (or
turn off) these warnings, However sometimes it makes sense. The PDF
version of the MathML recommendation for example is set automatically
by LaTeX from sources primarily designed for the normative HTML
version. Because it has many one or two line paragraphs and many
indented tables and examples, the right hand margin is very uneven
anyway and so allowing the occasional overlarge example to protrude
isn't so bad, it is set with



hfuzz=20pt
vfuzz=20pt
hbadness=2000
vbadness=maxdimen


Settings that don't affect the typesetting of good boxes



TeX3 introduced a parameter emergencystretch which allows extra
stretch to be more uniformly added to a paragraph if the default
stretching does not produce a good break. Setting this to a non zero
value can sometimes help.



Settings that do affect the typesetting.



LaTeX has a command sloppy that sets up looser typesetting



defsloppy{%
tolerance 9999%
emergencystretch 3em%
hfuzz .5p@
vfuzzhfuzz}


The setting of tolerance makes it rather more sloppy than is perhaps
desirable, and it is probably worth experimenting with just setting
emergencystretch.



The default fussy settings used by LaTeX are



deffussy{%
emergencystretchz@
tolerance 200%
hfuzz .1p@
vfuzzhfuzz}


For vertical page breaking, if you are getting underful boxes in the
output routine you may prefer raggedbottom rather than
flushbottom as this adds stretchable space at the end of each page
so no page will be underful (but short pages will be silently
accepted). It is possible of course to have something between these
two extremes, that adds glue that only extends a finite amount rather
than fill glue.



The above are the main global settings however every aspect of the
document design affects this. In particular, if the space between
display elements such as lists and displayed maths, and the space
between paragraphs, is stretchy then it it is much easier for TeX fo
find a "good" page break, however this means that there is no vertical
alignment between lines on different pages. especially for book designs
using two page spreads, designers often aim to keep text on a grid
where text always aligns on fixed positions. This usually means that
you have to make all the vertical spaces much more rigid, which
increases the chance of Tex giving warnings about over or under-full
vboxes.






share|improve this answer

































    52














    Yes, you should definitely take care of them.




    1. Overfull hbox messages tell you that some line sticks out over the right margin;


    2. Underfull hbox messages tell you that some line is poorly typeset (or that you've improperly used \ to leave a vertical space (for example, typing two \ in a row);


    3. Underfull vbox messages usually tell you that a page is poorly typeset.



    How much badness requires action is difficult to say, but I would never accept a final PDF where there's some Overfull hbox.






    share|improve this answer





















    • 2





      You were faster than me, I would just add that 3. happens mostly with section titles being moved to the top of the next page, or when you use [H] (here and only here) table or figure, which are large in height; the same applies for inline tabular, includegraphics, ...

      – yo'
      Apr 5 '12 at 11:09






    • 4





      I actually never understood why Overfull hboxes are permitted at all. Surely I can understand "a lot of whitespace" as being a reasonable warning, but "sticking out of the margin" should definitely be an error in my opinion.

      – UncleZeiv
      Apr 5 '12 at 13:57






    • 4





      @UncleZeiv It's not difficult to avoid overfull hboxes, but doing so one must be prepared to accept horrendously spaced lines. Taking care of a few lines is not so burdensome, particularly when we know that the other lines are correctly typeset.

      – egreg
      Apr 5 '12 at 14:02






    • 10





      but what can be done about Overfull hbox?

      – alfC
      Apr 5 '12 at 18:10






    • 4





      @alfC Some small text editing usually solves the problem. I use to say that very rarely the first or even the fourth version of a text has so polished a prose that it's become untouchable. :)

      – egreg
      Apr 5 '12 at 19:40












    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f50830%2fdo-i-have-to-care-about-bad-boxes%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    108














    It is worth noting that TeX doesn't make the value judgements here.



    The user, or more likely, the class file on behalf of the user, has set constraints on the amount by which boxes may overflow, the amount of stretching allowed on short pages etc. TeX only warns if these user-set constraints are exceeded.



    So if you are setting difficult material with lots of big unbreakable chunks, that means that the constraints are probably wrong. (They were designed mostly for copy that is mostly text that can be hyphenated and with enough interword stretch to get tight fitting boxes.)



    Rather than TeX trying to meet un-achievable constraints and then complaining about failing to meet them, it is better to modify (relax) the constraints. But before doing that you should make sure that they really are un-achievable and it is not just user error preventing tex from finding a good layout.



    Some general notes added as requested:



    Settings that only affect warning messages.



    There are several setting that only affect the messages that TeX sends
    out. For example if you know that some boxes will be overfull by 2pt
    (and you don't mind this) but you want to be warned for a box that is
    1cm too full then set



    hfuzz=2pt


    this will make no difference to the typesetting, but will suppress
    warnings for boxes that are only slightly overfull.



    vfuzz


    is the same thing for vertical boxes.



    Similar are hbadness and vbadness which are a measure of how
    bad a box is, typically how much white space has had to be stretched.
    the exact number is not usually that relevant but 0 is good and 10000
    is infinitely bad (TeX's badness calculation arbitrarily forces any
    very bad boxes to this amount).



    The parameter tolerance is what tells Tex how much stretching
    should be allowed. TeX tries to line-break a paragraph in such a way
    as to keep the badness below the specified tolerance.



    Good typographic quality would indicate that you shouldn't ignore (or
    turn off) these warnings, However sometimes it makes sense. The PDF
    version of the MathML recommendation for example is set automatically
    by LaTeX from sources primarily designed for the normative HTML
    version. Because it has many one or two line paragraphs and many
    indented tables and examples, the right hand margin is very uneven
    anyway and so allowing the occasional overlarge example to protrude
    isn't so bad, it is set with



    hfuzz=20pt
    vfuzz=20pt
    hbadness=2000
    vbadness=maxdimen


    Settings that don't affect the typesetting of good boxes



    TeX3 introduced a parameter emergencystretch which allows extra
    stretch to be more uniformly added to a paragraph if the default
    stretching does not produce a good break. Setting this to a non zero
    value can sometimes help.



    Settings that do affect the typesetting.



    LaTeX has a command sloppy that sets up looser typesetting



    defsloppy{%
    tolerance 9999%
    emergencystretch 3em%
    hfuzz .5p@
    vfuzzhfuzz}


    The setting of tolerance makes it rather more sloppy than is perhaps
    desirable, and it is probably worth experimenting with just setting
    emergencystretch.



    The default fussy settings used by LaTeX are



    deffussy{%
    emergencystretchz@
    tolerance 200%
    hfuzz .1p@
    vfuzzhfuzz}


    For vertical page breaking, if you are getting underful boxes in the
    output routine you may prefer raggedbottom rather than
    flushbottom as this adds stretchable space at the end of each page
    so no page will be underful (but short pages will be silently
    accepted). It is possible of course to have something between these
    two extremes, that adds glue that only extends a finite amount rather
    than fill glue.



    The above are the main global settings however every aspect of the
    document design affects this. In particular, if the space between
    display elements such as lists and displayed maths, and the space
    between paragraphs, is stretchy then it it is much easier for TeX fo
    find a "good" page break, however this means that there is no vertical
    alignment between lines on different pages. especially for book designs
    using two page spreads, designers often aim to keep text on a grid
    where text always aligns on fixed positions. This usually means that
    you have to make all the vertical spaces much more rigid, which
    increases the chance of Tex giving warnings about over or under-full
    vboxes.






    share|improve this answer






























      108














      It is worth noting that TeX doesn't make the value judgements here.



      The user, or more likely, the class file on behalf of the user, has set constraints on the amount by which boxes may overflow, the amount of stretching allowed on short pages etc. TeX only warns if these user-set constraints are exceeded.



      So if you are setting difficult material with lots of big unbreakable chunks, that means that the constraints are probably wrong. (They were designed mostly for copy that is mostly text that can be hyphenated and with enough interword stretch to get tight fitting boxes.)



      Rather than TeX trying to meet un-achievable constraints and then complaining about failing to meet them, it is better to modify (relax) the constraints. But before doing that you should make sure that they really are un-achievable and it is not just user error preventing tex from finding a good layout.



      Some general notes added as requested:



      Settings that only affect warning messages.



      There are several setting that only affect the messages that TeX sends
      out. For example if you know that some boxes will be overfull by 2pt
      (and you don't mind this) but you want to be warned for a box that is
      1cm too full then set



      hfuzz=2pt


      this will make no difference to the typesetting, but will suppress
      warnings for boxes that are only slightly overfull.



      vfuzz


      is the same thing for vertical boxes.



      Similar are hbadness and vbadness which are a measure of how
      bad a box is, typically how much white space has had to be stretched.
      the exact number is not usually that relevant but 0 is good and 10000
      is infinitely bad (TeX's badness calculation arbitrarily forces any
      very bad boxes to this amount).



      The parameter tolerance is what tells Tex how much stretching
      should be allowed. TeX tries to line-break a paragraph in such a way
      as to keep the badness below the specified tolerance.



      Good typographic quality would indicate that you shouldn't ignore (or
      turn off) these warnings, However sometimes it makes sense. The PDF
      version of the MathML recommendation for example is set automatically
      by LaTeX from sources primarily designed for the normative HTML
      version. Because it has many one or two line paragraphs and many
      indented tables and examples, the right hand margin is very uneven
      anyway and so allowing the occasional overlarge example to protrude
      isn't so bad, it is set with



      hfuzz=20pt
      vfuzz=20pt
      hbadness=2000
      vbadness=maxdimen


      Settings that don't affect the typesetting of good boxes



      TeX3 introduced a parameter emergencystretch which allows extra
      stretch to be more uniformly added to a paragraph if the default
      stretching does not produce a good break. Setting this to a non zero
      value can sometimes help.



      Settings that do affect the typesetting.



      LaTeX has a command sloppy that sets up looser typesetting



      defsloppy{%
      tolerance 9999%
      emergencystretch 3em%
      hfuzz .5p@
      vfuzzhfuzz}


      The setting of tolerance makes it rather more sloppy than is perhaps
      desirable, and it is probably worth experimenting with just setting
      emergencystretch.



      The default fussy settings used by LaTeX are



      deffussy{%
      emergencystretchz@
      tolerance 200%
      hfuzz .1p@
      vfuzzhfuzz}


      For vertical page breaking, if you are getting underful boxes in the
      output routine you may prefer raggedbottom rather than
      flushbottom as this adds stretchable space at the end of each page
      so no page will be underful (but short pages will be silently
      accepted). It is possible of course to have something between these
      two extremes, that adds glue that only extends a finite amount rather
      than fill glue.



      The above are the main global settings however every aspect of the
      document design affects this. In particular, if the space between
      display elements such as lists and displayed maths, and the space
      between paragraphs, is stretchy then it it is much easier for TeX fo
      find a "good" page break, however this means that there is no vertical
      alignment between lines on different pages. especially for book designs
      using two page spreads, designers often aim to keep text on a grid
      where text always aligns on fixed positions. This usually means that
      you have to make all the vertical spaces much more rigid, which
      increases the chance of Tex giving warnings about over or under-full
      vboxes.






      share|improve this answer




























        108












        108








        108







        It is worth noting that TeX doesn't make the value judgements here.



        The user, or more likely, the class file on behalf of the user, has set constraints on the amount by which boxes may overflow, the amount of stretching allowed on short pages etc. TeX only warns if these user-set constraints are exceeded.



        So if you are setting difficult material with lots of big unbreakable chunks, that means that the constraints are probably wrong. (They were designed mostly for copy that is mostly text that can be hyphenated and with enough interword stretch to get tight fitting boxes.)



        Rather than TeX trying to meet un-achievable constraints and then complaining about failing to meet them, it is better to modify (relax) the constraints. But before doing that you should make sure that they really are un-achievable and it is not just user error preventing tex from finding a good layout.



        Some general notes added as requested:



        Settings that only affect warning messages.



        There are several setting that only affect the messages that TeX sends
        out. For example if you know that some boxes will be overfull by 2pt
        (and you don't mind this) but you want to be warned for a box that is
        1cm too full then set



        hfuzz=2pt


        this will make no difference to the typesetting, but will suppress
        warnings for boxes that are only slightly overfull.



        vfuzz


        is the same thing for vertical boxes.



        Similar are hbadness and vbadness which are a measure of how
        bad a box is, typically how much white space has had to be stretched.
        the exact number is not usually that relevant but 0 is good and 10000
        is infinitely bad (TeX's badness calculation arbitrarily forces any
        very bad boxes to this amount).



        The parameter tolerance is what tells Tex how much stretching
        should be allowed. TeX tries to line-break a paragraph in such a way
        as to keep the badness below the specified tolerance.



        Good typographic quality would indicate that you shouldn't ignore (or
        turn off) these warnings, However sometimes it makes sense. The PDF
        version of the MathML recommendation for example is set automatically
        by LaTeX from sources primarily designed for the normative HTML
        version. Because it has many one or two line paragraphs and many
        indented tables and examples, the right hand margin is very uneven
        anyway and so allowing the occasional overlarge example to protrude
        isn't so bad, it is set with



        hfuzz=20pt
        vfuzz=20pt
        hbadness=2000
        vbadness=maxdimen


        Settings that don't affect the typesetting of good boxes



        TeX3 introduced a parameter emergencystretch which allows extra
        stretch to be more uniformly added to a paragraph if the default
        stretching does not produce a good break. Setting this to a non zero
        value can sometimes help.



        Settings that do affect the typesetting.



        LaTeX has a command sloppy that sets up looser typesetting



        defsloppy{%
        tolerance 9999%
        emergencystretch 3em%
        hfuzz .5p@
        vfuzzhfuzz}


        The setting of tolerance makes it rather more sloppy than is perhaps
        desirable, and it is probably worth experimenting with just setting
        emergencystretch.



        The default fussy settings used by LaTeX are



        deffussy{%
        emergencystretchz@
        tolerance 200%
        hfuzz .1p@
        vfuzzhfuzz}


        For vertical page breaking, if you are getting underful boxes in the
        output routine you may prefer raggedbottom rather than
        flushbottom as this adds stretchable space at the end of each page
        so no page will be underful (but short pages will be silently
        accepted). It is possible of course to have something between these
        two extremes, that adds glue that only extends a finite amount rather
        than fill glue.



        The above are the main global settings however every aspect of the
        document design affects this. In particular, if the space between
        display elements such as lists and displayed maths, and the space
        between paragraphs, is stretchy then it it is much easier for TeX fo
        find a "good" page break, however this means that there is no vertical
        alignment between lines on different pages. especially for book designs
        using two page spreads, designers often aim to keep text on a grid
        where text always aligns on fixed positions. This usually means that
        you have to make all the vertical spaces much more rigid, which
        increases the chance of Tex giving warnings about over or under-full
        vboxes.






        share|improve this answer















        It is worth noting that TeX doesn't make the value judgements here.



        The user, or more likely, the class file on behalf of the user, has set constraints on the amount by which boxes may overflow, the amount of stretching allowed on short pages etc. TeX only warns if these user-set constraints are exceeded.



        So if you are setting difficult material with lots of big unbreakable chunks, that means that the constraints are probably wrong. (They were designed mostly for copy that is mostly text that can be hyphenated and with enough interword stretch to get tight fitting boxes.)



        Rather than TeX trying to meet un-achievable constraints and then complaining about failing to meet them, it is better to modify (relax) the constraints. But before doing that you should make sure that they really are un-achievable and it is not just user error preventing tex from finding a good layout.



        Some general notes added as requested:



        Settings that only affect warning messages.



        There are several setting that only affect the messages that TeX sends
        out. For example if you know that some boxes will be overfull by 2pt
        (and you don't mind this) but you want to be warned for a box that is
        1cm too full then set



        hfuzz=2pt


        this will make no difference to the typesetting, but will suppress
        warnings for boxes that are only slightly overfull.



        vfuzz


        is the same thing for vertical boxes.



        Similar are hbadness and vbadness which are a measure of how
        bad a box is, typically how much white space has had to be stretched.
        the exact number is not usually that relevant but 0 is good and 10000
        is infinitely bad (TeX's badness calculation arbitrarily forces any
        very bad boxes to this amount).



        The parameter tolerance is what tells Tex how much stretching
        should be allowed. TeX tries to line-break a paragraph in such a way
        as to keep the badness below the specified tolerance.



        Good typographic quality would indicate that you shouldn't ignore (or
        turn off) these warnings, However sometimes it makes sense. The PDF
        version of the MathML recommendation for example is set automatically
        by LaTeX from sources primarily designed for the normative HTML
        version. Because it has many one or two line paragraphs and many
        indented tables and examples, the right hand margin is very uneven
        anyway and so allowing the occasional overlarge example to protrude
        isn't so bad, it is set with



        hfuzz=20pt
        vfuzz=20pt
        hbadness=2000
        vbadness=maxdimen


        Settings that don't affect the typesetting of good boxes



        TeX3 introduced a parameter emergencystretch which allows extra
        stretch to be more uniformly added to a paragraph if the default
        stretching does not produce a good break. Setting this to a non zero
        value can sometimes help.



        Settings that do affect the typesetting.



        LaTeX has a command sloppy that sets up looser typesetting



        defsloppy{%
        tolerance 9999%
        emergencystretch 3em%
        hfuzz .5p@
        vfuzzhfuzz}


        The setting of tolerance makes it rather more sloppy than is perhaps
        desirable, and it is probably worth experimenting with just setting
        emergencystretch.



        The default fussy settings used by LaTeX are



        deffussy{%
        emergencystretchz@
        tolerance 200%
        hfuzz .1p@
        vfuzzhfuzz}


        For vertical page breaking, if you are getting underful boxes in the
        output routine you may prefer raggedbottom rather than
        flushbottom as this adds stretchable space at the end of each page
        so no page will be underful (but short pages will be silently
        accepted). It is possible of course to have something between these
        two extremes, that adds glue that only extends a finite amount rather
        than fill glue.



        The above are the main global settings however every aspect of the
        document design affects this. In particular, if the space between
        display elements such as lists and displayed maths, and the space
        between paragraphs, is stretchy then it it is much easier for TeX fo
        find a "good" page break, however this means that there is no vertical
        alignment between lines on different pages. especially for book designs
        using two page spreads, designers often aim to keep text on a grid
        where text always aligns on fixed positions. This usually means that
        you have to make all the vertical spaces much more rigid, which
        increases the chance of Tex giving warnings about over or under-full
        vboxes.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 9 '13 at 12:42

























        answered Apr 5 '12 at 12:23









        David CarlisleDavid Carlisle

        500k4211471897




        500k4211471897























            52














            Yes, you should definitely take care of them.




            1. Overfull hbox messages tell you that some line sticks out over the right margin;


            2. Underfull hbox messages tell you that some line is poorly typeset (or that you've improperly used \ to leave a vertical space (for example, typing two \ in a row);


            3. Underfull vbox messages usually tell you that a page is poorly typeset.



            How much badness requires action is difficult to say, but I would never accept a final PDF where there's some Overfull hbox.






            share|improve this answer





















            • 2





              You were faster than me, I would just add that 3. happens mostly with section titles being moved to the top of the next page, or when you use [H] (here and only here) table or figure, which are large in height; the same applies for inline tabular, includegraphics, ...

              – yo'
              Apr 5 '12 at 11:09






            • 4





              I actually never understood why Overfull hboxes are permitted at all. Surely I can understand "a lot of whitespace" as being a reasonable warning, but "sticking out of the margin" should definitely be an error in my opinion.

              – UncleZeiv
              Apr 5 '12 at 13:57






            • 4





              @UncleZeiv It's not difficult to avoid overfull hboxes, but doing so one must be prepared to accept horrendously spaced lines. Taking care of a few lines is not so burdensome, particularly when we know that the other lines are correctly typeset.

              – egreg
              Apr 5 '12 at 14:02






            • 10





              but what can be done about Overfull hbox?

              – alfC
              Apr 5 '12 at 18:10






            • 4





              @alfC Some small text editing usually solves the problem. I use to say that very rarely the first or even the fourth version of a text has so polished a prose that it's become untouchable. :)

              – egreg
              Apr 5 '12 at 19:40
















            52














            Yes, you should definitely take care of them.




            1. Overfull hbox messages tell you that some line sticks out over the right margin;


            2. Underfull hbox messages tell you that some line is poorly typeset (or that you've improperly used \ to leave a vertical space (for example, typing two \ in a row);


            3. Underfull vbox messages usually tell you that a page is poorly typeset.



            How much badness requires action is difficult to say, but I would never accept a final PDF where there's some Overfull hbox.






            share|improve this answer





















            • 2





              You were faster than me, I would just add that 3. happens mostly with section titles being moved to the top of the next page, or when you use [H] (here and only here) table or figure, which are large in height; the same applies for inline tabular, includegraphics, ...

              – yo'
              Apr 5 '12 at 11:09






            • 4





              I actually never understood why Overfull hboxes are permitted at all. Surely I can understand "a lot of whitespace" as being a reasonable warning, but "sticking out of the margin" should definitely be an error in my opinion.

              – UncleZeiv
              Apr 5 '12 at 13:57






            • 4





              @UncleZeiv It's not difficult to avoid overfull hboxes, but doing so one must be prepared to accept horrendously spaced lines. Taking care of a few lines is not so burdensome, particularly when we know that the other lines are correctly typeset.

              – egreg
              Apr 5 '12 at 14:02






            • 10





              but what can be done about Overfull hbox?

              – alfC
              Apr 5 '12 at 18:10






            • 4





              @alfC Some small text editing usually solves the problem. I use to say that very rarely the first or even the fourth version of a text has so polished a prose that it's become untouchable. :)

              – egreg
              Apr 5 '12 at 19:40














            52












            52








            52







            Yes, you should definitely take care of them.




            1. Overfull hbox messages tell you that some line sticks out over the right margin;


            2. Underfull hbox messages tell you that some line is poorly typeset (or that you've improperly used \ to leave a vertical space (for example, typing two \ in a row);


            3. Underfull vbox messages usually tell you that a page is poorly typeset.



            How much badness requires action is difficult to say, but I would never accept a final PDF where there's some Overfull hbox.






            share|improve this answer















            Yes, you should definitely take care of them.




            1. Overfull hbox messages tell you that some line sticks out over the right margin;


            2. Underfull hbox messages tell you that some line is poorly typeset (or that you've improperly used \ to leave a vertical space (for example, typing two \ in a row);


            3. Underfull vbox messages usually tell you that a page is poorly typeset.



            How much badness requires action is difficult to say, but I would never accept a final PDF where there's some Overfull hbox.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Apr 5 '12 at 13:28

























            answered Apr 5 '12 at 11:06









            egregegreg

            736k8919353261




            736k8919353261








            • 2





              You were faster than me, I would just add that 3. happens mostly with section titles being moved to the top of the next page, or when you use [H] (here and only here) table or figure, which are large in height; the same applies for inline tabular, includegraphics, ...

              – yo'
              Apr 5 '12 at 11:09






            • 4





              I actually never understood why Overfull hboxes are permitted at all. Surely I can understand "a lot of whitespace" as being a reasonable warning, but "sticking out of the margin" should definitely be an error in my opinion.

              – UncleZeiv
              Apr 5 '12 at 13:57






            • 4





              @UncleZeiv It's not difficult to avoid overfull hboxes, but doing so one must be prepared to accept horrendously spaced lines. Taking care of a few lines is not so burdensome, particularly when we know that the other lines are correctly typeset.

              – egreg
              Apr 5 '12 at 14:02






            • 10





              but what can be done about Overfull hbox?

              – alfC
              Apr 5 '12 at 18:10






            • 4





              @alfC Some small text editing usually solves the problem. I use to say that very rarely the first or even the fourth version of a text has so polished a prose that it's become untouchable. :)

              – egreg
              Apr 5 '12 at 19:40














            • 2





              You were faster than me, I would just add that 3. happens mostly with section titles being moved to the top of the next page, or when you use [H] (here and only here) table or figure, which are large in height; the same applies for inline tabular, includegraphics, ...

              – yo'
              Apr 5 '12 at 11:09






            • 4





              I actually never understood why Overfull hboxes are permitted at all. Surely I can understand "a lot of whitespace" as being a reasonable warning, but "sticking out of the margin" should definitely be an error in my opinion.

              – UncleZeiv
              Apr 5 '12 at 13:57






            • 4





              @UncleZeiv It's not difficult to avoid overfull hboxes, but doing so one must be prepared to accept horrendously spaced lines. Taking care of a few lines is not so burdensome, particularly when we know that the other lines are correctly typeset.

              – egreg
              Apr 5 '12 at 14:02






            • 10





              but what can be done about Overfull hbox?

              – alfC
              Apr 5 '12 at 18:10






            • 4





              @alfC Some small text editing usually solves the problem. I use to say that very rarely the first or even the fourth version of a text has so polished a prose that it's become untouchable. :)

              – egreg
              Apr 5 '12 at 19:40








            2




            2





            You were faster than me, I would just add that 3. happens mostly with section titles being moved to the top of the next page, or when you use [H] (here and only here) table or figure, which are large in height; the same applies for inline tabular, includegraphics, ...

            – yo'
            Apr 5 '12 at 11:09





            You were faster than me, I would just add that 3. happens mostly with section titles being moved to the top of the next page, or when you use [H] (here and only here) table or figure, which are large in height; the same applies for inline tabular, includegraphics, ...

            – yo'
            Apr 5 '12 at 11:09




            4




            4





            I actually never understood why Overfull hboxes are permitted at all. Surely I can understand "a lot of whitespace" as being a reasonable warning, but "sticking out of the margin" should definitely be an error in my opinion.

            – UncleZeiv
            Apr 5 '12 at 13:57





            I actually never understood why Overfull hboxes are permitted at all. Surely I can understand "a lot of whitespace" as being a reasonable warning, but "sticking out of the margin" should definitely be an error in my opinion.

            – UncleZeiv
            Apr 5 '12 at 13:57




            4




            4





            @UncleZeiv It's not difficult to avoid overfull hboxes, but doing so one must be prepared to accept horrendously spaced lines. Taking care of a few lines is not so burdensome, particularly when we know that the other lines are correctly typeset.

            – egreg
            Apr 5 '12 at 14:02





            @UncleZeiv It's not difficult to avoid overfull hboxes, but doing so one must be prepared to accept horrendously spaced lines. Taking care of a few lines is not so burdensome, particularly when we know that the other lines are correctly typeset.

            – egreg
            Apr 5 '12 at 14:02




            10




            10





            but what can be done about Overfull hbox?

            – alfC
            Apr 5 '12 at 18:10





            but what can be done about Overfull hbox?

            – alfC
            Apr 5 '12 at 18:10




            4




            4





            @alfC Some small text editing usually solves the problem. I use to say that very rarely the first or even the fourth version of a text has so polished a prose that it's become untouchable. :)

            – egreg
            Apr 5 '12 at 19:40





            @alfC Some small text editing usually solves the problem. I use to say that very rarely the first or even the fourth version of a text has so polished a prose that it's become untouchable. :)

            – egreg
            Apr 5 '12 at 19:40


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f50830%2fdo-i-have-to-care-about-bad-boxes%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Installing LyX: “No textclass is found.”LyX installation error- text class not found- 'Reconfigure' or...

            (1602) Indiana Índice Designación y nombre Características orbitales Véase...

            Universidad Autónoma de Occidente Índice Historia Campus Facultades Programas Académicos Medios de...