To help Paul (and other contributors), print a hint in front of the violating line. Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- utilities/punctcheck.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utilities/punctcheck.pl b/utilities/punctcheck.pl index 8820bf9c..94cbafc9 100755 --- a/utilities/punctcheck.pl +++ b/utilities/punctcheck.pl @@ -71,6 +71,8 @@ sub check_line { $next_line =~ /\\E?QuickQuizEnd[BEM]?/ || $next_line =~ /\\end\{(quot|enum|item|sequ)/ ) { $ng -= 1; + } else { + print "vvv Hint: sentence ending with an uppercase needs \"\\\@.\" vvv\n"; } } if ($line =~ /^(?=[\s]*+[^%])[^%]*[a-z][\)\}\']*[\.\?\!][\)\}\']*\s+[^%]/ || @@ -80,21 +82,28 @@ sub check_line { if ($line =~ /^(?=[\s]*+[^%])[^%]*[a-z][\)\}\']*[\.\?\!][\)\}\']*\s+\\\\/ || $line =~ /^(?=[\s]*+[^%])[^%]*.*[\.:][\)\}\']*\s+\\\\/ ) { $ng -= 1; + } else { + print "vvv Hint: end of sentence needs new line vvv\n"; } } if ($line =~ /^(?=[\s]*+[^%])[^%]*[^~]\\cite/) { $ng += 1; if ($line =~ /^(?=[\s]*+[^%])[^%]*~\(\\cite/) { $ng -= 1; + } else { + print "vvv Hint: \\cite{} needs a \"~\" in front vvv\n"; } } if ($line =~ /^(?=[\s]*+[^%])[^%]*\\\@[\.\?\!\:][\)\}\']*\s+[^%]/){ $ng += 1; + print "vvv Hint: end of sentence needs new line vvv\n"; } if ($line =~ /[a-z][\)\}\']*\\\@[\.\?\!\:][\)\}\']*\s/) { + print "vvv Hint: should be \"xxx.\\\@\" vvv\n"; $ng += 1; } if ($line =~ /[A-Z][\)\}\']*[\.\?\!\:]\\\@[\)\}\']*\s/) { + print "vvv Hint: should be \"XXX\\\@.\" vvv\n"; $ng += 1; } if ($ng) { -- 2.25.1