Text Formatting\neg causes overfull \hbox

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

\neg causes overfull \hbox

Post by Gulzt »

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:

Code: Select all

\documentclass[12pt, dutch]{report} % to allow chapter tags
\usepackage{mathtools} % use the floor and ceil operators.
\usepackage{amsmath} % use of the case function
\begin{document}
\[
   U
\]
\end{document}
But this causes an error:

Code: Select all

\[
   \neg U
\]
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.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

\neg causes overfull \hbox

Post by Johannes_B »

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.

Code: Select all

\documentclass[12pt, dutch]{report}
\usepackage{mathtools}% already loads amsmath
\begin{document}
\[
	\neg U
\]
\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: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Re: \neg causes overfull \hbox

Post by Stefan Kottwitz »

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
LaTeX.org admin
Post Reply