
表のセルの内容を見出しの中央に配置したいのですが、ポーランド語のテキスト文書のガイドラインでは、表の見出しの内容を水平方向と垂直方向の両方で中央に配置する必要があります。そのような答えですが、コードが説明されていないため、実装できません。コマンドを使用してm
、-type列の適用や\multirow[c]{1}{\mycolumnwidth}{My cell content}
それらの組み合わせもいくつか試しました\multicolumn
。テキストの高さの調整は\multirow{1}{\mycolumnwidth}[\myyshift]{My cell content}
解決策ではありません。垂直方向の中央揃えは自動的に実行する必要があります。何らかの答えtabular
プレーンTeX用ですが、または同様の環境を使用したいと思います。
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}
答え1
およびsiunitx
と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}