2016-11-10 8 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

test5 행이되어야하며 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 성명을 수용해야하는 두 줄에 걸쳐