如何制作一个非常具体的表格

如何制作一个非常具体的表格

在此处输入图片描述

我想制作类似图片中的表格的东西。到目前为止我只做到了这一点:

\documentclass{article}
\usepackage{longtable}
\setlength\LTleft{-110pt} 
\setlength\LTright{\fill}


\begin{document}

\begin{longtable}{lllll}

\caption{Quick guide to GPU terms}\\
\hline
\bfseries Type &\bfseries Descriptive name &\bfseries Closest Term &\bfseries Official term &\bfseries Definition\\ \hline
\endfirsthead
\hline
\endlastfoot
\hline
Program abstractions       &Vectorizable Loop         &Vectorizable Loop       &Grid     &Vectorizable Loop       \\        \hline
(put in this space the above title vertically)   &some     &some       &some      &some                                   \\       \hline
(same as above)                                        &some     &some       &some      &some                                   \\       \hline

Machine object          &Thread SIMD               & Thread Vector            &  Warp    &      SIMD Processor\\ \hline
(put in this space the above title vertically)&some     & some                         &  some      &   some\\                  \hline
(same as above)&some                          & some                         &  some      &   some\\                  \hline

Processing Hardware &some                          & some                         &  some      &   some\\                  \hline
(put in this space the above title vertically)&some                          & some            &  some      &   some\\              \hline
(same as above)&some                          & some                         &  some      &   some\\                  \hline

Memory Hardware     &some                          & some                         &  some      &   some\\                  \hline
(put in this space the above title vertically)&some   & some                         &  some      &   some\\               \hline
(same as above)&some                          & some                         &  some      &   some\\                  \hline

\end{longtable}

\end{document}

有人能指出如何做到这一点吗?

答案1

我会尽量避免使用垂直文本。对于这样的表格,这样做毫无意义;只需用水平规则分隔大块内容,但不要在与给定类型相对应的块中使用规则。

将类型设置得稍微偏移一点,并使用不同的字体将有助于读者理解其作用。

我使用单个tabular,而不是longtable,以适应您的需要。

\documentclass{article}
\usepackage{booktabs}
\usepackage{caption}

\begin{document}

\begin{table}
\caption{Quick guide to GPU terms}
\begin{tabular}{lllll}
\toprule
&\bfseries Descriptive name &\bfseries Closest Term &
  \bfseries Official term &\bfseries Definition\\
\midrule
\multicolumn{5}{@{}l}{\itshape Program abstractions} \\
&Vectorizable Loop & Vectorizable Loop & Grid & Vectorizable Loop \\
&some              & some              & some & some              \\
&some              & some              & some & some              \\
\midrule
\multicolumn{5}{@{}l}{\itshape Machine object} \\
&Thread SIMD       & Thread Vector     & Warp & SIMD Processor\\ 
&some              & some              & some & some              \\
&some              & some              & some & some              \\
\midrule
\multicolumn{5}{@{}l}{\itshape Processing Hardware} \\
&some              & some              & some & some              \\
&some              & some              & some & some              \\
\midrule
\multicolumn{5}{@{}l}{\itshape Memory Hardware} \\
&some              & some              & some & some              \\
&some              & some              & some & some              \\
\bottomrule
\end{tabular}
\end{table}

\end{document}

在此处输入图片描述

相关内容