3

Im trying to create a multicolumn table in LaTex that would look like this:

enter image description here

Unfortunately I tried pretty much all the codes for multi row and multi column tables but it never looks even remotely similar. My main problem is to fit the Chronological periods on top of the 2 names.

The last code I tried was:

\documentclass[11pt]{article}
\begin{document}

\begin{left}
\begin{tabular}{|lc|ll|l|ll|}

\hline

{\bfseries Bronze Age} & {} & {\bfseries Iron Age} & {} &{\bfseries    Hellenistic}  & {\bfseries Roman}\\

\hline

\multirow {Kilise Tepe & Ephesos & Kilise Tepe  & Ephesos & Gordion &  Ephesos& Sagalassos}\\
\hline
\end{tabular}
\end{left}


\end{document}

Could someone please put me in the right direction?

Thank you in advance.

2

Your table seems to be wide and will not fit on the page width in the portrait mode without sacrificing readability. So, I suggest rotating the table at 90 degrees using the sidewaystable environment from the rotating package.

\documentclass[11pt]{article}
\usepackage{rotating}
\begin{document}

\begin{sidewaystable}[!htb]\small\centering
\begin{tabular}{|l|*7{c|}} \hline
&\multicolumn{2}{|c|}{\bfseries Bronze Age} & \multicolumn{2}{|c|}{\bfseries Iron Age} & {\bfseries Hellenistic}&\multicolumn{2}{|c|}{\bfseries Roman}\\ \cline{2-8}
& Kilise Tepe & Ephesos & Kilise Tepe  & Ephesos & Gordion &  Ephesos & Sagalassos\\ \hline
\textbf{Presence of fish (no species ID)}&&&&&&& \\ \hline
\textbf{Marine Species}&&&&&&&\\ \hline
% .............. continue the same way
\end{tabular}
\end{sidewaystable}

\end{document}

enter image description here

1

Here is a solution with tabularx, array, makecell. You don't need multirow, but thegeometry` package helps to have sensible margins.

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[showframe]{geometry}
\usepackage{array, makecell, ltablex}
\renewcommand\theadfont{\bfseries}

\begin{document}

\sffamily\small\setlength\tabcolsep{3pt}\renewcommand\arraystretch{1.2}
\noindent
\begin{tabularx}{\linewidth}{| >{\itshape}l|ccccccc|}
  \hline
  & \multicolumn{2}{c|}{\bfseries Bronze Age} & \multicolumn{2}{|c|}{\bfseries Iron Age} & \multicolumn{1}{|c|}{\bfseries Hellenistic} & \multicolumn{2}{|c|}{\bfseries Roman}\\
  \cline{2-8}
                          & \multicolumn{1}{c|}{Kilise Tepe} & \multicolumn{1}{|c|}{Gordion} & \multicolumn{1}{|c|}{Kilise Tepe} & \multicolumn{1}{|c|}{Gordion} & \multicolumn{1}{|c|}{Ephesos} & \multicolumn{1}{|c|}{Ephesos} & \multicolumn{1}{|c|}{Sagalassos} \\
  \hline
  \thead{Presence of fish & & & & & & & \\ (no species ID)} & & + & & + & & & \\
  \cline{1-1}
  \thead{Marine species} & & & & & & & \\
  \cline{1-1}
  Sardina pilchardus & & & & & & & + \\
  \cline{1-1}
  Euthynnus alletteratus & & & & & & & + \\
  \cline{1-1}
  Auxis rochei & & & & & & & + \\
  \cline{1-1}
  Sarda sarda & & & & & & & + \\
  \cline{1-1}
  Scomber japonicas & & & & & & & + \\
  \cline{1-1}
  Epinephelus & & & & & & & \\
  \cline{1-1}
  Carcharhinus & & & & & & & \\
  \cline{1-1}
  Alosa fallax & + & & & & & & \\
  \cline{1-1}
  Sparidae & + & & & & & + & \\
  \hline
\end{tabularx}

\end{document} 

