I have some issues when creating my tables in LaTeX and really hope, that some of you could help me. My table looks like this:
Here is my coding:
\documentclass[a4paper,12pt,oneside]{article}
\usepackage[english]{babel}
\usepackage{tikz}
\usepackage{pgf}
\usetikzlibrary{shapes,arrows,positioning,calc}
\usepackage{tabu}
\usepackage{hyperref}
\usepackage{longtable}
\usepackage{array}
\usepackage{multirow,tabularx,booktabs}
\begin{document}
\begin{center}
\begin{tabularx}{0.8\linewidth}{l !{\qquad} r X r X r X r}
\toprule
& \multicolumn{3}{c}{Name1} & & \multicolumn{3}{c}{Name2}
\\ \cmidrule{2-4} \cmidrule{6-8}
& Factor1 && Factor2 && Factor1 && Factor2\\
\midrule
Test 1 & 12 && 32 && 3 && 5 \\
Test 2 & 1234 && 234 && 334 && --- \\
\bottomrule
\end{tabularx}
\end{center}
\end{document}
If it is possible, I would like my table to look like this (there should, of course, still be a space in the line below Name 1 and Name 2):
Further questions:
- How do I add "Note:"?
- How do I add table name?
Hope someone can help me. Thank you very much.
tabularx
but are loading thetabu
package; you are usingtoprule
/(c)midrule
/bottomrule
without loading thebooktabs
package.tabularx
and you use it.