GeneralOverfull \hbox

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
lehe
Posts: 12
Joined: Mon Feb 09, 2009 11:57 pm

Overfull \hbox

Post by lehe »

HI,
I am having a problem of restricting the length of a text line within the viewable width of a page as I got the error:
Overfull \hbox (179.70857pt too wide) in paragraph at lines 37--39
How to fix it? Thanks a lot!

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Overfull \hbox

Post by localghost »

Search the concerning line in the source code and let us see how it looks like. Prepare a minimal working example (MWE) if necessary.


Best regards
Thorsten¹
lehe
Posts: 12
Joined: Mon Feb 09, 2009 11:57 pm

Overfull \hbox

Post by lehe »

Thank you!
There are two places that exceed the right border and also the dash in the first line is mis-displayed.
Here is my sample:

Code: Select all

\documentclass[a4paper]{article}
%\documentclass[12pt]{article}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[margin=1in]{geometry}  % set the margins to 1in on all sides
\usepackage{graphicx}              % to include figures
\usepackage{amsmath}               % great math stuff
\usepackage{amsfonts}              % for blackboard bold, etc
\usepackage{amsthm}                % better theorem environments

\begin{document}


\section*{Discussion} 
\begin{enumerate}

\item {\it Write up a short discussion – that includes your data, along with an interpretation of their meaning.
  Is there anything special about these sequences? (Try Google, or the following link: http://www.neb. com/nebecomm/tech\_reference/restriction\_enzymes/cross\_index\_recognition\_sequences.asp)}
\end{enumerate}
My detection results on the three species' genomes are stored in M.jannaschii\_overrep.txt, M.jannaschii\_underrep.txt, H.pylori\_overrep.txt, H.pylori\_underrep.txt, H.influenzae\_overrep.txt and H.influenzae\_underrep.txt.
\end{document}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Overfull \hbox

Post by Stefan Kottwitz »

Hi lehe,

you could try to insert \- like

Code: Select all

M.janna\-schii\_un\-der\-rep.txt, ... H.in\-flu\-en\-zae\_underrep.txt.
Stefan
LaTeX.org admin
Post Reply