groff
[Top][All Lists]
Advanced

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

Re: [Groff] Tabular html output.


From: Larry Kollar
Subject: Re: [Groff] Tabular html output.
Date: Thu, 20 May 2004 21:51:07 -0400

Bruno Hertz wrote:

I've been trying out -Thmtl, but with mixed results especially
regarding tabs. ...

E.g. when feeding a groff source with one tab stop .ta 17cR and one tab
in the following text line, I see the comment <!-- TABS --> in the html
output but the input tab has been replaced simply by a space.

Question hence: is tabular output supposed to work at this
moment? And if so, what should I do to optimize my groff source
for it?

The HTML output is getting better, but has a long way to go before
being able to position things like this. My opinion only... probably the
best way to handle it would be to define a macro like this:

.\" Usage:   .Tab2 left right
.de Tab2
.  ie !'\\*[.T]'html' \{\
.  ta 17cR
\\$1\t\\$2
.\}
.el \{\
.  HTML <table border='0'><tr>
.  HTML <td align='left'>\\$1</td><td align='right'>\\$2</td>
.  HTML </tr></table>
.\}
..

You won't get precise positioning of the right-justified text in
your HTML output, but it will probably look reasonably good
in a variety of situations. Canonical HTML doesn't allow you
to specify the exact width of a table anyway.

Hope that helps,

--
Larry Kollar     k  o  l  l  a  r  @  a  l  l  t  e  l  .  n  e  t
Unix Text Processing: "UTP Revival"
http://home.alltel.net/kollar/utp/



reply via email to

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