我需要帮助使带有文本和 rotatebox 元素的 tabularx 单元格垂直居中。
这是我的代码(编辑:根据评论更新了代码片段):
\documentclass{article}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{relsize}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\begin{table*}
\smaller
\caption{A Table}
\centering
\begin{tabularx}{\textwidth}{llllllllllllXXXlX}
\multirow{2}{*}{} &
\multicolumn{4}{c}{Multi-1} &
\multicolumn{4}{c}{Multi-2} &
\multicolumn{8}{c}{Multi-3} \\
\cmidrule(lr){2-5}
\cmidrule(lr){6-9}
\cmidrule(lr){10-17}
\multicolumn{1}{l|}{\rotatebox{90}{Ref}} &
\multicolumn{1}{l|}{\rotatebox{90}{very-long-rotate-1}}&
\multicolumn{1}{l|}{\rotatebox{90}{very-long-rotate-2}} &
\multicolumn{1}{l|}{\rotatebox{90}{very-long-rotate-3}}&
\multicolumn{1}{l|}{\rotatebox{90}{very-long-rotate-4}} &
\multicolumn{1}{l|}{\rotatebox{90}{very-long-rotate-1}} &
\multicolumn{1}{l|}{\rotatebox{90}{very-long-rotate-2}} &
\multicolumn{1}{l|}{\rotatebox{90}{very-long-rotate-3}} &
\multicolumn{1}{l|}{\rotatebox{90}{very-long-rotate-4}} &
\multicolumn{1}{l|}{\rotatebox{90}{very-long-rotate-1}} &
\multicolumn{1}{l|}{\rotatebox{90}{very-long-rotate-2}} &
\multicolumn{1}{l|}{\rotatebox{90}{very-long-rotate-3}} &
\multicolumn{1}{c|}{center} &
\multicolumn{1}{c|}{center} &
\multicolumn{1}{c|}{center} &
\multicolumn{1}{l|}{\rotatebox{90}{very-long-rotate-1}} &
\multicolumn{1}{c|}{center} \\
\cmidrule{1-17}
& & & & & & & & & & & & & & & & \\
\end{tabularx}
\end{table*}
并呈现下表:
我想要有带文本的列中心垂直(以及水平)居中。你能帮助我吗?
提前致谢