I have the following code
\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage[table]{xcolor}
\begin{document}
\renewcommand{\arraystretch}{1.5}%
\begin{tabularx}{418.26pt}{|c|c|c|>{\centering}X|>{\centering}X|>{\centering}X|c|c|}
\hline
\rowcolor{black!20}Nr. & Date & Version & Changed Chapters & Types of Change & Autor & Status\\\hline
1 & 06.12.2022 & 0.1 & Alle & First Draft & Long Ass Lastname & -\\\hline
\end{tabularx}
\end{document}
which results in the following output
In addition to centering the cells horizontally, I also want to center them vertically. Ideally, I'd like to define a variant of the cell type X so as to not clutter the actual contents of the table with special case handling.
I've tried both solutions involving tabularx proposed at Vertical alignment in tabular cells with variable height, but neither worked satisfactorally.
The \parbox solution
\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage[table]{xcolor}
\begin{document}
\renewcommand{\arraystretch}{1.5}%
\begin{tabularx}{418.26pt}{|c|c|c|>{\centering}X|>{\centering}X|>{\centering}X|c|c|}
\hline
\rowcolor{black!20}Nr. & Date & Version & \noindent\parbox[c]{\hsize}{Changed Chapters} & \noindent\parbox[c]{\hsize}{Types of Change} & Autor & Status\\\hline
1 & 06.12.2022 & 0.1 & Alle & First Draft & \noindent\parbox[c]{\hsize}{Long Ass Lastname} & -\\\hline
\end{tabularx}
\end{document}
results in this monstrosity
The \multicolumn "solution" is just as bad (except also having to guess an appropriate cell width)
\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage[table]{xcolor}
\begin{document}
\renewcommand{\arraystretch}{1.5}%
\begin{tabularx}{418.26pt}{|c|c|c|>{\centering}X|>{\centering}X|>{\centering}X|c|c|}
\hline
\rowcolor{black!20}Nr. & Date & Version & \multicolumn{1}{|m{2cm}|}{Changed Chapters} & \multicolumn{1}{|m{2cm}|}{Types of Change} & Autor & Status\\\hline
1 & 06.12.2022 & 0.1 & Alle & First Draft & \multicolumn{1}{|m{2cm}|}{Long Ass Lastname} & -\\\hline
\end{tabularx}
\end{document}





\renewcommand\tabularxcolumn[1]{m{#1}is what is documented in thetabularxdoc – David Carlisle Dec 06 '22 at 12:42