LaTeX forum ⇒ Text Formatting\neg causes overfull \hbox

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Posts: 4
Joined: Tue Feb 02, 2016 2:47 pm

\neg causes overfull \hbox

Postby Gulzt » Wed Mar 02, 2016 3:18 pm

Whenever I use the \neg command I get this badbox warning:
Overfull \hbox (6.03711pt too wide) in paragraph

For example, this code works fine:
  1. \documentclass[12pt, dutch]{report} % to allow chapter tags
  2. \usepackage{mathtools} % use the floor and ceil operators.
  3. \usepackage{amsmath} % use of the case function
  4. \begin{document}
  5. \[
  6. U
  7. \]
  8. \end{document}

But this causes an error:
  1. \[
  2. \neg U
  3. \]

What can I do to remove the badbox error?

Placing the \neg in an inline math function like so: $\neg U$ works fine however. Though this is not what I seek for in this case. The full function I am writing down is much too big for that.


User avatar
Site Moderator
Posts: 4166
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Mar 02, 2016 8:36 pm

Badbox warning are worth looking into matter more deeply, but they are not errors.
Your example cannot give the warning, it is simply impossible. A box is overfull if the contents is spilling over the boxes edges, for example the content of a line into the margin.

  1. \documentclass[12pt, dutch]{report}
  2. \usepackage{mathtools}% already loads amsmath
  3. \begin{document}
  4. \[
  5. \neg U
  6. \]
  7. \end{document}

Please read about minimal working examples and provide one to use, so we can reproduce that part of your document and give spot-on advice.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9581
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Mar 02, 2016 9:16 pm

Same for me - no error, no warning.

Please post a minimal example which produces the problem. This may include your whole function and your margin settings, or your complete preamble. Post a complete problem example, which shows the problem but anything unrelated can be removed. And click on Johannes' link. ;-)

Stefan admin

Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 2 guests