groff
[Top][All Lists]
Advanced

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

Re: (off topic?) Docbook? Re: manlint?


From: Peter Schaffter
Subject: Re: (off topic?) Docbook? Re: manlint?
Date: Sun, 27 Sep 2020 22:46:41 -0400
User-agent: Mutt/1.9.4 (2018-02-28)

On Sun, Sep 27, 2020, James K. Lowden wrote:
> I think the idea behind grothml is that one input document "just works"
> with any backend.  A different -- and, I would argue, more
> realistic -- approach would be a macro-to-HTML converter that worked
> only for documents expressly written with HTML in mind, using only
> macros and eschewing troff requests.  Such a document is, I assert,
> easily converted to HTML and produces perfectly acceptable PDF.  

Yes.  I do this frequently with -mom.  It's almost trivial.  It
doesn't require much more than a couple of sed scripts.
 
> Almost any macro set you pick maps onto HTML

Precisely.

FWIW, the mom macros were designed with conversion to other "...ML"
formats in mind.  Almost all typesetting functions are performed
with macros even when groff has requests to accomplish the same
thing; equally, the most common inline requests are treated as
string-invoked macros.  (The goal was to insulate users--and
documents--as much as possible from low-level troff.)  Semantic
elements are all unambiguously associated with a macro.  Every
semantic macro has corresponding style macros, which can be
converted to stylesheets.  PDF linking has a clear syntax that
allows unambiguous creation of ids for internal linking and a
dedicated macro for external links.

For all that, if I know a document is likely to be converted
to HTML, I make sure the document is written sensibly for the
conversion--exactly what James proposes.  It's admittedly easy with
-mom, but I see no reason why -ms documents intended for HTML output
can't be written specifically for it using the available macros.
Nothing wrong with asking document writers to shoulder some of the
burden.

-- 
Peter Schaffter
http://www.schaffter.ca



reply via email to

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