Skip to content

Conversation

@YDX-2147483647
Copy link
Member

@YDX-2147483647 YDX-2147483647 commented Mar 25, 2025

Resolves #593
Relates-to: BITNP/BIThesis-wiki#483

@YDX-2147483647
Copy link
Member Author

YDX-2147483647 commented Mar 25, 2025

! Extra \endcsname.
<recently read> \endcsname 

CI 报错是 TeX Live 2025 新出现的,我本地也有,是第一次编译时main.aux多了\endcsname。实测 TeXPage 上的 2024 正常;我本地 2025 的 ctexart、ctexbook 都有问题,不过\usepackage{ctex}不受影响,pdflatex、xelatex、lualuatex 现象相同。编辑texlive/2025/texmf-dist/tex/latex/ctex/ctexbook.cls,把下面这个宏的内容清空,可以正常使用\cref,不过有副作用,\ref会从附录A变成A

  \cs_new_protected:Npn \ctex_fix_varioref_label:n #1
    {
-      \tl_if_empty:cT { p@#1 }
-        { \exp_args:Nnx \labelformat {#1} { \exp_not:c { CTEX@the#1 } } }
    }

大概率是 CTeX-org/ctex-kit#725

MWE

\documentclass{ctexbook}

\usepackage{cleveref}

\begin{document}
\section{S}\label{sec:intro}
\cref{sec:intro}
\end{document}

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (6)
  • bithesis.dtx: Language not supported
  • handbook/chapters/ch0-quick-start.tex: Language not supported
  • handbook/chapters/ch1-intro.tex: Language not supported
  • handbook/chapters/ch2-template-usage.tex: Language not supported
  • handbook/chapters/ch3-latex-syntax.tex: Language not supported
  • handbook/main.tex: Language not supported

@YDX-2147483647
Copy link
Member Author

YDX-2147483647 commented Dec 18, 2025

目前 TeX Live 2025 已经能用 cleveref 了;而 TeX Live 2024 尽管不能用 cleveref,添加这段代码也不影响使用别的包。
因此,再检查一下这个 PR 和 BITNP/BIThesis-wiki#483 ,就可以合并了。

@YDX-2147483647 YDX-2147483647 marked this pull request as ready for review December 18, 2025 03:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@YDX-2147483647 YDX-2147483647 added this pull request to the merge queue Dec 23, 2025
Merged via the queue into BITNP:main with commit c1958d1 Dec 23, 2025
15 checks passed
@YDX-2147483647 YDX-2147483647 deleted the cleveref branch December 23, 2025 15:51
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.

[Feature Request]: 加入 Cleveref 宏包以支持更好的引用格式

1 participant