> *pages 11 to 13 are about implementing a new output format,* I really do wish Mandoc would support the Troff intermediate output format. Even if processing text piped between programs isn't nearly as efficient as reading it from a compiled program, it's so much more flexible.
On Mon, 17 Dec 2018 1:36 am Ingo Schwarze <schwa...@usta.de wrote: > 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 > >