[l2h] Various latex2html bugfixes
Julius Smith
jos at ccrma.stanford.edu
Fri Feb 18 18:19:22 CET 2005
Hi All,
The following patches implement a few known bugfixes (see past email
to latex2html at tug.org) that seem not to have been incorporated into the
official release as yet.
The first patch allows the author address to contain more than one
line (separated by '\\').
The second patch repairs the flush-left formatting of the author
address (while the first line of address and other author info are
centered).
The third patch replaces \W by \s to fix mishandling of parentheses,
causing them to be typeset at different sizes.
Finally, there is a recommended defaults change that works around the image
conversion problems that leave some images with gray backgrounds and black
lines along the left and underside edge.
Julius
Patches follow:
*** /usr/bin/latex2html-FC2-STOCK Wed Jan 19 08:09:43 2005
--- /usr/bin/latex2html Mon Jan 31 11:37:37 2005
***************
*** 12365,12371 ****
$t_author = &translate_environments($_);
$t_author =~ s/\s+/ /g;
$t_author = &simplify(&translate_commands($t_author));
! ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author);
push @authors, $t_author;
push @affils, $t_affil;
push @addresses, $t_address;
--- 12365,12371 ----
$t_author = &translate_environments($_);
$t_author =~ s/\s+/ /g;
$t_author = &simplify(&translate_commands($t_author));
! ($t_author,$t_affil,$t_address) = split(/\s*<BR>s*/, $t_author, 3);
push @authors, $t_author;
push @affils, $t_affil;
push @addresses, $t_address;
***************
*** 12374,12380 ****
$_ = &translate_environments($next);
$next = &translate_commands($_);
($t_author) = &simplify($next);
! ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author);
push @authors, $t_author;
push @affils, $t_affil if $t_affil;
push @addresses, $t_address if $t_address;
--- 12374,12380 ----
$_ = &translate_environments($next);
$next = &translate_commands($_);
($t_author) = &simplify($next);
! ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author, 3);
push @authors, $t_author;
push @affils, $t_affil if $t_affil;
push @addresses, $t_address if $t_address;
***************
*** 12537,12546 ****
if ($t_date&&!($t_date=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) {
$t_title .= "\n<P$alignc><STRONG>$t_date</STRONG></P>";}
if
($t_address&&!($t_address=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) {
! $t_title .= "\n<P$alignl><SMALL>$t_address</SMALL></P>";
} # else { $t_title .= "\n<P$alignl>"}
if ($t_email&&!($t_email=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) {
! $t_title .= "\n<P$alignl><SMALL>$t_email</SMALL></P>";
} # else { $t_title .= "</P>" }
join("\n", $s_author_info, $t_title, $e_author_info);
}
--- 12537,12546 ----
if ($t_date&&!($t_date=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) {
$t_title .= "\n<P$alignc><STRONG>$t_date</STRONG></P>";}
if
($t_address&&!($t_address=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) {
! $t_title .= "\n<P$alignc><SMALL>$t_address</SMALL></P>";
} # else { $t_title .= "\n<P$alignl>"}
if ($t_email&&!($t_email=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) {
! $t_title .= "\n<P$alignc><SMALL>$t_email</SMALL></P>";
} # else { $t_title .= "</P>" }
join("\n", $s_author_info, $t_title, $e_author_info);
}
***************
*** 15271,15277 ****
# MRO: replaced $* with /m
while ($text =~ /(\\[a-zA-Z]+|[&;]SPM\w+;|<[^>]+>)+/m ) {
$scbef = $`; $special = $&; $text = $';
! while ( $scbef =~ /(&#\d+;|[a-z$sclower])+[a-z\W\d$sclower]*/m) {
$scstr .= $`; $scbef = $';
$next = $&;
$next =~ s/&#(\d+);/&lowercase_entity($1)/egm;
--- 15271,15277 ----
# MRO: replaced $* with /m
while ($text =~ /(\\[a-zA-Z]+|[&;]SPM\w+;|<[^>]+>)+/m ) {
$scbef = $`; $special = $&; $text = $';
! while ( $scbef =~ /(&#\d+;|[a-z$sclower])+[a-z\s\d$sclower]*/m) {
$scstr .= $`; $scbef = $';
$next = $&;
$next =~ s/&#(\d+);/&lowercase_entity($1)/egm;
***************
*** 15282,15288 ****
$scstr .= $scbef . $special;
}
if ($text) {
! while ( $text =~ /(&#\d+;|[a-z$sclower])+[a-z\W\d$sclower]*/m) {
$scstr .= $`; $text = $';
$next = $&;
$next =~ s/&#(\d+);/&lowercase_entity($1)/egm;
--- 15282,15288 ----
$scstr .= $scbef . $special;
}
if ($text) {
! while ( $text =~ /(&#\d+;|[a-z$sclower])+[a-z\s\d$sclower]*/m) {
$scstr .= $`; $text = $';
$next = $&;
$next =~ s/&#(\d+);/&lowercase_entity($1)/egm;
l2hconf.pm can be changed as follows to suppress Bugzilla Bug 127010
(https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=127010):
*** l2hconf.pm~ Fri Feb 18 09:10:26 2005
--- l2hconf.pm Fri Feb 18 09:10:47 2005
***************
*** 42,48 ****
# -white
# this overrides the above gray-scale for figures that don't need
anti-aliasing
#
! $WHITE_BACKGROUND = 0;
# -image_type
--- 42,48 ----
# -white
# this overrides the above gray-scale for figures that don't need
anti-aliasing
#
! $WHITE_BACKGROUND = 1;
# -image_type
***************
*** 780,786 ****
# If this is set to 0 then any inlined images generated from "figure"
# environments will NOT be transparent.
#
! $TRANSPARENT_FIGURES = 1;
# Set the default body text, inserted between <BODY> ... </BODY>.
--- 780,786 ----
# If this is set to 0 then any inlined images generated from "figure"
# environments will NOT be transparent.
#
! $TRANSPARENT_FIGURES = 0;
# Set the default body text, inserted between <BODY> ... </BODY>.
More information about the latex2html
mailing list