summaryrefslogtreecommitdiff
path: root/support/chktex/MakeHTML.pl
diff options
context:
space:
mode:
Diffstat (limited to 'support/chktex/MakeHTML.pl')
-rw-r--r--support/chktex/MakeHTML.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/support/chktex/MakeHTML.pl b/support/chktex/MakeHTML.pl
new file mode 100644
index 0000000000..6bdbadcf12
--- /dev/null
+++ b/support/chktex/MakeHTML.pl
@@ -0,0 +1,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;
+ }
+}