#### tex4ht and tables

Hi,

I am trying to convert a latex document into HTML. The document includes
several tables which should all have one of two layouts (columns
width). Unfortunately, when I convert my document with tex4ht, the
layouts of the tables are not specified in the html file and are left to
the browser. Said another way,in the following command

\begin{tabular}[pos]{cols}
column 1 entry & column 2 entry ... & column n entry \\
.
.
.
\end{tabular}

the cols specification is not retained.

At the moment I have achieved my goal by defining two new commands

which are asserted just before \begin{tabular} (one of the two commands,
depending on the desired layout).
Since they do nothing, they do not disturb LaTeX or pdfLaTeX, but now I
can use them in the .cfg file to change the tex4ht hooks of the tabular
environment:

\Configure{tabular}
{\HCode{<table class="tabular" cellspacing="0pt"
<colgroup class="maintable">
<col width="160">
<col width="500">
</colgroup>}}
{\HCode{</table>}}
{\HCode{<tr valign="baseline" class="maintablerow">}}
{\HCode{</tr>}}
{\HCode{<td  align="left" class="maintableentry">}}
{\HCode{</td>}} }

Admittedly this is not very straightforward. I have discovered tex4ht
just two day ago and I am wondering if there is a simpler method.

Thank you for any suggestion.
Fede


 0
beffa (6)
2/13/2004 3:08:59 PM
comp.text.tex 37978 articles. 1 followers.

5 Replies
293 Views

Similar Articles

[PageSpeed] 24
Federico Beffa wrote:
>
> Hi,
>
> I am trying to convert a latex document into HTML. The document includes
>   several tables which should all have one of two layouts (columns
> width). Unfortunately, when I convert my document with tex4ht, the
> layouts of the tables are not specified in the html file and are left to
> the browser. Said another way,in the following command
>
>  \begin{tabular}[pos]{cols}
>  column 1 entry & column 2 entry ... & column n entry \\
>  .
>  .
>  .
>  \end{tabular}
>
> the cols specification is not retained.
> ...
> I have discovered tex4ht
> just two day ago and I am wondering if there is a simpler method.
>
> Thank you for any suggestion.
> Fede
>

Try TtH:

http://hutchinson.belmont.ma.us/tth/

Ian Hutchinson.


 0
hutch2980 (34)
2/14/2004 9:57:56 PM
On Sat, 14 Feb 2004, Ian Hutchinson wrote:

> Federico Beffa wrote:
> >
> > Hi,
> >
> > I am trying to convert a latex document into HTML. The document includes
> >   several tables which should all have one of two layouts (columns
> > width). Unfortunately, when I convert my document with tex4ht, the
> > layouts of the tables are not specified in the html file and are left to
> > the browser. Said another way,in the following command
> >
> >  \begin{tabular}[pos]{cols}
> >  column 1 entry & column 2 entry ... & column n entry \\
> >  .
> >  .
> >  .
> >  \end{tabular}
> >
> > the cols specification is not retained.
>  > ...
> > I have discovered tex4ht
> > just two day ago and I am wondering if there is a simpler method.
> >
> > Thank you for any suggestion.
> > Fede
> >
>
> Try TtH:
>
> http://hutchinson.belmont.ma.us/tth/
>
> Ian Hutchinson.
>
>

Thank you for your suggestion. I have tried Tth, and it does a good
job with tabular. Unfortunately, it has problems with \newlength, and
when LaTeX macros get redefined.

I am happy with the very dynamic configurability and capability of
tex4ht. The one point which is disturbing me, is that when the width of
a column of a tabular environment is specified with p{width}, this is
not reproduced in the HTML output. This seems to me a basic need, but I
I were happy to find a simple way to achieve this with tex4ht.

Fede


 0
beffa (6)
2/15/2004 1:27:25 PM
>    several tables which should all have one of two layouts (columns
> width). Unfortunately, when I convert my document with tex4ht, the
> layouts of the tables are not specified in the html file and are left to
> the browser.

I modified tex4ht (in the bug fixes distribution) to allow for width
specifications of p-columns through the command line option p-width'.

This command line option activates a configuration similar to the
following ones.

\Configure{HColWidth}
{\HCode{ style="width:\HColWidth"}}

