9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] htmlroff
@ 2006-01-05  7:01 Russ Cox
  2006-01-05  7:45 ` Rob Pike
  0 siblings, 1 reply; 8+ messages in thread
From: Russ Cox @ 2006-01-05  7:01 UTC (permalink / raw)
  To: 9fans

Is anyone interested in hacking on a simple version
of troff that generates html?  The idea is to implement
most of the troff base language and add primitives for
putting in raw html and watching to make sure tags get
matched properly.  It's considerably simpler than troff
since one doesn't have to deal with the low-level details
of text layout, character widths, and so on.

The idea is that then htmlroff could use the existing
macro packages more or less directly, perhaps with a
few small changes.  It would replace both ms2html,
which works at a higher level, and troff2html, which
works at a lower level.  It could format the manual
pages as well as the papers, and the resulting html
would actually look good and be easy to change
(just edit the macros).

Completing the picture would be versions of pic, eqn,
and tbl that emit SVG, MathML, and HTML tables.

I've started to cannibalize ms2html to build htmlroff,
but I really don't have much time to spend on it.

Russ


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] htmlroff
  2006-01-05  7:01 [9fans] htmlroff Russ Cox
@ 2006-01-05  7:45 ` Rob Pike
  2006-01-05  7:56   ` Russ Cox
  0 siblings, 1 reply; 8+ messages in thread
From: Rob Pike @ 2006-01-05  7:45 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

If I remember right - and I might not - I looked into an
html driver or terminal type for troff, but gave up and
did man2html instead, which took a radically smpler
tack than ms2html and scored a little better overall
but much worse in some cases.

Don't you think a better long-term plan would be
to abandon troff?

-rob

On 1/4/06, Russ Cox <rsc@swtch.com> wrote:
> Is anyone interested in hacking on a simple version
> of troff that generates html?  The idea is to implement
> most of the troff base language and add primitives for
> putting in raw html and watching to make sure tags get
> matched properly.  It's considerably simpler than troff
> since one doesn't have to deal with the low-level details
> of text layout, character widths, and so on.
>
> The idea is that then htmlroff could use the existing
> macro packages more or less directly, perhaps with a
> few small changes.  It would replace both ms2html,
> which works at a higher level, and troff2html, which
> works at a lower level.  It could format the manual
> pages as well as the papers, and the resulting html
> would actually look good and be easy to change
> (just edit the macros).
>
> Completing the picture would be versions of pic, eqn,
> and tbl that emit SVG, MathML, and HTML tables.
>
> I've started to cannibalize ms2html to build htmlroff,
> but I really don't have much time to spend on it.
>
> Russ
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] htmlroff
  2006-01-05  7:45 ` Rob Pike
@ 2006-01-05  7:56   ` Russ Cox
  2006-01-05  8:43     ` Francisco J Ballesteros
  0 siblings, 1 reply; 8+ messages in thread
From: Russ Cox @ 2006-01-05  7:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> If I remember right - and I might not - I looked into an
> html driver or terminal type for troff, but gave up and
> did man2html instead, which took a radically smpler
> tack than ms2html and scored a little better overall
> but much worse in some cases.

I agree that modifying troff to add a driver wouldn't work,
because troff still thinks it is in charge of various layout
decisions and works at too low a level.  Troff2html fails
(when it does) for basically the same reasons.  Ms2html,
while originally intended to handle the -ms macros directly,
now has machinery in it to run arbitrary troff macros.  I think
that if this were fleshed out and a few primtives for HTML
added, then the HTML and -ms details could be moved
completely out into macro libraries.

> Don't you think a better long-term plan would be
> to abandon troff?

Yes.  But for what?

