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

refactor: 让硕博模板书脊上下居中,并适应长标题,避免与姓名粘连 #511

Merged
merged 2 commits into from
May 24, 2024

Conversation

YDX-2147483647
Copy link
Collaborator

@YDX-2147483647 YDX-2147483647 commented May 22, 2024

Resolves #505

MWE

% !TeX program = xelatex
% !BIB program = biber

\documentclass[type=master]{bithesis}

\BITSetup{
  info = {
    author = {杜甫},
    % title = 八月秋高风怒号卷我屋上三重茅茅飞渡江洒江郊高者挂罥长林梢下者飘转沉塘坳,
    title = 形状记忆聚氨酯的合成及其在织物中的应用,
    % verticalTitle = {形状记忆聚氨酯{L } {T } {X }的合成 \rotatebox[origin=c]{-90}{Feng Kaiyu} 及其在织物中的应用},
  },
}

\begin{document}
  \MakePaperBack
\end{document}
  • old.pdf:旧版
  • new.pdf:此PR
  • 其它PDF:Word模板

标准例子

图片
图片
图片

特殊例子

图片
图片

测量

29.7 mm / 941 × 158 = 5.0 mm.

图片
图片
图片

具体修改

  • \vskip\newgeometry + \restoregeometry

    原来的\vskip没生效(删掉后编译结果相同),而且需要从上边距开始算。干脆改边距好了。

  • center环境 → \centering

    lshort-zh-cn:center等环境会在上下文产生一个额外间距,而\centering等命令不产生,只是改变对齐方式。

  • minipage环境的对齐方式 tc

    这样遇到超长标题时,可以向两边溢出。

  • \vfill\par + \vpace

    \vspace可以设置间距最小值,避免标题稍长就和姓名学校粘在一起。

    另外,\vfill会直接生效,而\vspace不会,所以要加\par

@YDX-2147483647

This comment was marked as resolved.

@YDX-2147483647
Copy link
Collaborator Author

YDX-2147483647 commented May 22, 2024

geometry - Is it possible to fully \restoregeometry inside a group? - TeX - LaTeX Stack Exchange


现已通过make regression-test,只有书脊变了。

Resolves BITNP#505

具体修改如下。

- `\vskip` → `\newgeometry` + `\restoregeometry`

  原来的`\vskip`没生效(删掉后编译结果相同),而且需要从上边距开始算。干脆改边距好了。

- `center`环境 → `\centering`

  lshort-zh-cn:`center`等环境会在上下文产生一个额外间距,而`\centering`等命令不产生,只是改变对齐方式。

- `minipage`环境的对齐方式 `t` → `c`

  这样遇到超长标题时,可以向两边溢出。

- `\vfill` → `\par` + `\vpace`

  `\vspace`可以设置间距最小值,避免标题稍长就和姓名学校粘在一起。

  另外,`\vfill`会直接生效,而`\vspace`不会,所以要加`\par`。
@YDX-2147483647 YDX-2147483647 marked this pull request as ready for review May 22, 2024 17:51
@YDX-2147483647 YDX-2147483647 changed the title refactor: 让硕博模板书脊上下居中,并适应长标题 refactor: 让硕博模板书脊上下居中,并适应长标题,避免与姓名粘连 May 22, 2024
@fky2015 fky2015 added this pull request to the merge queue May 24, 2024
Merged via the queue into BITNP:main with commit 9b315ee May 24, 2024
3 checks passed
@YDX-2147483647 YDX-2147483647 deleted the YDX-2147483647/issue505 branch May 27, 2024 12:37
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

Successfully merging this pull request may close these issues.

[Bug]: 硕博模板书脊不适应长标题
2 participants