\Configure{HColWidth}
{\HCode{ style="width:
\ifnum \HCol=1 160\fi
\ifnum \HCol=3 500\fi
"}}

Try the above examples with, for instance, the following source under
different font sizes in the browser.

\begin{tabular}{p{2cm}cp{3cm}}
1 2 3 1 2 3 1 2 3 1 2 3 & x & 1 2 3 1 2 3 1 2 3 1 2 3
\end{tabular}

The configuration provided through the command line option p-width'
takes to some degree into account the size of fonts in use within the
HTML displays.  Yet, not all the browsers react properly to the size
changes.

-eitan


 0
gurari (142)
2/15/2004 10:28:58 PM
On 15 Feb 2004, Eitan Gurari wrote:

>
> >    several tables which should all have one of two layouts (columns
> > width). Unfortunately, when I convert my document with tex4ht, the
> > layouts of the tables are not specified in the html file and are left to
> > the browser.
>
> I modified tex4ht (in the bug fixes distribution) to allow for width
> specifications of p-columns through the command line option p-width'.
>
> This command line option activates a configuration similar to the
> following ones.
>
>    \Configure{HColWidth}
>       {\HCode{ style="width:\HColWidth"}}
>
>    \Configure{HColWidth}
>       {\HCode{ style="width:
>                       \ifnum \HCol=1 160\fi
>                       \ifnum \HCol=3 500\fi
>        "}}
>
> Try the above examples with, for instance, the following source under
> different font sizes in the browser.
>
>    \begin{tabular}{p{2cm}cp{3cm}}
>    1 2 3 1 2 3 1 2 3 1 2 3 & x & 1 2 3 1 2 3 1 2 3 1 2 3
>    \end{tabular}
>
> The configuration provided through the command line option p-width'
> takes to some degree into account the size of fonts in use within the
> HTML displays.  Yet, not all the browsers react properly to the size
> changes.
>
> -eitan
>

Thank you for the help! I have installed the new release (bugfix) and
it is working as desired. However, I think you have introduced a new
bug in the code. In fact, if I compile a file with the "info" option,
then I become the following error:

....
(/home/beffa/texmf/tex/generic/tex4ht/tex4ht.4ht
::::::::::::::::::::::::::::::::::::::::::
TeX4ht info is available in the log file
::::::::::::::::::::::::::::::::::::::::::
) (/home/beffa/texmf/tex/generic/tex4ht/tex4ht.sty
--- needs --- tex4ht simple ---
(./simple.tmp) (./simple.xref)
(/home/beffa/texmf/tex/generic/tex4ht/info4ht.4ht)
(/home/beffa/texmf/tex/generic/tex4ht/infoht4.4ht
! Missing number, treated as zero.
t
l.3 ...\infoIVht#1//{}\fi\infoIVht[tml4ch1]76...//

?

-----------------
The above error does not show up without the "info" option.

Fede


 0
beffa (6)
2/16/2004 2:54:19 PM
> I think you have introduced a new
> bug in the code. In fact, if I compile a file with the "info" option,

Thanks. I loaded new files with a fix to the problem. -eitan


 0
gurari (142)
2/16/2004 4:07:09 PM
Similar artilces about - tex4ht and tables:

compare tables #2
In the article "Delete Duplicate Records From Access Tables" By Danny Lesandrini writes the following: This final suggestion is the most flexible and accurate. Given any table, it generates a recordset of appropriate fields (excluding memo and binary image fields) and dynamically loops through the fields' collection to perform the recordset compare. In this example, two recordsets are used, one being a clone of the other. When a duplicate is found, it is deleted from the first recordset and the next record is examined. When it has determined that the records do not match, both ...

CREATE TABLE "UPD"."SELECTED_NODES" ("SEQ_I" NUMBER NOT NULL, "NODE_I" NUMBER NOT NULL, "LABEL_S" VARCHAR2(1 byte), CONSTRAINT "PK_SELECTED_NODES" PRIMARY KEY("NODE_I") USING INDEX STORAGE ( INITIAL 0K NEXT 0K MINEXTENTS 0 MAXEXTENTS 0 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1) PCTFREE 10 INITRANS 2 MAXTRANS 255) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 0K NEXT 0K MINEXTENTS 0 MAXEXTENTS 0 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1) NOLOGGING I...

Table function GET_DBM_CONFIG missing in Fixpak 9
Hi All, I have DB2 ESE V8.2.2(fixpak9) on Windows. When I use "Activity Monitor", under task "resolving the performance degradation of an application" and any report (other than "top CPU time-consuming SQL statements" -- this report works), I get the following error message: No authorized routine named "GET_DBM_CONFIG" of type "FUNCTION" having compatible arguments was found. SQLSTATE=42884 DB2 document says "GET_DBM_CONFIG" was introduced in Fixpak 7. How to fix the problem? TIA Bill In article <112...

Hi all Please see attach that I send ,, this is vi that write and read from xml file ,, my problem is when I press on load ?? &nbsp; If you can see that I saved a table data &nbsp;, I want if I press on load bottom&nbsp; all the data loaded on the screen &nbsp;in table shape as table control &nbsp; Who can I do that &nbsp; Note : press on set limit to save into xml file &nbsp; &nbsp; Thanks &nbsp; loadTable.vi: http://forums.ni.com/attachments/ni/170/290681/1/loadTable.vi Hi elyan As i can see you still have&nbsp;problems with xml files :s...

convert a SELECT into a "2D-table"
I have a large mysql table with fields like so: {MetalName Adsorbate Energy} There are about 17 distinct values for both MetalName and Adsorbate fields. (Those are both avalable as foreign keys in two other tables if needed) Is there a query snippet that I can use which could convert it into a compact 2d table. eg. Ads1 Ads2 Ads3 Ads4 Ads5 M1 BE11 BE12 M2 BE21 M3 M4 M5 etc. The reason is that in making html output out of this a 2D representation is more elegant and easy to look up than a long flowing list. Any ideas? -- Rahul On Jul 22, 6:17=A0pm, Rahul <nos....

400+metrics: Span multiple wide tables or use one narrow table?
Hi, I am pulling over 400 different metrics from an Excel spreadsheet into Access (97). Conceptually, each row represents a single set of these 400 metrics. However, because of the 255 column limit in Access I am faced with a dilemma: Do I create two tables (1 with 255 columns, the other with 145) and a lookup table that stores which metric is found in which table? Obviously this method would require VBA logic to coordinate any time I need to get at the data. Speed is not a huge issue so this could be done. Or do I create a table like so: MetricSetID (number) MetricName (text) MetricValue ...

table information
hi there, I am just wondering if there is a way to get a complete list of all the field properties for a table within your database; aside from clicking on each field and writing all the properties down. thanks Chanchito wrote: > hi there, > > I am just wondering if there is a way to get a complete list of all > the field properties for a table within your database; aside from > clicking on each field and writing all the properties down. > > thanks Tools - Analyze - Table -- I don't check the Email account attached to this message. Send instead to... RBrandt ...

Large partitioned table issue
Hi ... we're a mainframe V7 shop planning an imminent upgrade to V8. My application team is converting an IMS DB into a DB/2 table ... approximately 40GB of uncompressed (~20 GB compressed) data spread over 10 partitions. Approximately 35% of the data is "inactive" (easily identifiable as such) and of limited (but some) use. We require 2 non-partitioning indexes on the data. The DBA group would like us to put the "inactive" data into a separate table because of the sort resource requirements to build the NPIs. Separating the data into two tables would require ap...

tex4ht and braces
With the tex4ht included in the latest MiKTeX, the following does not work: $E_\mathrm{kinetic}$. If I change it to $E_{\mathrm{kinetic}}$, then it works. Is there a solution around this (other then changing all problematic formulae in the document)? Szabolcs >With the tex4ht included in the latest MiKTeX, the following does not >work: $E_\mathrm{kinetic}$. If I change it to $E_{\mathrm{kinetic}}$, >then it works. Is there a solution around this (other then changing all >problematic formulae in the document)? There is no other solution besides changing all those case...

tex4ht
Why is it not in CTAN (except for Windows)? Where can I download it? Wolfgang > Why is it not in CTAN (except for Windows)? Where can I download it? In what platform are you interested? The ctan distribution in ctan is identical to http://www.cis.ohio-state.edu/~gurari/TeX4ht/, except that it does not include the bug fixes page. The distribution is not dedicated to Windows. -eitan Eitan Gurari wrote: > >> Why is it not in CTAN (except for Windows)? Where can I download it? > > In what platform are you interested? Debian GNU/Linux 3.0r2. > The ctan distributi...

GetNext command on table.
Hi. I'm trying figure out what happens with the GetNext command if called with a table as argument. Looking through logs of a manager communicating with the device the agent I'm dev'ing should be simulating, I see these adjacent frames (first in the log file) background: Table is called atmPvcTable, Logged device is lucent router) Frame 82 | PDU type: GET-NEXT Object identifier 1: 1.3.6.1.4.1.1751.2.18.6.1 Object name: atmPvcVccTable(1) <--called getNext to table Frame 83 | PDU type: RESPONSE Object identifier 1: 1.3.6.1.4.1.1751.2.18.6.1.1.7.501001.0.101.5010...

Saving two mysql tables as csv files
The following code only generates the first csv file. The second request is just ignored. What am I doing wrong? I am using Mozilla Firefox, Windows XP, and Xampp. <?php require 'bm_connect.php'; // export to csv file the table bmbookmark and call it bookmarks.csv header("Content-type: text/csv"); header("Content-Disposition: attachment; filename=bookmarks.csv"); $query = "SELECT * FROM bmbookmark";$result = mysql_query($query); while($row = mysql_fetch_row($result)){ print implode(",",$row)."\n"; }; mysql_free_result($resul... Adding (Add am developing inventory page in php with database as mentioned below. I have some complex equation which I am unable to resolve. Please help me out. I have one table name "A" with column X and Y having values as follows: Table "A" ------------ X Y ------------ blue 0 yellow 0 brown 0 Table "B" in following pattern. ------------ X Y ------------ blue 50 yellow 15 blue 20 brown 5 similarly Table "C" ------------ X Y ------------ blue 15 yellow 10 blue 5 brown 5 Now what... how to update col 1 from col 2 of same table i am trying a few combinations and they dont work. update rawdatas r, rawdatas r1 set r.Created_at=r1.tradedatetime where r.id=r1.id and r.processed_indicator is null; i also tried update rawdatas r set r.Created_at=r.tradedatetime where r.processed_indicator is null; On Sep 22, 8:17=A0pm, Junkone <junko...@gmail.com> wrote: > i am trying a few combinations and they dont work. > > update rawdatas r, rawdatas r1 > set r.Created_at=3Dr1.tradedatetime > =A0where =A0r.id=3Dr1.id and r.processed_indicator is null; > i also tried > > update rawdatas r set r.Crea... Creating a new table as a subset of two other tables I am trying to create a table which is a subset of two other table where those tables have the same uniquely identifying key. I am using Access 2003. The SQL statement that I am trying to use gets an automation error, and I am not sure what part of the SQL code is causing them because I don't know how to debug from the error statements that I get. Here is the code: CREATE TABLE subTable AS ( SELECT * FROM table1, table2 WHERE table1.cusip = table2.cusip) cusip is the uniquely identifying key that each table contains. Can anyone see what is causing the automation error? Thanks, Carter ... How to change rows from a database table using a SWT table At the moment I am building a little desktop application. I am using SWT for this. One of the things I want to use is a database. I can fill a SWT Table with the values I retrieve with a select. (Using a TableItem for each row of the ResultSet.) Adding to both tables does not pose a problem either. But I was wondering how to handle edits and deletes. For this I need the key of a record, but I would not want to display the keys in my table. How can I get edit and delete functionality without showing the keys to the user? -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linked... Junction Tables Hi, Do Junction Tables need ID fields with Primary keys? For example if you store employee ID, employee name, Company ID, Company name. As you can see no field here can be a primary key since all of the columns will have repeatable values. So does one need to put in an autonumber field and make it a primary key? thanks assuming many company IDs, many employee IDs assigned employee IDs tblCompany companyId companyName tblEmployee pkId (autonumber) employeeId employeeName companyId lets you change the employeeId if required I assume pkid is just a column with no v... ICONV UTF-8 to ISO 8859-1 conversion tables hi, I can not find this table in SYS$I18N_ICONV :( is there one availble somewhere ? BTW, the help for ICONV is quite... short :( no example at all does anybody have usage example for me ? I run OpenVMS 7.3-2 alpha TIA, Pierre > I can not find this table in SYS\$I18N_ICONV :( > is there one availble somewhere ? Does http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626 +1246989896870+28353475&threadId=1264461 help you out? Peter Weaver www.weaverconsulting.ca www.openvmsvirtualization.com www.vaxvirtualization.com www.alphavirtualization.com Winner of ...

Detect if table exists
This should be easy, but I am unable to find it now. How can I detect if a particular table exists or not in my DB (I am using MySQL). I cannot delete table, so I can't use drop if exists; but can I use count (*) if exists, or sth similar? I am not much of a DB person. Any pointers would be very useful. TIA, - Manish Il Sun, 08 Aug 2004 23:46:11 +0530, Manish Hatwalne ha scritto: > This should be easy, but I am unable to find it now. > How can I detect if a particular table exists or not in my DB (I am using > MySQL). > I cannot delete table, so I can't use drop if exi...

Table and BOM symbols
Hi there, 1. I have a sheet metal and I have cut a hole and a rectangular slot. I have named these 2 features in part file (setup - name- feature). When I create a repeat region in drawing I am not able to get those features updated in BOM. Can any body tell me how do I go about this? 2. How to insert a userdefined symbol? I have not used this before and don't know the usage of this. Thanks in advance, Shankar. "Shankar Venkateswaran" <v_shankar1979@yahoo.com> wrote in message news:610c5dee.0405041425.7f0dec71@posting.google.com... : Hi there, : 1. I hav...

tex4ht and mdwtab
The following example doesn't work with htlatex : \documentclass{article} \usepackage{mdwtab} \begin{document} \begin{tabular}{cc} 45 & 34 \\ \end{tabular} \end{document} It gives the "missing # inseted in alignment preamble" error. Is there a workaround? Martin. >The following example doesn't work with htlatex : > >\documentclass{article} >\usepackage{mdwtab} >\begin{document} >\begin{tabular}{cc} >45 & 34 \\ >\end{tabular} >\end{document} > >It gives the "missing # inseted in alignment preamble" error. Is there >a ...

how to hide a select box in a table when i scroll top or left using stylee sheets
Hi, I have created a table with scroll effects using style sheets, in one of the TD I have created a select box now what I want is when I scroll top or left I want the select box to be hidden and when I scroll back it should be displayed. I am attaching the code, if u go through the code u will get a better idea of what I want. thanks <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <STYLE type=text/css> ..l { TEXT-ALIGN: left } ..r { TEXT-ALIGN: right } ..table { BORDER-TOP-WIDTH: 1px; FONT-WEIGHT: normal; BORDER-LEFT-WI...

tools for editing tables
latable is a very nice tool for creating and editing large and complex tables where the latex code gets very unwieldy. latable naturally can't do everything (eg can't handle double lines). Are there any other tools for table editing? David Griffel ...

Tying up Port Login table entries with Port Table Entries in CISCO SNMP
In a monitoring app I am writing I plan on using SNMP to obtain for each port on an MDS9000 CISCO switch the remote host WWN and remote port WWN, with the aim of producing a table as follows: Port Port Remote Remote No WWN Host WWN Port WWN 1 a.b.c d.e.f g.h.i 2 j.k.l - - <-- not connected 3 m.n.o p.q.r s.t.u ::::::::::::::::::::::::::::: I _thought_ this information could be obtained by referring to a couple of tables in CISCO-FC-FE-MIB: * The Port table, which is .1.3.6.1.4...

Preparing a Table
Dear All: I am using Proc Univariate and want the results to be displayed as follows: Year 1999 Mean Median Min Max P1 P99 N Nmiss Var A Var B Var C .. .. .. Year 2000 Var A Var B Var C .. .. .. The code that I am using is Proc Univariate data = X noprint; By Year; var A B C .... ; output out = Summary_Statistics Mean = MeanA MeanB... Median = MedianA MedianB .... Min = ... and so on The output that I obtain is in one line for each year and that is not what I want.. Please help On Fri, 11 Jun 2004 16:47:27 -0700, Microstructure <randistan69@HOTMAIL.COM> wrote: &g...