Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Now I have badbox warning with this table :

\documentclass[11pt,a4paper,twoside,twocolumn]{scrartcl}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage{multicol}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{caption} 
\setlength{\columnsep}{30pt}
\usepackage[tracking=true]{microtype}
\usepackage{geometry}
\geometry{a4paper,left=2cm,right=2cm,top=2cm,bottom=2cm}
\captionsetup[table]{skip=10pt}
\raggedbottom
\begin{document}

\twocolumn[\begin{@twocolumnfalse} 

\begin{abstract}
some text here
\end{abstract}

\end{@twocolumnfalse}]  

\section*{title}
\subsection*{title}
some tex here

\begin{table}[ht!]
\small
\caption{Concentrations d'ADN mesurées par spectrophotométrie et rapports d'absorbance A$_{260\;\unit{nm}}$/A$_{280\;\unit{nm}}$.}
\label{tab:absorbance}
\begin{tabularx}{7,9cm}{X p{1,8cm} X}
\hline 
\textbf{Extrait de la souche N°} & \textbf{[ADN]* en ng/$\mu$L}  & \textbf{Rapport d'absorbance A$_{260\;\unit{nm}}$/A$_{280\;\unit{nm}}$} \\  
\hline
1 & 1178,13 & 2,23 \\  
2 & 957,52 & 1,68 \\  
6 & 1470,09 & 2,18 \\  
7 & 983,12 & 2,11 \\  
11 & 1003,30 & 1,15 \\  
12 & 536,17 & 1,88 \\  
14 & 1163,83 & 2,10 \\  
17 & 201,00 & 1,84 \\  
18 & 552,17 & 2,15 \\  
19 & 890,13 & 2,26 \\  
20 & 588,75 & 2,07 \\  
22 & 307,13 & 1,83 \\ 
\hline 
\end{tabularx} 
\caption*{\small\raggedright *[ADN] : Concentration d'ADN$_{\text{extrait}}$}
\end{table}

some text here

\end{document}
share|improve this question
2  
Omit \usepackage[onehalfspacing]{setspace} (which I also very much doubt to not change the line spacing in article). –  lockstep Nov 16 '12 at 17:40
    
Without it it looks worse : i50.tinypic.com/2d9biq1.jpg –  esmitex Nov 16 '12 at 17:41
    
You need to add a minimal working example (i.e., one that a) is compilable b) shows the problem c) uses as few packages and custom macros as possible). –  lockstep Nov 16 '12 at 17:44
    
well it works with a different class. I just tried {scrartcl} to change the title of section style and now I have that new error –  esmitex Nov 16 '12 at 17:46
1  
@esmitex Try putting the command \raggedbottomjust before \begin{document}. I also suggest using the \typearea -command built into KOMAscript to set the typing block. Remove the \geometryand put in the DIV8 or DIV9 or even DIV10 in the class options. –  Sveinung Nov 17 '12 at 0:37
show 3 more comments

1 Answer

up vote 4 down vote accepted

Both article and scrartcl use the same rubber lengths before and after the section heading. So I think the most likely cause of the problem stems from the fact that those two classes have different default text width and text heights. The page break is occurring at a different place resulting in an underfull vbox. In order to compensate, TeX is stretching the vertical glue on the page and that's what's causing the extra gap. Try using the geometry package to adjust the text body. Example:

\documentclass[twocolumn,a4paper,11pt]{scrartcl}

\usepackage[body={6.25in,8.25in}]{geometry}
\usepackage[T1]{fontenc}
\usepackage[onehalfspacing]{setspace}
\usepackage{lipsum}

\begin{document}

\section{Sample Section}

\lipsum[1-4]

\section{Another section}

\lipsum[5-10]

\end{document}

In the above, if you remove the line loading the geometry package, the vertical spacing increases around the section headings.

share|improve this answer
    
I already use the following geometry package \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} (default settings given by Texmaker. –  esmitex Nov 16 '12 at 23:01
1  
@esmitex If you have have underfull vbox messages in your log file, then extra gap is caused by the glue stretching. You could try \raggedbottom to prevent that. –  Nicola Talbot Nov 17 '12 at 12:38
    
I have a lot of underfull hbox and I use \raggedbottom –  esmitex Nov 17 '12 at 12:48
1  
@esmitex: If you do not give us a MWE showing your problem we can only guess and that is no fun. Look in your actual work, search for a realy bad typesetted page and rebuild this page in your MWE. Include the minimim set of called packages to show the problem. Include \raggedbottom etc. what you have done to avoid the problem. If we have a MWE we can run it on our own computers and can talk with you about the same error messages or warnungs like: "in your code line x you have the warning because ..." –  Kurt Nov 17 '12 at 18:29
    
well it does not really affect the layout now, the code I had copied pasted in the question has been automatically changed –  esmitex Nov 17 '12 at 18:43
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.