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.

I have a document with 3 tables on it. The tables look really nice, but I have one problem: they are too tall and so they overlap the footnote!

I have tried reducing the size of the letters inside the table but that does not work, and I am not allowed to change the font size of the document (must be 12pt).

How can I fix this?

Here is a MWE:

\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
\usepackage[margin=2.54cm]{geometry}
\usepackage{graphicx,booktabs,tabularx}
\usepackage[table]{xcolor}
\usepackage{array}

%define some nice colors
\definecolor{middleware_green}{RGB}{82, 119, 17}
\definecolor{middleware_white}{RGB}{255, 255, 255}
\definecolor{middleware_light_gray}{RGB}{239, 239, 239}
\definecolor{middleware_dark_gray}{RGB}{153, 153, 153}

\renewcommand{\tabularxcolumn}[1]{>{\small}m{#1}}
\newcolumntype{L}{>{\leavevmode\ignorespaces\raggedleft\arraybackslash\sffamily}X}%
\newcolumntype{C}{>{\leavevmode\ignorespaces\centering\arraybackslash\sffamily}X}%
\rowcolors{2}{middleware_white}{middleware_light_gray}

\begin{document}


\begin{table}
\newcolumntype{L}{>{\leavevmode\ignorespaces\raggedleft\arraybackslash\sffamily}X}%
\newcolumntype{C}{>{\leavevmode\ignorespaces\centering\arraybackslash\sffamily}X}%
\rowcolors{2}{middleware_white}{middleware_light_gray}

\begin{tabularx}{0.45\textwidth}{|L|L|L|L|}
\hline\rowcolor{middleware_green}
\multicolumn{ 4}{|c|}{\small\textcolor{white}{\textbf{1 Source, 1 Session, 1 Client, Exp0}}} \\ \hline
\rowcolor{middleware_dark_gray}
\multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Mes\-sa\-ges per mi\-nu\-te per sour\-ce}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Mid\-dle\-ware Exec. Ti\-me (s)}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{De\-lay (s)}}} & 
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Ave\-ra\-ge De\-lay (s)}}} \\ \hline
    &   60  &   0   &       \\ \cline{ 2- 3}
  60    &   60  &   0   &   0.00    \\ \cline{ 2- 3}
    &   60  &   0   &       \\ \hline
    &   60  &   0   &       \\ \cline{ 2- 3}
  120   &   60  &   0   &   0.00    \\ \cline{ 2- 3}
    &   60  &   0   &       \\ \hline
    &   60  &   0   &       \\ \cline{ 2- 3}
  240   &   60  &   0   &   0.00    \\ \cline{ 2- 3}
    &   60  &   0   &       \\ \hline
    &   69  &   9   &       \\ \cline{ 2- 3}
  480   &   69  &   9   &   16.67   \\ \cline{ 2- 3}
    &   92  &   32  &       \\ \hline
    &   159     &   99  &       \\ \cline{ 2- 3}
  1000  &   173     &   113     &   109.67  \\ \cline{ 2- 3}
    &   177     &   117     &       \\ \hline
    &   391     &   331     &       \\ \cline{ 2- 3}
  2000  &   383     &   323     &   311.00  \\ \cline{ 2- 3}
    &   339     &   279     &       \\ \hline
    &   561     &   501     &       \\ \cline{ 2- 3}
  4000  &   631     &   501     &   512.33  \\ \cline{ 2- 3}
    &   595     &   535     &       \\ \hline
