latex - How to fix Underfull hbox (badness 10000) warning?

latex – How to fix Underfull hbox (badness 10000) warning?

latex – How to fix Underfull hbox (badness 10000) warning?

Instead of forcing an underfull box with newline, you could simply leave an empty line to start a new paragraph:

documentclass{article}
usepackage[T2A]{fontenc}
usepackage[utf8]{inputenc}
usepackage{titling}
usepackage{amssymb}
usepackage{amsthm}
usepackage{tikz}


setlength{droptitle}{-3.5cm}
setlength{parindent}{0cm}
newcommand{squad}{hspace{0.5em}}

author{vladgovor77771}
title{Some article}

begin{document}
maketitle

textbf{Task 1} 

Task description: 

blabla

end{document}

I had a similar issue, I solved it by removing any newline or \ at the and of every sentence that had nothing textual below.

For instance, two examples that causes that problem:

An example. \
This is well used. \
This line will cause the error. \

(Im a new paragraph) \
Because theres nothing directly underneath.\
The last line does NOT require a newline.

This is a thid paragraph. \
:D

The same is true for figures or similar

This is a line.
Putting a newline, as here, before a begin will cause the error. \
begin{figure}[h]
....
end{figure}

latex – How to fix Underfull hbox (badness 10000) warning?

A quick and nice solution is to use package parskip, and instead of using newline or \ for line breaks, simply insert an empty line

documentclass{article}
usepackage[T2A]{fontenc}
usepackage[utf8]{inputenc}
usepackage{titling}
usepackage{amssymb}
usepackage{amsthm}
usepackage{tikz}
usepackage{parskip} %% <-- added

setlength{droptitle}{-3.5cm}
setlength{parindent}{0cm}
newcommand{squad}{hspace{0.5em}}

author{vladgovor77771}
title{Some article}

begin{document}
maketitle

textbf{Task 1}

Task description:

end{document}

The warning will be gone.


By the way, to know why it happened, refer to this question on TeX Stack Exchange.

Related posts on latex :

Leave a Reply

Your email address will not be published. Required fields are marked *