Discussions of the Parallel Programming book
 help / color / mirror / Atom feed
From: Akira Yokosawa <akiyks@gmail.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: perfbook@vger.kernel.org, Akira Yokosawa <akiyks@gmail.com>
Subject: [PATCH -perfbook 2/8] Apply hotfix for cleveref against recent LaTeX2e
Date: Wed, 6 May 2026 20:40:12 +0900	[thread overview]
Message-ID: <d39b0401-0c40-4a77-a4c4-1d0ff4bceff7@gmail.com> (raw)
In-Reply-To: <e8b6b390-7034-4d01-a565-8d5d48309a05@gmail.com>

It turned out that cleveref has been suffering from (yet another)
compatibility issue against LaTeX2e since <2024-11-01> release.

As can be seen in the closing paragraph of Section 1.1 in CI-built
PDFs at:

     https://gitlab.com/linux-kernel/perfbook/-/artifacts

, chapters in Appendix are printed as "Section C" and "Section E",
rather than "Appendix C" and "Appendix E".

Apply a hotfix based on a suggestion from Ulrike Fischer [1].

Link: https://github.com/latex3/latex2e/issues/2049#issuecomment-4302720865 [1]
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 fixcleveref.ltx | 12 ++++++++++++
 perfbook-lt.tex |  2 ++
 2 files changed, 14 insertions(+)
 create mode 100644 fixcleveref.ltx

diff --git a/fixcleveref.ltx b/fixcleveref.ltx
new file mode 100644
index 00000000..76a2b591
--- /dev/null
+++ b/fixcleveref.ltx
@@ -0,0 +1,12 @@
+\makeatletter%
+ \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}%
+\makeatother
+\IfFormatAtLeastTF{2024-11-01}{%
+  \AddToHook{cmd/appendix/before}{%
+    \crefalias{chapter}{appendix}%
+    \crefalias{section}{appendix}%
+    \crefalias{subsection}{appendix}%
+    \crefalias{subsubsection}{appendix}%
+    \crefalias{subsubsubsection}{appendix}%
+  }%
+}{}
diff --git a/perfbook-lt.tex b/perfbook-lt.tex
index 5509d455..4eec9b67 100644
--- a/perfbook-lt.tex
+++ b/perfbook-lt.tex
@@ -594,6 +594,8 @@
   \input{fixfvextra.ltx}
 }{}
 
+\input{fixcleveref.ltx}
+
 \begin{document}
 
 %%HTMLSKIP
-- 
2.43.0



  parent reply	other threads:[~2026-05-06 11:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-06 11:37 [PATCH -perfbook 0/8] May 2026 updates (1st set) Akira Yokosawa
2026-05-06 11:38 ` [PATCH -perfbook 1/8] Update rcu-test-ratio for Linux v7.0 Akira Yokosawa
2026-05-06 11:40 ` Akira Yokosawa [this message]
2026-05-06 11:41 ` [PATCH -perfbook 3/8] Cope with iconv without ISO~8859-1 support Akira Yokosawa
2026-05-06 11:43 ` [PATCH -perfbook 4/8] precheck-tentative.sh: Detect premature versions of "lineno" and "microtype" Akira Yokosawa
2026-05-06 11:44 ` [PATCH -perfbook 5/8] runlatex.sh: Add WARNEXIT variable to make "LaTeX Warning:" in .log be ignored Akira Yokosawa
2026-05-06 11:45 ` [PATCH -perfbook 6/8] precheck-tentative.sh: Fail early with suggestions for Fedora 44 Akira Yokosawa
2026-05-06 11:46 ` [PATCH -perfbook 7/8] precheck.sh: Add check of missing LaTeX packages " Akira Yokosawa
2026-05-06 11:47 ` [PATCH -perfbook 8/8] FAQ-BUILD: Add needed " Akira Yokosawa
2026-05-06 18:42 ` [PATCH -perfbook 0/8] May 2026 updates (1st set) Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d39b0401-0c40-4a77-a4c4-1d0ff4bceff7@gmail.com \
    --to=akiyks@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=perfbook@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox