General ⇒ overfull \hbox - why?
-
- Posts: 13
- Joined: Tue Aug 26, 2008 9:01 pm
overfull \hbox - why?
with this post, which is the my first in this forum, i would like to get some information about the overfull \hbox phenomenon.
if this is important, i use texlive, but got the same results with tetex.
when compiling the this code i get a overfull \hbox on the beginning of each new column, and i don't understand why.
actually the result looks like i excepted it.
--
maybe someone can clear things up a bit.
thanks in advance
alex
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 - why?
Code: Select all
\documentclass[a4paper,twocolumn]{article}
\usepackage[T1]{fontenc} % Cork Encoding einschalten, wichtig für Silbentrennung
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[centering,includeheadfoot,margin=2cm]{geometry}
\usepackage{txfonts}
\usepackage{supertabular}
\usepackage{array}
Perhaps a list environment would be better in this case.
Best regards and welcome to the board
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 13
- Joined: Tue Aug 26, 2008 9:01 pm
overfull \hbox - why?
thank you for your suggestions.
\usepackage[T1]{fontenc} is nice.
\usepackage[ngerman]{babel} instead of \usepackage{german} too.
\usepackage[centering,includeheadfoot,margin=2cm]{geometry} instead of \usepackage{fullpage} also.
\usepackage{txfonts} instead of \usepackage{mathptmx} does not work good for me.
this way a font is embedded in the resulting pdf (dvipdf) that is not needed.
now the situation seems to be better than before, but not really satisfying, now i have overlapping text at some positions.
localghost, could you try it out yourself?
the link from my initial post points to the current version of the .tex file.
by the way, is it possible to enable word-wrapping in supertabular?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
overfull \hbox - why?
That was only a small failure with copy and paste from one of my documents. Stay with mathptmx if that fits better.alex.blackbit wrote:[...] \usepackage{txfonts} instead of \usepackage{mathptmx} does not work good for me.
this way a font is embedded in the resulting pdf (dvipdf) that is not needed. [...]
You have to try something like p{...} column types to avoid overlapping and get line wrapping.alex.blackbit wrote:[...]now the situation seems to be better than before, but not really satisfying, now i have overlapping text at some positions.
localghost, could you try it out yourself?
the link from my initial post points to the current version of the .tex file.
by the way, is it possible to enable word-wrapping in supertabular?
Code: Select all
\begin{supertabular}{p{0.3\linewidth}p{0.7\linewidth}}
...
\end{supertabular}
Code: Select all
Aichach"=Friedberg
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 13
- Joined: Tue Aug 26, 2008 9:01 pm
overfull \hbox - why?
i got a usable result with margin=1cm for {geometry} and
Code: Select all
\begin{supertabular}{p{0.1\linewidth}p{0.8\linewidth}}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
overfull \hbox - why?
That's something I didn't take into account. The length \columnsep between two columns has to be subtracted. A margin of 1cm looks too narrow for me. The result should also be suitable with a 2cm margin.alex.blackbit wrote:[...] please note that 0.1+0.8<1.0. do you have a quick explanation why this is necessary?
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10