enter image description here

0

In order to merge two or more column you need the \multicolumn command, which takes three inputs:

\multicolumn{<number of columns you want to merge>}{<text alignement>}{<text>}

The desired table could be obtained with the following code:

\documentclass{article}

\usepackage{multirow}

\begin{document}

\begin{tabular}{|l|c|c|c|c|c|c|c|}
    \hline
    \multirow{2}{*}{} & \multicolumn{2}{c|}{Bronze Age} & \multicolumn{2}{c|}{Iron Age} & Hellenistic & \multicolumn{2}{c|}{Roman}\\
    & \textbf{Kilise Tepe} & \textbf{Gordion} & \textbf{Kilise Tepe} & \textbf{Gordion} & \textbf{Ephesos}  & \textbf{Ephesos} & \textbf{Salagassos}\\
    \hline
    \textbf{Presence of fish} & & + & & + & & & \\
    \cline{1-1}
    \multicolumn{1}{|c|}{\textbf{Marine species}} & & & & & & & \\
    \cline{1-1}
    \textit{Sardina pilcardus} & & & & & & & + \\
    \cline{1-1}
    \textit{Euthynnus alletteratus} & & & & & & & + \\
    \hline
\end{tabular}

\end{document}

but, as AboAmmar pointed out in his answer, it will likely be too wide for the page. As an alternative to the rotating package, you may consider using acronyms in order to decrease the width of every column, and add a legend (using once again the \multicolumn command). For example:

enter image description here

\documentclass{article}

\usepackage{multirow}

\begin{document}

\begin{tabular}{|l|c|c|c|c|c|c|c|}
    \hline
    \multirow{2}{*}{} & \multicolumn{2}{c|}{Bronze Age} & \multicolumn{2}{c|}{Iron Age} & Hellenistic & \multicolumn{2}{c|}{Roman}\\
    & \textbf{K. T.} & \textbf{G.} & \textbf{K. T.} & \textbf{G.} & \textbf{E.}  & \textbf{E.} & \textbf{S.}\\
    \hline
    \textbf{Presence of fish} & & + & & + & & & \\
    \cline{1-1}
    \multicolumn{1}{|c|}{\textbf{Marine species}} & & & & & & & \\
    \cline{1-1}
    \textit{Sardina pilcardus} & & & & & & & + \\
    \cline{1-1}
    \textit{Euthynnus alletteratus} & & & & & & & + \\
    \hline
    \multicolumn{8}{l}{\textbf{K. T.}: Kilise Tepe}\\
    \multicolumn{8}{l}{\textbf{G.}: Gordon}\\
    \multicolumn{8}{l}{\textbf{E.}: Ephesos}\\
    \multicolumn{8}{l}{\textbf{S.}: Salagassos}\\
\end{tabular}

\end{document}

Eventually, you may want to have a look at the booktabs package, and remove some line from the table:

enter image description here

\documentclass{article}

\usepackage{multirow}
\usepackage{booktabs}

\begin{document}

\begin{tabular}{lccccccc}
    \toprule
    \multirow{2}{*}{} & \multicolumn{2}{c}{Bronze Age} & \multicolumn{2}{c}{Iron Age} & Hellenistic & \multicolumn{2}{c}{Roman}\\
    & \textbf{K. T.} & \textbf{G.} & \textbf{K. T.} & \textbf{G.} & \textbf{E.}  & \textbf{E.} & \textbf{S.}\\
    \midrule
    \textbf{Presence of fish} & & + & & + & & & \\
    \cmidrule{1-1}
    \multicolumn{1}{c}{\textbf{Marine species}} & & & & & & & \\
    \cmidrule{1-1}
    \textit{Sardina pilcardus} & & & & & & & + \\
    \textit{Euthynnus alletteratus} & & & & & & & + \\
    \bottomrule
\end{tabular}

\end{document}
  • Thank you so much everyone. This is brilliant! I'll try all the suggestions and decide which one suits best. Thank you. – Claudia Oct 29 '15 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.