\end{tabularx}
\begin{tabularx}{0.45\textwidth}{|L|L|L|L|}
\hline\rowcolor{middleware_green}
\multicolumn{ 4}{|c|}{\small\textcolor{white}{\textbf{1 Source, 1 Session, 1 Client, Exp6}}} \\ \hline
\rowcolor{middleware_dark_gray}
\multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Mes\-sa\-ges per mi\-nu\-te per sour\-ce}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Mid\-dle\-ware Exec. Ti\-me (s)}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{De\-lay (s)}}} & 
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Ave\-ra\-ge De\-lay (s)}}} \\ \hline
    &   88  &   28  &       \\ \cline{ 2- 3}
  60    &   88  &   28  &   28.00   \\ \cline{ 2- 3}
    &   88  &   28  &       \\ \hline
    &   89  &   29  &       \\ \cline{ 2- 3}
  120   &   89  &   29  &   29.00   \\ \cline{ 2- 3}
    &   89  &   29  &       \\ \hline
    &   89  &   29  &       \\ \cline{ 2- 3}
  240   &   89  &   29  &   29.00   \\ \cline{ 2- 3}
    &   89  &   29  &       \\ \hline
    &   108     &   48  &       \\ \cline{ 2- 3}
  480   &   109     &   49  &   49.00   \\ \cline{ 2- 3}
    &   110     &   50  &       \\ \hline
    &   188     &   128     &       \\ \cline{ 2- 3}
  1000  &   188     &   128     &   131.00  \\ \cline{ 2- 3}
    &   197     &   137     &       \\ \hline
    &   316     &   256     &       \\ \cline{ 2- 3}
  2000  &   361     &   301     &   284.00  \\ \cline{ 2- 3}
    &   355     &   295     &       \\ \hline
    &   599     &   539     &       \\ \cline{ 2- 3}
  4000  &   617     &   557     &   542.33  \\ \cline{ 2- 3}
    &   591     &   531     &       \\ \hline
\end{tabularx}
\centering\begin{tabularx}{0.45\textwidth}{|L|L|L|L|}
\hline\rowcolor{middleware_green}
\multicolumn{ 4}{|c|}{\small\textcolor{white}{\textbf{1 Source, 1 Session, 1 Client, Exp7}}} \\ \hline
\rowcolor{middleware_dark_gray}
\multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Mes\-sa\-ges per mi\-nu\-te per sour\-ce}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Mid\-dle\-ware Exec. Ti\-me (s)}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{De\-lay (s)}}} & 
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Ave\-ra\-ge De\-lay (s)}}} \\ \hline
    &   118 &   58  &       \\ \cline{ 2- 3}
  60    &   117 &   57  &   57.67   \\ \cline{ 2- 3}
    &   118     &   58  &       \\ \hline
    &   119     &   59  &       \\ \cline{ 2- 3}
  120   &   119     &   59  &   59.00   \\ \cline{ 2- 3}
    &   119     &   59  &       \\ \hline
    &   119     &   59  &       \\ \cline{ 2- 3}
  240   &   119     &   59  &   59.00   \\ \cline{ 2- 3}
    &   119     &   59  &       \\ \hline
    &   142     &   82  &       \\ \cline{ 2- 3}
  480   &   147     &   87  &   85.67   \\ \cline{ 2- 3}
    &   148     &   88  &       \\ \hline
    &   245     &   185     &       \\ \cline{ 2- 3}
  1000  &   243     &   183     &   183.63  \\ \cline{ 2- 3}
    &   242     &   182     &       \\ \hline
    &   386     &   326     &       \\ \cline{ 2- 3}
  2000  &   363     &   303     &   313.67  \\ \cline{ 2- 3}
    &   372     &   312     &       \\ \hline
    &   647     &   587     &       \\ \cline{ 2- 3}
  4000  &   677     &   617     &   608.33  \\ \cline{ 2- 3}
    &   681     &   621     &       \\ \hline
\end{tabularx}
\label{1source_1session_1client_tables}
\caption{1 source, 1 session, 1 client middleware execution times}
\end{table}
\end{document}
share|improve this question
1  
\renewcommand\arraystretch{.9} before you begin. Can reset to 1 afterward. –  Steven B. Segletes Mar 18 at 1:56
    
Why the \leavevmode\ignorespaces in your L and C definitions? Usually they have no effect but in the cases that they do affect the output, they will do the wrong thing as far as I can tell. –  David Carlisle Mar 18 at 2:31
    
