-
Notifications
You must be signed in to change notification settings - Fork 97
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
[Bug]: 硕博模板书脊不适应长标题 #505
Labels
🐛 bug
Something isn't working
Comments
临时解决方案编辑 |
给书脊的 \begingroup
\noindent\hfill
\rotatebox[origin=lt]{-90}{%
\makebox[\textheight]{%
\fangsong
\addCJKfontfeatures*{RawFeature={vertical}}%
\thu@spine@font
\CJKmove
#1\hfill
\thu@stretch{4.5em}{#2}%
}%
}%
\endgroup
cjk - Vertical Chinese text with XeTeX - TeX - LaTeX Stack Exchange |
当时编写时参考的要求。 |
% 对齐中西基线
% https://tex.stackexchange.com/a/38585
\newcommand*\CJKmovesymbol[1]{\raise.35em\hbox{#1}}
\newcommand*\CJKmove{\punctstyle{plain}% do not modify the spacing between punctuations
\let\CJKsymbol\CJKmovesymbol
\let\CJKpunctsymbol\CJKsymbol}
% \begin{macro}{\make_paper_back:}
% 制作书脊。
% \begin{macrocode}
\cs_new:Npn \make_paper_back: {
\cleardoublepage
\currentpdfbookmark{书脊}{frontmatter:paperback}
\begin{titlepage}
% 上下各留出规定的边距,到下一页再恢复
\newgeometry{
vmargin = 5cm,
}
\centering
% 把盒子竖过来,盒子内相当于一行;再把汉字利用字体特性转回来。
% 存在的问题:破折号断开
\rotatebox[origin=lt]{-90}{
% 实际使用时:\framebox → \makebox
\framebox[\textheight]{
\heiti\zihao{3}
\addCJKfontfeatures*{RawFeature={vertical}}
\CJKmove
%
% 标准例子:
形状记忆聚氨酯的合成及其在织物中的应用
%
% 西文例子:
% 形状记忆聚氨酯 \hspace{0.2em}
% \rotatebox{90}{L} \hspace{0.2em}
% \rotatebox{90}{T} \hspace{0.2em}
% \rotatebox{90}{X} \hspace{0.2em}
% 的合成Feng Kaiyu及其在织物中的应用
%
% 超长例子:
% 八月秋高风怒号卷我屋上三重茅茅飞渡江洒江郊高者挂罥长林梢下者飘转沉塘坳
\hspace{1em plus 1fill}
杜甫
\hspace{1em plus 1fill}
北京理工大学
}
}
\restoregeometry
\end{titlepage}
} |
测量像素结果
|
YDX-2147483647
added a commit
to YDX-2147483647/BIThesis
that referenced
this issue
May 22, 2024
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
added a commit
to YDX-2147483647/BIThesis
that referenced
this issue
May 22, 2024
Resolves BITNP#505 具体修改如下。 - `\vskip` → `\newgeometry` + `\restoregeometry` 原来的`\vskip`没生效(删掉后编译结果相同),而且需要从上边距开始算。干脆改边距好了。 - `center`环境 → `\centering` lshort-zh-cn:`center`等环境会在上下文产生一个额外间距,而`\centering`等命令不产生,只是改变对齐方式。 - `minipage`环境的对齐方式 `t` → `c` 这样遇到超长标题时,可以向两边溢出。 - `\vfill` → `\par` + `\vpace` `\vspace`可以设置间距最小值,避免标题稍长就和姓名学校粘在一起。 另外,`\vfill`会直接生效,而`\vspace`不会,所以要加`\par`。
github-merge-queue bot
pushed a commit
that referenced
this issue
May 24, 2024
Resolves #505 具体修改如下。 - `\vskip` → `\newgeometry` + `\restoregeometry` 原来的`\vskip`没生效(删掉后编译结果相同),而且需要从上边距开始算。干脆改边距好了。 - `center`环境 → `\centering` lshort-zh-cn:`center`等环境会在上下文产生一个额外间距,而`\centering`等命令不产生,只是改变对齐方式。 - `minipage`环境的对齐方式 `t` → `c` 这样遇到超长标题时,可以向两边溢出。 - `\vfill` → `\par` + `\vpace` `\vspace`可以设置间距最小值,避免标题稍长就和姓名学校粘在一起。 另外,`\vfill`会直接生效,而`\vspace`不会,所以要加`\par`。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
发生了什么?
标题很长时,书脊的标题、姓名、学校会粘在一起。即使下面有空,也不往下挪。
你期望的结果
问题复现的步骤(或者截图)
足够长的标题:八月秋高风怒号卷我屋上三重茅茅飞渡江洒江郊高者挂罥长林梢下者飘转沉塘坳
相关代码
这俩
\vfill
有时无效,原因不明。BIThesis/bithesis.dtx
Lines 1929 to 1931 in 2f6cf63
The text was updated successfully, but these errors were encountered: