groff
[Top][All Lists]
Advanced

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

Re: [groff] Work-related rants


From: Ingo Schwarze
Subject: Re: [groff] Work-related rants
Date: Sun, 16 Dec 2018 15:32:01 +0100
User-agent: Mutt/1.8.0 (2017-02-23)

Hi Larry,

Larry Kollar wrote on Sun, Dec 16, 2018 at 02:20:32AM -0500:

> Rant the Third: How *DO* you Embed Manpages?

one very clean option is to write a mandoc output formatter.

Admittedly, that requires a one-time investment of about a week of
work for a new output format, and better coordinate with upstream
whether it can be included, or you are in for maintenance work later
because the internal interfaces and the syntax tree formats are
still very much in flux.  But a week of work doesn't seem that much
to me if it allows you to maintain the source documents in man page
format for good and intergrate them into whatever format project
policies require, without bothering with that format - which will
typically be complex, unreadable, and hard to write.

In princple, writing such a thing is straightforward:

  https://www.openbsd.org/papers/eurobsdcon2018-mandoc.pdf
    -- pages 11 to 13 are about implementing a new output format,
       and why it isn't hard; that's why the topic only took up
       three pages out of about 60 in the talk

   $ wc -l mdoc_{html,man,markdown}.c man_html.c
    1814 mdoc_html.c
    1802 mdoc_man.c
    1591 mdoc_markdown.c
     677 man_html.c

  https://undeadly.org/cgi?action=article&sid=20170304230520
  
Yours,
  Ingo



reply via email to

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