複数行テキストを複数行で回転する

複数行テキストを複数行で回転する

基本的なテーブルを作成しようとしており、次のコードを思いつきました。問題は、回転したボックスが奇妙に配置されていることです。 ここに画像の説明を入力してください

最適な配置は、すべての小さな回転ボックスを左右に中央揃えにし、行にまたがる回転ボックスは両方向に中央揃えにすることです。rotatebox で origin=c を使用しようとしましたが、何も変わりませんでした。

\begin{table}
\begin{tabularx}{\textwidth}{X|X|X|X|X|X|X}
\multirow{2}{*}{\rotatebox[]{90}{Tool}} & \multicolumn{2}{c|}{\makecell{Usability,\\ Consistency,\\Reuse}} & \multicolumn{3}{c|}{Support for \ac{UCSD}} & \multirow{2}{*}{\rotatebox[]{90}{\makecell{Structured\\Storage}}} \\
& \rotatebox[origin=c]{90}{\makecell{Shape\\Recognition}} & \rotatebox[origin=c]{90}{\makecell{Similarity\\Search}} & \rotatebox[origin=c]{90}{\makecell{Real-Time\\Collaboration}} & \rotatebox[origin=c]{90}{\makecell{Low- \& High\\Fidelity\\Prototypes}} & \rotatebox[origin=c]{90}{\makecell{Interactive\\Testing}} & \\ \hline
\end{tabularx}

\caption{Comparison}
\label{tab:existing_tools}
\end{table}

答え1

ここに画像の説明を入力してください

\documentclass{article}
\usepackage{rotating}
\usepackage{makecell, tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}

\begin{document}
    \begin{table}
    \settowidth\rotheadsize{Recogniti}
\begin{tabularx}{\textwidth}{C|C|C|C|C|C|C}
    & \multicolumn{2}{c|}{\makecell[b]{Usability,\\ Consistency,\\Reuse}}
        & \multicolumn{3}{c|}{Support for UCSD}
            &                                           \\
\rothead{Tool}
    & \rothead{Shape\\Recognition}
        & \rothead{Similarity\\Search}
            & \rothead{Real-Time\\Collaboration}
                & \rothead{Low- \& High\\Fidelity\\Prototypes}
                    & \rothead{Interactive\\Testing}
                        & \rothead{Structured\\Storage} \\
    \hline
\end{tabularx}

\caption{Comparison}
\label{tab:existing_tools}
\end{table}
\end{document}

関連情報