I'm trying to make a table with diagonale titles. For this, I used some functions from the answer from Heiko Oberdiek in the post Special Table with Diagonal lines
I create the following functions by using the Heiko's proposition and modify it in order to have a line up and down, multiline support and the capability to increase the angle selection:
\usepackage{makecell}
\newcolumntype{M}{>{\centering\arraybackslash}m{3mm}}
\renewcommand*{\arraystretch}{1.5}%
\newcommand*{\headformat}[1]{{\small#1}}%
\newcommand*{\vcorr}{%
\vadjust{\vspace{-\dp\csname @arstrutbox\endcsname}}%
\global\let\vcorr\relax
}%
\newcommand*{\HeadAux}[5]{%
\multicolumn{#2}{@{}#3@{}}{%
\vcorr
\sbox0{\headformat{\strut #1}}%
\sbox2{\headformat{Maintenance}}%
\sbox4{\kern\tabcolsep\redtriangle\kern\tabcolsep}%
\sbox6{\rotatebox{#4}{\rule{0pt}{\dimexpr\ht0+\dp0\relax}}}%
\sbox0{\raisebox{0.25\dimexpr\dp0-\ht0\relax}[0pt][0pt]{\unhcopy0}}%
\dimen0=\dimexpr\wd2+0.5\wd4\relax
\ifx\HeadLine Y%
\rlap{\rotatebox{#5}{\hbox{\vrule width\dimen0 height .4pt}}}%
\fi
\kern.75\wd4 %
\rlap{%
\raisebox{.1\wd4}{\rotatebox{#4}{\unhcopy0}}%
}%
\kern.25\wd4 %
\ifx\HeadLine Y%
\rlap{\rotatebox{#5}{\hbox{\vrule width\dimen0 height .4pt}}}%
\fi
}%
}%
\newcommand*{\head}[1]{\HeadAux{\global\let\HeadLine=Y#1} {1} {r} {45} {45}}%
\newcommand*{\headNoLine}[1]{\HeadAux{\global\let\HeadLine=N#1} {1} {r} {45} {45}}%
\newcommand*{\headmulti}[2]{\HeadAux{\global\let\HeadLine=N#1} {#2} {l} {0} {45}}%
And I create my table in a separate tex file thanks the following:
\documentclass[./main.tex]{subfiles}
\begin{document}
\begin{tabular}{%
>{\bfseries}rM|M|M|M|M|M|M|M|M|M|M%
}%
& \head{Maintenance}
& \head{Flight n-i}
& \headmulti{\thead{$n^{th}$ - Flight Conditions}}{5}
& \head{Flight n+i}
& \head{Maintenance}
\\
\toprule
\sbox0{S}%
\rule{0pt}{\dimexpr\ht0 + 2ex\relax}%
Repercussion Phase
& {\cellcolor{blue!25}} & \cellcolor{gray!25}\greencheck
&\greencheck &\greencheck & \greencheck
&\greencheck & \greencheck & \cellcolor{gray!25}\greencheck
& {\cellcolor{blue!25}}\\
\hline
S1 Detection
& {\cellcolor{blue!25}} & \cellcolor{gray!25}\redtriangle
& \redtriangle & \redtriangle & \redtriangle
& \redtriangle & \redtriangle & \cellcolor{gray!25}\redtriangle
& {\cellcolor{blue!25}}\\
\hline
Risk Time
& {\cellcolor{blue!25}} & \cellcolor{gray!25}\greencheck
&\greencheck & \greencheck & \greencheck
&\greencheck&\greencheck& \cellcolor{gray!25}\greencheck
& {\cellcolor{blue!25}}\\
\hline
\multicolumn{3}{c|}{\multirow{2}{*}{Time(s)}}
& \multicolumn{5}{c|}{$t_0$}\\
\cline{3-9}
\multicolumn{2}{c|}{} & \multicolumn{7}{c|}{Mainteance Time $MT_1$} \\
\cline{3-9}
\end{tabular}%
\kern19.5mm
\newline
\begin{tabular}{%
>{\bfseries}lc|>{\quad}c
*{4}{c|}c>{\quad}c
*{4}{c|}c>{\quad}c
*{2}{c|}c%
}%
&
\head{Data Dimensions} &
&
\head{Single Input/Output} &
\head{Statc Rates} &
\head{Hierachical Memory} &
\head{Complex Data Movement} &
\headNoLine{Single Kernel Execution} &
&
\head{Application graph} &
\head{Implicit memory access} &
\head{Theoretical Framework} &
\head{Out-of-band control} &
\headNoLine{Real-time constraints} &
&
\head{Data Parallelism} &
\head{Pipeline Parallelism} &
\headNoLine{Task Parallelism}
\\
\sbox0{S}%
\rule{0pt}{\dimexpr\ht0 + 2ex\relax}%
StreamIt & \textcolor{tabred}{\bfseries 1} &&
\redtriangle & \redtriangle & & & &&
\greenbullet & \greenbullet & \orangecirc & \greenbullet & &&
\greenbullet & \greenbullet & \greenbullet
\\\hline
StreamC/KernelC & \textcolor{tabred}{\bfseries 1} &&
& & & & \redtriangle &&
\greenbullet & \greenbullet & & \greenbullet & &&
\greenbullet & &
\\\hline
SDF & \textcolor{tabred}{\bfseries 1} &&
& \redtriangle & & & &&
\greenbullet & \greenbullet & \greenbullet & & &&
& \greenbullet & \greenbullet
\\\hline
MDSDF & \textcolor{tabgreen}{\bfseries\itshape n} &&
& \redtriangle & & \redtriangle & &&
\greenbullet & \greenbullet & \greenbullet & & &&
\greenbullet & \greenbullet & \greenbullet
\\\hline
ArrayOL & \textcolor{tabgreen}{\bfseries\itshape n} &&
& \redtriangle & & \redtriangle & &&
\greenbullet & \greenbullet & \orangecirc & & &&
\greenbullet & \greenbullet & \greenbullet
\\\hline
Brook & \textcolor{tabgreen}{\bfseries\itshape n} &&
& & & & \redtriangle &&
& \greenbullet & & & &&
\greenbullet & &
\\\hline
Sequoia & \textcolor{tabgreen}{\bfseries\itshape n} &&
& & \redtriangle & \redtriangle & \redtriangle &&
& & & & &&
\greenbullet & &
\\\hline
\rowcolor{tabyellow}%
Block-parallel & \textcolor{tabbrown}{\bfseries 2} &&
& \redtriangle & & & &&
\greenbullet & \greenbullet & \orangecirc & \greenbullet &
\greenbullet &&
\greenbullet & \greenbullet & \greenbullet
\\[.5ex]
\multicolumn{3}{c}{} &
\multicolumn{5}{c}{\bfseries Limitations} &&
\multicolumn{5}{c}{\bfseries Features} &&
\multicolumn{3}{c}{\bfseries Parallelism}
\\
\end{tabular}%
\kern19.5mm % manually with the help of the next \vrule
% \vrule height 50mm
\end{document}
Except for the gap between the title row and the first data raw, it is working great (not so bad for a beginner...).
Do you know I can reduce / delete this Gap between the first rows??.
I try to modify several parameters, but unefortunately, it does nothing. I think the problem is in vcorr,
\newcommand*{\vcorr}{%
\vadjust{\vspace{-\dp\csname @arstrutbox\endcsname}}%
\global\let\vcorr\relax
}
I don't understand the behavior, nor the goal of @arstrutbox. In fact, I found very few information about it...
Furthermore if someone can explain me how I could push my horizontal text in multiline...? Think, I will have to use some cosinus and sinus function to do a perfect behavior...
Many thanks for your support


booktabsrules (\topruleand the like) don't go along with vertical rules. – egreg Feb 04 '18 at 22:53