页眉显示的是“Chapter 1.”,为英文,不是中文的“第1章”,如何解决
Closed this issue · 8 comments
检查 / Check
- [ x] 已阅读 提问流程
- [x ] 确认问题为关于 ucasthesis 编译和设计的问题,而非 LaTeX 的一般知识性问题
- [x ] 已仔细阅读 LaTeX 知识小站
- [ x] 已查阅搜索 issues 的 已关闭问题
closed issues
编译环境 / Compilation Environment
-
操作系统 / Operating System
- [x ] Windows 7/8/10
- macOS
- Linux
-
TeX 发行版 / Tex Distribution
- [x ] TeX Live
- MiKTeX
- CTeX
描述问题 / Problem Description
问题描述:texlive2020+TeXstudio,编译下载的tex文件,生成的页眉显示“Chapter1.”,为英文,不是中文的“第1章”,该如何解决,谢谢!
日志文件 / .log file
将编译生成的 .log
文件拖入下行空白处:
Thesis.log
问题截图 / Screenshots
最小工作示例(MWE) / Minimal Working Example
将编译生成的
.log
文件拖入下行空白处:
Thesis.log
根据 log 文件的 977 行
Package: fancyhdr 2021/01/04 v4.0 Extensive control of page headers and footers
和 CTeX-org/ctex-kit#554 是同一个问题。
按照这个方法:“还有一个临时补救的方法,在使用相应ctex宏包时,去相应的源文件搜索"\ctex_patch_cmd:Nnn \ps@fancy",替换成”\ctex_patch_cmd:Nnn \f@nch@initialise“,例如,使用ctexbook类,应该修改%TEXLIVE%\texmf-dist\tex\latex\ctex下的ctexbook.cls文件”,修改了 还是不好使呀?请问还有其他解决办法吗?谢谢
@Coder-zhangwei 建议考虑降低 fancyhdr的版本,或者先不管,写完最后编译最终版本时,找一台具有低版本的 fancyhdr 电脑编译即可,如 texlive 2019,或 overleaf
请问有texlive2019的下载地址吗,主流镜像网站上的texlive均更新至2020,编译会产生英文章节这个问题。谢谢
请问有texlive2019的下载地址吗,主流镜像网站上的texlive均更新至2020,编译会产生英文章节这个问题。
@yangle15 只回退 fancyhdr
到上一个版本即可,不必重装 texlive,更不必装 texlive 2019。texlive 默认会备份一个历史版本,使用 tlmgr restore fancyhdr 49886
可以回退 fancyhdr
到前一个版本。参考文档 https://www.tug.org/texlive/doc/tlmgr.html#restore
@yangle15 如果你无法根据 @muzimuzhi 的方案回退 fancyhdr 的版本,你可以:
- 先不用理会这个英文问题,当写完你的整个论文,最后需要编译最终版本时,去 overleaf (https://github.com/mohuangrui/ucasthesis/wiki/字体配置#linuxoverleaf-系统的字体配置) 上编译一下即可。
- 先不用理会这个英文问题,等 ctex 修复此问题,然后再更新你的 texlive 也可
作为临时的解决方案,这样也可以:
--- a/Style/artratex.sty
+++ b/Style/artratex.sty
@@ -710,6 +710,7 @@
%\renewcommand{\sectionmark}[1]{\markright{\MakeUppercase{#1}}{}}%
%- Deactivate uppercase effect
\renewcommand{\MakeUppercase}[1]{#1}%
+ \renewcommand{\chaptermark}[1]{\markboth{\CTEXthechapter\quad#1}{}}
%- Define different kinds of header and footer for different parts
\fancypagestyle{frontmatterstyle}{% style for frontmatter
\fancyhf{}% clear fields