On Sat, 14 Dec 2013 01:17:02 +0000 (UTC) Thorsten Glaser <t...@mirbsd.de> wrote:
> Though I do low-level *roff stuff too. I had to learn it because > I had to fix the mdoc macro _implementation_ itself… not too hard, > the classical documentation https://www.mirbsd.org/manUSD/21.troff > and https://www.mirbsd.org/manUSD/22.trofftut are nice intros. > > Not always, there’s stuff that needs multilines in *roff, but > with structural regexes that will work. > > Also, HTML output can be done (cf. the above links; those were > done by AT&T nroff (from 4.4BSD-Alpha, hacked up) → col → some > mksh script with lots of sed to convert them. Valid XHTML/1.1, > or it’s a bug. Much nicer than GNU groff. No way to natively > specify hyperlinks or other HTML features (due to this using > the preformatted manpages that are generated during the BSD > build anyway), and fixed-width output, but I chose to make it > a feature and CSSify this to look like amber TTY output. With mdocml [1] you get nice HTML output for free, because it translates high level macros like mdoc/man to output format directly. This produces output typically of better quality than when fiddling with roff or catpages directly (preformatted man pages). On other hand you need stick to the mdoc/man and avoid low level roff. This works just fine for the most documentation that is out there... excluding mksh. As for writing man pages, there is very good tutorial/manual written by the author of mdocml [2]. [1] http://mdocml.bsd.lv/ [2] http://manpages.bsd.lv/mdoc.html -- Paul Onyschuk