File: MakeHTML.pl

package info (click to toggle)
chktex 1.7.2-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,220 kB
  • ctags: 453
  • sloc: ansic: 4,171; sh: 414; makefile: 309; perl: 92; lisp: 5
file content (20 lines) | stat: -rw-r--r-- 254 bytes parent folder | download | duplicates (14)
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;
    }
}