Bug 24852 - [PATCH] latex2html screws up tabularx environments
Summary: [PATCH] latex2html screws up tabularx environments
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: tetex
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-24 15:39 UTC by Nils Philippsen
Modified: 2007-04-18 16:30 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2001-01-24 17:04:49 UTC


Attachments (Terms of Use)
patch for latex2html to produce better output in tabularx environments (834 bytes, patch)
2001-01-24 17:04 UTC, Nils Philippsen
no flags Details | Diff

Description Nils Philippsen 2001-01-24 15:39:12 UTC
When I use latex2html (from tetex-1.0.7-11) to process latex source
containing tabularx environments, it skips the "X" column (the one with
variable width where text is rendered like in a small paragraph -- the
feature why you want to use tabularx at all) completely (it is not shown
or otherwise taken into account (e.g. number of cols) at all).

The reason is that in versions/table.pl the "X" character isn't recognized.

The following patch fixes this (BTW: I vote for putting latex2html in a
separate package, it's just not funny if you have to rebuild TeX just to
get a patched latex2html. If you don't want to write the spec file, give me
a shout):

*****  8< ** latex2html-2K.1beta-tabularx.patch *****
--- latex2html-2K.1beta/versions/table.pl.tabularx	Fri Nov 14 11:10:52 1997+++ latex2html-2K.1beta/versions/table.pl	Wed Jan 24 15:11:01 2001
@@ -121,6 +121,10 @@
 	    $htmlcolspec .= "<COL ALIGN=RIGHT>";
 	    push(@colspec,"$cellopen=RIGHT NOWRAP>$content_mark$cellclose");
 	    $cols++;
+
} elsif ( $char eq "X" ) {
+
    $htmlcolspec .= "<COL ALIGN=JUSTIFY>";
+
    push(@colspec,"$cellopen=LEFT>$content_mark$cellclose");
+
    $cols++;
 	} elsif ( $char eq "p" ) {
 	    $colspec =~ s/$next_pair_rx//;
 	    ($pts,$len) = &convert_length($2);
@@ -170,7 +174,11 @@
     local($_) = @_;
     s/$next_pair_rx//;
     local($pts,$len) = &convert_length($2);
-    &do_env_tabular($_," width=$pts");
+    if ($pts != "") {
+
&do_env_tabular($_," width=$pts");
+    } else {
+
&do_env_tabular($_);
+    }
 }

 sub do_env_tabular {
***** >8 *****************************

Comment 1 Nils Philippsen 2001-01-24 16:37:29 UTC
Bah, it seems that bugzilla has screwed up my patch...

Tim: I will send you the patch directly in a mail.

Comment 2 Nils Philippsen 2001-01-24 17:04:46 UTC
Created attachment 8168 [details]
patch for latex2html to produce better output in tabularx environments

Comment 3 Tim Waugh 2001-02-02 16:14:13 UTC
This is fixed in 1.0.7-12.  Thanks for the patch.


Note You need to log in before you can comment on or make changes to this bug.