Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何生成规范的长表格?(希望能提供长表格模板) #584

Closed
EricYan1994 opened this issue Dec 30, 2020 · 2 comments
Closed

Comments

@EricYan1994
Copy link

EricYan1994 commented Dec 30, 2020

根据《清华大学研究生学位论文写作指南(202009)》,当表格较大,不能在一页内打印时,可以以“续表”的形式另页打印。

目前的模板里没有长表格,我自己尝试用longtable能基本实现想要的效果,主要有两个问题:

  1. 【续表】没法正确体现,理想的效果是第一页是【表 X.X】,之后都应该是【续表 X.X】
  2. 请问如何缩小表格的行距?
\begin{longtable}{cccc}
    \caption{VOCs体积浓度(ppb)}\\
    \toprule[1.5pt]
    VOCs物种 & 2018 & 2019 & 2020 \\
    \midrule
    \endhead
    \bottomrule[1.5pt]
    \endfoot
    butane & 0.63  & 1.02  & 1.11  \\
    n-butane & 2.06  & 3.22  & 3.31  \\
    isopentane & 1.54  & 2.02  & 2.57  \\
    n-pentane & 1.13  & 1.56  & 2.02  \\
    2,2-dimethylbutane & 0.04  & 0.06  & 0.13  \\
    2,3-dimethylbutane & 0.00  & 0.00  & 0.00  \\
    2-methylpentane & 0.61  & 0.60  & 0.68  \\
    cyclopentane & 0.16  & 0.11  & 0.11  \\
    3-methylpentane & 0.31  & 0.31  & 0.36  \\
    n-hexane & 0.49  & 0.30  & 0.39  \\
    2,4-dimethylpentane & 0.03  & 0.01  & 0.02  \\
    methylcyclopentane & 0.50  & 0.21  & 0.28  \\
    2-methylhexane & 0.15  & 0.10  & 0.11  \\
    2,3-dimethylpentane & 0.07  & 0.01  & 0.02  \\
    cyclohexane & 0.37  & 0.06  & 0.06  \\
\end{longtable}%
@zepinglee
Copy link
Contributor

zepinglee commented Dec 30, 2020

  1. 【续表】没法正确体现,理想的效果是第一页是【表 X.X】,之后都应该是【续表 X.X】

我刚看了一下,2020-12 版指南修改了续表的格式:

如某个表需要转页接排,在随后的各页上应重复表的编号。编号后跟表题(可省略)和“(续)”,置于表上方。续表均应重复表头。

可以这样实现:

\begin{longtable}{cccc}
    \caption{跨页长表格的表题} \\
    \toprule
    Header 1 & Header 2 & Header 3 & Header 4 \\
    \midrule
  \endfirsthead
    \caption[]{跨页长表格的表题(续)} \\
    \toprule
    Header 1 & Header 2 & Header 3 & Header 4 \\
    \midrule
  \endhead
    \bottomrule
  \endfoot
  Row 1  & & & \\
  Row 2  & & & \\
  Row 3  & & & \\
  Row 4  & & & \\
  Row 5  & & & \\
\end{longtable}

我发现目前模板中对 longtable 的配置导致编译错误,稍后修复一下。

  1. 请问如何缩小表格的行距?

《指南》的要求是

表单元格中的文字采用 11pt 字书写,汉字用宋体,英文和数字用 Times New Roman 体,单倍行距,段前空 3 磅, 段后空 3 磅。

模板会在用户载入 longtable 后自动配置好字号和行距。如果需要更小的行距,可以将 \arraystretch 改得更小。

{\renewcommand\arraystretch{0.9}
  \begin{longtable}
    ...
  \end{longtable}
}

@zepinglee
Copy link
Contributor

8bca6d2 中修复了 longtable 宏包的配置,并且添加了相应的示例以及测试文件。

This was referenced Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants