discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: discuss@mdocml.bsd.lv
Cc: David Holland <dholland@NetBSD.org>,
	Thomas Klausner <wiz@NetBSD.org>,
	Kristaps Dzonsons <kristaps@bsd.lv>
Subject: Re: Extension for more general documents
Date: Fri, 13 Jun 2014 12:05:50 +0200	[thread overview]
Message-ID: <20140613100550.GB27739@iris.usta.de> (raw)
In-Reply-To: <539ABA77.4050305@bsd.lv>

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

  reply	other threads:[~2014-06-13 10:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13  8:35 Thomas Klausner
2014-06-13  8:46 ` Kristaps Dzonsons
2014-06-13 10:05   ` Ingo Schwarze [this message]
2014-06-13 11:06     ` Thomas Klausner
2014-06-13 11:44       ` Thomas Klausner
2014-06-13 14:04         ` Svyatoslav Mishyn
2014-06-13 22:18           ` Thomas Klausner
2014-06-14 12:27           ` Ingo Schwarze
2014-06-14 12:16 ` Ingo Schwarze
     [not found]   ` <20140705205008.GA8289@netbsd.org>
2014-08-09  1:05     ` Ingo Schwarze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140613100550.GB27739@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=dholland@NetBSD.org \
    --cc=discuss@mdocml.bsd.lv \
    --cc=kristaps@bsd.lv \
    --cc=wiz@NetBSD.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).