Commit d6dd6486 authored by liziwl's avatar liziwl
Browse files

文档添加表格旋转功能

在模板文档中添加了一个使用 `sidewaystable` 环境的示例,以演示如何将表格旋转90度。同时在模板文件 `sustechthesis.dtx` 中引入了 `rotating` 包以支持表格旋转功能。
parent fe297b33
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -122,6 +122,23 @@
  \end{tabularx}
\end{table}

如果表格横向宽度不够,可以使用 \pkg{sidewaystable} 将表格旋转90度。
\begin{sidewaystable}
  \centering
  \caption{三线表示例}
  \begin{tabular}{ll}
    \toprule
    文件名          & 描述                         \\
    \midrule
    thuthesis.dtx   & 模板的源文件,包括文档和注释 \\
    thuthesis.cls   & 模板文件                     \\
    thuthesis-*.bst & BibTeX 参考文献表样式文件    \\
    thuthesis-*.bbx & BibLaTeX 参考文献表样式文件  \\
    thuthesis-*.cbx & BibLaTeX 引用样式文件        \\
    \bottomrule
  \end{tabular}
  \label{tab:three-line-rotate}
\end{sidewaystable}


如果您要排版的表格长度超过一页,那么推荐使用 \pkg{longtable} 或者 \pkg{supertabular}
+2 −1
Original line number Diff line number Diff line
@@ -2825,6 +2825,8 @@
% 这会导致含有多行文字的单元格中行距有误。
% todo: sustech(修订注释)
%    \begin{macrocode}
% 表格旋转
\RequirePackage{rotating}
\newcommand\thu@set@table@font{
  \ifthu@language@chinese
    \def\thu@table@font{%
@@ -4544,7 +4546,6 @@ Thesis for the Degree of \degree@level@en@noun \ of \thu@degree@domain@en%
  }%
}{%
}
\RequirePackage{rotating}
\newcommand\undefcolumntype[1]{\expandafter\let\csname NC@find@#1\endcsname\relax}
\newcommand\forcenewcolumntype[1]{\undefcolumntype{#1}\newcolumntype{#1}}
%    \end{macrocode}