@DavidCarlisle: I saw it in another response and since I do not have problems with it I decided to keep them. Should I remove them? –  Flame_Phoenix Mar 18 at 11:43

2 Answers 2

up vote 5 down vote accepted

You can select a smaller font size:

\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
\usepackage[margin=2.54cm]{geometry}
\usepackage{graphicx,booktabs,tabularx}
\usepackage[table]{xcolor}
\usepackage{array}

%define some nice colors
\definecolor{middleware_green}{RGB}{82, 119, 17}
\definecolor{middleware_white}{RGB}{255, 255, 255}
\definecolor{middleware_light_gray}{RGB}{239, 239, 239}
\definecolor{middleware_dark_gray}{RGB}{153, 153, 153}

\renewcommand{\tabularxcolumn}[1]{>{\small}m{#1}}
\newcolumntype{L}{>{\leavevmode\ignorespaces\raggedleft\arraybackslash\sffamily}X}%
\newcolumntype{C}{>{\leavevmode\ignorespaces\centering\arraybackslash\sffamily}X}%
\rowcolors{2}{middleware_white}{middleware_light_gray}

\begin{document}


\begin{table}
\centering
\footnotesize
\begin{tabularx}{0.45\textwidth}{|L|L|L|L|}
\hline\rowcolor{middleware_green}
\multicolumn{ 4}{|c|}{\small\textcolor{white}{\textbf{1 Source, 1 Session, 1 Client, Exp0}}} \\ \hline
\rowcolor{middleware_dark_gray}
\multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Mes\-sa\-ges per mi\-nu\-te per sour\-ce}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Mid\-dle\-ware Exec. Ti\-me (s)}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{De\-lay (s)}}} & 
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Ave\-ra\-ge De\-lay (s)}}} \\ \hline
    &   60  &   0   &       \\ \cline{ 2- 3}
  60    &   60  &   0   &   0.00    \\ \cline{ 2- 3}
    &   60  &   0   &       \\ \hline
    &   60  &   0   &       \\ \cline{ 2- 3}
  120   &   60  &   0   &   0.00    \\ \cline{ 2- 3}
    &   60  &   0   &       \\ \hline
    &   60  &   0   &       \\ \cline{ 2- 3}
  240   &   60  &   0   &   0.00    \\ \cline{ 2- 3}
    &   60  &   0   &       \\ \hline
    &   69  &   9   &       \\ \cline{ 2- 3}
  480   &   69  &   9   &   16.67   \\ \cline{ 2- 3}
    &   92  &   32  &       \\ \hline
    &   159     &   99  &       \\ \cline{ 2- 3}
  1000  &   173     &   113     &   109.67  \\ \cline{ 2- 3}
    &   177     &   117     &       \\ \hline
    &   391     &   331     &       \\ \cline{ 2- 3}
  2000  &   383     &   323     &   311.00  \\ \cline{ 2- 3}
    &   339     &   279     &       \\ \hline
    &   561     &   501     &       \\ \cline{ 2- 3}
  4000  &   631     &   501     &   512.33  \\ \cline{ 2- 3}
    &   595     &   535     &       \\ \hline
