[tex4ht] tex4ht, tabulary and colortbl

David P Mitchell david.p.mitchell at homemail.com.au
Thu Mar 3 13:03:55 CET 2011


I have a custom report style that uses several latex packages, including
tabulary and colortbl. Tex files compile fine using pdflatex. For
corporate reasons, I need to convert the content to MS Word and would
also like to convert to HTML. I've just begun trying to use tex4ht for
conversion and fully expect that I may have to do some additional tex4ht
customisation.

First pass of tex4ht failed at the first table float. Further
investigation suggests some incompatibility between tabulary and
colortbl under tex4ht, because when I don't load colortbl style file,
tex4ht, somewhat surprisingly, successfully processes the entire
document (albeit with complaints about undefined colortbl macros).

Below I've included a short tex file (tex4ht-tabularytest.tex) that
reproduces the error. When processed with the command:

$ mk4ht htlatex tex4ht-tabularytest.tex "" "" ""

compilation fails at the beginning of the tabulary environment (log file
error output listed below). When the colortbl package is not included
the file compiles with no errors. Substituting a tabular or tabularx
environment for tabulary appears to work fine with colortbl.

I haven't seen this issue in the mailing list archives. Grateful for any
advice. (I'm running Debian sid tex4ht version 2009_06_11.)

Regards,
David.

-- 
David Mitchell
david.p.mitchell at homemail.com.au



tex4ht-tabularytest.tex file:

\documentclass{report}
\usepackage{tabulary}
\usepackage{tabularx}
\usepackage{color}
\usepackage{colortbl}
\usepackage{caption}[2008/04/01]

\begin{document}
\begin{table}[h]
  \centering
  \caption{Test table}
  \label{tab:test}
  \begin{tabulary}{\textwidth}{l R}
    Blah & Blah\\
  \end{tabulary}
\end{table}
\end{document}



Log file (from beginning of error messages):
! Undefined control sequence.
\begin:current at color ->\let \sv:curcolor 
                                         \current at color 
l.31   \begin{tabulary}{\textwidth}{l R}
                                        
? R
OK, entering \nonstopmode...
! Illegal parameter number in definition of \@preamble.
<to be read again> 
                    
l.31   \begin{tabulary}{\textwidth}{l R}
                                        
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.

! Illegal parameter number in definition of \@preamble.
<to be read again> 
                   1
l.31   \begin{tabulary}{\textwidth}{l R}
                                        
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.

! TeX capacity exceeded, sorry [input stack size=5000].
\OT1-cmd ...tect \@typeset at protect \@inmathwarn #1
                                                  \else \noexpand #1\expanda...
l.31   \begin{tabulary}{\textwidth}{l R}
                                        
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.

 
Here is how much of TeX's memory you used:
 5198 strings out of 495062
 64923 string characters out of 1182643
 255108 words of memory out of 3000000
 8318 multiletter control sequences out of 15000+50000
 3808 words of font info for 15 fonts, out of 3000000 for 9000
 28 hyphenation exceptions out of 8191
 5000i,5n,4003p,693b,271s stack positions out of 5000i,500n,10000p,200000b,50000s
Output written on tex4ht-tabularytest.dvi (2 pages, 11216 bytes).



More information about the tex4ht mailing list