From 9f2324bd97b869f920cd1f168dc1fe83acb814c7 Mon Sep 17 00:00:00 2001 From: Stuart Date: Mon, 12 Jan 2026 15:02:42 -0500 Subject: [PATCH] Strip appendix content from tex file Added regex to strip appendix content from the tex file. This is relevant for the new "End Matter" allowed for PRL --- texprlcount.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/texprlcount.pl b/texprlcount.pl index f5b397a..80838f8 100755 --- a/texprlcount.pl +++ b/texprlcount.pl @@ -85,6 +85,9 @@ (&@) # We strip comments from the tex file $texfile =~ s/[^\\]%[^\n]*//g; +# Strip appendix +$texfile =~ s/\\appendix.*?\\end\{document\}/\\end\{document\}/sg; + # We count the number of characters in the abstract my $abstract; ($abstract) = $texfile =~ /\\begin\{abstract\}(.*?)\\end\{abstract\}/s;