There were cases where custom macros for indexing such as \IX, \Acr, \IXacr, etc. lacked the "\" leading them. Add patterns to catch such typo. They rely on the leading parts of those macros are spelled right. Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- utilities/cleverefcheck.pl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/utilities/cleverefcheck.pl b/utilities/cleverefcheck.pl index 69497893..0085fdb5 100755 --- a/utilities/cleverefcheck.pl +++ b/utilities/cleverefcheck.pl @@ -21,6 +21,10 @@ my $ng = 0; my $Verbatim_begin = qr/\\begin\{(Verbatim|tabula|equation|SaveVerb|verbbox)/ ; my $Verbatim_end = qr/\\end\{(Verbatim|tabula|equation|SaveVerb|verbbox)/ ; my $label_ptn = qr/(^\s*|\{)(,?[a-z]{3,4}:([a-zMPS]+:)?[^\},]+)(\}|,)/ ; +my $IX_ptn = qr/(^|\s+)IX[^\s\{]*{/ ; +my $api_ptn = qr/(^|\s+)api[^\s\{]*{/ ; +my $ppl_ptn = qr/(^|\s+)ppl[^\s\{]*{/ ; +my $acr_ptn = qr/(^|\s+)[aA]cr[^\s\{]*{/ ; my $in_footnote = 0 ; my $footnote_save = 0; @@ -90,6 +94,10 @@ sub check_line { $line =~ /^(?=[\s]*+[^%])[^%][ ]+\t/) { # TAB after white space $ng += 1; } + if ($line =~ /$IX_ptn/ || $line =~ /$api_ptn/ || + $line =~ /$ppl_ptn/ || $line =~ /$acr_ptn/ ) { + $ng += 1; + } if ($ng) { print $ARGV[0], ':', $line_num, ':', $raw_line; } -- 2.17.1