Russ


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] htmlroff
  2006-01-05  7:56   ` Russ Cox
@ 2006-01-05  8:43     ` Francisco J Ballesteros
  2006-01-05  8:48       ` Russ Cox
  0 siblings, 1 reply; 8+ messages in thread
From: Francisco J Ballesteros @ 2006-01-05  8:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Regarding papers, I finally gave up troff and went back to latex.
Most places ask you to follow a given sty, and I got tired of
converting troff to latex (despite using a silly script for that).

Wouldn´t a converter from troff to latex be easier if we are talking
about generating html? latex is huge, but we already have it.

On 1/5/06, Russ Cox <rsc@swtch.com> wrote:
> > Don't you think a better long-term plan would be
> > to abandon troff?
>
> Yes.  But for what?
>
> Russ
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] htmlroff
  2006-01-05  8:43     ` Francisco J Ballesteros
@ 2006-01-05  8:48       ` Russ Cox
  2006-01-05  8:59         ` Francisco J Ballesteros
                           ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Russ Cox @ 2006-01-05  8:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Wouldn´t a converter from troff to latex be easier if we are talking
> about generating html? latex is huge, but we already have it.

How does converting from troff to latex help with html?
Latex2html produces disgusting output.

Russ


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] htmlroff
  2006-01-05  8:48       ` Russ Cox
@ 2006-01-05  8:59         ` Francisco J Ballesteros
  2006-01-05 10:32         ` John Murdie
  2006-01-05 18:48         ` Taj Khattra
  2 siblings, 0 replies; 8+ messages in thread
From: Francisco J Ballesteros @ 2006-01-05  8:59 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

If you don´t like latex2html output, then it does not help.
The output is awful for hand editing, but regarding presentation,
generating all the doc in a single page is not that bad.

On 1/5/06, Russ Cox <rsc@swtch.com> wrote:
> > Wouldn´t a converter from troff to latex be easier if we are talking
> > about generating html? latex is huge, but we already have it.
>
> How does converting from troff to latex help with html?
> Latex2html produces disgusting output.
>
> Russ
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] htmlroff
  2006-01-05  8:48       ` Russ Cox
  2006-01-05  8:59         ` Francisco J Ballesteros
@ 2006-01-05 10:32         ` John Murdie
  2006-01-05 18:48         ` Taj Khattra
  2 siblings, 0 replies; 8+ messages in thread
From: John Murdie @ 2006-01-05 10:32 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Thu, 2006-01-05 at 03:48 -0500, Russ Cox wrote:
> > Wouldn´t a converter from troff to latex be easier if we are talking
> > about generating html? latex is huge, but we already have it.
> 
> How does converting from troff to latex help with html?
> Latex2html produces disgusting output.
> 
> Russ

Yes, I use TTH - http://hutchinson.belmont.ma.us/tth/  - instead. Though
it's a long time since I used latex2html(1), I remember that it writes
many HTML files by default, each containing a section or sub-section of
the original document. I had to use several switches to make it work
almost sensibly.

The TTH source is a Lex program which the author does not make
available, only the generated C. It writes just one HTML file for every
LaTeX file input.

John A. Murdie
Department of Computer Science
University of York
UK



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] htmlroff
  2006-01-05  8:48       ` Russ Cox
  2006-01-05  8:59         ` Francisco J Ballesteros
  2006-01-05 10:32         ` John Murdie
@ 2006-01-05 18:48         ` Taj Khattra
  2 siblings, 0 replies; 8+ messages in thread
From: Taj Khattra @ 2006-01-05 18:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Latex2html produces disgusting output.

is hevea any better? (haven't tried it myself or compared it to latex2html).
http://pauillac.inria.fr/~maranget/hevea/


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-01-05 18:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-05  7:01 [9fans] htmlroff Russ Cox
2006-01-05  7:45 ` Rob Pike
2006-01-05  7:56   ` Russ Cox
2006-01-05  8:43     ` Francisco J Ballesteros
2006-01-05  8:48       ` Russ Cox
2006-01-05  8:59         ` Francisco J Ballesteros
2006-01-05 10:32         ` John Murdie
2006-01-05 18:48         ` Taj Khattra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).