3

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}
7
  • 2
    Omit \usepackage[onehalfspacing]{setspace} (which I also very much doubt to not change the line spacing in article).
    – lockstep
    Nov 16, 2012 at 17:40
  • Without it it looks worse : i50.tinypic.com/2d9biq1.jpg
    – esmitex
    Nov 16, 2012 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, 2012 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, 2012 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, 2012 at 0:37

1 Answer 1

5

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.

6
  • 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, 2012 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. Nov 17, 2012 at 12:38
  • I have a lot of underfull hbox and I use \raggedbottom
    – esmitex
    Nov 17, 2012 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 ..."
    – Mensch
    Nov 17, 2012 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, 2012 at 18:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .