
Gostaria de centralizar o conteúdo das células da tabela no título. Nas diretrizes para documentos de texto em polonês, o conteúdo do cabeçalho da tabela deve ser centralizado tanto horizontal quanto verticalmente. eu encontreiuma resposta dessas, mas não estou conseguindo implementá-lo, pois o código não está explicado. Tentei também a aplicação da m
coluna -type e \multirow[c]{1}{\mycolumnwidth}{My cell content}
algumas combinações delas com \multicolumn
o comando. O ajuste da altitude do texto \multirow{1}{\mycolumnwidth}[\myyshift]{My cell content}
não é uma solução - a centralização vertical deve ser realizada automaticamente. Háalguma respostapara TeX simples, mas eu gostaria de usar tabular
um ambiente semelhante.
MWE:
\documentclass[table]{standalone}
\usepackage{dcolumn}
\usepackage{multirow}
\newcolumntype{d}{D{.}{.}{2.1}}
\renewcommand{\arraystretch}{1.3}
\begin{document}
\begin{tabular}{|l|d|d|}
\hline
\multicolumn{1}{|c|}{\multirow[c]{1}{23mm}{\centering\textbf{Title of side-heading}}} &
\multicolumn{1}{>{\centering}p{23mm}|}{\textbf{Arbitrary values}} &
\multicolumn{1}{>{\centering}p{23mm}|}{\textbf{Some other random values}}\\
\hline
Description 1 & 63.5 & 48.7\\
\hline
Description 2 & 88.4 & 51.3\\
\hline
\end{tabular}
\end{document}
Responder1
Comsiunitx
e makecell
:
\documentclass[table]{standalone}
\usepackage{siunitx}
\usepackage{makecell}
\renewcommand{\theadfont}{\normalsize\bfseries}
\renewcommand{\arraystretch}{1.3}
\begin{document}
\begin{tabular}{|l|S[table-format=2.1]|S[table-format=2.1]|}
\hline
{\thead{Title of\\ side-heading}} &
{\thead{Arbitrary\\ values}} &
{\thead{Some other\\ random\\ values}}\\
\hline
Description 1 & 63.5 & 48.7\\
\hline
Description 2 & 88.4 & 51.3\\
\hline
\end{tabular}
\end{document}