\end{tabularx}\hfill
\begin{tabularx}{0.45\textwidth}{|L|L|L|L|}
\hline\rowcolor{middleware_green}
\multicolumn{ 4}{|c|}{\small\textcolor{white}{\textbf{1 Source, 1 Session, 1 Client, Exp6}}} \\ \hline
\rowcolor{middleware_dark_gray}
\multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Mes\-sa\-ges per mi\-nu\-te per sour\-ce}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Mid\-dle\-ware Exec. Ti\-me (s)}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{De\-lay (s)}}} & 
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Ave\-ra\-ge De\-lay (s)}}} \\ \hline
    &   88  &   28  &       \\ \cline{ 2- 3}
  60    &   88  &   28  &   28.00   \\ \cline{ 2- 3}
    &   88  &   28  &       \\ \hline
    &   89  &   29  &       \\ \cline{ 2- 3}
  120   &   89  &   29  &   29.00   \\ \cline{ 2- 3}
    &   89  &   29  &       \\ \hline
    &   89  &   29  &       \\ \cline{ 2- 3}
  240   &   89  &   29  &   29.00   \\ \cline{ 2- 3}
    &   89  &   29  &       \\ \hline
    &   108     &   48  &       \\ \cline{ 2- 3}
  480   &   109     &   49  &   49.00   \\ \cline{ 2- 3}
    &   110     &   50  &       \\ \hline
    &   188     &   128     &       \\ \cline{ 2- 3}
  1000  &   188     &   128     &   131.00  \\ \cline{ 2- 3}
    &   197     &   137     &       \\ \hline
    &   316     &   256     &       \\ \cline{ 2- 3}
  2000  &   361     &   301     &   284.00  \\ \cline{ 2- 3}
    &   355     &   295     &       \\ \hline
    &   599     &   539     &       \\ \cline{ 2- 3}
  4000  &   617     &   557     &   542.33  \\ \cline{ 2- 3}
    &   591     &   531     &       \\ \hline
\end{tabularx}\par

\begin{tabularx}{0.45\textwidth}{|L|L|L|L|}
\hline\rowcolor{middleware_green}
\multicolumn{ 4}{|c|}{\small\textcolor{white}{\textbf{1 Source, 1 Session, 1 Client, Exp7}}} \\ \hline
\rowcolor{middleware_dark_gray}
\multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Mes\-sa\-ges per mi\-nu\-te per sour\-ce}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Mid\-dle\-ware Exec. Ti\-me (s)}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{De\-lay (s)}}} & 
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Ave\-ra\-ge De\-lay (s)}}} \\ \hline
    &   118 &   58  &       \\ \cline{ 2- 3}
  60    &   117 &   57  &   57.67   \\ \cline{ 2- 3}
    &   118     &   58  &       \\ \hline
    &   119     &   59  &       \\ \cline{ 2- 3}
  120   &   119     &   59  &   59.00   \\ \cline{ 2- 3}
    &   119     &   59  &       \\ \hline
    &   119     &   59  &       \\ \cline{ 2- 3}
  240   &   119     &   59  &   59.00   \\ \cline{ 2- 3}
    &   119     &   59  &       \\ \hline
    &   142     &   82  &       \\ \cline{ 2- 3}
  480   &   147     &   87  &   85.67   \\ \cline{ 2- 3}
    &   148     &   88  &       \\ \hline
    &   245     &   185     &       \\ \cline{ 2- 3}
  1000  &   243     &   183     &   183.63  \\ \cline{ 2- 3}
    &   242     &   182     &       \\ \hline
    &   386     &   326     &       \\ \cline{ 2- 3}
  2000  &   363     &   303     &   313.67  \\ \cline{ 2- 3}
    &   372     &   312     &       \\ \hline
    &   647     &   587     &       \\ \cline{ 2- 3}
  4000  &   677     &   617     &   608.33  \\ \cline{ 2- 3}
    &   681     &   621     &       \\ \hline
\end{tabularx}%
\caption{1 source, 1 session, 1 client middleware execution times}
\label{1source_1session_1client_tables}
\end{table}
\end{document}

enter image description here

Anonther option would be to scale them down a little vertically, using \scalebox from graphicx:

\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
\usepackage[margin=2.54cm]{geometry}
\usepackage{graphicx,booktabs,tabularx}
\usepackage[table]{xcolor}
\usepackage{array}
\usepackage{graphicx}

%define some nice colors
\definecolor{middleware_green}{RGB}{82, 119, 17}
\definecolor{middleware_white}{RGB}{255, 255, 255}
\definecolor{middleware_light_gray}{RGB}{239, 239, 239}
\definecolor{middleware_dark_gray}{RGB}{153, 153, 153}

