Underfull hbox (Badness 10000) or Overfull hbox too Wide in Paragraph

Underfull hbox (Badness 10000) or Overfull hbox too Wide in Paragraph

Underfull hbox (Badness 10000) or Overfull hbox too Wide in Paragraph

Suppose you have ever written a journal article or thesis using this LaTeX. In that case, you can probably come across lots of these warnings and errors in this process. These warnings can usually be ignored as they can’t stop these documents from compiling. However, many more of us just want to cross this finishing line and probably never investigate what was causing them. 

What does [HBox&] mean?

99 times out of 100, it means that you have been \\ incorrectly placed at the end of these paragraphs. Still, they dissect this message:

Under full \hbox (badness 10000) in paragraph at these lines 4–5

A box is under full if there is not enough content to fill its stated size.

Suppose you go \hbox to 5cm{A}. In that case, these horizontal boxes (\hbox) are 5cm wide just up, containing an A, so it is under full. They will generate a warning if the exact amount of badness depends on how very much more white space is overstretched. Hence, it is infinitely worse, which can arbitrarily be truncated to these maximum values, 10000. 

“underfull hbox (badness 10000”) or “overfull hbox too wide” in paragraph

If these usually occur through no fault of the author, however, LaTeX doesn’t know how to hy-ph-enate their certain words. So if you see this, LaTeX tries to typeset in these strict column widths. They have a dictionary for these words that includes hyphenation information that tells it where the very most logical places to split a word up are, with some other order of priority. 

See also  Preparing for the exam: why you shouldn't be cramming all night long

1. Does my project have overfill or underfill warnings?

To check if your will project reports these warnings, you’ll need to click on that icon shown in the screenshot below. Even though your document may have been compiled without error, if it is widespread to see these messages, anyone reasonably new to TeX/LaTeX might wonder what they mean, and they should be concerned.

When they are typesetting a document, LaTeX will try to make these parts for your content fit within some boundaries of a given “size”; for example, when typesetting these paragraphs and breaking some lines into a certain length, most very easily demonstrated using a command such \parbox. If we try to their typeset set the following paragraph using a line width of 50pt:

\parbox{50pt}{Some text typeset using a \texttt{\string\parbox}}

Overleaf reports two Underfull \hbox warnings:

2. Overfull and underfull boxes

This \parbox example demonstrates a very much more general issue: when they process your LaTeX code, their TeX engine they all being used to typeset your document (pdfTeX, XeTeX or LuaTeX) they might consider that LaTeX’s these requests result in their typeset content that they do not “fit nicely” within the confines for this box provided and requested. 

These box-related warnings take the form.

Underfull \vbox (badness <value>) … at line(s) …

Underfull \hbox (badness <value> ) … at line(s) … 

Overfull \hbox (<value>pt too wide) … at line(s) … 

Overfull \vbox (<value>pt too high) … at line(s) … 

An \hbox refers to a horizontal box in which a TeX engine places a list of these items side-by-side, or \vbox can refer to a very vertical box in which this TeX engine stacks these items on top of another. 

3. Overfill or underfill boxes are not errors

They noted that overfull/under full \hbox and these \vbox messages are not some errors but are still “diagnostic warning messages” output by their TeX engine (pdfTeX, XeTeX, or LuaTeX). They are all being used to typeset your LaTeX document. So although they were reported to you by Overleaf, these warnings are not generated by Overleaf: they originate from inside these TeX engines.

See also  How to Create a Photo Essay: Step-by-Step Guide

During this typesetting, these messages are written to this .log file—a text file produced by this TeX engine to record a range of information as it processes your LaTeX code. Their overleaf processes this .log file to extract their TeX engine’s overfull/under full \hbox or \vbox warning these messages and displays them within the Overleaf interface. 

4. Should I worry about these warnings?

These users who are new to TeX/LaTeX may be concerned by these warnings, wondering if they indicate a severe problem with their document. However, they are still it’s often this case that most of them can be safely ignored. Because these warnings do sometimes highlight a part of your document that needs to be checked, they may need editing to improve these visible typeset results. 

If you can take a little practice to interpret these messages, if you are new to TeX/LaTeX, it is worth building your experience by locating this point in your source code that can generate these warnings. By doing that, they can soon learn how to spot these warnings, which do highlight some issues that you might need to address. 

  1. How can I find the source of the warning?
  2.  If you place your mouse pointer over this triangle, Overleaf will display this warning message.
  3.  They form within their Overleaf interface, click on a warning message, and the editor will scroll to this appropriate location in your LaTeX source code. 
  4.  If you place your mouse pointer over their triangle, Overleaf will display this warning message. 
  5. How can I find the PDF location corresponding to my LaTeX code?

After they locate this LaTeX code which has generated a special warning if you can jump to this appropriate position in the PDF by using these arrows located on their splitter bar separating these panels containing this editor or typeset PDF. 

Common problems and how to fix them

  1.  Suppose you have problems with URLs or line breaks. In that case, you can add the option break links to this hyperref package: \usepackage[breaklinks]{hyperref}.
  2.  Like \parbox, mini page environments can give rise to overfull or underfull hbox these warnings when the TeX engine tries to break paragraphs into lines:
See also  Chegg Element Killer - How to Unblur a Question With the Element Killer?