长表上的属性垂直对齐

长表上的属性垂直对齐

我创建了一个 4 列的长表。如下所示。我希望将属性(在本例中为“Business”)放在第一列上,垂直(横向)而不是水平。实现此目的的最简单方法是什么?

先感谢您

\begin{longtable}[c]{| c | c |c | c|}


\hline
\rowcolor{orange}
\textbf{Category} & \textbf{Name} & Yes & No\\
\hline
\endfirsthead

\hline
\multicolumn{4}{|c|}{Continuation of Table \ref{long:hey}}\\
\hline
\rowcolor{orange}
\textbf{Category} & \textbf{Name} & Yes & No\\
\hline
\endhead

\hline
\endfoot
\endlastfoot

  \multirow{7}{*}{\textbf{Business}} & IreneVillas & \checkmark & \checkmark \\ \cline{2-4}
    & PhotoCorfu & \checkmark & \checkmark \\ \cline{2-4}
    & TradesManager & \checkmark & \checkmark \\ \cline{2-4}
    & CWE & \checkmark & \checkmark \\ \cline{2-4}
    & Akron & \checkmark & \checkmark \\ \cline{2-4}    
    & TVRepair & \checkmark & \checkmark \\ \cline{2-4}
    & Smart Scan  & \checkmark & \checkmark \\ \cline{2-4}

  \hline

   \caption{List of all business websites}\\  
\end{longtable}

答案1

下面是通过 graphicx 旋转标签的示例,其中的一些格式清理来自书签, 和确保长表不会拆分类别

在此处输入图片描述

\documentclass{article}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{booktabs}

\begin{document}
\begin{longtable}[c]{cccc}

\toprule
\textbf{Category} & \textbf{Name} & Yes & No\\
\midrule
\endfirsthead

\multicolumn{4}{c}{Continuation of Table \ref{long:hey}}\\
\midrule
\textbf{Category} & \textbf{Name} & Yes & No\\
\midrule
\endhead

\caption{\label{long:hey} List of all business websites}
\endfoot
\bottomrule
\endlastfoot

  \multirow{7}{*}{\rotatebox{90}{\textbf{Business}}} & IreneVillas & x & x \\*
    & PhotoCorfu & x & x \\*
    & TradesManager & x & x \\*
    & CWE & x & x \\*
    & Akron & x & x \\*
    & TVRepair & x & x \\*
    & Smart Scan  & x & x \\*

  \midrule

  \multirow{7}{*}{\rotatebox{90}{\textbf{Business}}} & IreneVillas & x & x \\*
    & PhotoCorfu & x & x \\*
    & TradesManager & x & x \\*
    & CWE & x & x \\*
    & Akron & x & x \\*
    & TVRepair & x & x \\*
    & Smart Scan  & x & x \\*

  \midrule

  \multirow{7}{*}{\rotatebox{90}{\textbf{Business}}} & IreneVillas & x & x \\*
    & PhotoCorfu & x & x \\*
    & TradesManager & x & x \\*
    & CWE & x & x \\*
    & Akron & x & x \\*
    & TVRepair & x & x \\*
    & Smart Scan  & x & x \\*

  \midrule

  \multirow{7}{*}{\rotatebox{90}{\textbf{Business}}} & IreneVillas & x & x \\*
    & PhotoCorfu & x & x \\*
    & TradesManager & x & x \\*
    & CWE & x & x \\*
    & Akron & x & x \\*
    & TVRepair & x & x \\*
    & Smart Scan  & x & x \\*

  \midrule

  \multirow{7}{*}{\rotatebox{90}{\textbf{Business}}} & IreneVillas & x & x \\*
    & PhotoCorfu & x & x \\*
    & TradesManager & x & x \\*
    & CWE & x & x \\*
    & Akron & x & x \\*
    & TVRepair & x & x \\*
    & Smart Scan  & x & x \\*

  \midrule

  \multirow{7}{*}{\rotatebox{90}{\textbf{Business}}} & IreneVillas & x & x \\*
    & PhotoCorfu & x & x \\*
    & TradesManager & x & x \\*
    & CWE & x & x \\*
    & Akron & x & x \\*
    & TVRepair & x & x \\*
    & Smart Scan  & x & x \\*

\end{longtable}
\end{document}

相关内容