\renewcommand{\tabularxcolumn}[1]{>{\small}m{#1}}
\newcolumntype{L}{>{\leavevmode\ignorespaces\raggedleft\arraybackslash\sffamily}X}%
\newcolumntype{C}{>{\leavevmode\ignorespaces\centering\arraybackslash\sffamily}X}%
\rowcolors{2}{middleware_white}{middleware_light_gray}

\newcolumntype{L}{>{\leavevmode\ignorespaces\raggedleft\arraybackslash\sffamily}X}%
\newcolumntype{C}{>{\leavevmode\ignorespaces\centering\arraybackslash\sffamily}X}%
\rowcolors{2}{middleware_white}{middleware_light_gray}

\begin{document}


\begin{table}
\centering
\scalebox{1}[.9]{%
\begin{tabularx}{0.45\textwidth}{|L|L|L|L|}
\hline\rowcolor{middleware_green}
\multicolumn{ 4}{|c|}{\small\textcolor{white}{\textbf{1 Source, 1 Session, 1 Client, Exp0}}} \\ \hline
\rowcolor{middleware_dark_gray}
\multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Mes\-sa\-ges per mi\-nu\-te per sour\-ce}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Mid\-dle\-ware Exec. Ti\-me (s)}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{De\-lay (s)}}} & 
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Ave\-ra\-ge De\-lay (s)}}} \\ \hline
    &   60  &   0   &       \\ \cline{ 2- 3}
  60    &   60  &   0   &   0.00    \\ \cline{ 2- 3}
    &   60  &   0   &       \\ \hline
    &   60  &   0   &       \\ \cline{ 2- 3}
  120   &   60  &   0   &   0.00    \\ \cline{ 2- 3}
    &   60  &   0   &       \\ \hline
    &   60  &   0   &       \\ \cline{ 2- 3}
  240   &   60  &   0   &   0.00    \\ \cline{ 2- 3}
    &   60  &   0   &       \\ \hline
    &   69  &   9   &       \\ \cline{ 2- 3}
  480   &   69  &   9   &   16.67   \\ \cline{ 2- 3}
    &   92  &   32  &       \\ \hline
    &   159     &   99  &       \\ \cline{ 2- 3}
  1000  &   173     &   113     &   109.67  \\ \cline{ 2- 3}
    &   177     &   117     &       \\ \hline
    &   391     &   331     &       \\ \cline{ 2- 3}
  2000  &   383     &   323     &   311.00  \\ \cline{ 2- 3}
    &   339     &   279     &       \\ \hline
    &   561     &   501     &       \\ \cline{ 2- 3}
  4000  &   631     &   501     &   512.33  \\ \cline{ 2- 3}
    &   595     &   535     &       \\ \hline
\end{tabularx}\hfill
\begin{tabularx}{0.45\textwidth}{|L|L|L|L|}
\hline\rowcolor{middleware_green}
\multicolumn{ 4}{|c|}{\small\textcolor{white}{\textbf{1 Source, 1 Session, 1 Client, Exp6}}} \\ \hline
\rowcolor{middleware_dark_gray}
\multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Mes\-sa\-ges per mi\-nu\-te per sour\-ce}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Mid\-dle\-ware Exec. Ti\-me (s)}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{De\-lay (s)}}} & 
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Ave\-ra\-ge De\-lay (s)}}} \\ \hline
    &   88  &   28  &       \\ \cline{ 2- 3}
  60    &   88  &   28  &   28.00   \\ \cline{ 2- 3}
    &   88  &   28  &       \\ \hline
    &   89  &   29  &       \\ \cline{ 2- 3}
  120   &   89  &   29  &   29.00   \\ \cline{ 2- 3}
    &   89  &   29  &       \\ \hline
    &   89  &   29  &       \\ \cline{ 2- 3}
  240   &   89  &   29  &   29.00   \\ \cline{ 2- 3}
    &   89  &   29  &       \\ \hline
    &   108     &   48  &       \\ \cline{ 2- 3}
  480   &   109     &   49  &   49.00   \\ \cline{ 2- 3}
    &   110     &   50  &       \\ \hline
    &   188     &   128     &       \\ \cline{ 2- 3}
  1000  &   188     &   128     &   131.00  \\ \cline{ 2- 3}
    &   197     &   137     &       \\ \hline
    &   316     &   256     &       \\ \cline{ 2- 3}
  2000  &   361     &   301     &   284.00  \\ \cline{ 2- 3}
    &   355     &   295     &       \\ \hline
    &   599     &   539     &       \\ \cline{ 2- 3}
  4000  &   617     &   557     &   542.33  \\ \cline{ 2- 3}
    &   591     &   531     &       \\ \hline
\end{tabularx}%
}\par

\scalebox{1}[.9]{%
\begin{tabularx}{0.45\textwidth}{|L|L|L|L|}
\hline\rowcolor{middleware_green}
\multicolumn{ 4}{|c|}{\small\textcolor{white}{\textbf{1 Source, 1 Session, 1 Client, Exp7}}} \\ \hline
\rowcolor{middleware_dark_gray}
\multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Mes\-sa\-ges per mi\-nu\-te per sour\-ce}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Mid\-dle\-ware Exec. Ti\-me (s)}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{De\-lay (s)}}} & 
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Ave\-ra\-ge De\-lay (s)}}} \\ \hline
    &   118 &   58  &       \\ \cline{ 2- 3}
  60    &   117 &   57  &   57.67   \\ \cline{ 2- 3}
    &   118     &   58  &       \\ \hline
    &   119     &   59  &       \\ \cline{ 2- 3}
  120   &   119     &   59  &   59.00   \\ \cline{ 2- 3}
    &   119     &   59  &       \\ \hline
    &   119     &   59  &       \\ \cline{ 2- 3}
  240   &   119     &   59  &   59.00   \\ \cline{ 2- 3}
    &   119     &   59  &       \\ \hline
    &   142     &   82  &       \\ \cline{ 2- 3}
  480   &   147     &   87  &   85.67   \\ \cline{ 2- 3}
    &   148     &   88  &       \\ \hline
    &   245     &   185     &       \\ \cline{ 2- 3}
  1000  &   243     &   183     &   183.63  \\ \cline{ 2- 3}
    &   242     &   182     &       \\ \hline
    &   386     &   326     &       \\ \cline{ 2- 3}
  2000  &   363     &   303     &   313.67  \\ \cline{ 2- 3}
    &   372     &   312     &       \\ \hline
    &   647     &   587     &       \\ \cline{ 2- 3}
  4000  &   677     &   617     &   608.33  \\ \cline{ 2- 3}
    &   681     &   621     &       \\ \hline
\end{tabularx}%
}
\caption{1 source, 1 session, 1 client middleware execution times}
\label{1source_1session_1client_tables}
\end{table}
\end{document}

enter image description here

Edit:

(after David's answer) \label in floats must appear after \caption.

share|improve this answer

Use a smaller font, and DONT PUT LABEL BEFORE CAPTION:-)

Also .45\textwidth is too narrow for your heading, changed to .46 added as much \extrarowheight as would fit on page, and a \bigskip before the last table.

\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
\usepackage[margin=2.54cm]{geometry}
\usepackage{graphicx,booktabs,tabularx}
\usepackage[table]{xcolor}
\usepackage{array}

%define some nice colors
\definecolor{middleware_green}{RGB}{82, 119, 17}
\definecolor{middleware_white}{RGB}{255, 255, 255}
\definecolor{middleware_light_gray}{RGB}{239, 239, 239}
\definecolor{middleware_dark_gray}{RGB}{153, 153, 153}

