summaryrefslogtreecommitdiff
path: root/support/chktex/MakeHTML.pl
blob: 6bdbadcf127321162bb5c98f0185b336a23620e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Remove parts of code enclosed in %latex/%endlatex tags

$latexonly = 0;

while(<>)
{
    $latexonly = 1 if /^%latex/i;
    $latexonly = 0 if /^%endlatex/i;
    

    if($latexonly) {
	if(/^%!(.*)/)
	{
	    print $1;
	}
    }
    else {
	print;
    }
}