hyperref 7.01n (released in July 2025) made a change in the name of
its macro for formatting page counts in index [1].  It ended up in
a regression in our Index pages, namely, missing most page counts
with bold shape or underlined.
This issue is observed in recent CI-builds at
https://gitlab.com/linux-kernel/perfbook/.

Add regex'es to cover the patterns of "hyperxindexformat{...}".
   (in addition to those for existing "hyperindexformat{...}")

Link: https://ctan.org/ctan-ann/id/aFgfN-aRU1t7L2XT@prptp [1]
Signed-off-by: Akira Yokosawa <[email protected]>
---
 utilities/adjustindexformat.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/utilities/adjustindexformat.pl b/utilities/adjustindexformat.pl
index 584b3232..52cfaae6 100755
--- a/utilities/adjustindexformat.pl
+++ b/utilities/adjustindexformat.pl
@@ -38,5 +38,11 @@ while($line = <$fh>) {
     $line =~ s/\{([^\|]+)(\|hyperindexformat)\{\\gl(@\\makefirstuc 
)\{.+\}\}\}/\{$1$3\{$1\}$2\{\\GL\}\}/ ;
     $line =~ s/\{([^\|]+)(\|hyperindexformat)\{\\gl(@\\makefirstuc 
)\{.+\}!([^\}]+)\}\}/\{$1$3\{$1}!$4$2\{\\GL\}\}/ ;
     $line =~ s/(\\makefirstuc )\{([^\)]+)\} \<([^\]]+)\>\|hyperpage\}/$1\{$2\} 
\($3\)|hyperindexformat\{\\GL\}\}/ ;
+    $line =~ s/\{([^\|]+)(\|hyperxindexformat)\{\\bf(@\\makefirstuc 
)\{.+\}\}\}/\{$1$3\{$1\}$2\{\\BF\}\}/ ;
+    $line =~ s/\{([^\|]+)(\|hyperxindexformat)\{\\bf(@\\makefirstuc 
)\{.+\}!([^\}]+)\}\}/\{$1$3\{$1}!$4$2\{\\BF\}\}/ ;
+    $line =~ s/(\\makefirstuc )\{([^\)]+)\} \[([^\]]+)\]\|hyperpage\}/$1\{$2\} 
\($3\)|hyperxindexformat\{\\BF\}\}/ ;
+    $line =~ s/\{([^\|]+)(\|hyperxindexformat)\{\\gl(@\\makefirstuc 
)\{.+\}\}\}/\{$1$3\{$1\}$2\{\\GL\}\}/ ;
+    $line =~ s/\{([^\|]+)(\|hyperxindexformat)\{\\gl(@\\makefirstuc 
)\{.+\}!([^\}]+)\}\}/\{$1$3\{$1}!$4$2\{\\GL\}\}/ ;
+    $line =~ s/(\\makefirstuc )\{([^\)]+)\} \<([^\]]+)\>\|hyperpage\}/$1\{$2\} 
\($3\)|hyperxindexformat\{\\GL\}\}/ ;
     print $line ;
 }

base-commit: bfce6d84f45d7aa5ffb4ea2202ca6a248adf5dff
-- 
2.43.0


Reply via email to