\renewcommand{\tabularxcolumn}[1]{>{\small}m{#1}}
\newcolumntype{L}{>{\leavevmode\ignorespaces\raggedleft\arraybackslash\sffamily}X}%
\newcolumntype{C}{>{\leavevmode\ignorespaces\centering\arraybackslash\sffamily}X}%
\rowcolors{2}{middleware_white}{middleware_light_gray}

\begin{document}


\begin{table}\footnotesize\centering\setlength\extrarowheight{.7pt}
\newcolumntype{L}{>{\leavevmode\ignorespaces\raggedleft\arraybackslash\sffamily}X}%
\newcolumntype{C}{>{\leavevmode\ignorespaces\centering\arraybackslash\sffamily}X}%
\rowcolors{2}{middleware_white}{middleware_light_gray}

\begin{tabularx}{0.46\textwidth}{|L|L|L|L|}
\hline\rowcolor{middleware_green}
\multicolumn{ 4}{|c|}{\small\textcolor{white}{\textbf{1 Source, 1 Session, 1 Client, Exp0}}} \\ \hline
\rowcolor{middleware_dark_gray}
\multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Mes\-sa\-ges per mi\-nu\-te per sour\-ce}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Mid\-dle\-ware Exec. Ti\-me (s)}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{De\-lay (s)}}} & 
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Ave\-ra\-ge De\-lay (s)}}} \\ \hline
    &   60  &   0   &       \\ \cline{ 2- 3}
  60    &   60  &   0   &   0.00    \\ \cline{ 2- 3}
    &   60  &   0   &       \\ \hline
    &   60  &   0   &       \\ \cline{ 2- 3}
  120   &   60  &   0   &   0.00    \\ \cline{ 2- 3}
    &   60  &   0   &       \\ \hline
    &   60  &   0   &       \\ \cline{ 2- 3}
  240   &   60  &   0   &   0.00    \\ \cline{ 2- 3}
    &   60  &   0   &       \\ \hline
    &   69  &   9   &       \\ \cline{ 2- 3}
  480   &   69  &   9   &   16.67   \\ \cline{ 2- 3}
    &   92  &   32  &       \\ \hline
    &   159     &   99  &       \\ \cline{ 2- 3}
  1000  &   173     &   113     &   109.67  \\ \cline{ 2- 3}
    &   177     &   117     &       \\ \hline
    &   391     &   331     &       \\ \cline{ 2- 3}
  2000  &   383     &   323     &   311.00  \\ \cline{ 2- 3}
    &   339     &   279     &       \\ \hline
    &   561     &   501     &       \\ \cline{ 2- 3}
  4000  &   631     &   501     &   512.33  \\ \cline{ 2- 3}
    &   595     &   535     &       \\ \hline
\end{tabularx}%
\quad
\begin{tabularx}{0.46\textwidth}{|L|L|L|L|}
\hline\rowcolor{middleware_green}
\multicolumn{ 4}{|c|}{\small\textcolor{white}{\textbf{1 Source, 1 Session, 1 Client, Exp6}}} \\ \hline
\rowcolor{middleware_dark_gray}
\multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Mes\-sa\-ges per mi\-nu\-te per sour\-ce}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Mid\-dle\-ware Exec. Ti\-me (s)}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{De\-lay (s)}}} & 
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Ave\-ra\-ge De\-lay (s)}}} \\ \hline
    &   88  &   28  &       \\ \cline{ 2- 3}
  60    &   88  &   28  &   28.00   \\ \cline{ 2- 3}
    &   88  &   28  &       \\ \hline
    &   89  &   29  &       \\ \cline{ 2- 3}
  120   &   89  &   29  &   29.00   \\ \cline{ 2- 3}
    &   89  &   29  &       \\ \hline
    &   89  &   29  &       \\ \cline{ 2- 3}
  240   &   89  &   29  &   29.00   \\ \cline{ 2- 3}
    &   89  &   29  &       \\ \hline
    &   108     &   48  &       \\ \cline{ 2- 3}
  480   &   109     &   49  &   49.00   \\ \cline{ 2- 3}
    &   110     &   50  &       \\ \hline
    &   188     &   128     &       \\ \cline{ 2- 3}
  1000  &   188     &   128     &   131.00  \\ \cline{ 2- 3}
    &   197     &   137     &       \\ \hline
    &   316     &   256     &       \\ \cline{ 2- 3}
  2000  &   361     &   301     &   284.00  \\ \cline{ 2- 3}
    &   355     &   295     &       \\ \hline
    &   599     &   539     &       \\ \cline{ 2- 3}
  4000  &   617     &   557     &   542.33  \\ \cline{ 2- 3}
    &   591     &   531     &       \\ \hline
