This commit is contained in:
gferg 2002-04-02 20:19:02 +00:00
parent 31b96c8634
commit 774437607c
3 changed files with 18 additions and 4 deletions

View File

@ -1 +1 @@
0.5.1, 2002-01-18
0.6.0, 2002-04-02

View File

@ -14,6 +14,7 @@
# 12Oct2001 - 0.4 - fix for sections; loop thru both files (body/title)
# 27Nov2001 - 0.5 - fixed bug in determining where doc-index lies
# 18Jan2002 - 0.5.1 - entity fix (822*)
# 02Apr2002 - 0.6 - misc fixes (bibliography/appendix, etc).
#
sub fix_print_html {
@ -126,8 +127,10 @@ sub fix_html {
$$buf =~ s/(\n><LI\n><DIV\nCLASS="FORMALPARA"\n)><P\n(.*?)<\/P\n>/$1$2\n/gms;
$$buf =~ s/(\n><LI\nSTYLE="[^\"]+"\n)><P\n(.*?)<\/P\n>/$1$2\n/gms;
if( $is_article == 0 ) {
$$buf =~ s/(\nCLASS="SECT[TION\d]+"\n>)<H1\n(.*?)<\/H1/$1<H0\n$2<\/H0/gims;
$$buf =~ s/(\nCLASS="SECT[TION\d]+"\n><HR>)<H1\n(.*?)<\/H1/$1<H0\n$2<\/H0/gims;
$$buf =~
s/(\nCLASS="SECT[TION\d]+"\n>)<H1\n(.*?)<\/H1/$1<H0\n$2<\/H0/gims;
$$buf =~
s/(\nCLASS="SECT[TION\d]+"\n><HR>)<H1\n(.*?)<\/H1/$1<H0\n$2<\/H0/gims;
}
$$buf =~ s/<H1(\nCLASS="INDEXDIV"\n)(.*?)<\/H1/<H2$1$2<\/H2/gims;
if( ($indx = rindex($$buf, "<H1\n><A\nNAME=\"DOC-INDEX\"")) > -1 ) {
@ -137,6 +140,7 @@ sub fix_html {
$$buf = substr($$buf, 0, $indx);
$$buf .= "\n<\/BODY>\n<\/HTML>\n\n";
}
$$buf =~ s/\&\#13;//g;
$$buf =~ s/\&\#60;/\&lt;/g;
$$buf =~ s/\&\#62;/\&gt;/g;
@ -177,6 +181,12 @@ sub fix_html {
$l[$cnt] =~ s/<\/H2/<\/H1/g;
}
if( $l[$cnt] =~ /^CLASS=\"CHAP/i
||
$l[$cnt] =~ /^NAME=\"BIBL/i
||
$l[$cnt] =~ /^CLASS=\"APPENDIX/i
||
$l[$cnt] =~ /^CLASS=\"GLOSSARY/i
||
$l[$cnt] =~ /^CLASS=\"PREF/i ) {
$j = 1;
@ -188,6 +198,10 @@ sub fix_html {
}
$$buf =~ s/><DIV\nCLASS="\w+"\n//gms;
$$buf =~ s/><\/DIV\n//gms;
$buf =~ s/<SPAN\n[^>]*?>//gms;
$buf =~ s/<\/SPAN\n>//gms;
$$buf =~ s/(><LI\n)><P\n(.*?)<\/P\n>(<\/LI\n)/$1$2$3/gms;
return;

View File

@ -53,7 +53,7 @@ $fname_wo_ext =~ s/\.[\w]+$//;
&fix_print_html($ARGV[0], 'body.html', 'title.html');
my($cmd) = "htmldoc --size universal -t pdf -f ${fname_wo_ext}.pdf " .
"--firstpage p1 --titlefile title.html body.html";
"--firstpage p1 --titlefile title.html body.html --footer c.1";
# For postscript output; append onto the above cmd string:
#