Skip to content

Instantly share code, notes, and snippets.

@balkian
Created May 4, 2017 07:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balkian/bb677c23be8fced89ea14a1f098bdb10 to your computer and use it in GitHub Desktop.
Save balkian/bb677c23be8fced89ea14a1f098bdb10 to your computer and use it in GitHub Desktop.
Rotated headers in latex tables
\usepackage{adjustbox}
\usepackage{array}
\newcolumntype{R}[2]{%
>{\adjustbox{angle=#1,lap=\width-(#2)}\bgroup}%
l%
<{\egroup}%
}
\newcommand*\rot{\multicolumn{1}{R{45}{1em}}}% no optional argument here, please!
\begin{document}
\begin{tabular}{r|ccc}
&
\rot{Property 1} &
\rot{Property 2} &
\rot{Property 3}
\\ \hline
System 1 & & & X \\
System 2 & X & X & X \\
System 3 & X & & X \\ \hline
\end{tabular}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment