From 3e87e2d7af73dd9fbf5a4210a2d80c5bc914b9a1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 13 Apr 2017 23:32:21 +0000 Subject: chktex support file updates git-svn-id: svn://tug.org/texlive/trunk@43786 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/chktex/chktexrc | 4 +- Master/texmf-dist/doc/chktex/ChkTeX.pdf | Bin 225331 -> 355998 bytes Master/texmf-dist/scripts/chktex/deweb.pl | 159 ++++++++++++++++-------------- 3 files changed, 88 insertions(+), 75 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/chktex/chktexrc b/Master/texmf-dist/chktex/chktexrc index da28a5dcfad..c6355f8db12 100644 --- a/Master/texmf-dist/chktex/chktexrc +++ b/Master/texmf-dist/chktex/chktexrc @@ -493,6 +493,8 @@ WipeArg \citet:*[][]{} \citep:*[][]{} \citealt:*{} \citealp:*[]{} \citeauthor:*{} \Citet:*[][]{} \Citep:*[][]{} \Citealt:*{} \Citealp:*[]{} \Citeauthor:{} \citetext:{} \citeyear:*{} \citeyearpar:{} + # tipa which uses " + \textipa:{} } ##################################################################### @@ -545,7 +547,7 @@ TextCmd VerbEnvir { verbatim comment listing verbatimtab rawhtml errexam picture texdraw - filecontents pgfpicture tikzpicture + filecontents pgfpicture tikzpicture minted lstlisting IPA } ##################################################################### diff --git a/Master/texmf-dist/doc/chktex/ChkTeX.pdf b/Master/texmf-dist/doc/chktex/ChkTeX.pdf index 35c6f526ea3..443bb4f722c 100644 Binary files a/Master/texmf-dist/doc/chktex/ChkTeX.pdf and b/Master/texmf-dist/doc/chktex/ChkTeX.pdf differ diff --git a/Master/texmf-dist/scripts/chktex/deweb.pl b/Master/texmf-dist/scripts/chktex/deweb.pl index 83de358bc2e..0e9c85f96ca 100755 --- a/Master/texmf-dist/scripts/chktex/deweb.pl +++ b/Master/texmf-dist/scripts/chktex/deweb.pl @@ -26,93 +26,104 @@ # # -print STDERR "DeWEB v1.2 - Copyright 1996 Jens T. Berger Thielemann\n"; +print STDERR "DeWEB v1.3 - Copyright 1996 Jens T. Berger Thielemann\n"; undef $/; -$texmode = 1; -$_ = <>; - -while(/\@/) -{ - &out($`); - $_ = $'; - - if(/^@/) { - $_ = $'; - &out('@'); - next; +my @FILES = @ARGV; +FILE: +while( my $file = shift @FILES ) { + + my $success = open my $fh, '<', "$file"; + if ( ! $success ) { + print STDERR "Couldn't open file '$file'\n"; + next FILE; } - if(/^([\s\n])/) { - $_ = $'; - print "\n" if $1 eq "\n"; - $texmode = 1; - next; - } - - if(/^[cpd]/i) { - $_ = $'; - $texmode = 0; - next; - } - - if(/^\,/i) { - $_ = $'; - print '\,'; - next; - } - - if(m!^/!) { - $_ = $'; - print '\\\\'; - next; - } - - if(/^[h\&\|\;\#\+]/i || /^i.*/i) { - $_ = $'; - next; - } - - if(/^\*[0-9\*]?((.|\n)*?\.)/) { - $_ = $'; - print $1; - $texmode = 1; - next; - } - - if(/^[<(^.t!]((.|\n)*?)\@\>/i) { - $_ = $'; - print '{'.$1.'}'; - $texmode = 0; - next; - } - - if(/^[=]((.|\n)*?)\@\>/) { - $_ = $'; - print &printnl($1); - next; - } + $texmode = 1; + $_ = <$fh>; + + while (/\@/) { + &out($`); + $_ = $'; + + if (/^@/) { + $_ = $'; + &out('@'); + next; + } + + if (/^([\s\n])/) { + $_ = $'; + print "\n" if $1 eq "\n"; + $texmode = 1; + next; + } + + if (/^[cpd]/i) { + $_ = $'; + $texmode = 0; + next; + } + + if (/^\,/i) { + $_ = $'; + print '\,'; + next; + } + + if (m!^/!) { + $_ = $'; + print '\\\\'; + next; + } + + if (/^[h\&\|\;\#\+]/i || /^i.*/i) { + $_ = $'; + next; + } + + if (/^\*[0-9\*]?((.|\n)*?\.)/) { + $_ = $'; + print $1; + $texmode = 1; + next; + } + + if (/^[<(^.t!]((.|\n)*?)\@\>/i) { + $_ = $'; + print '{'.$1.'}'; + $texmode = 0; + next; + } + + if (/^[=]((.|\n)*?)\@\>/) { + $_ = $'; + print &printnl($1); + next; + } + + if (/^[fsl](\s+\S+\s+\S+)|^\'(.|\n)*?\'|^\[((.|\n)*?)\@\]/i) { + $_ = $'; + print &printnl($+); + next; + } + + @line = split(/\n/, $_, 2); + print STDERR "Unknown opcode, ignored. Buffer:\n$line[0]\n"; - if(/^[fsl](\s+\S+\s+\S+)|^\'(.|\n)*?\'|^\[((.|\n)*?)\@\]/i) { - $_ = $'; - print &printnl($+); - next; } - @line = split(/\n/, $_, 2); - print STDERR "Unknown opcode, ignored. Buffer:\n$line[0]\n"; + print $_; } -print $_; - sub printnl { my($foo); - if(defined $_[0]) { - $foo = $_[0]; - $foo =~ s/.//g; + if (defined $_[0]) { + $foo = $_[0]; + $foo =~ s/.//g; } else { - $foo = ""; + $foo = ""; } $foo; } -- cgit v1.2.3