Open Basmah1961 opened 4 months ago
nicematrix
yet has such feature with its built-in command \diagbox
.
\documentclass[11pt, a4paper]{article}
\pagestyle{empty}
\usepackage{nicematrix}
\begin{document}
\begin{NiceTabular}[hvlines]{l l l}
\diagbox{Aa}{Pp}
& Beta
& Gamma
\\
Epsilon
& Zeta
& Eta
\\
Iota
& Kappa
& Lambda
\\
\end{NiceTabular}
\end{document}
nicematrix
yet has such feature with its built-in command\diagbox
.\documentclass[11pt, a4paper]{article} \pagestyle{empty} \usepackage{nicematrix} \begin{document} \begin{NiceTabular}[hvlines]{l l l} \diagbox{Aa}{Pp} & Beta & Gamma \\ Epsilon & Zeta & Eta \\ Iota & Kappa & Lambda \\ \end{NiceTabular} \end{document}
I did not know it is available. However, I think it is possible to improve it by
diagbox
(Aa
and Pb
) must have \tabcolsep
margin from vertical rulesYou are right. It's a good suggestion. However, I can't change easily such features without silently breaking existing documents. The command \diagbox
has been introduced in the version 4.1 of 2020/05/27 (four years ago) and it's not so difficult for the final user to add a \hspace*{...}
and a \strut
(for the vertical space).
Then why not make \diagbox
behave as normally does, but add an optional key to change its behavior? This way, existing documents will not be affected while users get to test new functionalities which emulate tabularray
tabularray
has a command\diagbox
which allows for convenient placement of diagonal boxes. It might be good to add this command instead of using\CodeAfter
andtikzpicture