From: Kristaps Dzonsons <kristaps@bsd.lv>
To: discuss@mdocml.bsd.lv
Subject: mandoc & mandocdb on Mac OS X
Date: Sat, 09 Aug 2014 14:25:10 +0200 [thread overview]
Message-ID: <53E61326.4070905@bsd.lv> (raw)
Hi,
Thought I'd drop a note to all with OSX who want mandoc goodness instead
of the defaults for apropos and so on. This can be easily modified to
only affect the local user, but I want to make it the system default.
(As noted to tech@, there's a certain failure with mmap() in running
some commands, but this should be fixed soon, so I won't mention it here.)
First, uncomment "USE_MANPATH" in the Makefile. Then make (or remake)
and install with the usual make install. (All binaries dumped into
/usr/local now.)
Aside: I also uncommented the CFLAGS and DBLIB to include /usr/local as
I've compiled a more recent SQLite in there. The default SQLite doesn't
have SQLITE_DETERMINISTIC. I don't know how much of a difference this
makes, however.
Prep the makewhatis database.
$ sudo /usr/local/sbin/makewhatis
Optionally add this to the /etc/weekly.local file. Note that the system
makewhatis (via makewhatis.local) will also run weekly as stipulated in
/etc/periodic/weekly.
Then make sure that apropos and whatis point to mandoc's versions of the
same. You can either replace the in-system binaries or alias. (Note:
if you alias, running apropos via man won't work with the new system.)
Finally, we need to de-funk man-db:
$ alias man='man -c -p ""'
This makes the formatter be run each time (-c) and suppresses
preprocessors (-p ""). Next, to continue de-funkifying, we need not
only to replace nroff with mandoc in /etc/man.conf, but to decline the
"help" that man-db gives us in line lengths in a way that I can't
disable but that triggers -man mode instead of -mdoc:
NROFF tail -n +2 | /usr/local/bin/mandoc
That's it! NOTE: not all manuals play well with mandoc! Specifically,
the OpenGL manuals look like butts. I don't know why yet. Perhaps, in
converting from DocBook, they didn't use docbook2mdoc...
(Aside number two. It's because the OpenGL docbook input use a lot of
<inlineequation>, which docbook2mdoc doesn't understand enough to
convert to eqn. In turn, mandoc's eqn wouldn't understand enough of the
eqn itself... Any takers?)
Best,
Kristaps
--
To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv
reply other threads:[~2014-08-09 12:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=53E61326.4070905@bsd.lv \
--to=kristaps@bsd.lv \
--cc=discuss@mdocml.bsd.lv \
/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).