2016-11-10 16 views
-2

テーブルの複数行である最初の列に垂直方向に「テスト」を配置しようとしています。コードは次のとおりです。テーブルの複数行にテキストを垂直方向に配置する方法

\begin{table}[] 
\tiny 
\caption{a} 

\begin{tabular}{|M{0.1in}|p{0.7in}|p{1.4in}|p{2in}|} 
    \hline 
    % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ... 
    & \textbf{Factor Name} & \textbf{Explanation} & \textbf{Rationale} \\ 
    \hline 
    \multirow{4}{*}{\rotatebox[origin=c]{90}{test}}& body1 &body2 &\multirow{2}{*}{\parbox{2in}{body3}} \\ 
    \hhline{~--~} 
    & 1 & 2 \newline & \\ 
    \hhline{~---} 
    & 3& 3 & \multirow{2}{*}{5} \\ 
    \hhline{~--~} 
    & 6 & 7 & \\ 
    \hhline{----} 


    \hline 
\end{tabular} 
\end{table} 

これを行うには何か考えます。

答えて

0

testは、5の行ではなく、4です。

enter image description here

\documentclass{article} 

\usepackage{multirow,hhline,graphicx,array} 
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}} 

\begin{document} 

\begin{tabular}{|M{0.1in}|p{0.7in}|p{1.4in}|p{2in}|} 
    \hline 
    % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ... 
    & \textbf{Factor Name} & \textbf{Explanation} & \textbf{Rationale} \\ 
    \hline 
    \multirow{5}{*}{\rotatebox[origin=c]{90}{test}}& body1 &body2 &\multirow{2}{*}{\parbox{2in}{body3}} \\ 
    \hhline{~--~} 
    & 1 & 2 \newline & \\ 
    \hhline{~---} 
    & 3 & 3 & \multirow{2}{*}{5} \\ 
    \hhline{~--~} 
    & 6 & 7 & \\ 
    \hhline{----} 
\end{tabular} 

\end{document} 
12を含む行は、あなたがあなたの \multirow文で対応すべき対象の2行にまたがります
関連する問題