Graphics, Figures & Tables ⇒ A better table ?
A better table ?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
A better table ?
For the moment, I can't decide between these three table styles :
Code: Select all
\documentclass[12pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{amsmath}
\usepackage{tensor}
\usepackage{booktabs}
\usepackage{xcolor}
\usepackage{colortbl}
\begin{document}
\begin{table}[H]
\centering
\begin{tabular}{cl*4{>{\centering\arraybackslash}p{1cm}}}
\toprule[1.5pt]
\toprule[.5pt]
$\mathcal{C}$ & & $\tensor{\Omega}{_{\text\it mat}}$ & $\tensor{\Omega}{_{\text\it rad}}$ & $\tensor{\Omega}{_{\Lambda}}$ & $k$ \\
\midrule %\hline
%\rowcolor[gray]{0.9}
1 & Univers vide : & 0 & 0 & 0 & $-1 $ \\
2 & Univers de poussières : & 1 & 0 & 0 & $0$ \\
%\rowcolor[gray]{0.9}
3 & Univers clos : & 4 & 0 & 0 & $1$ \\
4 & Univers de radiation : & 0 & 1 & 0 & $0$ \\
%\rowcolor[gray]{0.9}
5 & Univers de deSitter : & 0 & 0 & 1 & $0$ \\
6 & $\Lambda$CDM : & 0.3 & 0 & 0.7 & $0$ \\
\bottomrule[.5pt]
\bottomrule[1.5pt]
\end{tabular}
\caption{A caption.}
\end{table}
\begin{table}[H]
\centering
\begin{tabular}{cl*4{>{\centering\arraybackslash}p{1cm}}}
\toprule[1.5pt]
\toprule[.5pt]
$\mathcal{C}$ & & $\tensor{\Omega}{_{\text\it mat}}$ & $\tensor{\Omega}{_{\text\it rad}}$ & $\tensor{\Omega}{_{\Lambda}}$ & $k$ \\
%\hline
\rowcolor[gray]{0.9}
1 & Univers vide : & 0 & 0 & 0 & $-1 $ \\
2 & Univers de poussières : & 1 & 0 & 0 & $0$ \\
\rowcolor[gray]{0.9}
3 & Univers clos : & 4 & 0 & 0 & $1$ \\
4 & Univers de radiation : & 0 & 1 & 0 & $0$ \\
\rowcolor[gray]{0.9}
5 & Univers de deSitter : & 0 & 0 & 1 & $0$ \\
6 & $\Lambda$CDM : & 0.3 & 0 & 0.7 & $0$ \\
\bottomrule[.5pt]
\bottomrule[1.5pt]
\end{tabular}
\caption{A caption again.}
\end{table}
\begin{table}[H]
\centering
\begin{tabular}{!{\vline}cl*4{>{\centering\arraybackslash}p{1cm}}!{\vline}}
\hline
\rowcolor[gray]{0.6}\color{white} $\mathcal{C}$ & & $\color{white} \tensor{\Omega}{_{\text\it mat}}$ & $\color{white} \tensor{\Omega}{_{\text\it rad}}$ & $\color{white} \tensor{\Omega}{_{\Lambda}}$ & $\color{white} k$ \\
%\hline
\rowcolor[gray]{0.98}
1 & Univers vide : & 0 & 0 & 0 & $-1 $ \\
\rowcolor[gray]{0.9}
2 & Univers de poussières : & 1 & 0 & 0 & $0$ \\
\rowcolor[gray]{0.98}
3 & Univers clos : & 4 & 0 & 0 & $1$ \\
\rowcolor[gray]{0.9}
4 & Univers de radiation : & 0 & 1 & 0 & $0$ \\
\rowcolor[gray]{0.98}
5 & Univers de deSitter : & 0 & 0 & 1 & $0$ \\
\rowcolor[gray]{0.9}
6 & $\Lambda$CDM : & 0.3 & 0 & 0.7 & $0$ \\
\hline
\end{tabular}
\caption{Another caption.}
\end{table}
\end{document}
Any suggestion ?
Here's a preview :