[tex4ht] Tables generated by htlatex are too complex for Kindle
Ray Seyfarth
ray.seyfarth at gmail.com
Sat Nov 12 05:20:24 CET 2011
On Fri, Nov 11, 2011 at 8:16 PM, Radhakrishnan CV <cvr at river-valley.org>wrote:
> On Thu, Nov 10, 2011 at 10:36 PM, Ray Seyfarth <ray.seyfarth at gmail.com>
> wrote:
> > Hi tex4ht Fans!
> >
> > I have prepared a book using LaTeX which looks great as a printed book
> > (PDF). However, to have an electronic version for Kindles and Nooks, I
> had
> > to convert the book to HTML. The htlatex command does an outstanding
> job of
> > conversion to html, but the lines for the tables are too complex for the
> > Kindle to handle properly.
>
> TeX4ht generates the kind of tables as found in LaTeX documents.
>
> > Is there some way to tell htlatex to generate tables with border="1"?
>
> You might provide a simpler configuration for tabular structure after
> \begin{document} in the following fashion:
>
> the syntax is
>
> \Configure{tabular}
> {at the start of table}
> {at the end of table}
> {at the beginning of row}
> {at the end of row}
> {before each cell}
> {after each cell}
>
> \Configure{tabular}
> {\HCode{<table width="100\%" cellspacing="3" cellpadding="3"
> border="1">}}
> {\HCode{</table>}}
> {\HCode{<tr style="background-color:\rowcolor">}}
> {\HCode{</tr>}}
> {\HCode{<td align="left"
> \ifnum \HMultispan>1 colspan="\HMultispan"\fi >}}
> {\HCode{</td>}}
>
> The following is for alternate background colors for rows and unique
> color first row.
>
> \def\rowcolor{\ifnum\HRow=1
> \#aaaaff;\else\ifodd\HRow\#f0f0f0;\else\#fdeded;\fi\fi}
>
> Hope this will help your purpose.
>
> Best regards
> --
> Radhakrishnan
>
Thanks for your suggestion. I may end up needing to know how to configure
the tabular environment.
Last night I ran across a reference to using a configuration file
specifying pic-tabular and I believe that this will take care of my needs
pretty well. I can have all my tables be images and produce a nice looking
ebook. It would be nicer to have an HTML table so that increasing the font
size would make the table text larger, but I am happy enough to have a
workable solution.
I also have modified /etc/tex4ht/tex4ht.env to make the images a little
larger (-x 1800) and darker (--gamma 1.5). With these changes I have
tables and math which look much better on the Kindle. Before the math
images were a light gray and hard to read. Now they look pretty crisp.
I will retain your message in case I decide to try for HTML tables in the
future.
Thanks
Ray
--
Ray Seyfarth http://rayseyfarth.com
http://rayseyfarth.blogspot.com
Personal email: Ray.Seyfarth at gmail.com
Google Voice: 601-336-0128 (Calls Cell & Skype)
Cell: 601-270-7995 Skype: 601-255-4985
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20111111/7c49ab20/attachment.html>
More information about the tex4ht
mailing list