thuthesis
thuthesis copied to clipboard
在附录中使用longtable时,页眉错误
提交前检查
- [x] 我已经充分阅读了模板文档。
- [x] 我的问题并非关于模板的用法(否则请前往 discussions 提出)。
- [x] 我已经搜索了已有的 issues 和 discussion,确认没有重复提交。
系统
Windows11
TeX 发行版
Tex Live 2024
TeX 编译器
PdfLaTeX
版本
7.6.0
学位类型
doctor
问题描述
在appendix中使用longtable时,会导致附录的页眉错误地显示为“参考文献”(上一部分的页眉)
复现代码
\chapter{补充内容}
\section{插图}
\begin{longtable}{ccc}
\caption{标题}
\label{table:appendix-table-1} \\
\toprule
表头1 & 表头2 & 表头3 \\
\midrule
\endfirsthead
\caption*{续表~\thetable\quad 标题} \\
\toprule
表头1 & 表头2 & 表头3 \\
\midrule
\endhead
\bottomrule
\endfoot
44 & 55 & 66\\
\pagebreak
77 & 88 & 99 \\
\end{longtable}
编译日志
其他信息
No response
此问题使用最新的 TeX Live 2025 + XeLaTeX 可以复现(表现为此章节页眉接续上一页的内容),TeX Live 2024 则不能复现。可能是某些宏包的行为有所修改。
此外,ThuThesis 并不支持使用 PdfLaTeX 编译。
此问题事实上与 ThuThesis 无关:
\documentclass{article}
\usepackage{longtable,fancyhdr}
\pagestyle{fancy}
\begin{document}
\appendix
\section{Test}
\begin{longtable}{ccc}
\caption{The Table} \\
\hline
1 & 2 & 3 \\
\hline
\endhead
\hline
\endfoot
4 & 5 & 6 \\
\pagebreak
7 & 8 & 9 \\
\end{longtable}
Left Mark: \leftmark
\end{document}
使用 TeX Live 2024 (XeLaTeX / PDFLaTeX) 编译时,第二页上的页眉(Left Mark)正常为节标题。切换至 2025,则空白。
此问题似乎和 https://github.com/latex3/latex2e/issues/672 描述的有点类似。
抱歉,重新检查了一下,TeX 编译器是XeLaTeX,TeX 发行版是MiKTeX 25.4
我目前尝试的方法是强行修改页眉内容
\fancypagestyle{appendixlongtable}{%
\fancyhead{}
\fancyhead[C]{\wuhao 附录~\thechapter\quad 补充内容}
}
\appendix
\pagestyle{appendixlongtable}
\chapter{补充内容}
...
\backmatter
\pagestyle{plain}
这是好的解决办法吗?
@shwangtangjun 目前可以先这样 workaround,如果有可能,,可以把表格移动到附录第二页也能缓解问题。 @zepinglee 对此有何想法吗?