From: Steinar B. <sb...@do...> - 2003-04-27 21:39:01
|
If I put <programlisting> or <screen> inside a table <entry>, I get error messages like the one below: ! LaTeX Error: Something's wrong--perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.282 \begin{Verbatim}[] ? The reason seems to be that LaTeX doesn't like Verbatim environments inside tabular enviroments. The reason for the use of <screen> and <programlisting> in this case, has been to ensure that the text has been rendered in a fixed width font. So what I've done, is to add the following templates to my db2latex local customization style sheet: <xsl:template match="entry/screen"> \tt{<xsl:apply-templates/>} </xsl:template> <xsl:template match="entry/programlisting"> \tt{<xsl:apply-templates/>} </xsl:template> This will not solve the general case for <programlisting> or <screen> inside <entry>, but it's perhaps better than having the LaTeX processing stop? A small table to reproduce this problem, can be found at the end of this message. - Steinar ---Table to make LaTeX croak <informaltable> <tgroup cols="2"> <tbody> <row> <entry><programlisting>Some fixed width text</programlisting></entry> <entry>Some normal text</entry> </row> <row> <entry><screen>More fixed width text</screen></entry> <entry>More normal text</entry> </row> </tbody> </tgroup> </informaltable> |