From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx.stare.cz (mx.stare.cz [79.98.77.229]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id b44c001d for ; Fri, 14 Jun 2019 06:40:08 -0500 (EST) Received: from www.stare.cz (localhost [127.0.0.1]) by www.stare.cz (OpenSMTPD) with ESMTP id 4b5a9412 for ; Fri, 14 Jun 2019 13:40:07 +0200 (CEST) Date: Fri, 14 Jun 2019 13:40:07 +0200 From: Jan Stary To: discuss@mandoc.bsd.lv Subject: Re: Mandoc for oil Message-ID: <20190614114006.GB77287@www.stare.cz> References: <20190614084313.GA17405@www.stare.cz> <20190614085423.GC17405@www.stare.cz> X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) On Jun 14 05:24:23, matt.singletary@gmail.com wrote: > I was concerned that if I wrote osh.1 in mdoc(7), I would need to > generate another man(7) page for systems that don't support mdoc(7), ie > most linuxes. Linux systems do "support" mdoc(7): the linux man(1) runs groff(1) to format the manpage, and groff(1) understands both mdoc(7) and man(7). > But isn't the point of mandoc -T man to output man(7) from an > mdoc(7) file? No. An mdoc(7) manpage can be readily displayed (by mandoc, by groff, by the linux man via groff). Just like a man(7) page can. > Or asking another way; what's the most reasonable (workflow) way to write > a man page in mdoc(7), $ vi prog.1 $ vi function.3 $ vi format.5 > but make man pages available on systems that don't > support mdoc(7) (ie most linuxes)? They do, see above. mdoc(7) is not a novelty, it has been around for decades. See the excelent https://manpages.bsd.lv/history.html (which is interesting in itself). Jan > > > A good start is > > > > > > $ wc -l /usr/share/man/man1/*.1 | sort -n | less > > > > > > (or wherever your system keeps manpages), > > > pick the shortest one for a program you know and use, > > > and read the (input) manpage, such as > > > > > > $ vim /usr/share/man/man1/yes.1 > > > > I forgot an important thing: on many systems outside of the *BSD family, > > the system manpages will be written in the legacy man(7) format, > > built on top of roff(7), a general purpose typesetting language. > > > > Both man(1) and mandoc(1) can read both; but mdoc(5) ficilitates > > semantic markup ("this is a commandline option"), as opposed to > > low-level formating instructions ("type this in italic"). > > > > In case your system uses man(7), not mdoc(7), as e.g. most linuxes do, > > you will have to learn mdoc elsewhere, e.g. > > > > http://cvsweb.openbsd.org/src/usr.bin/yes/yes.1 -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv