From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout.scc.kit.edu (mailout.scc.kit.edu [129.13.185.202]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s5DA5skE000309 for ; Fri, 13 Jun 2014 06:05:55 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1WvOMp-0003mS-Jp; Fri, 13 Jun 2014 12:05:51 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1WvOMh-00018P-Bw; Fri, 13 Jun 2014 12:05:43 +0200 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1WvORv-0001Ch-MG; Fri, 13 Jun 2014 12:11:07 +0200 Received: from schwarze by usta.de with local (Exim 4.77) (envelope-from ) id 1WvOMp-0001Dl-6c; Fri, 13 Jun 2014 12:05:51 +0200 Date: Fri, 13 Jun 2014 12:05:50 +0200 From: Ingo Schwarze To: discuss@mdocml.bsd.lv Cc: David Holland , Thomas Klausner , Kristaps Dzonsons Subject: Re: Extension for more general documents Message-ID: <20140613100550.GB27739@iris.usta.de> References: <20140613083536.GJ14438@danbala.tuwien.ac.at> <539ABA77.4050305@bsd.lv> X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <539ABA77.4050305@bsd.lv> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Thomas, Kristaps Dzonsons wrote on Fri, Jun 13, 2014 at 10:46:47AM +0200: > Thomas Klausner wrote: >> We'd really like to move away the documents in NetBSD's base system >> from the groff -ms and -me macro sets to anything else that can be >> easily converted to txt, html, and pdf. >> >> We already have mandoc in the base system and it supports these output >> formats. So it seems to be a good candidate, and mdoc already provides >> the formatting options we need (AFAIK). >> >> We probably would just need to add a mode to mandoc where it doesn't >> insist on a man page header and instead supports some article >> information like a title. Well, -ms and -me are macro sets just like -man and -mdoc, so it's not just a matter of taking something away, but a matter of adding something, that is, defining data structures for abstract syntax trees for these languages and then adding parsers for these languages and output modules producing ASCII, HTML, and PostScript output from the syntax trees. >> Would you be willing to add support for this in mandoc? Me, right now, no. That would be too much work for a very small number of mostly hopelessly outdated documents. >> Am I overlooking stuff that makes this more hard than I currently >> imagine it to be? > Can you point to an example or two for reference? http://cvsweb.netbsd.org/bsdweb.cgi/src/bin/csh/USD.doc/ uses -ms, specifically AI AB AE AU DE DS EH FE FS I IP KE KF LP ND NH OH PP SH TL UX and bp br nf so ta ti http://cvsweb.netbsd.org/bsdweb.cgi/src/bin/sh/USD.doc/ uses -ms, in addition to the above: RE RS .[ .] ds sp ul http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.sbin/lpr/SMM.doc/ uses -ms (not checking in detail) Also, bc, bib, ed, ex, eqn, fsck, jove, learn, nvi, ratfor, sed, timed, ufs, uucp had some -ms documentation. I guess implementing that would be a task of the same order of magnitude as the complete man(7) implementation, maybe slightly smaller, probably about 2000-4000 LOC. http://cvsweb.netbsd.org/bsdweb.cgi/src/games/trek/USD.doc/ uses -me, specifically FF TE TS as bl bp ce de ds eh el ev f fi ft hc ie in na ne nf nr oh pp qq sp ti tl tr ul vs wh Similarly, there was -me documentation for mail, rogue, and maybe more. That looks rather low-levelish, so it is harder to estimate than -ms and may be conceptionally more difficult. It may be the same order of magnitude of work, it doesn't look easier in any case. Just as a few examples... Yours, Ingo -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv