For a variety of reasons, I migrate some tabulars to NiceTabular. One of them looks like this:
\documentclass{article}
\makeatletter
\newsavebox\saved@arstrutbox
\newcommand{\setarstrut}[1]{%
\noalign{%
\begingroup
\global\setbox\saved@arstrutbox\copy@arstrutbox
#1%
\global\setbox@arstrutbox\hbox{%
\vrule @height\arraystretch\ht\strutbox
@depth\arraystretch \dp\strutbox
@width\z@
}%
\endgroup
}%
}
\newcommand{\restorearstrut}{%
\noalign{%
\global\setbox@arstrutbox\copy\saved@arstrutbox
}%
}
\makeatother
\begin{document}
\begin{tabular}{c@{/}c}
\setarstrut{\tiny}
\multicolumn{1}{c@{\tiny/}}{\tiny\textbf{droggel}} & \tiny\textbf{jug} \ \restorearstrut \hline
23 & 42
\end{tabular}
\end{document}
The header is mostly taken from this answer about making rows smaller. What I do is that I render the first row smaller than the others. Since I use the separator character / between the columns, that should also be rendered smaller. To facilitate this, I add a \multicolumn that replaces the original separator with a tiny one.
Now I switch out tabular with NiceTabular:
\documentclass{article}
\usepackage{nicematrix}
\makeatletter
\newsavebox\saved@arstrutbox
\newcommand{\setarstrut}[1]{%
\noalign{%
\begingroup
\global\setbox\saved@arstrutbox\copy@arstrutbox
#1%
\global\setbox@arstrutbox\hbox{%
\vrule @height\arraystretch\ht\strutbox
@depth\arraystretch \dp\strutbox
@width\z@
}%
\endgroup
}%
}
\newcommand{\restorearstrut}{%
\noalign{%
\global\setbox@arstrutbox\copy\saved@arstrutbox
}%
}
\makeatother
\begin{document}
\begin{NiceTabular}{c@{/}c}
\setarstrut{\tiny}
\multicolumn{1}{c@{\tiny/}}{\tiny\textbf{droggel}} & \tiny\textbf{jug} \ \restorearstrut \hline
23 & 42
\end{NiceTabular}
\end{document}
Compiling this yields:
! Package array Error: Empty preamble: `l' used.
See the array package documentation for explanation.
Type H <return> for immediate help.
...
l.29 ...column{1}{c@{\tiny/}}{\tiny\textbf{droggel}}
& \tiny\textbf{jug} \ \r...
The error comes from the @{\tiny/} bit of the multicolumn argument. If I delete this, the code renders but the / is obviously gone.
How can I migrate this properly to NiceTabular while keeping the separator setup?

\documentclass{article} \usepackage{nicematrix} \begin{document} \begin{NiceTabular}{cl} \multicolumn{1}{c@{}}{text} & text \\ text & text \end{NiceTabular} \end{document}for example still reproduces the error message you also get from your code. – leandriis Jun 09 '21 at 07:18nicematrix). This is a problem ofnicematrix.nicematrixis not compatible with all the types of format of\multicolumn. I should mention that problem in the documentation. Maybe, it will be solved in a future version. In your case, I would try to use a tabular with 3 columns (one for the/)... – F. Pantigny Jun 10 '21 at 20:37