COMPGROUPS.NET | Post | Groups | Users | Stream | Browse | About | |

tex4ht and tables

• Email
• Follow

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
Reply beffa (6) 2/13/2004 3:08:59 PM

See related articles to this posting

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
Reply 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
Reply 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
Reply 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
Reply 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
Reply gurari (142) 2/16/2004 4:07:09 PM
 comp.text.tex 36398 articles. 68 followers.

5 Replies
131 Views

Similar Articles

[PageSpeed] 55

• Email
• Follow

Similar Artilces:

tex4ht
Dear Sir, this is my input.tex file: \documentclass{article} \usepackage{dcolumn} \newcolumntype{d}[1]{D{.}{.}{#1}} \begin{document} \begin{tabular}{@{}ld{3,2}d{3,2}d{3,2}d{3,2}d{3,2}d{2,3}@{}} \multicolumn{7}{@{}l}{Autonomy}\\ 1. Complete & 100 & 23 & 21 & 106 & 39 & 29 \\ (\%) & 33.6\% & 7.5\% & 13.8\% & 35.9\% & 13.0\% & 19.3\% \\ 2. Partial & 178 & 227 & 107 & 154 & 177 & 86 \\ (\%) & 59.7\% & 74.4\% & 70.4\% & 52.2\% & 59.2\% & 57.3\% \end{tabular} \end{document} when I run ...

Greetings. I am using TeX4ht to generate an XHTML version of my LaTeX document. By default TeX4ht indents subsections and subsubsections in the table of contents with non-breaking spaces. I would prefer that it used nested HTML unordered list environments (<ul>...</ul>) instead so that its tables of contents are neater and resemble those produced by, say, HEVEA. I can't figure out how to do this. Here's the configuration file I made, which is the best I can do: \Preamble{html} \begin{document} \ConfigureToc{section}{\HCode{<li>}}{~}{}{\HCode{</li>}} \Con...

Hi, When I use tableofcontents, I get someting like: %%%%%%%%%%%%%% <div class="tableofcontents"> <span class="sectionToc"><a href="#x1-1000" id="QQ2-1-1">section1</a></span><br> <span class="sectionToc"><a href="#x1-3000" id="QQ2-1-3">section2</a></span> </div> %%%%%%%%%%%%%% I want to use the table of contents in a javascript so I need to fromat it as: %%%%%%%%%%%%% item[1]=["#x1-1000","section1"] item[1]=["#x1-3000","sec...

TABLES TABLES TABLES
How would you best describe to a retiscent SAS student that the concept of TABLES isn't limited to SQL? This came up during a discussion on table lookup methods - and lookup tables in particular (I mean, lookup tables pre- date SQL). Even SAS data sets are referred to as tables. This made the student apoplectic. Words of wisdom most welcome!!! Thanks, Howard sasbum@AOL.COM wrote: >How would you best describe to a retiscent SAS student that the concept of >TABLES isn't limited to SQL? This came up during a discussion on table >lookup methods - and lookup tables in partic...

Re: TABLES TABLES TABLES
sasbum@AOL.COM wrote: >How would you best describe to a retiscent SAS student that the concept of >TABLES isn't limited to SQL? This came up during a discussion on table >lookup methods - and lookup tables in particular (I mean, lookup tables >pre- >date SQL). Even SAS data sets are referred to as tables. This made the >student apoplectic. I find a visual works well here. If you show a grid with rows and columns, then you can show a picture of a SAS data set and a SQL table and a lookup table, and show that (regardless of terminology and buzzwords) they're all pr...

From table to table....
I want to create a new table containing only the results from a select statement of another table. How is that done? select a, b, c into destTable from sourceTable where a='x' or a='y' or a='z'; Does one have to create the destTable or is it created for you with the correct structure? Can the rows of one table be used in the select of another table? eg: The above select statement has three choices. could those 'choices' have been rows of a column of a table? On Wed, 1 Feb 2012 10:29:45 -0800 (PST), SpreadTooThin wrote: > I want to create a new table co...

Table of tables
Given t = {{{-1, -1, -2+2I}, {-1, -1, 3-I}}, {{-1, -1, 4+I}, {-1, -1, -5-5I}}}; how can I extract the imaginary part of the complex elements to obtain {{{-1, -1, 2}, {-1, -1, -1}}, {{-1, -1, 1}, {-1, -1, -5}}}; thank you. Luiz Melo -- On Oct 20, 1:07 am, Luiz Melo <luiz.m...@polymtl.ca> wrote: > Given > > t = {{{-1, -1, -2+2I}, {-1, -1, 3-I}}, {{-1, -1, 4+I}, {-1, -1, -5-5I}}}; > > how can I extract the imaginary part of the complex elements to obtain > > {{{-1, -1, 2}, {-1, -1, -1}}, {{-1, -1, 1}, {-1, -1, -5}}}; > > thank yo...

Re: TABLES TABLES TABLES #5
LOL -- I told him I had a table in my dining room, and another kind in my kitchen, etc. -----Original Message----- From: Ed Heaton <EdHeaton@westat.com> To: Howard Wood <sasbum@AOL.COM> Sent: Mon, 28 Nov 2005 08:44:38 -0500 Subject: RE: TABLES TABLES TABLES Howard, Maybe you should turn the tables on him and correct him whenever he refers to a sedan as a car or to beef as meat or to an engine as a motor. Ed Ed Heaton RW-4541 #4818 -----Original Message----- From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu] On Behalf Of Howard Wood Sent: Saturday, Nov...

Re: TABLES TABLES TABLES #2
OHHH went there, did that, got the t-shirt, even. I tried everything in the book. This person is extremely LITERAL and looking for the letter of the law, or something........maybe my trying so hard just egged him on, or his stubbornness that kept his feet in concrete, but I don't think so. He truly believes that. -----Original Message----- From: David L Cassell <davidlcassell@MSN.COM> To: SAS-L@LISTSERV.UGA.EDU Sent: Sun, 27 Nov 2005 11:55:12 -0800 Subject: Re: TABLES TABLES TABLES sasbum@AOL.COM wrote: >How would you best describe to a retiscent SAS student that the concept...

Re: TABLES TABLES TABLES #3
You might say he is "incorrigible". Rob Rohrbough Omaha, NE > -----Original Message----- > From: Howard Wood [mailto:sasbum@AOL.COM] > Sent: Monday, November 28, 2005 10:25 AM > Subject: Re: TABLES TABLES TABLES > > > LOL -- I told him I had a table in my dining room, and > another kind in my kitchen, etc. > > -----Original Message----- > From: Ed Heaton <EdHeaton@westat.com> > To: Howard Wood <sasbum@AOL.COM> > Sent: Mon, 28 Nov 2005 08:44:38 -0500 > Subject: RE: TABLES TABLES TABLES > > > Howard, > > Maybe you ...

Re: TABLES TABLES TABLES #4
Howard: Although Date and Celko follow the usual convention when they call the sole data structure in SQL a 'table', Codd tended to prefer 'relation'. The concept has a long history in mathematics and logic. Before SQL, before SAS, before IBM, and even before Babbage .... A relational database has one or more tables. Neither 'database' nor 'table' implies anything about the implementation of a database or table in a database or file management system. If a data structure has the properties of a table (column variables in rows), it's a table. Nothing more, n...

Re: TABLES TABLES TABLES #6
Ahhhh - I'm lovin' that one. TY TY In a message dated 12/1/2005 6:14:05 AM Eastern Standard Time, rdevenezia@WILDBLUE.NET writes: Friar Broccoli wrote: > Try this (a higher authority): > > http://www.google.com/search?num=100&hl=en&lr=lang_en&safe=off&as_qdr=all&q=de fine%3A+data+table&btnG=Search&lr=lang_en > > Howard Wood wrote: >> OHHH went there, did that, got the t-shirt, even. I tried >> everything in the book. This person is extremely LITERAL and >> looking for the letter of the law, or something........maybe...

Tables? Gear tables?
Anyone have a solution for getting a gear table on a drawing with the correct font height? It has to be editable. Design tables suck at this because they are an OLE object. I have tried about ten different approaches. Even a macro that will draw all the grid lines (real slow!) Table needs to be about 40 rows and 2 columns I did all the ole object approaches. Word, Excel, they suck due to sizing issues (i.e. font height incorrect) I even tried to rebuild the revision table thingy to work for this application I cannot believe they went to the trouble to add ALL the table capability and LEFT OUT ...

table class for table
Hi: Is there free code for a "Table" class? I am especially interested in using this class to store "table information" extracted from html. Thanks, John I'd be inclined to use something like String[][] for the general case. -- ROGER NEYMAN <homecurr@yahoo.com> wrote in message news:2d5d0ce4.0405161110.36f9b7ca@posting.google.com... > Hi: > > Is there free code for a "Table" class? I am especially interested in > using this class to store "table information" extracted from html. > > Thanks, > > John Good ne...

select table.* from table
I'm using JDBC to update Oracle 9i tables. If I execute "select * from table" then, even though I've requested an updatable resultset, I cannot modify the resultset -- it fails with "Invalid operation for read only resultset". If, however, I change the query to "select table.* from table" then I *can* modify the resultset. What is the distinction between these queries that makes one read-only and one writable? Thanks. ...

Re: Table of tables
Thanks Sebastian and Valeri for the help. I'm actually looking for a function that operates only on the third row of each column-matrix terms(which happen to be complex in the example I gave), but leaves the other terms intact. Consider a different example: Let t = {{{-1, -1, -2}, {-1, -1, -3}}, {{-1, -1, -4}, {-1, -1, -5}}}; how can I get {{{-1, -1, 2}, {-1, -1, 3}}, {{-1, -1, 4}, {-1, -1, 5}}}; that is, in this case, I need a function that takes the Abs[] of the 3rd row of each sub-matrix and leaves the other terms intact. Regards, Luiz > Hi Luiz! >...

in table a but not in table b
Hallo, I have two tables, a and b. For the sake of clarity I use only one column in both tables. a. has a columns containing values NL,DE,FR, IT b has a column containing values NL and FR I need a query that selects the missing value(s), and only the missing values in table b. So the result should be DE and IT. I'm sure some join would work, but I am totally confused by them joins... ;-)) Please give me clue sjef escribi�: > Hallo, > I have two tables, a and b. For the sake of clarity I use only one > column in both tables. > a. has a columns containing values NL,DE,FR, IT >...

tables: changing default table font for all tables in a document
Hello, I would like all tables in a document to appear in a font different from the one that I use for the rest of the document. One way to do this is to wrap \textsf{...} around every table: \textsf{ \begin{tabular}{rcc} [...] \end{tabular} } does the trick. But isn't there a way to redefine the tabular environment so that I need not employ \textsf{...}for each table? Thank you, --John John Bullock wrote: > Hello, > > I would like all tables in a document to appear in a font di...

Table captions above tables.
Hello all! Could you hint me about the easiest way in LaTeX to have tables' captions before tables. Thanks in advance, Anton Antonius <anton.txt@gmail.com> writes: > Hello all! > > Could you hint me about the easiest way in LaTeX to have tables' > captions before tables. Use the "caption" package for that (see its documentation). I also advise to use the "booktabs" package for the table itself. -- Gernot Hassenpflug Am Fri, 24 Oct 2008 07:18:11 -0700 (PDT) schrieb Antonius: > Hello all! > > Could you hint me about the easiest way ...

IE7: Table in Table
Hi! My html code is posted below. Firefox and IE6 shows the page correctly, but IE7 has a big problem with the height of the inner table. If I switch back from XHTML to HTML, IE7 also shows the page correctly. But I want XHTML. What do I have to change, so that IE6, IE7 and Firefox shows an inner table with 100% of height? I don't want divs, so please do not answer: use divs. Thanks in advance, best regards Sebastian <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">...

SQL for Quering Access Tables using a Table/Field List Table
I have a Table called TableField that has the table names, fields and Data type of all the tables and fields in the database. They are set up as follows: Table: TableField TableName FieldName Type Table1 LName Text Table1 FName Text Table1 Address1 Text Table1 Address2 Text Table1 State Text Table1 Zip Text Table2 Color Text Table2 Descrip Text Table2 Size Text Table2 Temp Text . . Table65 ... Not having much Access experience, If I were looking for a specific value "e.g., Orange" located in one o...

relaton between notify table , target adress table, target parametets table
Hi, Could anyone please tell me the relation between notification table, target address table and target address parameters table? Regards ramu <ramu.ask@gmail.com> wrote: > Hi, > Could anyone please tell me the relation between notification > table, target address table and target address parameters table? Did you take a look at RFC 3413? Appendix A includes an example how the tables work together... /js -- Juergen Schoenwaelder Jacobs University Bremen <http://www.eecs.iu-bremen.de/> P.O. Box 750 561, 28725 Bremen, Germany...

Tables printing prefs: how rescale wide tables to fit the page FOR ALL TABLES AT ONCE
Hi there, unfortunately I'm unable to use this preference for the whole output. After running some ANOVAs with pairwise comparisons each time I have to click each table seperatetly to alter the width. Regardless of where I alter it. I tried TableLooks as well as Table Properties. I saved the look and applied it to all other tables. Nothing works. It would really be awesome if someone could give me a hint on how to use that feature. Thanks, Rene Update: Problem solved. You have to alter the TableLook via the output file/window and save it (save as). Then you have to u...

ODBC-linked table update on table ' table name ' failed.
Hello All: Have a problem that I have never seen before and have not found anything on technet on how to resolve it. I have a SQL Server 2000 server that I have created a new database. I then used DTS to import data from a MS Access 97 database. Before making the import, I made changes to the MS Access database and changed the autonumbers to integers. I also removed all relationships. My front end is still in MS Access 97 and I am linking ODBC tables from the SQL Server. Here's the issue, I can not make any changes to any data in any table. I get the following message: ODBC-linked table ...