3

Image

How do you create a table just like above, with different number of visible columns depending on the rows.

Thanks!

  • 1
    Welcome to TeX.SX! Can you show an intended application? Usually such tables are better realized in different formats. – egreg Feb 11 '17 at 22:04
4

See: enter link description here

\documentclass{article}
% Kommentieren Sie die folgende Zeile aus um das Einbinden von Grafiken zu ermöglichen (.png, .jpg)
%\usepackage[pdftex]{graphicx}
% Kommentieren Sie die folgende Zeile ein um KEINE Umlaute zu ermöglichen
\usepackage[utf8]{inputenc}
\usepackage{multirow}
\usepackage{rotating}
% Das Dokument beginnt hier
\begin{document}


\begin{table}
\begin{center}
\begin{tabular}{|c|c|c|c|c|}
\cline{3-5}
\multicolumn{2}{c|}{} & \multicolumn{3}{c|}{numbers} \\
\cline{3-5}
\multicolumn{2}{c|}{} & 1 & 2 & 3 \\
\hline
\multirow{3}{*}{\begin{sideways} letters~ \end{sideways}} & A & A1 & A2 & A3 \\
\cline{2-5}
& B & B1 & B2 & B3 \\
\cline{2-5}
& C & C1 & C2 & C3 \\
\hline
\end{tabular}
\end{center}
%\caption{Table caption.}
%\label{Table2}
\end{table}


\end{document}

enter image description here

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.