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

请问每个chapter的title距离页眉线留白太宽怎么调整? #23

Open
GuoPingPan opened this issue May 4, 2023 · 3 comments
Open

Comments

@GuoPingPan
Copy link

请问每个chapter的title距离页眉线留白太宽怎么调整?

还有摘要的标题部分也是

image
image
image

@GuoPingPan
Copy link
Author

@StickCui 麻烦请教一下您

@StickCui
Copy link
Owner

请问每个chapter的title距离页眉线留白太宽怎么调整?

还有摘要的标题部分也是

image image image

在 XDUthesis.cls 文件中,有如下的定义:
\ctexset{
chapter/beforeskip = {20pt},
chapter/format = {\zihao{3}\heiti\centering},%修正章节标题错误加粗问题
section/format = {\zihao{4}\songti\centering},
subsection/format = {\zihao{-4}\songti}
}
你可以参考 ctex 的官方文档进行相关设置,建议做好备份,以免修改出问题了改不回来。
打开 ctex 官方文档可在命令行调用一下命令:
texdoc ctex

@GuoPingPan
Copy link
Author

我研究了一下,为这个issue提供一些拙见吧。

  1. 需要在 \ctexset 中加上 chapter/fixskip = truechapter/beforeskip才起作用
\ctexset{
    chapter/beforeskip = {20pt}, % 章节标题上边距
    chapter/afterskip={12pt}, % 章节标题下边距
    chapter/fixskip = true,
    subsubsection/format = {\zihao{-4}\songti\bfseries}, % 二级标题格式
}
  1. 对于 abstract 的格式,需要额外修改 XDUthesis.cls 中的设置,以下是我的修改
\def\make@abstract{
\cleardoublepage%
\pagenumbering{roman}

\pagestyle{myheadings} % 中文摘要
\phantomsection
\pdfbookmark[1]{\XDU@abstractnameheader}{abscn}  %% 添加摘要页到书签
\vspace*{-1em} % 减少距离上边距的留白
\centerline{\heiti\chaptersize\XDU@abstractname}%
\vspace*{1em}
\XDU@cabstract
\par\vspace*{2em}\noindent{\heiti\zihao{-4}\textbf{\XDU@keywordsname:\XDU@keywords}}%
\vspace*{1em}%
\cleardoublepage

\pagestyle{headings} % 英文摘要
\phantomsection
\pdfbookmark[1]{\XDU@enabstractname}{absen}  %% 添加Abstract页到书签
\vspace*{-1em}
\centerline{\textbf{\chaptersize\XDU@enabstractname}}%
\vspace*{1em}
\XDU@eabstract
\par\vspace*{2em}\noindent{\textbf{\zihao{-4}
    \XDU@enkeywordsname:~\XDU@enkeywords}}%
\vspace*{1em}
\cleardoublepage

}

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