Skip to content

Instantly share code, notes, and snippets.

@AntonLydike
Last active June 5, 2019 12:22
Show Gist options
  • Save AntonLydike/57da49f0268e80aac8c6b61ef25ed885 to your computer and use it in GitHub Desktop.
Save AntonLydike/57da49f0268e80aac8c6b61ef25ed885 to your computer and use it in GitHub Desktop.
Intricate latex table
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{multirow}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\begin{document}
Some fancy-ass latex table:
\bigskip
\begin{center}
\begin{tabular}{ c c | C{1cm} r | l C{1cm} | }
\multicolumn{2}{ c }{} & \multicolumn{4}{ c }{X} \\
\multicolumn{2}{ c }{} & \multicolumn{2}{ c }{PI} & \multicolumn{2}{ c }{HH} \\ \cline{3-6}
& \multirow{3}{*}{-} & & & & \\
\multirow{4}{*}{Y} & & \multicolumn{2}{ c| }{I} & \multicolumn{2}{ c| }{II} \\
& & & a & b & \\ \cline{3-6}
& \multirow{3}{*}{+} & & c & d & \\
& & \multicolumn{2}{ c| }{III} & \multicolumn{2}{ c| }{IV} \\
& & & & & \\ \cline{3-6}
\end{tabular}
\end{center}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment