groff
[Top][All Lists]
Advanced

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

[Groff] tab problems with grohtml


From: Werner LEMBERG
Subject: [Groff] tab problems with grohtml
Date: Mon, 31 Mar 2003 15:02:50 +0200 (CEST)

Gaius,


there are (at least) two serious bugs in tab handling.

. Consider the following example (<TAB> denotes a real tab character)
  which consists of a single line:

    a<TAB>b

  The resulting HTML code is

    <p>a b</p>

  which is wrong.  Reason for the problem is a missing initializer in
  post-grohtml to set the tab stops to the current value.  The proper
  fix is to insert `.ta \n[.tabs]' at the end of html.tmac (which is
  now already in the CVS) but it makes no difference -- this is
  another bug described in the next item.

. `.ta ...' in the source file makes troff emit
  `x X html-tag:.ta ...', but it is only recognized beginning in the
  next paragraph which is wrong.  It has to be recognized immediately.

  Consider this example

    .ta 1i
    a<TAB>b
    .br
    c<TAB>d

  You will get this HTML code (simplified to make it more readable):

    <table>
      <tr>
        <td width="15%">
          <p>c</p>
        </td>
        <td width="85%">
          <p>d</p>
        </td>
    </table>

  If you say

    .ta 1i
    .br
    a<TAB>b
    .br
    c<TAB>d

  you get the expected result

    <table>
      <tr>
        <td width="15%">
          <p>a</p>
        </td>
        <td width="85%">
          <p>b</p>
        </td>
      <tr>
        <td width="15%">
          <p>c</p>
        </td>
        <td width="85%">
          <p>d</p>
        </td>
    </table>

. Finally, consider this:

    .ta 1i
    .br
    a<TAB>b
    .sp
    c<TAB>d

  You get exactly the same result as above which is of course wrong.
  `.sp' must create an empty line!  Within tables, it should
  e.g. insert `<tr><td>&nbsp;</td>'.


Can you fix this, please?


    Werner


PS: Just now I've added some minor fixes to groff which affect HTML
    output also.  Please check whether they are correct.

reply via email to

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