$what = $ARGV[0]; print ">>$what\n"; $/ = undef; open DOC, "${what}2.tex"; $doc = ; open IN, "fdl.tex"; $fdl = ; open IN, "mk-src.tex"; $mksrc = ; $mksrc =~ s/\\subsection/\\subsubsection/g; $mksrc =~ s/\\section/\\subsection/g; $mksrc =~ s/\$<\$/\$/>/g; open IN, "lgpl.txt"; $lgpl = ; $lgpl = <<"---"; \\begin{verbatim} $lgpl \\end{verbatim} --- close IN; #$doc =~ s/(http\:\/\/\S+?)([\.\)]\W|\s)/\\htmladdnormallink{$1}{$1}$2/g; # latex2html does not recognize IfFileExists $doc =~ s/\\IfFileExists\{url\.sty\}.+\n.+/\\usepackage{url}/; $doc =~ s/\\url\|(.+?)\|/\\url\{$1\}/g; # latex2html does not like tabularnewline and providecommand # does not fix the problem $doc =~ s/\\providecommand{\\tabularnewline}{\\\\}//; $doc =~ s/\\tabularnewline/\\\\/g; $doc =~ s/(?\\textcompwordmark{}>/\\dgt{}/g; $doc =~ s/<\\,{}\\,{}>/\\dgt{}/g; $doc =~ s/<>/\\dgt{}/g; $doc =~ s/\\textasciitilde{}/\\\~{}/g; $doc =~ s/\\textasciicircum{}/\\\^{}/g; $doc =~ s/\(\(FDL\)\)/$fdl/g; $doc =~ s/\(\(LGPL\)\)/$lgpl/g; $doc =~ s/\(\(MKSRC\)\)/$mksrc/g; open DOC, ">$what.tex"; print DOC $doc;