texi2html-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texi2html-bug] @multitable inside @smallexample


From: Patrice Dumas
Subject: Re: [Texi2html-bug] @multitable inside @smallexample
Date: Mon, 15 Sep 2008 16:23:33 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Sun, Sep 14, 2008 at 08:45:05PM +0200, Reinhold Kainhofer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Patrick!
> We ran into another formatting problem: We have some multi-column tables 
> inside a @smallexample section, e.g. 
> 
> @smallexample
> @multitable {Header1} {Length of second col} {third col}
> @headitem Language
>   @tab Note names
>   @tab sharp 
> @item nederlands.ly
>   @tab c d e f g a bes b
>   @tab -is 
> @end multitable
> @end smallexample
> 
> Now, the problem with texi2html is that it creates a table and wraps a 
> <pre ...> around the table contents, were it also inserts spaces and 
> linebreaks, which then of course show up in the HTML:

It is a feature, <table> and <td>... in <pre> are not valid html.

> <table><tr><td>&nbsp;</td><td><table>
> <thead><tr><th><pre class="smallexample"> Language
>   </pre></th><th><pre class="smallexample"> Note names
>   </pre></th><th><pre class="smallexample"> sharp
> </pre></th></tr></thead>
> <tr><td><pre class="smallexample"> nederlands.ly
>   </pre></td><td><pre class="smallexample"> c d e f g a bes b
>   </pre></td><td><pre class="smallexample"> -is
> </pre></td></tr>
> </table>
> </td></tr></table>

Regarding the spacing, the end of lines of @tab and  @*item are
preserved as we are in @smallexample, it seems to me to be right.

> makeinfo --html in contrast converts it to one <pre..> around the whole table 
> and removes leading/trailing whitespace/linebreaks:
> 
> <pre class="smallexample">
>      <p><table summary=""><tr align="left"><th valign="top">Language
>        </th><th valign="top">Note names
>        </th><th valign="top">sharp
>      <br></th></tr><tr align="left"><td valign="top">nederlands.ly
>        </td><td valign="top">c d e f g a bes b
>        </td><td valign="top">-is
>      <br></td></tr></table>
> </pre>

It preserves spaces and linebreaks exactly like texi2html. The only
difference is the pre within or without. (texi2html adds linebreaks, but
only at places where they are not relevant).

I guess that what you want to write, in fact, is something along:

@smallexample
@multitable {Header1} {Length of second col} {third col}
@headitem Language @tab Note names   @tab sharp 
@item nederlands.ly  @tab c d e f g a bes b  @tab -is 
@end multitable
@end smallexample

Outside of @format, @*example... it doesn't matter if you add linebreaks
or not in tables because they don't change the html formatting anyway, 
but in preformatted environment, my assumption is that you should write 
your text the way you want it to appear, with @-commands removed.

--
Pat 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]