3

I am writing my bachelor thesis and I have a problem with my tables. They look ugly. Here an example what it looks like (click to enlarge):

tables

Here is a testcode:

\documentclass{article}
\usepackage{graphicx}
\usepackage{booktabs}
\begin{document}

\begin{table}
\caption{Überblick über die in dieser Arbeit verwendeten Medien mit der jeweiligen Verwendung und Referenz} % title of Table
\centering % used for centering table
\begin{tabular}{l l l} % centered columns (4 columns)
\hline\hline %inserts double horizontal lines
Medium & Verwendung & Referenz  \\ [0.5ex] % inserts table
%heading
\hline % inserts single horizontal line
SOC  & Kultivierung von \textit{E.coli} nach DNA-Transfer & (Danquah and Forde 2007) \\ % inserting body of the table
Tween 40/60/80 & fehlt & fehlt  \\
LB & Kultivierung/fehlt  & Invitrogen/fehlt \\
 [1ex] % [1ex] adds vertical space
\hline %inserts single line
\end{tabular}
\label{table:nonlinret} % is used to refer this table in the text
\end{table}

\begin{table}
\caption{Überblick über die in dieser Arbeit verwendeten Kits mit ihrer jeweiligen Anwendung sowie Referenz} % title of Table
\centering % used for centering table
\begin{tabular}{l l l} % centered columns (4 columns)
\hline\hline %inserts double horizontal lines
Kit & Anwendung & Referenz  \\ [0.5ex] % inserts table
%heading
\hline % inserts single horizontal line
GeneJET Plasmid Miniprep Kit  & Plasmid-DNA-Aufreinigung & Fermentas \\ % inserting body of the table
5'/3' RACE Kit & Race-PCR & Roche Diagnostics  \\
RNeasy Mini Kit & RNA-Isolierung  & Qiagen  \\
 [1ex] % [1ex] adds vertical space
\hline %inserts single line
\end{tabular}
\label{table:nonline} % is used to refer this table in the text
\end{table}


\begin{table}
\caption{Überblick über die in dieser Arbeit verwendeten Enzyme, ihre optimalen Puffer, ihre spezifische Anwendung und die jeweilige Referenz} % title of Table
\centering % used for centering table
\begin{tabular}{l l l l} % centered columns (4 columns)
\hline\hline %inserts double horizontal lines
Enzym & Puffer & Anwendung & Referenz \\ [0.5ex] % inserts table
%heading
\hline % inserts single horizontal line
Taq-Polymerase & 10x NH$_4$ Reaktionspuffer + 50 mM MgCl$_2$ & Polymerase-Kettenreaktion & Bioline \\ % inserting body of the table
Phusion& 10x NH$_4$ Reaktionspuffer/fehlt + 50 mM MgCl$_2$ & Polymerase-Kettenreaktion & Bioline/fehlt \\
DNA-Ligase & Ligationspuffer  & Verknüpfung von DNA-Strängen & Fermentas \\
DNase I & 10x Inkubationspuffer 
RDD-Puffer & Hydrolyse von DNA & Roche Diagnostics
Qiagen \\
RNase & fehlt  & fehlt & fehlt \\
 [1ex] % [1ex] adds vertical space
\hline %inserts single line
\end{tabular}
\label{table:nonlinwa} % is used to refer this table in the text
\end{table}
\end{document}

any tips?

David Carlisle
  • 757,742
mr.bio
  • 1,141
  • 8
    read the booktabs manual and this tutorial by Mori. – pmav99 Jun 10 '11 at 20:52
  • In addition to the (excellent) accepted answer, you might like to see this post: http://tex.stackexchange.com/questions/13744/how-to-separate-table-content-and-table-style – cmhughes Sep 03 '11 at 21:50
  • -1. Please read the [faq] and http://stackoverflow.com/questions/how-to-ask. Your questions tend not to show any effort or even ask about a specific point. – doncherry Sep 03 '11 at 21:51

1 Answers1

13

