Suppose I have the following table which lists conversion rules, where rows denote the input and columns denote the output type (so, for example, the conversion int8_t -> int16_t
would use b
, while int16_t -> int8_t
would use g
):
This answer lists alternatives for using a \slashbox
(which is what I would have originally used), which seem much more professional. However, the second table in their example seems unintuitive/not clear to me, and with the third, the thing that bit me was that in their example, the domains of rows and columns are different and therefore it is not necessary to define whether rows map to rooms and columns to dates or vice versa.
With that in mind, the best I could come up with was the above, which does not look good (and uses a vertical line which I'd like to avoid, but without it the table's meaning wouldn't be clear at all). What would be a best practice to typeset such a table?
Code for the example above:
\begin{table}
\centering
\begin{tabular}{rr|rrrrrr}
\toprule
& & \multicolumn{6}{c}{Output} \\
\midrule
& & int8\_t & int16\_t & int32\_t & uint8\_t & uint16\_t & uint32\_t \\
\multirow{6}[0]{*}{\begin{sideways}Input\end{sideways}} & int8\_t & a & b & c & d & e & f \\
& int16\_t & g & h & i & j & k & l \\
& int32\_t & m & n & o & p & q & r \\
& uint8\_t & s & t & u & v & w & x \\
& uint16\_t & y & z & a & b & c & d \\
& uint32\_t & e & f & g & h & i & j \\
\bottomrule
\end{tabular}%
\label{tab:addlabel}%
\end{table}%
\midrule
belongs after& & int8\_t & int16\_t & int32\_t & uint8\_t & uint16\_t & uint32\_t \\
.