[svn] r6075: wiki2pdf: gen-all totex
malekith
svnadmin at nemerle.org
Sat Jan 21 20:51:32 CET 2006
Log:
Some fixes.
Author: malekith
Date: Sat Jan 21 20:51:30 2006
New Revision: 6075
Modified:
wiki2pdf/gen-all
wiki2pdf/totex
Modified: wiki2pdf/gen-all
==============================================================================
--- wiki2pdf/gen-all (original)
+++ wiki2pdf/gen-all Sat Jan 21 20:51:30 2006
@@ -27,5 +27,6 @@
gen 'Grokking_Nemerle' 'Grokking Nemerle' '.*'
gen 'Tutorials_and_examples' 'Tutorials' '.*'
gen 'Macros' 'Macros' '.*'
+ gen 'Quick_Guide' 'Quick Guide' 'Quick_Guide'
gen 'Courses' 'Nemerle for OOP Programmers' 'Nemerle_for_OOP_Programmers_(Week_.*|Intro.*)'
fi
Modified: wiki2pdf/totex
==============================================================================
--- wiki2pdf/totex (original)
+++ wiki2pdf/totex Sat Jan 21 20:51:30 2006
@@ -3,7 +3,7 @@
$raise_level = $ENV{'RAISE_LEVEL'};
unlink("problems");
-open (IN, "recode utf8..l2 < output.html || touch problems |");
+open (IN, "konwert utf8-iso2 < output.html || touch problems |");
open (OUT, "> output.tex");
my $title = shift;
@@ -121,7 +121,8 @@
s/\|/{\\entbar}/g;
s/¡/{\\entbar}/g;
s/"/{"}/g;
- s/([_^%#\$&])/\\$1/g;
+ s/([_%#\$&])/\\$1/g;
+ s/\^/\${}^{\\wedge}\$/g;
return $_;
}
@@ -172,14 +173,17 @@
s/<\/\s*tt\s*>/}/g;
# skip the TOC
- if (/<table border="0" id="toc"><tr id="toctitle">/) {
+ if (/<table id='toc' class='toc'>/) {
while (<IN>) {
/<\/table>/ and last;
}
next;
}
- if (s/<pre>//) {
+ # skip scripts
+ s/<script.*<\/script>//;
+
+ if (s/<pre[^>]*>//) {
my $bye = 0;
my $out = "";
More information about the svn
mailing list