Use these simple rules.

  1. Choose a good class (Koma, memoir, tufte-book etc).
  2. Use \toprule, \midrule and \bottomrule from booktabs rather than \hline.
  3. Use p{} to control width of columns.

Here is your example modified as above.

enter image description here

   \documentclass{tufte-book}
    \usepackage{graphicx}
    \usepackage{booktabs}
    \begin{document}

    \begin{table}
    \caption{Überblick über die in dieser Arbeit verwendeten Medien mit der jeweiligen Verwendung und Referenz} % title of Table
    \centering % used for centering table
    \begin{tabular}{p{2.5cm} p{3cm} p{2.5cm}} % centered columns (4 columns)
    \toprule
    Medium & Verwendung & Referenz  \\ 
    \midrule
    SOC  & Kultivierung von \textit{E.coli} nach DNA-Transfer & (Danquah and Forde 2007) \\ % inserting body of the table
    Tween 40/60/80 & fehlt & fehlt  \\
    LB & Kultivierung/fehlt  & Invitrogen/fehlt \\
     \bottomrule
    \end{tabular}
    \label{table:nonlinret} % is used to refer this table in the text
    \end{table}

    \begin{table}
    \caption{Überblick über die in dieser Arbeit verwendeten Kits mit ihrer jeweiligen Anwendung sowie Referenz} % title of Table
    \centering % used for centering table
    \begin{tabular}{p{2.5cm} p{3cm} p{2.5cm}}
    \toprule
    Kit & Anwendung & Referenz  \\  % inserts table
    %heading
    \midrule
    GeneJET Plasmid Miniprep Kit  & Plasmid-DNA-Aufreinigung & Fermentas \\ % inserting body of the table
    5'/3' RACE Kit & Race-PCR & Roche Diagnostics  \\
    RNeasy Mini Kit & RNA-Isolierung  & Qiagen  \\
    \bottomrule
    \end{tabular}
    \end{table}

    \begin{table}
    \caption{Überblick über die in dieser Arbeit verwendeten Enzyme, ihre optimalen Puffer, ihre spezifische Anwendung und die jeweilige Referenz} % title of Table
    \centering % used for centering table
    \begin{tabular}{p{2cm} p{3cm} p{2cm} p{2.5cm}}
    \toprule
    Enzym & Puffer & Anwendung & Referenz \\  % inserts table
    %heading
    \hline % inserts single horizontal line
    Taq-Polymerase & 10x NH$_4$ Reaktionspuffer + 50 mM MgCl$_2$ & Polymerase-Kettenreaktion & Bioline \\ % inserting body of the table
    Phusion& 10x NH$_4$ Reaktionspuffer/fehlt + 50 mM MgCl$_2$ & Polymerase-Kettenreaktion & Bioline/fehlt \\
    DNA-Ligase & Ligationspuffer  & Verknüpfung von DNA-Strängen & Fermentas \\
    DNase I & 10x Inkubationspuffer 
    RDD-Puffer & Hydrolyse von DNA & Roche Diagnostics
    Qiagen \\
    RNase & fehlt  & fehlt & fehlt \\
    \bottomrule 
    \end{tabular}
    \label{table:nonlinwa} % is used to refer this table in the text
    \end{table}
    \end{document}
Moriambar
  • 11,466
yannisl
  • 117,160
  • Wwwoooooww... this loooks much better. Do you know how i can get equal linewidth ? for the 3 tables ( they are on one single page ) – mr.bio Jun 10 '11 at 21:16
  • 1
    @mr.bio easiest way adjust the p{cm} to add to equal totals. Personally I don't like tables that are 'stacked' on top of each other, see if you can include some text between them, the pages will look better. – yannisl Jun 10 '11 at 21:33
  • 3
    +1 Good answer, Just one quibble from a memoir fanboy: IMNSHO (1) should read "Choose a good class (memoir, Koma, tufte-book etc)". Memoir comes with booktabs built-in. – Brent.Longborough Jun 10 '11 at 23:16