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

degree=bachelor 时,出现多个 Overfull \vbox 和 Overfull \hbox 警告 #345

Closed
4 tasks done
ipython3 opened this issue May 1, 2022 · 6 comments
Closed
4 tasks done

Comments

@ipython3
Copy link

ipython3 commented May 1, 2022

检查

  • 已经阅读《研究生学位论文撰写手册》或《中国科学技术大学本科毕业论文(设计)格式》
  • 已经将模板升级到了最新版
  • 已经阅读使用说明文档 ustcthesis.pdf
  • 已经阅读 常见问题

编译环境

  • 编译的系统:Overleaf / macOS 12.3.1
  • TeX 发行版:MacTeX 2022
  • 模板类型:bachelor

描述问题

将 degree=doctor 修改为 degree=bachelor后,在 Overleaf 上,通过手动上传 ustc-title-page-heading.pdf,解决了找不到此文件的问题。但是在 \copyrightpage 处出现多个 Overfull \vbox 和 Overfull \hbox 警告。

截图:
截屏2022-05-01 14 56 49

我尝试在本地做(macOS 12.3.1,MacTeX 2022),依然有同样的问题。

我看到说明文档中提到,\copyrightpage 命令的作用是生成声明页面,其中的内容根据 secret-level 和 secretyear 的内容自动填写。考虑到要写的文章完全不涉及到保密,我直接去除了这条 \copyrightpage 命令。但是 Overfull 警告依然存在,报错的位置也下移到了另一条指令:

截屏2022-05-01 14 58 47

那么问题应该并不在 \copyrightpage 和声明页面上。我搜索了一下关于这个 Overfull 警告的资料,查到的基本都是和表格相关的讨论。例如:
Removing an "Overfull \vbox" message caused by a nested table

然而在源代码中,我并没有在 \copyrightpage 附近看到和表格有关的代码。由于对 Latex 了解有限,走到这步也就不知道该怎么解决这个问题了。

我肉眼没有观察到最终生成的 pdf 文件中有什么错误,但是 Overfull 总令人感觉好像有东西被“挤”出来了😂。不知道这个问题有没有可能被定位和解决呢?

复现上述问题的代码:将 degree=doctor 修改为 degree=bachelor。

@zepinglee
Copy link
Member

这个是封面的警告,由于 LaTeX 机制问题警告在下一行。

开启 draft 选项后可以看到,overfull box 都是封面的这个表格导致的。

Screen Shot 2022-05-01 at 19 37 03

本科生的封面在 #301 中改成了现在的样式,基于 tabular 实现的,而且为了标题能自动换行还使用了很多 dirty tricks,所以改起来比较麻烦。建议如果在视觉上没有问题的话就忽略警告吧。

ustcthesis/ustcthesis.cls

Lines 1976 to 2013 in df62a26

\begin{tabular}{lp{140bp}lp{140bp}}
\quad 目 &
\multirow[t]{2}{325bp}{%
\centering\fontsize{15bp}{40bp}\selectfont
\ustc@title
} & & \\
\cline{2-4}
\noalign{\vskip 24bp}
& & & \\
\cline{2-4}
\noalign{\vskip 24bp}
\quad 文 &
\multirow[t]{3}{325bp}{%
\centering\fontsize{15bp}{40bp}\selectfont
\ustc@title@en
} & & \\
\cline{2-4}
\noalign{\vskip 24bp}
\quad 目 & & & \\
\cline{2-4}
\noalign{\vskip 24bp}
& & & \\
\cline{2-4}
\noalign{\vskip 24bp}
\quad 系 & \multirow[t]{1}{325bp}{\centering\ustc@department} & & \\
\cline{2-4}
\noalign{\vskip 24bp}
\quad 名 & \multirow[t]{1}{140bp}{\centering\ustc@author} &
\quad 号 & \multirow[t]{1}{140bp}{\centering\ustc@student@id} \\
\cline{2-2}
\cline{4-4}
\noalign{\vskip 24bp}
\quad 师 & \multirow[t]{1}{325bp}{\centering\ustc@supervisor@names} & & \\
\cline{2-4}
\noalign{\vskip 24bp}
\quad 期 & \multirow[t]{1}{325bp}{\centering\ustc@date@zh@small} & & \\
\cline{2-4}
\end{tabular}

@ipython3
Copy link
Author

ipython3 commented May 1, 2022

理解了,那我先忽略这几个警告😂。
很感谢您的耐心回复!

@ipython3 ipython3 closed this as completed May 1, 2022
@zepinglee
Copy link
Member

当然,如果你愿意修这几个警告的话也欢迎 PR。

@zepinglee
Copy link
Member

2bd5e6b 中使用了 \multicolumn 的方法消除了封面的警告。@ipython3 试一下你的论文封面还会不会有警告?

@ipython3
Copy link
Author

ipython3 commented May 2, 2022

我在本地试了一下,没有警告了,很爽😂。
非常感谢您的维护!

@zepinglee
Copy link
Member

我在本地试了一下,没有警告了,很爽😂。 非常感谢您的维护!

好的,那我和并进 master 了。

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