\end{tabularx}

\bigskip

\begin{tabularx}{0.46\textwidth}{|L|L|L|L|}
\hline\rowcolor{middleware_green}
\multicolumn{ 4}{|c|}{\small\textcolor{white}{\textbf{1 Source, 1 Session, 1 Client, Exp7}}} \\ \hline
\rowcolor{middleware_dark_gray}
\multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Mes\-sa\-ges per mi\-nu\-te per sour\-ce}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Mid\-dle\-ware Exec. Ti\-me (s)}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{De\-lay (s)}}} & 
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Ave\-ra\-ge De\-lay (s)}}} \\ \hline
    &   118 &   58  &       \\ \cline{ 2- 3}
  60    &   117 &   57  &   57.67   \\ \cline{ 2- 3}
    &   118     &   58  &       \\ \hline
    &   119     &   59  &       \\ \cline{ 2- 3}
  120   &   119     &   59  &   59.00   \\ \cline{ 2- 3}
    &   119     &   59  &       \\ \hline
    &   119     &   59  &       \\ \cline{ 2- 3}
  240   &   119     &   59  &   59.00   \\ \cline{ 2- 3}
    &   119     &   59  &       \\ \hline
    &   142     &   82  &       \\ \cline{ 2- 3}
  480   &   147     &   87  &   85.67   \\ \cline{ 2- 3}
    &   148     &   88  &       \\ \hline
    &   245     &   185     &       \\ \cline{ 2- 3}
  1000  &   243     &   183     &   183.63  \\ \cline{ 2- 3}
    &   242     &   182     &       \\ \hline
    &   386     &   326     &       \\ \cline{ 2- 3}
  2000  &   363     &   303     &   313.67  \\ \cline{ 2- 3}
    &   372     &   312     &       \\ \hline
    &   647     &   587     &       \\ \cline{ 2- 3}
  4000  &   677     &   617     &   608.33  \\ \cline{ 2- 3}
    &   681     &   621     &       \\ \hline
\end{tabularx}

\caption{1 source, 1 session, 1 client middleware execution times\label{1source_1session_1client_tables}}
\end{table}
\end{document}


\documentclass{article}

\setlength\textwidth{.5\textwidth}
\usepackage[english]{babel}
\begin{document}



\newcommand\zz[2]{\begin{tabular}[t]{@{}c@{}}#1\\\itshape#2\\\end{tabular}}

\noindent\parbox[t]{\linewidth}{%
\setlength\baselineskip{2\baselineskip}%
This some  text that I want to flow.
This should  be a  whole  separate  sentence 
This some more  text that I want to flow.
This should  be a  whole  newseparate  sentence}%
\hspace{-\linewidth}%
\raisebox{-\baselineskip}{\parbox[t]{\linewidth}{%
\setlength\baselineskip{2\baselineskip}%
\itshape
Different text that gets stuck in the intervening lines.
Different text that gets stuck in the intervening lines.
Different text that gets stuck in the intervening lines.}}

\end{document} 
share|improve this answer
    
I checked the wiki about the label thing, thx! –  Flame_Phoenix Mar 18 at 11:54

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.