On Fri, Nov 11, 2011 at 8:16 PM, Radhakrishnan CV <[email protected]>wrote:
> On Thu, Nov 10, 2011 at 10:36 PM, Ray Seyfarth <[email protected]> > 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: [email protected] Google Voice: 601-336-0128 (Calls Cell & Skype) Cell: 601-270-7995 Skype: 601-255-4985
