version 1.40, 2002/07/22 20:04:16
|
version 1.42, 2002/07/25 18:58:09
|
Line 292 ENDPART
|
Line 292 ENDPART
|
$result =~ s/{\\par }\s*\\\\/\\\\/gm; |
$result =~ s/{\\par }\s*\\\\/\\\\/gm; |
$result =~ s/\\\\\s+\[/ \[/g; |
$result =~ s/\\\\\s+\[/ \[/g; |
$result =~ s/θ/\$\\theta\$/g; #converts theta from html into tex |
$result =~ s/θ/\$\\theta\$/g; #converts theta from html into tex |
$result =~ s/\b_+\b/\\makebox\[1 cm\]\[b\]{\\hrulefill}/g; |
$result =~ s/\b__+\b/\\makebox\[1 cm\]\[b\]{\\hrulefill}/g; |
#conversion of html characters to LaTeX equivalents |
#conversion of html characters to LaTeX equivalents |
if ($result =~ m/&(\w+|#\d+);/) { |
if ($result =~ m/&(\w+|#\d+);/) { |
$result = &character_chart($result); |
$result = &character_chart($result); |
} |
} |
|
$result =~ s/(\\end{tabular})\s*\\vskip 0 mm/$1/g; |
|
$result =~ s/(\\begin{enumerate})\s*\\noindent/$1/g; |
#-- writing .tex file in prtspool |
#-- writing .tex file in prtspool |
my $temp_file; |
my $temp_file; |
my $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout_".time."_".rand(10000000).".tex"; |
my $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout_".time."_".rand(10000000).".tex"; |
Line 314 FINALEND
|
Line 316 FINALEND
|
|
|
sub character_chart { |
sub character_chart { |
my $result = shift; |
my $result = shift; |
|
$result =~ s/�?0?7;//g; |
$result =~ s/�?0?9;//g; |
$result =~ s/�?0?9;//g; |
$result =~ s/�?10;//g; |
$result =~ s/�?10;//g; |
$result =~ s/�?13;//g; |
$result =~ s/�?13;//g; |
Line 472 sub character_chart {
|
Line 475 sub character_chart {
|
# $result =~ s/®//g; |
# $result =~ s/®//g; |
# $result =~ s/¯//g; |
# $result =~ s/¯//g; |
# $result =~ s/¯//g; |
# $result =~ s/¯//g; |
$result =~ s/°/\$^\\{\\circ\\}\$/g; |
$result =~ s/°/\$^{\\circ}\$/g; |
$result =~ s/°/\$^\\{\\circ\\}\$/g; |
$result =~ s/°/\$^{\\circ}\$/g; |
$result =~ s/±/\$\\pm\$/g; |
$result =~ s/±/\$\\pm\$/g; |
$result =~ s/±/\$\\pm\$/g; |
$result =~ s/±/\$\\pm\$/g; |
$result =~ s/²/\$^2\$/g; |
$result =~ s/²/\$^2\$/g; |
Line 635 sub character_chart {
|
Line 638 sub character_chart {
|
return $result; |
return $result; |
} |
} |
|
|
|
|
|
#'"` |
|
|
sub additional_cleanup { |
sub additional_cleanup { |
my $result = shift; |
my $result = shift; |
my $first_app = index($result,'\documentclass',0); |
my $first_app = index($result,'\documentclass',0); |