groff
[Top][All Lists]
Advanced

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

Re: [groff] grohtml shortcomings


From: Ingo Schwarze
Subject: Re: [groff] grohtml shortcomings
Date: Tue, 4 Dec 2018 05:40:58 +0100
User-agent: Mutt/1.8.0 (2017-02-23)

Hi James,

James K. Lowden wrote on Mon, Dec 03, 2018 at 04:46:31PM -0500:

> I converted the Heimdal kf.1 page to html recently, and found what I
> consider to be problems with both appearance and HTML style. 

For mdoc(7) input in particular, do not use "groff -mdoc -T html".
Use "mandoc -T html -O style=/path/to.css".

> Those <br> tags aren't desirable.

Doesn't happen with mandoc.

Oh, and by the way, at those places where you do want manual line breaks,
mandoc writes <br/>, not <br>; it produces valid polyglot HTML 5.

> My other complaint is the way style is used.  grohtml offers no way
> to include alternative CSS at the top of each page,

Mandoc does; doing so is even strongly recommended.

> and imposes quite a bit of style on a per-tag basis,

Mandoc does not.

> instead of by class.

Mandoc supports styling by "class=macroname" attributes.

> IMO groff should produce valid, unstyled HTML by default, with classes
> assigned to divisions, spans, and other tags named to reflect the input
> macros that generated them.

Groff cannot do that.  By the time grohtml(1) gets to see the text,
all the information about the macros has already been destroyed,
and only presentational instructions are left.

> (Unfortunately, grohtml generates no title in this case.)  

Mandoc does.

> This sets H1 headers to be centered,

Mandoc does not.

> Before I roll up my sleeves, I thought I'd ask for comments about that
> approach versus the current one.  

What you want to do seems hardly feasible, at least not without
arcane tricks and an insane amount of work, and even if you manage
to do it, it looks like a tremendous waste of time redoing all that
work in a franework that is very ill-suited to the task, when all
what you want is already readily available in a different framework
that is much better suited to the particular features you are asking
for.

For PDF output, by all means, use groff, it is much, much better
than mandoc for that.  For mdoc to HTML, don't.

Yours,
  Ingo



reply via email to

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