ttmac: rename IM (italic manual) to MR (manual reference) - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit d32deab17bfffa5bffc5fab3e6577558e40888c5
 (DIR) parent 9843fc0d82c68c78059ccb167e8402def5a4ee1f
 (HTM) Author: Russ Cox <rsc@swtch.com>
       Date:   Sat, 15 Aug 2020 20:07:38 -0400
       
       ttmac: rename IM (italic manual) to MR (manual reference)
       
       Suggested by G. Brandon Robinson.
       
       Diffstat:
         M man/man1/0intro.1                   |     148 ++++++++++++++++----------------
         M man/man1/9.1                        |      14 +++++++-------
         M man/man1/9c.1                       |       2 +-
         M man/man1/9p.1                       |      14 +++++++-------
         M man/man1/9term.1                    |      18 +++++++++---------
         M man/man1/acid.1                     |      14 +++++++-------
         M man/man1/acme.1                     |      42 ++++++++++++++++----------------
         M man/man1/acmeevent.1                |      22 +++++++++++-----------
         M man/man1/ascii.1                    |      12 ++++++------
         M man/man1/astro.1                    |       2 +-
         M man/man1/awk.1                      |       6 +++---
         M man/man1/bc.1                       |       6 +++---
         M man/man1/bundle.1                   |      10 +++++-----
         M man/man1/calendar.1                 |       2 +-
         M man/man1/cat.1                      |       8 ++++----
         M man/man1/cleanname.1                |       2 +-
         M man/man1/col.1                      |       8 ++++----
         M man/man1/colors.1                   |       6 +++---
         M man/man1/comm.1                     |       4 ++--
         M man/man1/core.1                     |       8 ++++----
         M man/man1/crop.1                     |      12 ++++++------
         M man/man1/date.1                     |       2 +-
         M man/man1/db.1                       |      10 +++++-----
         M man/man1/dc.1                       |       4 ++--
         M man/man1/dd.1                       |       2 +-
         M man/man1/deroff.1                   |      16 ++++++++--------
         M man/man1/devdraw.1                  |       8 ++++----
         M man/man1/dial.1                     |       4 ++--
         M man/man1/dict.1                     |       6 +++---
         M man/man1/diff.1                     |       8 ++++----
         M man/man1/doctype.1                  |      14 +++++++-------
         M man/man1/ed.1                       |      10 +++++-----
         M man/man1/eqn.1                      |       8 ++++----
         M man/man1/freq.1                     |       4 ++--
         M man/man1/git.1                      |       2 +-
         M man/man1/grap.1                     |       4 ++--
         M man/man1/graph.1                    |       4 ++--
         M man/man1/grep.1                     |      12 ++++++------
         M man/man1/gview.1                    |       2 +-
         M man/man1/gzip.1                     |       4 ++--
         M man/man1/hist.1                     |       8 ++++----
         M man/man1/hoc.1                      |       4 ++--
         M man/man1/htmlroff.1                 |      18 +++++++++---------
         M man/man1/idiff.1                    |       4 ++--
         M man/man1/install.1                  |      14 +++++++-------
         M man/man1/join.1                     |       4 ++--
         M man/man1/jpg.1                      |      10 +++++-----
         M man/man1/kill.1                     |      12 ++++++------
         M man/man1/label.1                    |      12 ++++++------
         M man/man1/lex.1                      |       2 +-
         M man/man1/look.1                     |       2 +-
         M man/man1/ls.1                       |      12 ++++++------
         M man/man1/man.1                      |      12 ++++++------
         M man/man1/map.1                      |       4 ++--
         M man/man1/mc.1                       |      18 +++++++++---------
         M man/man1/mk.1                       |      24 ++++++++++++------------
         M man/man1/mk9660.1                   |       4 ++--
         M man/man1/mkdir.1                    |       4 ++--
         M man/man1/mount.1                    |      10 +++++-----
         M man/man1/namespace.1                |       6 +++---
         M man/man1/ndb.1                      |      14 +++++++-------
         M man/man1/netfiles.1                 |      26 +++++++++++++-------------
         M man/man1/page.1                     |      22 +++++++++++-----------
         M man/man1/paint.1                    |      14 +++++++-------
         M man/man1/passwd.1                   |       2 +-
         M man/man1/pem.1                      |       6 +++---
         M man/man1/pic.1                      |       8 ++++----
         M man/man1/plot.1                     |       8 ++++----
         M man/man1/plumb.1                    |       6 +++---
         M man/man1/pr.1                       |       4 ++--
         M man/man1/proof.1                    |       6 +++---
         M man/man1/ps.1                       |       6 +++---
         M man/man1/psfonts.1                  |      10 +++++-----
         M man/man1/pwd.1                      |       4 ++--
         M man/man1/rc.1                       |      12 ++++++------
         M man/man1/readcons.1                 |       2 +-
         M man/man1/resample.1                 |       8 ++++----
         M man/man1/rio.1                      |      16 ++++++++--------
         M man/man1/rm.1                       |       2 +-
         M man/man1/rsa.1                      |       8 ++++----
         M man/man1/sam.1                      |      18 +++++++++---------
         M man/man1/scat.1                     |       8 ++++----
         M man/man1/secstore.1                 |       8 ++++----
         M man/man1/secstored.1                |       4 ++--
         M man/man1/sed.1                      |       8 ++++----
         M man/man1/seq.1                      |       2 +-
         M man/man1/sftpcache.1                |      12 ++++++------
         M man/man1/sleep.1                    |       2 +-
         M man/man1/snarfer.1                  |       4 ++--
         M man/man1/soelim.1                   |       8 ++++----
         M man/man1/sort.1                     |       4 ++--
         M man/man1/spell.1                    |       6 +++---
         M man/man1/split.1                    |       8 ++++----
         M man/man1/src.1                      |      12 ++++++------
         M man/man1/ssam.1                     |       4 ++--
         M man/man1/ssh-agent.1                |      20 ++++++++++----------
         M man/man1/strings.1                  |       2 +-
         M man/man1/sum.1                      |       4 ++--
         M man/man1/tar.1                      |       8 ++++----
         M man/man1/tbl.1                      |       8 ++++----
         M man/man1/tcs.1                      |       4 ++--
         M man/man1/test.1                     |       2 +-
         M man/man1/time.1                     |       2 +-
         M man/man1/touch.1                    |       6 +++---
         M man/man1/tr.1                       |       2 +-
         M man/man1/tr2post.1                  |      10 +++++-----
         M man/man1/troff.1                    |      16 ++++++++--------
         M man/man1/troff2html.1               |      16 ++++++++--------
         M man/man1/tweak.1                    |      12 ++++++------
         M man/man1/uniq.1                     |       2 +-
         M man/man1/vac.1                      |       6 +++---
         M man/man1/venti.1                    |      16 ++++++++--------
         M man/man1/web.1                      |       4 ++--
         M man/man1/wintext.1                  |      16 ++++++++--------
         M man/man1/winwatch.1                 |       6 +++---
         M man/man1/xd.1                       |       2 +-
         M man/man1/yacc.1                     |       6 +++---
         M man/man1/yesterday.1                |       6 +++---
         M man/man3/0intro.3                   |      54 ++++++++++++++++----------------
         M man/man3/9p-cmdbuf.3                |       4 ++--
         M man/man3/9p-fid.3                   |       8 ++++----
         M man/man3/9p-file.3                  |       4 ++--
         M man/man3/9p-intmap.3                |       4 ++--
         M man/man3/9p.3                       |      18 +++++++++---------
         M man/man3/9pclient.3                 |      22 +++++++++++-----------
         M man/man3/acme.3                     |      28 ++++++++++++++--------------
         M man/man3/addpt.3                    |       2 +-
         M man/man3/aes.3                      |      20 ++++++++++----------
         M man/man3/allocimage.3               |      20 ++++++++++----------
         M man/man3/arg.3                      |       4 ++--
         M man/man3/arith3.3                   |       2 +-
         M man/man3/atof.3                     |       4 ++--
         M man/man3/auth.3                     |      20 ++++++++++----------
         M man/man3/authsrv.3                  |       6 +++---
         M man/man3/bin.3                      |       4 ++--
         M man/man3/bio.3                      |      20 ++++++++++----------
         M man/man3/blowfish.3                 |      20 ++++++++++----------
         M man/man3/cachechars.3               |      20 ++++++++++----------
         M man/man3/cleanname.3                |       2 +-
         M man/man3/color.3                    |      16 ++++++++--------
         M man/man3/complete.3                 |       8 ++++----
         M man/man3/ctime.3                    |       8 ++++----
         M man/man3/des.3                      |      20 ++++++++++----------
         M man/man3/dial.3                     |       4 ++--
         M man/man3/dirread.3                  |      16 ++++++++--------
         M man/man3/draw.3                     |      16 ++++++++--------
         M man/man3/drawfcall.3                |      12 ++++++------
         M man/man3/dsa.3                      |      22 +++++++++++-----------
         M man/man3/dup.3                      |       2 +-
         M man/man3/elgamal.3                  |      20 ++++++++++----------
         M man/man3/encode.3                   |       4 ++--
         M man/man3/encrypt.3                  |       2 +-
         M man/man3/errstr.3                   |       8 ++++----
         M man/man3/event.3                    |      22 +++++++++++-----------
         M man/man3/exec.3                     |      18 +++++++++---------
         M man/man3/exits.3                    |       8 ++++----
         M man/man3/fcall.3                    |      14 +++++++-------
         M man/man3/flate.3                    |       2 +-
         M man/man3/fmtinstall.3               |      20 ++++++++++----------
         M man/man3/frame.3                    |      12 ++++++------
         M man/man3/genrandom.3                |       8 ++++----
         M man/man3/get9root.3                 |       6 +++---
         M man/man3/getenv.3                   |       4 ++--
         M man/man3/getfields.3                |       8 ++++----
         M man/man3/getns.3                    |       4 ++--
         M man/man3/getsnarf.3                 |       4 ++--
         M man/man3/getuser.3                  |       4 ++--
         M man/man3/getwd.3                    |       6 +++---
         M man/man3/graphics.3                 |      80 ++++++++++++++++----------------
         M man/man3/html.3                     |       2 +-
         M man/man3/ioproc.3                   |      22 +++++++++++-----------
         M man/man3/ip.3                       |       4 ++--
         M man/man3/isalpharune.3              |       2 +-
         M man/man3/keyboard.3                 |      14 +++++++-------
         M man/man3/lock.3                     |       2 +-
         M man/man3/mach-cmd.3                 |      14 +++++++-------
         M man/man3/mach-file.3                |       6 +++---
         M man/man3/mach-map.3                 |      16 ++++++++--------
         M man/man3/mach-stack.3               |       4 ++--
         M man/man3/mach-swap.3                |       2 +-
         M man/man3/mach-symbol.3              |      14 +++++++-------
         M man/man3/mach.3                     |      24 ++++++++++++------------
         M man/man3/malloc.3                   |       8 ++++----
         M man/man3/matrix.3                   |       2 +-
         M man/man3/memdraw.3                  |      34 ++++++++++++++++----------------
         M man/man3/memlayer.3                 |      22 +++++++++++-----------
         M man/man3/memory.3                   |       2 +-
         M man/man3/mouse.3                    |      30 +++++++++++++++---------------
         M man/man3/mousescrollsize.3          |       8 ++++----
         M man/man3/mp.3                       |       4 ++--
         M man/man3/mux.3                      |       6 +++---
         M man/man3/ndb.3                      |      10 +++++-----
         M man/man3/needstack.3                |       6 +++---
         M man/man3/notify.3                   |      20 ++++++++++----------
         M man/man3/open.3                     |      12 ++++++------
         M man/man3/opentemp.3                 |       4 ++--
         M man/man3/pipe.3                     |      14 +++++++-------
         M man/man3/plumb.3                    |      24 ++++++++++++------------
         M man/man3/post9pservice.3            |      12 ++++++------
         M man/man3/postnote.3                 |       4 ++--
         M man/man3/prime.3                    |      10 +++++-----
         M man/man3/print.3                    |      18 +++++++++---------
         M man/man3/proto.3                    |       2 +-
         M man/man3/pushtls.3                  |       8 ++++----
         M man/man3/qball.3                    |       2 +-
         M man/man3/quaternion.3               |       8 ++++----
         M man/man3/quote.3                    |      22 +++++++++++-----------
         M man/man3/rand.3                     |       8 ++++----
         M man/man3/rc4.3                      |      20 ++++++++++----------
         M man/man3/read.3                     |       8 ++++----
         M man/man3/readcolmap.3               |      10 +++++-----
         M man/man3/readcons.3                 |       2 +-
         M man/man3/regexp.3                   |       6 +++---
         M man/man3/rfork.3                    |      12 ++++++------
         M man/man3/rsa.3                      |      22 +++++++++++-----------
         M man/man3/rune.3                     |       4 ++--
         M man/man3/runestrcat.3               |       8 ++++----
         M man/man3/searchpath.3               |       8 ++++----
         M man/man3/sechash.3                  |      14 +++++++-------
         M man/man3/seek.3                     |       6 +++---
         M man/man3/sendfd.3                   |      12 ++++++------
         M man/man3/setjmp.3                   |       6 +++---
         M man/man3/sleep.3                    |       6 +++---
         M man/man3/stat.3                     |      10 +++++-----
         M man/man3/strcat.3                   |      10 +++++-----
         M man/man3/string.3                   |       2 +-
         M man/man3/stringsize.3               |      14 +++++++-------
         M man/man3/subfont.3                  |      28 ++++++++++++++--------------
         M man/man3/sysfatal.3                 |      14 +++++++-------
         M man/man3/thread.3                   |      28 ++++++++++++++--------------
         M man/man3/time.3                     |       2 +-
         M man/man3/udpread.3                  |       2 +-
         M man/man3/venti-cache.3              |      16 ++++++++--------
         M man/man3/venti-client.3             |      14 +++++++-------
         M man/man3/venti-conn.3               |      22 +++++++++++-----------
         M man/man3/venti-fcall.3              |      16 ++++++++--------
         M man/man3/venti-file.3               |      12 ++++++------
         M man/man3/venti-log.3                |       8 ++++----
         M man/man3/venti-mem.3                |       4 ++--
         M man/man3/venti-packet.3             |       4 ++--
         M man/man3/venti-server.3             |      12 ++++++------
         M man/man3/venti-zero.3               |       4 ++--
         M man/man3/venti.3                    |      50 ++++++++++++++++----------------
         M man/man3/wait.3                     |      16 ++++++++--------
         M man/man3/window.3                   |      16 ++++++++--------
         M man/man4/0intro.4                   |      14 +++++++-------
         M man/man4/9import.4                  |      16 ++++++++--------
         M man/man4/9pserve.4                  |       8 ++++----
         M man/man4/acme.4                     |      10 +++++-----
         M man/man4/factotum.4                 |      30 +++++++++++++++---------------
         M man/man4/fontsrv.4                  |      12 ++++++------
         M man/man4/fossil.4                   |      34 ++++++++++++++++----------------
         M man/man4/import.4                   |       6 +++---
         M man/man4/plumber.4                  |      18 +++++++++---------
         M man/man4/ramfs.4                    |       6 +++---
         M man/man4/smugfs.4                   |       6 +++---
         M man/man4/srv.4                      |      10 +++++-----
         M man/man4/tapefs.4                   |       8 ++++----
         M man/man4/vacfs.4                    |       4 ++--
         M man/man7/color.7                    |      14 +++++++-------
         M man/man7/face.7                     |       8 ++++----
         M man/man7/font.7                     |      22 +++++++++++-----------
         M man/man7/htmlroff.7                 |       6 +++---
         M man/man7/image.7                    |      32 ++++++++++++++++----------------
         M man/man7/keyboard.7                 |      28 ++++++++++++++--------------
         M man/man7/man.7                      |       6 +++---
         M man/man7/map.7                      |       2 +-
         M man/man7/mhtml.7                    |      18 +++++++++---------
         M man/man7/mpictures.7                |       4 ++--
         M man/man7/ms.7                       |      20 ++++++++++----------
         M man/man7/ndb.7                      |       6 +++---
         M man/man7/plot.7                     |       2 +-
         M man/man7/plumb.7                    |      18 +++++++++---------
         M man/man7/regexp.7                   |       6 +++---
         M man/man7/thumbprint.7               |       4 ++--
         M man/man7/utf.7                      |       8 ++++----
         M man/man7/venti.7                    |      28 ++++++++++++++--------------
         M man/man8/fossilcons.8               |      18 +++++++++---------
         M man/man8/getflags.8                 |      10 +++++-----
         M man/man8/listen1.8                  |       2 +-
         M man/man8/mkfs.8                     |       8 ++++----
         M man/man8/vbackup.8                  |      12 ++++++------
         M man/man8/venti-backup.8             |       4 ++--
         M man/man8/venti-fmt.8                |      12 ++++++------
         M man/man8/venti.8                    |      20 ++++++++++----------
         M tmac/tmac.an                        |       5 ++++-
       
       286 files changed, 1591 insertions(+), 1588 deletions(-)
       ---
 (DIR) diff --git a/man/man1/0intro.1 b/man/man1/0intro.1
       t@@ -32,15 +32,15 @@ they expect the
        environment variable 
        to contain the name of the root of the tree.
        See
       -.IM install (1)
       +.MR install (1)
        for details about installation.
        .PP
        Many of the familiar Unix commands,
        for example
       -.IM cat (1) ,
       -.IM ls (1) ,
       +.MR cat (1) ,
       +.MR ls (1) ,
        and
       -.IM wc (1) ,
       +.MR wc (1) ,
        are present, but in their Plan 9 forms:
        .I cat
        takes no options,
       t@@ -50,12 +50,12 @@ and
        .I wc
        counts UTF characters.
        In some cases, the differences are quite noticeable:
       -.IM grep (1)
       +.MR grep (1)
        and
       -.IM sed (1)
       +.MR sed (1)
        expect Plan 9 regular expressions
        (see
       -.IM regexp (7) ),
       +.MR regexp (7) ),
        which are closest to what Unix calls extended regular expressions.
        Because of these differences, it is not recommended to put 
        .B $PLAN9/bin
       t@@ -63,16 +63,16 @@ before the usual system
        .B bin
        directories in your search path.
        Instead, put it at the end of your path and use the
       -.IM 9 (1)
       +.MR 9 (1)
        script when you want to invoke the Plan 9 version of a
        traditional Unix command.
        .PP
        Occasionally the Plan 9 programs have been
        changed to adapt to Unix.
       -.IM Mk (1)
       +.MR Mk (1)
        now allows mkfiles to choose their own shell,
        and
       -.IM rc (1)
       +.MR rc (1)
        has a
        .I ulimit
        builtin and manages
       t@@ -80,14 +80,14 @@ builtin and manages
        .PP
        Many of the graphical programs from Plan 9 are present,
        including
       -.IM sam (1)
       +.MR sam (1)
        and
       -.IM acme (1) .
       +.MR acme (1) .
        An X11 window manager
       -.IM rio (1)
       +.MR rio (1)
        mimics Plan 9's window system, with command windows
        implemented by the external program
       -.IM 9term (1) .
       +.MR 9term (1) .
        Following the style of X Windows, these programs run in new
        windows rather than the one in which they are invoked.
        They all take a
       t@@ -101,10 +101,10 @@ The argument is one of
        \fIxmin\fL,\fIymin\fL,\fIxmax\fL,\fIymax\fR.
        .PP
        The
       -.IM plumber (4)
       +.MR plumber (4)
        helps to connect the various Plan 9 programs together,
        and fittings like
       -.IM web (1)
       +.MR web (1)
        connect it to external programs such as web browsers;
        one can click on a URL in
        .I acme
       t@@ -119,17 +119,17 @@ with file servers by reading and writing files.
        This cannot be done directly on Unix.
        Instead the servers listen for 9P connections on Unix domain sockets;
        clients connect to these sockets and speak 9P directly using the
       -.IM 9pclient (3)
       +.MR 9pclient (3)
        library.
       -.IM Intro (4)
       +.MR Intro (4)
        tells more of the story.
        The effect is not as clean as on Plan 9, but it gets the job done
        and still provides a uniform and easy-to-understand mechanism.
        The
       -.IM 9p (1)
       +.MR 9p (1)
        client can be used in shell scripts or by hand to carry out
        simple interactions with servers.
       -.IM Netfiles (1)
       +.MR Netfiles (1)
        is an experimental client for acme.
        .SS External databases
        Some programs rely on large databases that would be
       t@@ -146,7 +146,7 @@ The shell scripts
        and
        .I 9l
        (see
       -.IM 9c (1) )
       +.MR 9c (1) )
        provide a simple interface to the underlying system compiler and linker,
        similar to the 
        .I 2c
       t@@ -165,22 +165,22 @@ so that no
        options are needed.
        .PP
        The only way to write multithreaded programs is to use the
       -.IM thread (3)
       +.MR thread (3)
        library.
       -.IM Rfork (3)
       +.MR Rfork (3)
        exists but is not as capable as on Plan 9.
        There are many unfortunate by necessary preprocessor
        diversions to make Plan 9 and Unix libraries coexist.
        See
       -.IM intro (3)
       +.MR intro (3)
        for details.
        .PP
        The debuggers
       -.IM acid (1)
       +.MR acid (1)
        and
       -.IM db (1)
       +.MR db (1)
        and the debugging library
       -.IM mach (3)
       +.MR mach (3)
        are works in progress.
        They are platform-independent, so that x86 Linux core dumps
        can be inspected on PowerPC Mac OS X machines,
       t@@ -203,22 +203,22 @@ but that it is the extent to which they have been developed and exercised.
        .SS Porting programs
        The vast majority of the familiar Plan 9 programs 
        have been ported, including the Unicode-aware
       -.IM troff (1) .
       +.MR troff (1) .
        .PP
        Of the more recent additions to Plan 9,
       -.IM factotum (4) ,
       -.IM secstore (1) ,
       +.MR factotum (4) ,
       +.MR secstore (1) ,
        and
       -.IM secstored (1) ,
       -.IM vac (1) ,
       -.IM vacfs (4) ,
       +.MR secstored (1) ,
       +.MR vac (1) ,
       +.MR vacfs (4) ,
        and
       -.IM venti (8)
       +.MR venti (8)
        are all ported.
        .PP
        A backup system providing a dump file system built atop Venti
        is in progress; see
       -.IM vbackup (8) .
       +.MR vbackup (8) .
        .SS Porting to new systems
        Porting the tree to new operating systems or architectures
        should be straightforward, as system-specific code has been
       t@@ -240,9 +240,9 @@ need to write any system specific code at all.
        .PP
        There are other smaller system dependencies,
        such as the terminal handling code in
       -.IM 9term (1)
       +.MR 9term (1)
        and the implementation of
       -.IM getcallerpc (3) ,
       +.MR getcallerpc (3) ,
        but these are usually simple and are not on the critical
        path for getting the system up and running.
        .SH SEE ALSO
       t@@ -255,7 +255,7 @@ The manual pages are in a Unix style tree, with names like
        instead of Plan 9's simpler
        .BR  $PLAN9/man/1/cat ,
        so that the Unix
       -.IM man (1)
       +.MR man (1)
        utility can handle it.
        Some systems, for example Debian Linux,
        deduce the man page locations from the search path, so that
       t@@ -300,52 +300,52 @@ describes the Plan 9 file protocol 9P.
        These pages describe parts of the system
        that are new or different from Plan 9 from Bell Labs:
        .IP
       -.IM 9 (1) ,
       -.IM 9c (1) ,
       -.IM 9p (1) ,
       -.IM 9term (1) ,
       +.MR 9 (1) ,
       +.MR 9c (1) ,
       +.MR 9p (1) ,
       +.MR 9term (1) ,
        .I acidtypes
        in
       -.IM acid (1) ,
       -.IM dial (1) ,
       -.IM git (1) ,
       -.IM label (1) ,
       +.MR acid (1) ,
       +.MR dial (1) ,
       +.MR git (1) ,
       +.MR label (1) ,
        the
        .B MKSHELL
        variable in
       -.IM mk (1) ,
       -.IM namespace (1) ,
       -.IM netfiles (1) ,
       -.IM page (1) ,
       -.IM psfonts (1) ,
       -.IM rio (1) ,
       -.IM web (1) ,
       -.IM wintext (1)
       +.MR mk (1) ,
       +.MR namespace (1) ,
       +.MR netfiles (1) ,
       +.MR page (1) ,
       +.MR psfonts (1) ,
       +.MR rio (1) ,
       +.MR web (1) ,
       +.MR wintext (1)
        .IP
       -.IM intro (3) ,
       -.IM 9pclient (3) ,
       +.MR intro (3) ,
       +.MR 9pclient (3) ,
        the
        .B unix
        network in
       -.IM dial (3) ,
       -.IM exits (3) ,
       -.IM get9root (3) ,
       -.IM getns (3) ,
       -.IM notify (3) ,
       -.IM post9pservice (3) ,
       -.IM rfork (3) ,
       -.IM searchpath (3) ,
       -.IM sendfd (3) ,
       -.IM udpread (3) ,
       -.IM venti (3) ,
       -.IM wait (3) ,
       -.IM wctl (3)
       +.MR dial (3) ,
       +.MR exits (3) ,
       +.MR get9root (3) ,
       +.MR getns (3) ,
       +.MR notify (3) ,
       +.MR post9pservice (3) ,
       +.MR rfork (3) ,
       +.MR searchpath (3) ,
       +.MR sendfd (3) ,
       +.MR udpread (3) ,
       +.MR venti (3) ,
       +.MR wait (3) ,
       +.MR wctl (3)
        .IP
       -.IM intro (4) ,
       -.IM 9pserve (4) ,
       -.IM import (4) ,
       +.MR intro (4) ,
       +.MR 9pserve (4) ,
       +.MR import (4) ,
        .IP
       -.IM vbackup (8)
       +.MR vbackup (8)
        .IP
        .IR openfd (9p)
        .SH DIAGNOSTICS
       t@@ -356,4 +356,4 @@ exit with string statuses.  In fact, exiting with an empty status
        corresponds to exiting with status 0,
        and exiting with any non-empty string corresponds to exiting with status 1.
        See
       -.IM exits (3) .
       +.MR exits (3) .
 (DIR) diff --git a/man/man1/9.1 b/man/man1/9.1
       t@@ -12,7 +12,7 @@
        .B .
        .B 9
        (from
       -.IM sh (1) )
       +.MR sh (1) )
        .PP
        .B 9.rc
        .I cmd
       t@@ -24,7 +24,7 @@
        .B .
        .B 9.rc
        (from
       -.IM rc (1) )
       +.MR rc (1) )
        .PP
        .B u
        .I cmd
       t@@ -36,7 +36,7 @@
        .B .
        .B u
        (from
       -.IM sh (1) )
       +.MR sh (1) )
        .PP
        .B u.rc
        .I cmd
       t@@ -48,7 +48,7 @@
        .B .
        .B u.rc
        (from
       -.IM rc (1) )
       +.MR rc (1) )
        .SH DESCRIPTION
        Because Plan 9 supplies commands with the same name as but different
        behavior than many basic Unix system commands
       t@@ -86,7 +86,7 @@ in order to make the current shell start running in the Plan 9 environment.
        is the same as
        .I 9
        but written for use by the shell
       -.IM rc (1) .
       +.MR rc (1) .
        .PP
        .I U
        and
       t@@ -106,7 +106,7 @@ $ 9 grep '[α-ζ]' /etc/passwd
        .EE
        .PP
        Start an
       -.IM rc (1)
       +.MR rc (1)
        with the Plan 9 commands in the path before the system commands,
        and then run the Unix
        .IR ls :
       t@@ -124,7 +124,7 @@ $ 9 rc
        .br
        .B \*9/bin/u.rc
        .SH SEE ALSO
       -.IM intro (1)
       +.MR intro (1)
        .SH BUGS
        Some shell configurations
        (notably, oh-my-zsh)
 (DIR) diff --git a/man/man1/9c.1 b/man/man1/9c.1
       t@@ -164,7 +164,7 @@ With
        .BR t ,
        give a long listing of all information about the files,
        somewhat like a listing by
       -.IM ls (1) ,
       +.MR ls (1) ,
        showing
        .br
        .ns
 (DIR) diff --git a/man/man1/9p.1 b/man/man1/9p.1
       t@@ -121,11 +121,11 @@ copy a line from standard input to the file.
        Print errors, but don't give up.
        .B Rdwr
        is useful for interacting with servers like
       -.IM factotum (4) .
       +.MR factotum (4) .
        .TP
        .B ls
        Print a directory listing in the format of
       -.IM ls (1) .
       +.MR ls (1) .
        The
        .B -d
        and
       t@@ -150,12 +150,12 @@ it connects to the Unix domain socket
        .I service
        in the name space directory
        (see
       -.IM intro (4) )
       +.MR intro (4) )
        and then accesses
        .IR subpath .
        .SH EXAMPLE
        To update
       -.IM plumber (4) 's
       +.MR plumber (4) 's
        copy of your plumbing rules after editing
        .BR $HOME/lib/plumbing :
        .IP
       t@@ -164,7 +164,7 @@ cat $HOME/lib/plumbing | 9p write plumb/rules
        .EE
        .PP
        To display the contents of the current
       -.IM acme (4)
       +.MR acme (4)
        window:
        .IP
        .EX
       t@@ -173,6 +173,6 @@ window:
        .SH SOURCE
        .B \*9/src/cmd/9p.c
        .SH SEE ALSO
       -.IM intro (4) ,
       +.MR intro (4) ,
        .IR intro (9p),
       -.IM 9pclient (3)
       +.MR 9pclient (3)
 (DIR) diff --git a/man/man1/9term.1 b/man/man1/9term.1
       t@@ -58,7 +58,7 @@ uses the imported value of
        .B $font
        if set; otherwise it uses the graphics system default.
        (See
       -.IM font (7)
       +.MR font (7)
        for a full discussion of font syntaxes.)
        .PP
        .I 9term
       t@@ -96,7 +96,7 @@ Characters typed on the keyboard replace the selected text;
        if this text is not empty, it is placed in a
        .I snarf buffer
        common to all windows but distinct from that of
       -.IM sam (1) .
       +.MR sam (1) .
        .PP
        Programs access the text in the window at a single point
        maintained automatically by
       t@@ -163,7 +163,7 @@ and erases the character before the word.
        .PP
        An ACK character (control-F) or Insert character triggers file name completion
        for the preceding string (see
       -.IM complete (3) ).
       +.MR complete (3) ).
        .PP
        Text may be moved vertically within the window.
        A scroll bar on the left of the window shows in its clear portion what fragment of the
       t@@ -201,7 +201,7 @@ EOT, so the terminal must be set up with EOT
        as the ``eof'' character.
        .I 9term
        runs
       -.IM stty (1)
       +.MR stty (1)
        to establish this when the terminal is created.
        .PP
        .I 9term
       t@@ -231,13 +231,13 @@ are a few common ones where they fall short.
        First, programs using the GNU readline library typically
        disable terminal echo and perform echoing themselves.
        The most common example is the shell
       -.IM bash (1) .
       +.MR bash (1) .
        Disabling the use of readline with
        .RB `` "set +o emacs" ''
        .RI [ sic ]
        usually restores the desired behavior.
        Second, remote terminal programs such as
       -.IM ssh (1)
       +.MR ssh (1)
        typically run with echo disabled, relying on the
        remote system to echo characters as desired.
        Plan 9's
       t@@ -279,7 +279,7 @@ The
        menu item sends the contents of the selection (not the snarf buffer) to the
        .I plumber
        (see
       -.IM plumb (1) ).
       +.MR plumb (1) ).
        If the selection is empty, it sends the white-space-delimited text
        containing the selection (typing cursor).
        A typical use of this feature is to tell the editor to find the source of an error
       t@@ -323,7 +323,7 @@ Not a
        .IR 9term 
        bug:
        when running
       -.IM bash (1)
       +.MR bash (1)
        in 
        .RB `` "set +o emacs" ''
        mode, its handling of interrupts is broken.
       t@@ -334,4 +334,4 @@ character typed.
        .PP
        Unix makes everything harder.
        .SH SEE ALSO
       -.IM wintext (1)
       +.MR wintext (1)
 (DIR) diff --git a/man/man1/acid.1 b/man/man1/acid.1
       t@@ -70,7 +70,7 @@ at startup; see below.
        .BI -m " machine
        Assume instructions are for the given CPU type
        (see
       -.IM mach (3) )
       +.MR mach (3) )
        instead of using the executable header to select
        the CPU type.
        .TP
       t@@ -145,7 +145,7 @@ subscripts counted from 0.
        .BI delete " list", " subscript
        .PP
        Format codes are the same as in
       -.IM db (1) .
       +.MR db (1) .
        Formats may be attached to (unary) expressions with
        .BR \e ,
        e.g.
       t@@ -230,7 +230,7 @@ Print 10 lines of source around the program address.
        .BI Bsrc( address )
        Get the source line for the program address
        into a window of a running
       -.IM sam (1)
       +.MR sam (1)
        and select it.
        .TP
        .BI line( address )
       t@@ -323,7 +323,7 @@ Make the given process current.
        .TP
        .BI rc( string )
        Escape to the shell,
       -.IM rc (1) ,
       +.MR rc (1) ,
        to execute the command string.
        .TP
        .BI include( string )
       t@@ -449,7 +449,7 @@ notation)
        .BR *array .
        .PP
        Trace the system calls executed by
       -.IM ls (1)
       +.MR ls (1)
        (neither does this one):
        .IP
        .EX
       t@@ -503,8 +503,8 @@ acid: cont()
        .SH SOURCE
        .B \*9/src/cmd/acid
        .SH "SEE ALSO"
       -.IM mk (1) ,
       -.IM db (1)
       +.MR mk (1) ,
       +.MR db (1)
        .br
        Phil Winterbottom,
        ``Acid Manual''.
 (DIR) diff --git a/man/man1/acme.1 b/man/man1/acme.1
       t@@ -45,7 +45,7 @@ The interactive interface uses the keyboard and mouse; external programs
        use a set of files served by
        .IR acme ;
        these are discussed in
       -.IM acme (4) .
       +.MR acme (4) .
        .PP
        Any named
        .I files
       t@@ -86,7 +86,7 @@ The
        option instructs
        .I acme
        to use FUSE (see
       -.IM 9pfuse (4) )
       +.MR 9pfuse (4) )
        to mount itself at
        .IR mtpt .
        (Experimental.)
       t@@ -98,10 +98,10 @@ windows are in two parts: a one-line
        above a multi-line
        .IR body .
        The body typically contains an image of a file, as in
       -.IM sam (1) ,
       +.MR sam (1) ,
        or the output of a
        program, as in an
       -.IM rio (1)
       +.MR rio (1)
        window.
        The tag contains a number of
        blank-separated words, followed by a vertical bar character, followed by anything.
       t@@ -118,9 +118,9 @@ a slash.
        .SS Scrolling
        Each window has a scroll bar to the left of the body.
        The scroll bar behaves much as in
       -.IM sam (1)
       +.MR sam (1)
        or
       -.IM rio (1)
       +.MR rio (1)
        except that scrolling occurs when the button is pressed, rather than released,
        and continues
        as long as the mouse button is held down in the scroll bar.
       t@@ -131,7 +131,7 @@ down the scroll bar speeds up the rate of scrolling.
        .B -r
        reverses the scrolling behavior of buttons 1 and 3, to behave
        more like
       -.IM xterm (1) .)
       +.MR xterm (1) .)
        .SS Layout
        .I Acme
        windows are arranged in columns.  By default, it creates two columns when starting;
       t@@ -164,7 +164,7 @@ pre-loads them with useful commands.
        Also, the tag across the top maintains a list of executing long-running commands.
        .SS Typing
        The behavior of typed text is similar to that in
       -.IM rio (1)
       +.MR rio (1)
        except that the characters are delivered to the tag or body under the mouse; there is no
        `click to type'.
        (The experimental option
       t@@ -172,7 +172,7 @@ except that the characters are delivered to the tag or body under the mouse; the
        causes typing to go to the most recently clicked-at or made window.)
        The usual backspacing conventions apply.
        As in
       -.IM sam (1)
       +.MR sam (1)
        but not
        .IR rio ,
        the ESC key selects the text typed since the last mouse action,
       t@@ -249,7 +249,7 @@ is identified by the context of the command.
        These error windows are created when needed.
        .SS "Mouse button 1
        Mouse button 1 selects text just as in
       -.IM sam (1)
       +.MR sam (1)
        or
        .IR rio (1) ,
        including the usual double-clicking conventions.
       t@@ -305,7 +305,7 @@ by default.
        .TP
        .B Edit
        Treat the argument as a text editing command in the style of
       -.IM sam (1) .
       +.MR sam (1) .
        The full
        .B Sam
        language is implemented except for the commands
       t@@ -379,7 +379,7 @@ With no arguments,
        prints the supplementary list.
        This command is largely superseded by plumbing
        (see
       -.IM plumb (7) ).
       +.MR plumb (7) ).
        .TP
        .B Indent
        Set the autoindent mode according to the argument:
       t@@ -507,7 +507,7 @@ If the text indicated with button 2 is not a recognized built-in, it is executed
        a shell command.  For example, indicating
        .B date
        with button 2 runs
       -.IM date (1) .
       +.MR date (1) .
        The standard
        and error outputs of commands are sent to the error window associated with
        the directory from which the command was run, which will be created if
       t@@ -525,7 +525,7 @@ in a window containing
        executing
        .B mk
        will run
       -.IM mk (1)
       +.MR mk (1)
        in
        .BR /home/rob/sam ,
        producing output in a window labeled
       t@@ -539,12 +539,12 @@ and
        .B $winid
        set to the window's id number
        (see
       -.IM acme (4) ).
       +.MR acme (4) ).
        .PP
        The environment variable
        .B $acmeshell
        determines which shell is used to execute such commands; the
       -.IM rc (1)
       +.MR rc (1)
        shell is used by default.
        .SS "Mouse button 3
        Pointing at text with button 3 instructs
       t@@ -574,7 +574,7 @@ command adds directories to the standard list.)
        .PP
        If the text begins with a colon, it is taken to be an address, in
        the style of
       -.IM sam (1) ,
       +.MR sam (1) ,
        within the body of the window containing the text.
        The address is evaluated, the resulting text highlighted, and the mouse moved to it.
        Thus, in
       t@@ -644,7 +644,7 @@ then execute
        clicking button 1 while 2 is held down.
        .PP
        When an external command (e.g.
       -.IM echo (1) )
       +.MR echo (1) )
        is executed this way, the extra argument is passed as expected and an
        environment variable
        .B $acmeaddr
       t@@ -677,7 +677,7 @@ window and runs a
        (default
        .BR $SHELL )
        in it, turning the window into something analogous to an
       -.IM 9term (1)
       +.MR 9term (1)
        window.
        Executing text in a
        .I win
       t@@ -686,7 +686,7 @@ window with button
        .BR Send .
        .I Win
        windows follow the same scrolling heuristic as in
       -.IM 9term (1) :
       +.MR 9term (1) :
        the window scrolls on output only if the window is displaying the end of the buffer.
        .PP
        .I Awd
       t@@ -774,7 +774,7 @@ MIPS-specific binaries for applications
        .br
        .B \*9/bin/awd
        .SH SEE ALSO
       -.IM acme (4)
       +.MR acme (4)
        .br
        Rob Pike,
        .I
 (DIR) diff --git a/man/man1/acmeevent.1 b/man/man1/acmeevent.1
       t@@ -61,7 +61,7 @@ acmeevent, acme.rc \- shell script support for acme clients
        and
        .I acme.rc
        make it easy to write simple
       -.IM acme (1)
       +.MR acme (1)
        client programs as shell scripts.
        .PP
        .I Acme
       t@@ -69,14 +69,14 @@ clients read the
        .B event
        files 
        (see
       -.IM acme (4) )
       +.MR acme (4) )
        for the windows they control, reacting to the events.
        The events are presented in a format that is easy to read with C programs
        but hard to read with shell scripts.
        .PP
        .I Acmeevent
        reads an
       -.IM acme (4)
       +.MR acme (4)
        event stream from standard input, printing a shell-friendly
        version of the events, one per line, on standard output.
        Each output line from
       t@@ -165,7 +165,7 @@ above);
        below).
        .I Flag
        remains from the
       -.IM acme (4)
       +.MR acme (4)
        event format.
        Because
        .IR eq0 ,
       t@@ -174,7 +174,7 @@ and
        .I chordarg
        are explicit in each event
        (unlike in
       -.IM acme (4)
       +.MR acme (4)
        events),
        .I flag
        can usually be ignored.
       t@@ -221,7 +221,7 @@ window.
        .PP
        .I Acme.rc
        is a library of
       -.IM rc (1)
       +.MR rc (1)
        shell functions useful for writing acme clients.
        .PP
        .I Newwindow
       t@@ -259,14 +259,14 @@ The most commonly-used command is
        .BR clean ,
        which marks the window as clean.
        See
       -.IM acme (4)
       +.MR acme (4)
        for a full list of commands.
        .PP
        .I Windump
        sets the window's dump directory
        and dump command
        (see
       -.IM acme (4) ).
       +.MR acme (4) ).
        If either argument is omitted or is
        .BR - ,
        that argument is not set.
       t@@ -381,9 +381,9 @@ for the full implementation.
        .br
        .B \*9/lib/acme.rc
        .SH SEE ALSO
       -.IM acme (1) ,
       -.IM acme (4) ,
       -.IM rc (1)
       +.MR acme (1) ,
       +.MR acme (4) ,
       +.MR rc (1)
        .SH BUGS
        There is more that could be done to ease the writing
        of complicated clients.
 (DIR) diff --git a/man/man1/ascii.1 b/man/man1/ascii.1
       t@@ -91,7 +91,7 @@ control characters or insert newlines.
        is similar; it converts between
        .SM UTF
        and character values from the Unicode Standard (see
       -.IM utf (7) ).
       +.MR utf (7) ).
        If given a range of hexadecimal numbers,
        .I unicode
        prints a table of the specified Unicode characters \(em their values and
       t@@ -126,7 +126,7 @@ The file
        contains a
        table of characters and descriptions, sorted in hexadecimal order,
        suitable for
       -.IM look (1)
       +.MR look (1)
        on the lower case
        .I hex
        values of characters.
       t@@ -154,7 +154,7 @@ table of characters and descriptions.
        .br
        .B \*9/src/cmd/unicode.c
        .SH "SEE ALSO"
       -.IM look (1) ,
       -.IM tcs (1) ,
       -.IM utf (7) ,
       -.IM font (7)
       +.MR look (1) ,
       +.MR tcs (1) ,
       +.MR utf (7) ,
       +.MR font (7)
 (DIR) diff --git a/man/man1/astro.1 b/man/man1/astro.1
       t@@ -114,7 +114,7 @@ default latitude (N), longitude (W), and elevation (meters)
        .SH SOURCE
        .B \*9/src/cmd/astro
        .SH SEE ALSO
       -.IM scat (1)
       +.MR scat (1)
        .SH BUGS
        The
        .B k
 (DIR) diff --git a/man/man1/awk.1 b/man/man1/awk.1
       t@@ -377,7 +377,7 @@ Patterns are arbitrary Boolean combinations
        of regular expressions and
        relational expressions.
        Regular expressions are as in
       -.IM regexp (7) .
       +.MR regexp (7) .
        Isolated regular expressions
        in a pattern apply to the entire line.
        Regular expressions may also occur in
       t@@ -534,8 +534,8 @@ BEGIN        {        # Simulate echo(1)
        .SH SOURCE
        .B \*9/src/cmd/awk
        .SH SEE ALSO
       -.IM sed (1) ,
       -.IM regexp (7) ,
       +.MR sed (1) ,
       +.MR regexp (7) ,
        .br
        A. V. Aho, B. W. Kernighan, P. J. Weinberger,
        .I
 (DIR) diff --git a/man/man1/bc.1 b/man/man1/bc.1
       t@@ -218,7 +218,7 @@ Assignment to
        .B scale
        influences the number of digits to be retained on arithmetic
        operations in the manner of
       -.IM dc (1) .
       +.MR dc (1) .
        Assignments to
        .B ibase
        or
       t@@ -235,7 +235,7 @@ empty square brackets must follow the array name.
        .PP
        .I Bc
        is actually a preprocessor for
       -.IM dc (1) ,
       +.MR dc (1) ,
        which it invokes automatically, unless the
        .B -c
        (compile only)
       t@@ -273,7 +273,7 @@ mathematical library
        .B \*9/src/cmd/bc.y
        .SH "SEE ALSO"
        .IR dc (1), 
       -.IM hoc (1)
       +.MR hoc (1)
        .SH BUGS
        No
        .LR && ,
 (DIR) diff --git a/man/man1/bundle.1 b/man/man1/bundle.1
       t@@ -7,20 +7,20 @@ bundle \- collect files for distribution
        .SH DESCRIPTION
        .I Bundle
        writes on its standard output a shell script for
       -.IM rc (1)
       +.MR rc (1)
        or a Bourne shell
        which, when executed,
        will recreate the original
        .IR files .
        Its main use is for distributing small numbers of text files by
       -.IM mail (1) .
       +.MR mail (1) .
        .PP
        Although less refined than standard archives from
        .I 9ar
        (see
       -.IM 9c (1) )
       +.MR 9c (1) )
        or
       -.IM tar (1) ,
       +.MR tar (1) ,
        a
        .IR bundle
        file
       t@@ -49,7 +49,7 @@ cd gift; sh horse; mk
        (in
        .IR 9c (1)), 
        .IR tar (1), 
       -.IM mail (1)
       +.MR mail (1)
        .SH BUGS
        .I Bundle
        will not create directories and is unsatisfactory for non-text files.
 (DIR) diff --git a/man/man1/calendar.1 b/man/man1/calendar.1
       t@@ -43,7 +43,7 @@ processing at the end of the week.
        On Friday and Saturday, events through Monday are printed.
        .PP
        To have your calendar mailed to you every day, use
       -.IM cron (8) .
       +.MR cron (8) .
        .SH FILES
        .TF $HOME/lib/calendar
        .TP
 (DIR) diff --git a/man/man1/cat.1 b/man/man1/cat.1
       t@@ -51,7 +51,7 @@ copies to standard output exactly one line from the named
        .IR file ,
        default standard input.
        It is useful in interactive
       -.IM rc (1)
       +.MR rc (1)
        scripts.
        .PP
        The
       t@@ -76,11 +76,11 @@ characters and the characters that precede them.
        It is useful to use as
        .B $PAGER
        with the Unix version of
       -.IM man (1)
       +.MR man (1)
        when run inside a
        .I win
        (see
       -.IM acme (1) )
       +.MR acme (1) )
        window.
        .SH SOURCE
        .B \*9/src/cmd/cat.c
       t@@ -89,7 +89,7 @@ window.
        .br
        .B \*9/bin/nobs
        .SH SEE ALSO
       -.IM cp (1)
       +.MR cp (1)
        .SH DIAGNOSTICS
        .I Read
        exits with status
 (DIR) diff --git a/man/man1/cleanname.1 b/man/man1/cleanname.1
       t@@ -29,4 +29,4 @@ before processing.
        .SH SOURCE
        .B \*9/src/cmd/cleanname.c
        .SH SEE ALSO
       -.IM cleanname (3) .
       +.MR cleanname (3) .
 (DIR) diff --git a/man/man1/col.1 b/man/man1/col.1
       t@@ -14,11 +14,11 @@ and half line feeds (ESC-9 and ESC-8)
        as produced by
        .I nroff
        for .2C in
       -.IM ms (7)
       +.MR ms (7)
        or
       -.IM man (7)
       +.MR man (7)
        and for 
       -.IM tbl (1) .
       +.MR tbl (1) .
        .I Col
        is a pure filter.
        It normally emits only full line feeds;
       t@@ -47,7 +47,7 @@ paginate the output.
        .SH SOURCE
        .B \*9/src/cmd/col.c
        .SH SEE ALSO
       -.IM pr (1)
       +.MR pr (1)
        .SH BUGS
        .I Col
        can't back up more than 128 lines or
 (DIR) diff --git a/man/man1/colors.1 b/man/man1/colors.1
       t@@ -17,13 +17,13 @@ colors, cmapcube \- display color map
        .I Colors
        presents a grid showing the colors in the RGBV color map
        (see
       -.IM color (7) ).
       +.MR color (7) ).
        .PP
        Clicking mouse button 1 over a color in the grid will display the map index for that color,
        its
        red, green, and blue components,
        and the 32-bit hexadecimal color value as defined in
       -.IM allocimage (3) .
       +.MR allocimage (3) .
        If the
        .B -x
        option is specified, the components will also be listed in hexadecimal.
       t@@ -53,4 +53,4 @@ to black or white.
        .SH SOURCE
        .B \*9/src/cmd/draw/colors.c
        .SH SEE ALSO
       -.IM color (7)
       +.MR color (7)
 (DIR) diff --git a/man/man1/comm.1 b/man/man1/comm.1
       t@@ -41,7 +41,7 @@ Print lines common to two sorted files.
        .SH SOURCE
        .B \*9/src/cmd/comm.c
        .SH "SEE ALSO"
       -.IM sort (1) ,
       +.MR sort (1) ,
        .IR cmp (1), 
        .IR diff (1), 
       -.IM uniq (1)
       +.MR uniq (1)
 (DIR) diff --git a/man/man1/core.1 b/man/man1/core.1
       t@@ -35,7 +35,7 @@ The
        command, if run, prints a stack trace of the 
        executing thread at the time of the core dump;
        see
       -.IM db (1) .
       +.MR db (1) .
        .PP
        If no arguments are given,
        .I core
       t@@ -50,6 +50,6 @@ searches the current directory.
        .SH SOURCE
        .B \*9/src/cmd/core.c
        .SH "SEE ALSO
       -.IM acid (1) ,
       -.IM db (1) ,
       -.IM core (5)
       +.MR acid (1) ,
       +.MR db (1) ,
       +.MR core (5)
 (DIR) diff --git a/man/man1/crop.1 b/man/man1/crop.1
       t@@ -53,9 +53,9 @@ crop, iconv \- frame, crop, and convert image
        .SH DESCRIPTION
        .I Crop
        reads an
       -.IM image (7)
       +.MR image (7)
        file (default standard input), crops it, and writes it as a compressed
       -.IM image (7)
       +.MR image (7)
        file to standard output.
        There are two ways to specify a crop, by color value or by geometry.
        They may be combined in a single run of
       t@@ -65,7 +65,7 @@ in which case the color value crop will be done first.
        The
        .B -c
        option takes a red-green-blue triplet as described in
       -.IM color (3) .
       +.MR color (3) .
        (For example, white
        is
        .B 255
       t@@ -118,7 +118,7 @@ changes the format of pixels in the image
        Pixels in the image are converted according to the channel descriptor
        .IR chandesc ,
        (see
       -.IM image (7) ).
       +.MR image (7) ).
        For example, to convert a 4-bit-per-pixel grey-scale image to an 8-bit-per-pixel
        color-mapped image,
        .I chandesc
       t@@ -139,8 +139,8 @@ crop -c 255 255 255 -i -10 -b 255 150 150 imagefile > cropped
        .SH SOURCE
        .B \*9/src/cmd/draw/crop.c
        .SH SEE ALSO
       -.IM image (7) ,
       -.IM color (3)
       +.MR image (7) ,
       +.MR color (3)
        .SH BUGS
        .I Iconv
        should be able to do Floyd-Steinberg error diffusion or dithering
 (DIR) diff --git a/man/man1/date.1 b/man/man1/date.1
       t@@ -28,7 +28,7 @@ epoch, 00:00:00 GMT, January 1, 1970.
        The conversion from Greenwich Mean Time to local time depends on the
        .B $timezone
        environment variable; see
       -.IM ctime (3) .
       +.MR ctime (3) .
        .PP
        If the optional argument
        .I seconds
 (DIR) diff --git a/man/man1/db.1 b/man/man1/db.1
       t@@ -45,11 +45,11 @@ specifies the memory image of a process.
        A 
        .I pid
        gives the id of an executing process to be accessed via
       -.IM ptrace (2) .
       +.MR ptrace (2) .
        A
        .I corefile
        specifies the name of a core dump (see
       -.IM core (5)
       +.MR core (5)
        on your system of choice) containing the
        memory image of a terminated process.
        This manual refers to the memory image specified by
       t@@ -628,7 +628,7 @@ Dot is assigned to the variable or register named.
        .TP
        .B !
        The rest of the line is passed to
       -.IM rc (1)
       +.MR rc (1)
        for execution.
        .TP
        .BI $ modifier
       t@@ -969,8 +969,8 @@ is one the breakpoint will fire.
        Beware that local variables may be stored in registers; see the
        BUGS section.
        .SH "SEE ALSO"
       -.IM acid (1) ,
       -.IM core (1)
       +.MR acid (1) ,
       +.MR core (1)
        .SH SOURCE
        .B \*9/src/cmd/db
        .SH DIAGNOSTICS
 (DIR) diff --git a/man/man1/dc.1 b/man/man1/dc.1
       t@@ -235,8 +235,8 @@ lyx
        .SH SOURCE
        .B \*9/src/cmd/dc.c
        .SH "SEE ALSO"
       -.IM bc (1) ,
       -.IM hoc (1)
       +.MR bc (1) ,
       +.MR hoc (1)
        .SH DIAGNOSTICS
        .I x
        .LR "is unimplemented" ,
 (DIR) diff --git a/man/man1/dd.1 b/man/man1/dd.1
       t@@ -191,7 +191,7 @@ options become a simple file copy.
        .SH SOURCE
        .B \*9/src/cmd/dd.c
        .SH "SEE ALSO"
       -.IM cp (1)
       +.MR cp (1)
        .SH DIAGNOSTICS
        .I Dd
        reports the number of full + partial input and output
 (DIR) diff --git a/man/man1/deroff.1 b/man/man1/deroff.1
       t@@ -16,13 +16,13 @@ reads each file in sequence
        and removes all
        .I nroff
        and
       -.IM troff (1)
       +.MR troff (1)
        requests and non-text arguments, backslash constructions,
        and constructs of preprocessors such as
       -.IM eqn (1) ,
       -.IM pic (1) ,
       +.MR eqn (1) ,
       +.MR pic (1) ,
        and
       -.IM tbl (1) .
       +.MR tbl (1) .
        Remaining text is written on the standard output.
        .I Deroff
        follows files included by
       t@@ -67,7 +67,7 @@ requests.
        Remove titles, attachments, etc., as well as ordinary 
        .IR troff
        constructs, from
       -.IM ms (7)
       +.MR ms (7)
        or
        .I mm
        documents.
       t@@ -84,7 +84,7 @@ does for
        and
        .I latex
        (see
       -.IM tex (1) )
       +.MR tex (1) )
        files what
        .B deroff -wi
        does for
       t@@ -96,8 +96,8 @@ files.
        .B \*9/src/cmd/delatex.lx
        .SH "SEE ALSO"
        .IR troff (1), 
       -.IM tex (1) ,
       -.IM spell (1)
       +.MR tex (1) ,
       +.MR spell (1)
        .SH BUGS
        These filters are not complete interpreters of
        .I troff
 (DIR) diff --git a/man/man1/devdraw.1 b/man/man1/devdraw.1
       t@@ -5,7 +5,7 @@ devdraw \- draw device simulator
        invoked via 
        .I initdraw
        (see
       -.IM graphics (3) )
       +.MR graphics (3) )
        .SH DESCRIPTION
        .I Devdraw
        serves a custom graphics protocol and is the only program
       t@@ -20,9 +20,9 @@ to use all available physical pixels on a retina display.
        .SH SOURCE
        .B \*9/src/cmd/devdraw
        .SH "SEE ALSO
       -.IM draw (3) ,
       -.IM drawfcall (3) ,
       -.IM graphics (3)
       +.MR draw (3) ,
       +.MR drawfcall (3) ,
       +.MR graphics (3)
        .SH BUGS
        .I Devdraw
        should probably present a standard 9P server
 (DIR) diff --git a/man/man1/dial.1 b/man/man1/dial.1
       t@@ -12,7 +12,7 @@ dial \- connect to a remote service
        connects to the network address
        .I addr
        (see
       -.IM dial (3) )
       +.MR dial (3) )
        and then copies data from the connection to standard output,
        and from standard input to the connection.
        .PP
       t@@ -27,4 +27,4 @@ to exit only in response to end of file on the network connection.
        .SH SOURCE
        .B \*9/src/cmd/dial.c
        .SH SEE ALSO
       -.IM dial (3)
       +.MR dial (3)
 (DIR) diff --git a/man/man1/dict.1 b/man/man1/dict.1
       t@@ -53,7 +53,7 @@ Print a pronunciation key.
        .PD
        .PP
        Patterns are regular expressions (see
       -.IM regexp (7) ),
       +.MR regexp (7) ),
        with an implicit leading
        .L ^
        and trailing
       t@@ -154,7 +154,7 @@ searches for dictionaries in the directory named by
        .PP
        .I Adict
        is a dictionary browser for
       -.IM acme (1) .
       +.MR acme (1) .
        When run with no arguments, it creates a new
        .I acme
        window named
       t@@ -193,7 +193,7 @@ window.
        dictionaries
        .PD
        .SH "SEE ALSO"
       -.IM regexp (7)
       +.MR regexp (7)
        .SH SOURCE
        .B \*9/src/cmd/dict
        .br
 (DIR) diff --git a/man/man1/diff.1 b/man/man1/diff.1
       t@@ -19,7 +19,7 @@ two directories are compared by the method of
        .I diff
        for text
        files and
       -.IM cmp (1)
       +.MR cmp (1)
        otherwise.
        If more than two file names are given, then each argument is compared
        to the last argument as above.
       t@@ -140,9 +140,9 @@ differences.
        .SH SOURCE
        .B \*9/src/cmd/diff
        .SH "SEE ALSO"
       -.IM cmp (1) ,
       -.IM comm (1) ,
       -.IM ed (1)
       +.MR cmp (1) ,
       +.MR comm (1) ,
       +.MR ed (1)
        .SH DIAGNOSTICS
        Exit status is the empty string
        for no differences,
 (DIR) diff --git a/man/man1/doctype.1 b/man/man1/doctype.1
       t@@ -17,16 +17,16 @@ doctype \- intuit command line for formatting a document
        .SH DESCRIPTION
        .I Doctype
        examines a
       -.IM troff (1)
       +.MR troff (1)
        input file to deduce the appropriate text formatting command
        and prints it on standard output.
        .I Doctype
        recognizes input for
       -.IM troff (1) ,
       +.MR troff (1) ,
        related preprocessors like
       -.IM eqn (1) ,
       +.MR eqn (1) ,
        and the 
       -.IM ms (7)
       +.MR ms (7)
        and
        .I mm 
        macro packages.
       t@@ -56,8 +56,8 @@ Typeset files named
        .IR eqn (1), 
        .IR tbl (1), 
        .IR pic (1), 
       -.IM grap (1) ,
       -.IM ms (7) ,
       -.IM man (7)
       +.MR grap (1) ,
       +.MR ms (7) ,
       +.MR man (7)
        .SH BUGS
        In true A.I. style, its best guesses are inspired rather than accurate.
 (DIR) diff --git a/man/man1/ed.1 b/man/man1/ed.1
       t@@ -96,7 +96,7 @@ beginning of a line.
        supports the
        .I "regular expression"
        notation described in
       -.IM regexp (7) .
       +.MR regexp (7) .
        Regular expressions are used in addresses to specify
        lines and in one command
        (see
       t@@ -641,7 +641,7 @@ Dot is unchanged.
        Send the remainder of the line after the
        .L !
        to
       -.IM rc (1)
       +.MR rc (1)
        to be interpreted as a command.
        Dot is unchanged.
        .TP
       t@@ -679,9 +679,9 @@ and all characters after the last newline.
        .SH SOURCE
        .B \*9/src/cmd/ed.c
        .SH "SEE ALSO"
       -.IM sam (1) ,
       -.IM sed (1) ,
       -.IM regexp (7)
       +.MR sam (1) ,
       +.MR sed (1) ,
       +.MR regexp (7)
        .SH DIAGNOSTICS
        .BI ? name
        for inaccessible file;
 (DIR) diff --git a/man/man1/eqn.1 b/man/man1/eqn.1
       t@@ -15,7 +15,7 @@ eqn  \- typeset mathematics
        .SH DESCRIPTION
        .I Eqn
        is a
       -.IM troff (1)
       +.MR troff (1)
        preprocessor
        for typesetting mathematics
        on a typesetter.
       t@@ -34,7 +34,7 @@ named in the
        option (default
        .BR -Tutf ;
        see
       -.IM troff (1) ).
       +.MR troff (1) ).
        When run with other preprocessor filters,
        .I eqn
        usually comes last.
       t@@ -299,7 +299,7 @@ Mathematical words like
        .LR cos ,
        .L log
        are made Roman automatically.
       -.IM Troff (1)
       +.MR Troff (1)
        four-character escapes like
        .L \e(lh
        (\(lh) can be used anywhere.
       t@@ -319,7 +319,7 @@ font descriptions for PostScript
        .B \*9/src/cmd/eqn
        .SH "SEE ALSO"
        .IR troff (1), 
       -.IM tbl (1)
       +.MR tbl (1)
        .br
        J. F. Ossanna and B. W. Kernighan,
        ``Troff User's Manual''.
 (DIR) diff --git a/man/man1/freq.1 b/man/man1/freq.1
       t@@ -36,5 +36,5 @@ character, respectively.
        .SH SOURCE
        .B \*9/src/cmd/freq.c
        .SH SEE ALSO
       -.IM utf (7) ,
       -.IM wc (1)
       +.MR utf (7) ,
       +.MR wc (1)
 (DIR) diff --git a/man/man1/git.1 b/man/man1/git.1
       t@@ -55,7 +55,7 @@ current file tree.
        .I Git
        .I diff
        runs Unix's
       -.IM diff (1)
       +.MR diff (1)
        to compare the files in the local tree with the corresponding
        files in the revision history.
        The special revision
 (DIR) diff --git a/man/man1/grap.1 b/man/man1/grap.1
       t@@ -9,7 +9,7 @@ grap \- pic preprocessor for drawing graphs
        .SH DESCRIPTION
        .I Grap
        is a
       -.IM pic (1)
       +.MR pic (1)
        preprocessor for drawing graphs on a typesetter.
        Graphs are surrounded by the
        .I troff
       t@@ -407,7 +407,7 @@ definitions of standard plotting characters, e.g., bullet
        .B \*9/src/cmd/grap
        .SH "SEE ALSO"
        .IR pic (1), 
       -.IM troff (1)
       +.MR troff (1)
        .br
        J. L. Bentley and B. W. Kernighan,
        ``GRAP\(emA Language for Typesetting Graphs'',
 (DIR) diff --git a/man/man1/graph.1 b/man/man1/graph.1
       t@@ -89,7 +89,7 @@ The next argument is
        Next argument is one or more of the characters
        .B bcgkmrwy,
        choosing pen colors by their initial letter, as in
       -.IM plot (7) .
       +.MR plot (7) .
        Successive curves will cycle through the colors in the given order.
        .TP
        .B  -s
       t@@ -145,7 +145,7 @@ is reversed.
        .B \*9/src/cmd/graph
        .SH "SEE ALSO"
        .IR plot (1), 
       -.IM grap (1)
       +.MR grap (1)
        .SH BUGS
        Segments that run out of bounds are dropped, not windowed.
        Logarithmic axes may not be reversed.
 (DIR) diff --git a/man/man1/grep.1 b/man/man1/grep.1
       t@@ -27,7 +27,7 @@ searches the input
        for lines that match the
        .IR pattern ,
        a regular expression as defined in
       -.IM regexp (7)
       +.MR regexp (7)
        with the addition of a newline character as an alternative
        (substitute for
        .BR | )
       t@@ -114,11 +114,11 @@ If no files are listed, it searches all files matching
        .br
        .B \*9/bin/g
        .SH SEE ALSO
       -.IM ed (1) ,
       -.IM awk (1) ,
       -.IM sed (1) ,
       -.IM sam (1) ,
       -.IM regexp (7)
       +.MR ed (1) ,
       +.MR awk (1) ,
       +.MR sed (1) ,
       +.MR sam (1) ,
       +.MR regexp (7)
        .SH DIAGNOSTICS
        Exit status is null if any lines are selected,
        or non-null when no lines are selected or an error occurs.
 (DIR) diff --git a/man/man1/gview.1 b/man/man1/gview.1
       t@@ -144,7 +144,7 @@ awk 'BEGIN{for(x=.1;x<500;x+=.1)print x,sin(x)/x}' | gview
        .SH SOURCE
        .B \*9/src/cmd/draw/gview.c
        .SH SEE ALSO
       -.IM awk (1)
       +.MR awk (1)
        .SH BUGS
        The user interface for the
        .I slant
 (DIR) diff --git a/man/man1/gzip.1 b/man/man1/gzip.1
       t@@ -150,8 +150,8 @@ Produce debugging output.
        .br
        .B \*9/src/cmd/bzip2
        .SH SEE ALSO
       -.IM tar (1) ,
       -.IM compress (1)
       +.MR tar (1) ,
       +.MR compress (1)
        .SH BUGS
        .I Unzip
        can only extract files which are uncompressed or compressed
 (DIR) diff --git a/man/man1/hist.1 b/man/man1/hist.1
       t@@ -41,7 +41,7 @@ option enables verbose debugging printout.
        The 
        .B -d
        option causes
       -.IM diff (1)
       +.MR diff (1)
        .B -c
        to be run for each adjacent pair of dump files, while
        .B -b
       t@@ -73,11 +73,11 @@ by convention, root of dump file system
        .SH SOURCE
        .B \*9/src/cmd/hist.c
        .SH SEE ALSO
       -.IM yesterday (1) ,
       -.IM vbackup (8)
       +.MR yesterday (1) ,
       +.MR vbackup (8)
        .SH BUGS
        Should be called
        .IR history ,
        but
        that name is taken by
       -.IM sh (1) .
       +.MR sh (1) .
 (DIR) diff --git a/man/man1/hoc.1 b/man/man1/hoc.1
       t@@ -133,8 +133,8 @@ for(i=1; i<12; i++) print gcd(i,12)
        .SH SOURCE
        .B \*9/src/cmd/hoc
        .SH "SEE ALSO"
       -.IM bc (1) ,
       -.IM dc (1)
       +.MR bc (1) ,
       +.MR dc (1)
        .br
        B. W. Kernighan and R. Pike,
        .I
 (DIR) diff --git a/man/man1/htmlroff.1 b/man/man1/htmlroff.1
       t@@ -21,7 +21,7 @@ htmlroff \- HTML formatting and typesetting
        .SH DESCRIPTION
        .I Htmlroff
        accepts
       -.IM troff (1)
       +.MR troff (1)
        input in the named 
        .I files
        and formats it as HTML for viewing in a web browser.
       t@@ -63,7 +63,7 @@ HTML entity sequences
        and so on).
        .I Htmlroff
        invokes
       -.IM tcs (1)
       +.MR tcs (1)
        for the conversion.
        .TP
        .B -v
       t@@ -73,7 +73,7 @@ Generate debugging output and warnings about suspicious input.
        Most 
        .I troff
        input files, especially those using the
       -.IM ms (7)
       +.MR ms (7)
        macros, can be used unaltered.
        In general, the macro file
        .B tmac.html
       t@@ -83,10 +83,10 @@ as in
        .B -ms
        .BR -mhtml .
        .PP
       -.IM Htmlroff (7)
       +.MR Htmlroff (7)
        describes the changes to the input language.
        .PP
       -.IM Mhtml (7)
       +.MR Mhtml (7)
        describes the new macros.
        .SH EXAMPLES
        Format the Plan 9 web page:
       t@@ -113,7 +113,7 @@ to Unicode characters like α.
        .SH SOURCE
        .B \*9/src/cmd/htmlroff
        .SH "SEE ALSO
       -.IM tcs (1) ,
       -.IM troff (1) ,
       -.IM htmlroff (7) ,
       -.IM mhtml (7)
       +.MR tcs (1) ,
       +.MR troff (1) ,
       +.MR htmlroff (7) ,
       +.MR mhtml (7)
 (DIR) diff --git a/man/man1/idiff.1 b/man/man1/idiff.1
       t@@ -50,7 +50,7 @@ and prompt again.
        .PP
        .I Idiff
        invokes
       -.IM diff (1)
       +.MR diff (1)
        to compare the files.
        The
        .B -b
       t@@ -66,7 +66,7 @@ passed to
        .SH SOURCE
        .B \*9/src/cmd/idiff.c
        .SH "SEE ALSO
       -.IM diff (1)
       +.MR diff (1)
        .br
        Kernighan and Pike,
        .IR "The Unix Programming Environment" ,
 (DIR) diff --git a/man/man1/install.1 b/man/man1/install.1
       t@@ -15,7 +15,7 @@ cd \*9; ./INSTALL
        .SH DESCRIPTION
        To obtain the Plan 9 tree, use Git
        (see
       -.IM git (1) )
       +.MR git (1) )
        or download a tar file from
        .HR https://9fans.github.io/plan9port "" .
        .PP
       t@@ -25,7 +25,7 @@ usual place is
        In the root of the tree, run
        .BR ./INSTALL .
        This script builds the Plan 9 build program
       -.IM mk (1)
       +.MR mk (1)
        if necessary,
        cleans all previously built object files and libraries out of the tree,
        rebuilds and installs everything, and then cleans up.
       t@@ -109,7 +109,7 @@ can safely be repeated to rebuild the system from scratch.
        .PP
        Once the system is built for the first time,
        it can be maintained and rebuilt using
       -.IM mk (1) .
       +.MR mk (1) .
        To rebuild individual commands or libraries,
        run
        .B mk
       t@@ -119,7 +119,7 @@ and
        .B clean
        in the appropriate source directory
        (see
       -.IM src (1) ).
       +.MR src (1) ).
        .SH FILES
        .TP
        .B \*9/lib/moveplan9.files
       t@@ -132,7 +132,7 @@ the script that edits the files
        .TP
        .B \*9/src/mkmk.sh
        the shell script used to build
       -.IM mk (1)
       +.MR mk (1)
        .TP
        .B \*9/dist/manweb
        the shell script that builds the HTML manual
       t@@ -148,5 +148,5 @@ logged output from the last run of
        a summary of
        .B install.log
        .SH SEE ALSO
       -.IM intro (1) ,
       -.IM git (1)
       +.MR intro (1) ,
       +.MR git (1)
 (DIR) diff --git a/man/man1/join.1 b/man/man1/join.1
       t@@ -114,7 +114,7 @@ birthdays empty.
        The layout of 
        .B /adm/users
        is given in
       -.IM passwd (5) ;
       +.MR passwd (5) ;
        .B bdays
        contains sorted lines like
        .LR "ken:Feb\ 4,\ 1953" .
       t@@ -132,7 +132,7 @@ Print all pairs of users with identical userids.
        .SH "SEE ALSO"
        .IR sort (1), 
        .IR comm (1), 
       -.IM awk (1)
       +.MR awk (1)
        .SH BUGS
        With default field separation,
        the collating sequence is that of
 (DIR) diff --git a/man/man1/jpg.1 b/man/man1/jpg.1
       t@@ -122,7 +122,7 @@ Typing a
        .BR q ,
        DEL, or control-D exits the program.
        For a more user-friendly interface, use
       -.IM page (1) ,
       +.MR page (1) ,
        which invokes these programs to convert the images to standard format,
        displays them, and offers scrolling, panning, and menu-driven navigation among the files.
        .PP
       t@@ -147,7 +147,7 @@ any of the following options:
        .TP
        .B -c
        Convert the image to a Plan 9 representation, as defined by
       -.IM image (7) ,
       +.MR image (7) ,
        and write it to standard output.
        .TP
        .B -9
       t@@ -156,7 +156,7 @@ Like
        but produce an uncompressed image.
        This saves processing time, particularly when the output is
        being piped to another program such as
       -.IM page (1) ,
       +.MR page (1) ,
        since it avoids compression and decompression.
        .TP
        .B -t
       t@@ -235,8 +235,8 @@ space in the image.  The icon file is written to standard output.
        .SH SOURCE
        .B \*9/src/cmd/jpg
        .SH "SEE ALSO"
       -.IM page (1) ,
       -.IM image (7) .
       +.MR page (1) ,
       +.MR image (7) .
        .SH BUGS
        Writing an animated GIF using
        .I togif
 (DIR) diff --git a/man/man1/kill.1 b/man/man1/kill.1
       t@@ -19,18 +19,18 @@ prints commands that will cause all processes with
        .I name
        and owned by the current user to be terminated.
        Each command is commented with an output line from
       -.IM ps (1)
       +.MR ps (1)
        describing the process that would be killed.
        Use the
        .B send
        command of
       -.IM 9term (1) ,
       +.MR 9term (1) ,
        or pipe the output of
        .I kill
        into
       -.IM rc (1)
       +.MR rc (1)
        or
       -.IM sh (1)
       +.MR sh (1)
        to execute the commands.
        .PP
        .I Kill
       t@@ -60,8 +60,8 @@ signal.
        .SH SOURCE
        .B \*9/bin
        .SH "SEE ALSO"
       -.IM ps (1) ,
       -.IM notify (3)
       +.MR ps (1) ,
       +.MR notify (3)
        .SH BUGS
        .I Stop
        and
 (DIR) diff --git a/man/man1/label.1 b/man/man1/label.1
       t@@ -14,12 +14,12 @@ label, awd \- set window label
        sets the label of the current 
        .I win
        (see
       -.IM acme (1) )
       +.MR acme (1) )
        or X terminal window
        .RI ( e.g.,
       -.IM 9term (1)
       +.MR 9term (1)
        or
       -.IM xterm (1) )
       +.MR xterm (1) )
        by echoing a special control sequence to standard output.
        .PP
        .I Acme
       t@@ -38,7 +38,7 @@ sets the window name to the current directory with a
        suffix, using the name of the current system by default.
        .SH EXAMPLE
        One can use the following
       -.IM sh (1)
       +.MR sh (1)
        function to keep the label up-to-date in response to
        .I cd
        commands:
       t@@ -55,7 +55,7 @@ alias cd=_cd
        cd .
        .EE
        .PP
       -.IM Rc (1)
       +.MR Rc (1)
        installs a similar 
        .B fn
        .B cd
       t@@ -77,4 +77,4 @@ fn cd {
        .SH BUGS
        .I Awd
        is also documented in
       -.IM acme (1) .
       +.MR acme (1) .
 (DIR) diff --git a/man/man1/lex.1 b/man/man1/lex.1
       t@@ -65,7 +65,7 @@ output
        template
        .SH "SEE ALSO"
        .IR yacc (1), 
       -.IM sed (1)
       +.MR sed (1)
        .br
        M. E. Lesk and E. Schmidt,
        `LEX\(emLexical Analyzer Generator', 
 (DIR) diff --git a/man/man1/look.1 b/man/man1/look.1
       t@@ -74,7 +74,7 @@ is assumed, with collating sequence
        .B \*9/src/cmd/look.c
        .SH "SEE ALSO"
        .IR sort (1), 
       -.IM grep (1)
       +.MR grep (1)
        .SH DIAGNOSTICS
        The exit status is
        .RB `` "not found" ''
 (DIR) diff --git a/man/man1/ls.1 b/man/man1/ls.1
       t@@ -29,7 +29,7 @@ is the same as
        but sets the
        .B -p
        option and pipes the output through
       -.IM mc (1) .
       +.MR mc (1) .
        .PP
        There are a number of options:
        .TP
       t@@ -42,7 +42,7 @@ List in long format, giving mode (see below), file system type
        (e.g., for devices, the
        .B #
        code letter that names it; see
       -.IM intro (3) ),
       +.MR intro (3) ),
        the instance or subdevice number, owner, group,
        size in bytes, and time of last modification
        for each file.
       t@@ -60,7 +60,7 @@ Print only the final path element of each file name.
        List the
        .I qid
        (see
       -.IM stat (3) )
       +.MR stat (3) )
        of each file; the printed fields are in the order
        path, version, and type.
        .TP
       t@@ -99,7 +99,7 @@ otherwise.
        .TP
        .B -Q
        By default, printed file names are quoted if they contain characters special to
       -.IM rc (1) .
       +.MR rc (1) .
        The
        .B -Q
        flag disables this behavior.
       t@@ -168,5 +168,5 @@ if none of the above permissions is granted.
        .br
        .B \*9/bin/lc
        .SH SEE ALSO
       -.IM stat (3) ,
       -.IM mc (1)
       +.MR stat (3) ,
       +.MR mc (1)
 (DIR) diff --git a/man/man1/man.1 b/man/man1/man.1
       t@@ -45,7 +45,7 @@ The options are:
        .TP
        .B -h
        Print the pages to HTML and send to a web browser with
       -.IM web (1) .
       +.MR web (1) .
        .TP
        .B -n
        (Default)
       t@@ -54,17 +54,17 @@ Print the pages on the standard output using
        .TP
        .B -p
        Run
       -.IM proof (1)
       +.MR proof (1)
        on the specified man pages.
        .TP
        .B -P
        Run
       -.IM page (1)
       +.MR page (1)
        on the specified man pages.
        .TP
        .B -t
        Run
       -.IM troff (1)
       +.MR troff (1)
        and send its output
        to standard output.
        .TP
       t@@ -106,8 +106,8 @@ index for
        .br
        .B \*9/bin/lookman
        .SH "SEE ALSO"
       -.IM page (1) ,
       -.IM proof (1)
       +.MR page (1) ,
       +.MR proof (1)
        .SH BUGS
        The manual was intended to be typeset; some detail is sacrificed on text terminals.
        .PP
 (DIR) diff --git a/man/man1/map.1 b/man/man1/map.1
       t@@ -305,7 +305,7 @@ tracks appear as dot-dashed lines if the plotting filter supports them.)
        The
        .I file
        contains 
       -.IM plot (7) -style
       +.MR plot (7) -style
        data for
        .L :
        or
       t@@ -640,7 +640,7 @@ Map driver program
        .B \*9/src/cmd/map
        .SH "SEE ALSO"
        .IR map (7), 
       -.IM plot (1)
       +.MR plot (1)
        .SH DIAGNOSTICS
        `Map seems to be empty'\(ema coarse survey found
        zero extent within the 
 (DIR) diff --git a/man/man1/mc.1 b/man/man1/mc.1
       t@@ -18,10 +18,10 @@ splits the input into as many columns as will fit in
        .I N
        print positions.
        If run in a
       -.IM 9term (1) ,
       -.IM xterm (1) ,
       +.MR 9term (1) ,
       +.MR xterm (1) ,
        or
       -.IM acme (1)
       +.MR acme (1)
        window, the default
        .I N
        is the number of blanks that will fit across the window;
       t@@ -36,14 +36,14 @@ is printed separately.
        .SH SOURCE
        .B \*9/src/cmd/draw/mc.c
        .SH "SEE ALSO"
       -.IM 9term (1) ,
       -.IM acme (1) ,
       -.IM acme (4) ,
       -.IM xterm (1) ,
       -.IM pr (1) ,
       +.MR 9term (1) ,
       +.MR acme (1) ,
       +.MR acme (4) ,
       +.MR xterm (1) ,
       +.MR pr (1) ,
        .I lc
        in
       -.IM ls (1)
       +.MR ls (1)
        .SH BUGS
        On systems with high-DPI screens,
        .I 9term
 (DIR) diff --git a/man/man1/mk.1 b/man/man1/mk.1
       t@@ -29,7 +29,7 @@ contains a
        .I rule
        for each target that identifies the files and other
        targets upon which it depends and an
       -.IM sh (1)
       +.MR sh (1)
        script, a
        .IR recipe ,
        to update the target.
       t@@ -157,7 +157,7 @@ In the recipe of a meta-rule, the environment variable
        contains the string matched by the
        .BR % .
        For example, a meta-rule to compile a C program using
       -.IM 9c (1)
       +.MR 9c (1)
        might be:
        .IP
        .EX
       t@@ -207,7 +207,7 @@ References to variables are replaced by the variables' values.
        Special characters may be quoted using single quotes
        .BR \&''
        as in
       -.IM sh (1) .
       +.MR sh (1) .
        .PP
        Assignments and rules are distinguished by
        the first unquoted occurrence of
       t@@ -246,7 +246,7 @@ A legal reference of the form
        or
        .B ${name}
        is expanded as in
       -.IM sh (1) .
       +.MR sh (1) .
        A reference of the form
        .BI ${name: A % B = C\fL%\fID\fL}\fR,
        where
       t@@ -315,9 +315,9 @@ or
        .BR rcsh ,
        .I mk
        uses
       -.IM rc (1) 's
       +.MR rc (1) 's
        quoting rules; otherwise it uses
       -.IM sh (1) 's.
       +.MR sh (1) 's.
        The
        .B MKSHELL
        variable is consulted when the mkfile is read, not when it is executed,
       t@@ -523,7 +523,7 @@ of the aggregate
        Currently, the only aggregates supported are
        .I 9ar
        (see
       -.IM 9c (1) )
       +.MR 9c (1) )
        archives.
        .SS Attributes
        The colon separating the target from the prerequisites
       t@@ -567,12 +567,12 @@ In the rule,
        .B %
        has no special meaning.
        The target is interpreted as a regular expression as defined in
       -.IM regexp (7) .
       +.MR regexp (7) .
        The prerequisites may contain references
        to subexpressions in form
        .BI \e n\f1,
        as in the substitute command of
       -.IM sed (1) .
       +.MR sed (1) .
        .TP
        .B U
        The targets are considered to have been updated
       t@@ -625,7 +625,7 @@ Regular expression meta-rules:
        .EE
        .PP
        A correct way to deal with
       -.IM yacc (1)
       +.MR yacc (1)
        grammars.
        The file
        .B lex.c
       t@@ -656,8 +656,8 @@ x.tab.h:Pcmp -s:        y.tab.h
        .SH SOURCE
        .B \*9/src/cmd/mk
        .SH SEE ALSO
       -.IM sh (1) ,
       -.IM regexp (7)
       +.MR sh (1) ,
       +.MR regexp (7)
        .PP
        A. Hume,
        ``Mk: a Successor to Make''
 (DIR) diff --git a/man/man1/mk9660.1 b/man/man1/mk9660.1
       t@@ -71,7 +71,7 @@ the current directory).
        The
        .I proto
        file is formatted as described in
       -.IM proto (3) .
       +.MR proto (3) .
        .PP
        The created CD image will be in ISO-9660
        format, but by default the file names will
       t@@ -224,7 +224,7 @@ mk9660 -9cj -s /n/bootes -p srcproto cdimage
        .SH SOURCE
        \*9/src/cmd/9660
        .SH "SEE ALSO
       -.IM proto (3)
       +.MR proto (3)
        .\" .SH "SEE ALSO"
        .\" .I 9660srv
        .\" (in
 (DIR) diff --git a/man/man1/mkdir.1 b/man/man1/mkdir.1
       t@@ -28,11 +28,11 @@ The
        flag sets the permissions to be used when creating the directory.
        The default is 0777.
        .SH "SEE ALSO"
       -.IM rm (1)
       +.MR rm (1)
        .br
        .IR cd
        in
       -.IM rc (1)
       +.MR rc (1)
        .SH SOURCE
        .B \*9/src/cmd/mkdir.c
        .SH DIAGNOSTICS
 (DIR) diff --git a/man/man1/mount.1 b/man/man1/mount.1
       t@@ -15,7 +15,7 @@ mounts a 9P server's files into the file system.
        is typically 
        either the name of a Unix domain socket
        (see
       -.IM namespace (1) )
       +.MR namespace (1) )
        or the name or IP address of a machine
        serving 9P over TCP port 564.
        .PP
       t@@ -29,7 +29,7 @@ On Linux,
        .I mount
        uses the native 9P kernel module when present.
        Otherwise it tries to use
       -.IM 9pfuse (4)
       +.MR 9pfuse (4)
        with the FUSE file system module.
        Using the 9P kernel module requires root access.
        FUSE can often be used by regular users.
       t@@ -45,7 +45,7 @@ should be invoked as
        .BR mount .
        .SH EXAMPLES
        Mount 
       -.IM acme (4)
       +.MR acme (4)
        onto 
        .B /mnt/acme :
        .IP
       t@@ -64,6 +64,6 @@ cat /mnt/plumb/rules
        .br
        .B \*9/bin/unmount
        .SH SEE ALSO
       -.IM intro (4) ,
       +.MR intro (4) ,
        .IR intro (9p),
       -.IM 9pfuse (4)
       +.MR 9pfuse (4)
 (DIR) diff --git a/man/man1/namespace.1 b/man/man1/namespace.1
       t@@ -7,9 +7,9 @@ namespace \- print name space directory
        .I Namespace
        prints the directory representing the current name space.
        See
       -.IM intro (4) .
       +.MR intro (4) .
        .SH SOURCE
        .B \*9/src/cmd/namespace.c
        .SH SEE ALSO
       -.IM getns (3) ,
       -.IM intro (4)
       +.MR getns (3) ,
       +.MR intro (4)
 (DIR) diff --git a/man/man1/ndb.1 b/man/man1/ndb.1
       t@@ -24,9 +24,9 @@ ndbquery, ndbmkhash, ndbmkdb, ndbipquery, ndbmkhosts \- network database
        The network database holds administrative information used by
        .I authdial
        (see
       -.IM authsrv (3) )
       +.MR authsrv (3) )
        and
       -.IM secstored (1) .
       +.MR secstored (1) .
        .PP
        .I Ndbquery 
        searches the database for an attribute of type
       t@@ -46,7 +46,7 @@ of all the matched entries is returned.
        uses
        .I ndbipinfo
        (see
       -.IM ndb (3) )
       +.MR ndb (3) )
        to search for the values of the attributes
        .I rattr
        corresponding to the system
       t@@ -382,7 +382,7 @@ and by the ndb library routines.
        .PP
        .I Ndbmkdb
        is used in concert with
       -.IM awk (1)
       +.MR awk (1)
        scripts to convert
        uucp systems files and IP host files
        into database files.
       t@@ -395,7 +395,7 @@ it is necessary to run
        .I ndbmkhash
        whenever the files are modified.
        It may be profitable to control this by a frequent
       -.IM cron (8)
       +.MR cron (8)
        job.
        .PP
        .I Ndbmkhosts
       t@@ -439,5 +439,5 @@ hash files for
        .SH SOURCE
        .B \*9/src/cmd/ndb
        .SH SEE ALSO
       -.IM ndb (3) ,
       -.IM ndb (7)
       +.MR ndb (3) ,
       +.MR ndb (7)
 (DIR) diff --git a/man/man1/netfiles.1 b/man/man1/netfiles.1
       t@@ -21,7 +21,7 @@ Netfiles, netfileget, netfileput, netfilestat \- network file access inside acme
        .SH DESCRIPTION
        .B Netfiles
        presents remote file systems in
       -.IM acme (4)
       +.MR acme (4)
        windows.
        Each window is named
        .BI /n/ system / path
       t@@ -35,7 +35,7 @@ reads names of windows to create from the
        plumbing channel
        .B netfileedit
        (see
       -.IM plumber (4)
       +.MR plumber (4)
        and the example section below).
        In a
        .IR netfiles -controlled
       t@@ -60,13 +60,13 @@ The three first check to see if
        .I system
        is a service in the current name space
        (see
       -.IM intro (4) ).
       +.MR intro (4) ).
        If so, they use
       -.IM 9p (1)
       +.MR 9p (1)
        to access it.
        Otherwise, they assume that the system is a network name
        and use
       -.IM ssh (1) 's
       +.MR ssh (1) 's
        .I sftp
        to access it.
        .PP
       t@@ -100,7 +100,7 @@ or
        .SH EXAMPLES
        The following plumbing rule 
        (see
       -.IM plumb (7) )
       +.MR plumb (7) )
        passes 
        .B /n/
        paths to 
       t@@ -118,17 +118,17 @@ plumb client Netfiles
        .SH SOURCE
        .B \*9/src/cmd/netfiles
        .SH SEE ALSO
       -.IM 9p (1) ,
       -.IM ssh (1) ,
       -.IM ssh-agent (1) ,
       -.IM intro (4) ,
       -.IM acme (4) ,
       -.IM factotum (4) ,
       +.MR 9p (1) ,
       +.MR ssh (1) ,
       +.MR ssh-agent (1) ,
       +.MR intro (4) ,
       +.MR acme (4) ,
       +.MR factotum (4) ,
        .HR http://v9fs.sf.net
        .SH BUGS
        .I Netfiles
        depends on
       -.IM sftpcache (1) ,
       +.MR sftpcache (1) ,
        which only works with OpenSSH versions 4.3 and earlier;
        later versions do not print the
        .B sftp>
 (DIR) diff --git a/man/man1/page.1 b/man/man1/page.1
       t@@ -25,7 +25,7 @@ of a
        PostScript,
        PDF,
        or
       -.IM troff (1)
       +.MR troff (1)
        or
        Unix's
        .IR tex (1)
       t@@ -41,7 +41,7 @@ graphics files
        FAX
        page,
        a Plan 9
       -.IM image (7)
       +.MR image (7)
        file, an Inferno bitmap file, or other common format).
        .I Page
        displays these
       t@@ -108,7 +108,7 @@ it listens to the
        .B image
        plumbing channel
        (see
       -.IM plumber (4) )
       +.MR plumber (4) )
        for more images to display.
        The
        .B -i
       t@@ -194,7 +194,7 @@ reverses the order in which pages are displayed.
        Typing a
        .B w
        will write the currently viewed page to a new file as a compressed
       -.IM image (7)
       +.MR image (7)
        file.
        When possible, the filename is of the form
        .IR basename . pagenum . bit .
       t@@ -217,7 +217,7 @@ and
        PDF
        .IR files .
        It also calls a variety of conversion programs, such as those described in
       -.IM jpg (1) ,
       +.MR jpg (1) ,
        to convert the various raster graphics formats
        into Inferno bitmap files.
        Pages are converted ``on the fly,'' as needed.
       t@@ -235,11 +235,11 @@ Browse the Inferno bitmap library.
        man -t page | page -w
        Preview this manual in a new window.
        .SH "SEE ALSO
       -.IM gs (1) ,
       -.IM jpg (1) ,
       -.IM proof (1) ,
       -.IM tex (1) ,
       -.IM troff (1)
       +.MR gs (1) ,
       +.MR jpg (1) ,
       +.MR proof (1) ,
       +.MR tex (1) ,
       +.MR troff (1)
        .SH SOURCE
        .B \*9/src/cmd/page
        .SH DIAGNOSTICS
       t@@ -277,7 +277,7 @@ There are too many keyboard commands and menu items.
        Displaying a PostScript or PDF file depends both on having
        GhostScript
        (see
       -.IM gs (1) )
       +.MR gs (1) )
        installed and on the underlying operating system
        providing a file descriptor device tree at
        .BR /dev/fd .
 (DIR) diff --git a/man/man1/paint.1 b/man/man1/paint.1
       t@@ -19,7 +19,7 @@ If the optional
        argument is specified, then it is read and used as the canvas.
        .I Paint
        only recognizes Plan 9 bitmap format (see
       -.IM image (6) ).
       +.MR image (6) ).
        .PP
        A number of immediate keyboard commands are recognized:
        .TP
       t@@ -74,12 +74,12 @@ Quits the program.
        .SH SOURCE
        .B /sys/src/cmd/paint.c
        .SH "SEE ALSO"
       -.IM resample (1) ,
       -.IM rotate (1) ,
       -.IM crop (1) ,
       -.IM jpg (1) ,
       -.IM page (1) ,
       -.IM image (6)
       +.MR resample (1) ,
       +.MR rotate (1) ,
       +.MR crop (1) ,
       +.MR jpg (1) ,
       +.MR page (1) ,
       +.MR image (6)
        .SH HISTORY
        .I Paint
        first appeared in 9front (October, 2011).
 (DIR) diff --git a/man/man1/passwd.1 b/man/man1/passwd.1
       t@@ -36,7 +36,7 @@ It is a substitute for a SecureNet box.
        .br
        .B \*9/src/cmd/auth/passwd.c
        .SH "SEE ALSO"
       -.IM encrypt (3)
       +.MR encrypt (3)
        .PP
        Robert Morris and Ken Thompson,
        ``UNIX Password Security,''
 (DIR) diff --git a/man/man1/pem.1 b/man/man1/pem.1
       t@@ -20,7 +20,7 @@ Privacy Enhanced Mail program but now commonly used for
        other applications, notably TLS.
        PEM encodes data in base 64
        (see
       -.IM encode (3) )
       +.MR encode (3) )
        between lines of the form:
        .IP
        .EX
       t@@ -33,7 +33,7 @@ where
        may be any string describing the encoded data.
        The most common use of PEM format on Plan 9 is for encoding
        X.509 certificates; see
       -.IM rsa (1) .
       +.MR rsa (1) .
        .PP
        .I Pemdecode
        extracts the named
       t@@ -62,4 +62,4 @@ hello world
        .SH SOURCE
        .B \*9/src/cmd/auth
        .SH "SEE ALSO
       -.IM rsa (1)
       +.MR rsa (1)
 (DIR) diff --git a/man/man1/pic.1 b/man/man1/pic.1
       t@@ -31,7 +31,7 @@ pic, tpic, svgpic \- troff and tex preprocessors for drawing pictures
        .SH DESCRIPTION
        .I Pic
        is a
       -.IM troff (1)
       +.MR troff (1)
        preprocessor for drawing figures on a typesetter.
        .I Pic
        code is contained between
       t@@ -300,7 +300,7 @@ statement removes the definition of a macro.
        .PP
        .I Tpic
        is a
       -.IM tex (1)
       +.MR tex (1)
        preprocessor that accepts
        .IR pic
        language.
       t@@ -345,8 +345,8 @@ A: ellipse
        .B \*9/src/cmd/pic
        .SH "SEE ALSO"
        .IR grap (1), 
       -.IM doctype (1) ,
       -.IM troff (1)
       +.MR doctype (1) ,
       +.MR troff (1)
        .br
        B. W. Kernighan,
        ``PIC\(ema Graphics Language for Typesetting'',
 (DIR) diff --git a/man/man1/plot.1 b/man/man1/plot.1
       t@@ -14,7 +14,7 @@ from the
        .I files
        or standard input,
        drawing the results in a newly created
       -.IM rio (1)
       +.MR rio (1)
        window.
        Plot persists until a newline is typed in the window.
        Various options may be interspersed with the
       t@@ -31,7 +31,7 @@ Erase the screen.
        .TP
        .BI -c " col"
        Set the foreground color (see
       -.IM plot (7)
       +.MR plot (7)
        for color names).
        .TP
        .BI -f " fill"
       t@@ -57,5 +57,5 @@ middle of the screen.
        .SH SOURCE
        .B \*9/src/cmd/plot
        .SH "SEE ALSO"
       -.IM rio (1) ,
       -.IM plot (7)
       +.MR rio (1) ,
       +.MR plot (7)
 (DIR) diff --git a/man/man1/plumb.1 b/man/man1/plumb.1
       t@@ -83,6 +83,6 @@ default rules file
        .SH SOURCE
        .B \*9/src/cmd/plumb
        .SH "SEE ALSO"
       -.IM plumb (3) ,
       -.IM plumber (4) ,
       -.IM plumb (7)
       +.MR plumb (3) ,
       +.MR plumber (4) ,
       +.MR plumb (7)
 (DIR) diff --git a/man/man1/pr.1 b/man/man1/pr.1
       t@@ -106,5 +106,5 @@ characters instead of the default 72.
        .SH SOURCE
        .B \*9/src/cmd/pr.c
        .SH "SEE ALSO"
       -.IM cat (1) ,
       -.IM lp (1)
       +.MR cat (1) ,
       +.MR lp (1)
 (DIR) diff --git a/man/man1/proof.1 b/man/man1/proof.1
       t@@ -22,7 +22,7 @@ proof \- troff output interpreter
        .SH DESCRIPTION
        .I Proof
        reads
       -.IM troff (1)
       +.MR troff (1)
        intermediate language from
        .I file
        or standard input
       t@@ -126,8 +126,8 @@ into screen fonts and character numbers
        .B \*9/src/cmd/proof
        .SH SEE ALSO
        .IR lp (1), 
       -.IM gs (1) ,
       -.IM page (1)
       +.MR gs (1) ,
       +.MR page (1)
        .br
        J. F. Ossanna and B. W. Kernighan,
        ``Troff User's Manual''
 (DIR) diff --git a/man/man1/ps.1 b/man/man1/ps.1
       t@@ -102,6 +102,6 @@ to print the arguments for the process.  Newlines in arguments will be translate
        .br
        .B \*9/bin/psu
        .SH "SEE ALSO"
       -.IM acid (1) ,
       -.IM db (1) ,
       -.IM kill (1)
       +.MR acid (1) ,
       +.MR db (1) ,
       +.MR kill (1)
 (DIR) diff --git a/man/man1/psfonts.1 b/man/man1/psfonts.1
       t@@ -16,9 +16,9 @@ psfonts, psdownload \- add necessary fonts to PostScript document for printing
        ]
        .SH DESCRIPTION
        Plan 9's
       -.IM troff (1)
       +.MR troff (1)
        and
       -.IM tr2post (1)
       +.MR tr2post (1)
        use non-standard PostScript fonts
        (found in
        .BR \*9/postscript/font ).
       t@@ -114,12 +114,12 @@ Continue running even after fatal errors occur.
        .PD
        .SH EXAMPLE
        See
       -.IM tr2post (1)
       +.MR tr2post (1)
        for an example.
        .SH SOURCE
        .B \*9/bin/psfonts
        .br
        .B \*9/src/cmd/postscript/download
        .SH SEE ALSO
       -.IM troff (1) ,
       -.IM tr2post (1)
       +.MR troff (1) ,
       +.MR tr2post (1)
 (DIR) diff --git a/man/man1/pwd.1 b/man/man1/pwd.1
       t@@ -18,8 +18,8 @@ such as constructing shell prompts.
        .SH SEE ALSO
        .I cd
        in
       -.IM rc (1) ,
       -.IM getwd (3)
       +.MR rc (1) ,
       +.MR getwd (3)
        .SH BUGS
        .I Pwd
        is not provided.
 (DIR) diff --git a/man/man1/rc.1 b/man/man1/rc.1
       t@@ -50,7 +50,7 @@ exits or is terminated, the
        variable
        .B $status
        gets the process's wait message (see
       -.IM wait (3) );
       +.MR wait (3) );
        it will be the null string if the command was successful.
        .PP
        A long command line may be continued on subsequent lines by typing
       t@@ -83,7 +83,7 @@ in a directory in
        .B $path
        is the program to be executed.
        To be executable, the user must have execute permission (see
       -.IM stat (3) )
       +.MR stat (3) )
        and the file must be either an executable binary
        for the current machine's CPU type, or a shell script.
        Shell scripts begin with a line containing the full path name of a shell
       t@@ -350,7 +350,7 @@ or
        is a previously opened file descriptor and
        .I fd0
        becomes a new copy (in the sense of
       -.IM dup (3) )
       +.MR dup (3) )
        of it.
        A file descriptor may be closed by writing
        .BI >[ fd0 =]
       t@@ -543,7 +543,7 @@ function definition.
        A function with a special name will be called when
        .I rc
        receives a corresponding note; see
       -.IM notify (3) .
       +.MR notify (3) .
        The valid note names (and corresponding notes) are
        .B sighup
        .RB ( hangup ),
       t@@ -662,7 +662,7 @@ is composed of the bitwise OR of the
        .B rfork
        flags specified by the option letters
        (see
       -.IM fork (2) ).
       +.MR fork (2) ).
        If no
        .I flags
        are given, they default to
       t@@ -829,7 +829,7 @@ parsing the
        .B $PATH
        variable
        (as in
       -.IM sh (1) )
       +.MR sh (1) )
        or by
        .BR "path=(.\ /bin)" .
        The variables
 (DIR) diff --git a/man/man1/readcons.1 b/man/man1/readcons.1
       t@@ -27,4 +27,4 @@ is printed instead of an empty string.
        .SH SOURCE
        .B \*9/src/cmd/readcons.c
        .SH SEE ALSO
       -.IM readcons (3)
       +.MR readcons (3)
 (DIR) diff --git a/man/man1/resample.1 b/man/man1/resample.1
       t@@ -40,19 +40,19 @@ and
        .PP
        The input should be a Plan 9 image
        as described in 
       -.IM image (7) ,
       +.MR image (7) ,
        and the output will be a compressed 24-bit
        .B r8g8b8
        image.
        To uncompress the image or change the pixel format, use
        .I iconv
        (see
       -.IM crop (1) ).
       +.MR crop (1) ).
        .PP
        .SH SOURCE
        .B \*9/src/cmd/resample.c
        .SH "SEE ALSO
       -.IM crop (1) ,
       -.IM image (7)
       +.MR crop (1) ,
       +.MR image (7)
        .SH BUGS
        Faster algorithms exist, but this implementation produces correct pictures.
 (DIR) diff --git a/man/man1/rio.1 b/man/man1/rio.1
       t@@ -68,15 +68,15 @@ specifies an alternative program to run when the
        .I New
        menu item is selected.
        The default is to try
       -.IM 9term (1)
       +.MR 9term (1)
        and then to fall back to
       -.IM xterm (1) .
       +.MR xterm (1) .
        The
        .B \-s
        option has no effect.  It formerly set the scrolling mode for
        new windows and is recognized to avoid breaking scripts.
        See
       -.IM 9term (1)
       +.MR 9term (1)
        for a description of scrolling behavior.
        .PP
        The
       t@@ -137,11 +137,11 @@ Very small windows may not be created.
        The new window is created running
        .IR termprog ,
        by default
       -.IM 9term (1)
       +.MR 9term (1)
        or, if 
        .I 9term
        is not available,
       -.IM xterm (1) .
       +.MR xterm (1) .
        .TP
        .B Resize
        Change the size and location of a window.
       t@@ -165,7 +165,7 @@ Deleting a window causes a
        .L hangup
        note to be sent to all processes in the window's process group
        (see
       -.IM notify (3) ).
       +.MR notify (3) ).
        .TP
        .B Hide
        Hide a window.  Click in the window to be hidden (gunsight cursor);
       t@@ -241,8 +241,8 @@ starts a particular program.)
        .PP
        There is a currently a compiled-in limit of 128 hidden windows.
        .SH "SEE ALSO"
       -.IM 9term (1) ,
       -.IM xterm (1)
       +.MR 9term (1) ,
       +.MR xterm (1)
        .PP
        As mentioned above,
        .I rio
 (DIR) diff --git a/man/man1/rm.1 b/man/man1/rm.1
       t@@ -25,4 +25,4 @@ and the directory itself.
        .SH SOURCE
        .B \*9/src/cmd/rm.c
        .SH "SEE ALSO"
       -.IM remove (3)
       +.MR remove (3)
 (DIR) diff --git a/man/man1/rsa.1 b/man/man1/rsa.1
       t@@ -85,7 +85,7 @@ Plan 9 represents DSA and RSA keys as attribute-value pair lists
        prefixed with the string
        .BR key ;
        this is the generic key format used by
       -.IM factotum (4) .
       +.MR factotum (4) .
        A full DSA private key has the following attributes:
        .TP
        .B proto
       t@@ -334,9 +334,9 @@ scp auth.keys unix:.ssh/authorized_keys
        .SH SOURCE
        .B \*9/src/cmd/auth
        .SH "SEE ALSO
       -.IM factotum (4) ,
       -.IM pem (1) ,
       -.IM ssh (1)
       +.MR factotum (4) ,
       +.MR pem (1) ,
       +.MR ssh (1)
        .SH BUGS
        There are too many key formats.
        .PP
 (DIR) diff --git a/man/man1/sam.1 b/man/man1/sam.1
       t@@ -51,7 +51,7 @@ copies leading white space on the current line to the new line.
        Do not `download' the terminal part of
        .IR sam .
        Editing will be done with the command language only, as in
       -.IM ed (1) .
       +.MR ed (1) .
        .TP
        .BI -r " machine
        Run the host part remotely
       t@@ -69,7 +69,7 @@ for debugging.
        .PD
        .SS Regular expressions
        Regular expressions are as in
       -.IM regexp (7)
       +.MR regexp (7)
        with the addition of
        .BR \en
        to represent newlines.
       t@@ -698,7 +698,7 @@ There is usually a `current window',
        marked with a dark border, to which typed text and editing
        commands apply.
        Text may be typed and edited as in
       -.IM rio (1) ;
       +.MR rio (1) ;
        also the escape key (ESC) selects (sets dot to) text typed
        since the last mouse button hit.
        .PP
       t@@ -798,7 +798,7 @@ the white-space-delimited block of text is sent as a plumb message
        with a
        .B click
        attribute defining where the selection lies (see
       -.IM plumb (7) ).
       +.MR plumb (7) ).
        .TP
        .B look
        Search forward for the next occurrence of the literal text in dot.
       t@@ -909,11 +909,11 @@ source for the separate terminal part
        .TP
        .B \*9/bin/E
        .SH SEE ALSO
       -.IM ed (1) ,
       -.IM sed (1) ,
       -.IM grep (1) ,
       -.IM rio (1) ,
       -.IM regexp (7) .
       +.MR ed (1) ,
       +.MR sed (1) ,
       +.MR grep (1) ,
       +.MR rio (1) ,
       +.MR regexp (7) .
        .PP
        Rob Pike,
        ``The text editor sam''.
 (DIR) diff --git a/man/man1/scat.1 b/man/man1/scat.1
       t@@ -10,7 +10,7 @@ outside the solar system
        and implements database-like manipulations
        on sets of such objects.
        It also provides an interface to
       -.IM astro (1)
       +.MR astro (1)
        to plot the locations of solar system objects.
        Finally, it displays images from the
        Space Telescope Science Institute's
       t@@ -119,7 +119,7 @@ The names
        and
        .B comet
        refer to the earth's penumbra at lunar distance and the comet installed in the current
       -.IM astro (1) .
       +.MR astro (1) .
        The output is the planet's name, right ascension and declination, azimuth and altitude, and phase
        for the moon and sun, as shown by
        .BR astro .
       t@@ -182,7 +182,7 @@ collects all objects in the patches that cover the current set.
        .TP
        .BI astro " option"
        Run
       -.IM astro (1)
       +.MR astro (1)
        with the specified
        .I options
        (to which will be appended
       t@@ -324,7 +324,7 @@ Draw a map of the Pleiades.
        .SH SOURCE
        .B \*9/src/cmd/scat
        .SH SEE ALSO
       -.IM astro (1)
       +.MR astro (1)
        .br
        .B \*9/sky/constelnames\ \ 
        the three-letter abbreviations of the constellation names.
 (DIR) diff --git a/man/man1/secstore.1 b/man/man1/secstore.1
       t@@ -97,7 +97,7 @@ Option
        .B -n
        says that the password should be read from NVRAM
        (see
       -.IM authsrv (3) )
       +.MR authsrv (3) )
        instead of from
        .BR /dev/tty .
        .PP
       t@@ -107,7 +107,7 @@ or the server specified by option
        .BR -s .
        .PP
        For example, to add a secret to the file read by
       -.IM factotum (4) ,
       +.MR factotum (4) ,
        run
        .sp
        .EX
       t@@ -192,8 +192,8 @@ block chaining (CBC) mode.
        .br
        .B \*9/src/cmd/auth/secstore
        .SH SEE ALSO
       -.IM factotum (4) ,
       -.IM secstored (1)
       +.MR factotum (4) ,
       +.MR secstored (1)
        .SH BUGS
        There is deliberately no backup of files on the secstore, so
        .B -r
 (DIR) diff --git a/man/man1/secstored.1 b/man/man1/secstored.1
       t@@ -18,7 +18,7 @@ username
        .PP
        .I Secstored
        serves requests from
       -.IM secstore (1) .
       +.MR secstore (1) .
        The
        .B -R
        option supplements the password check with a
       t@@ -61,4 +61,4 @@ for mapping local userid to RADIUS userid
        .SH SOURCE
        .B \*9/src/cmd/auth/secstore
        .SH SEE ALSO
       -.IM secstore (1)
       +.MR secstore (1)
 (DIR) diff --git a/man/man1/sed.1 b/man/man1/sed.1
       t@@ -78,7 +78,7 @@ that
        addresses the last line of input, or a context address,
        .BI / regular-expression / \f1,
        in the style of
       -.IM regexp (7) ,
       +.MR regexp (7) ,
        with the added convention that
        .L \en
        matches a
       t@@ -235,7 +235,7 @@ in the pattern space.
        Any character may be used instead of 
        .LR / .
        For a fuller description see
       -.IM regexp (7) .
       +.MR regexp (7) .
        .I Flags
        is zero or more of
        .RS
       t@@ -374,8 +374,8 @@ formatted manuscript.
        .IR grep (1), 
        .IR awk (1), 
        .IR lex (1), 
       -.IM sam (1) ,
       -.IM regexp (7)
       +.MR sam (1) ,
       +.MR regexp (7)
        .br
        L. E. McMahon,
        `SED \(em A Non-interactive Text Editor',
 (DIR) diff --git a/man/man1/seq.1 b/man/man1/seq.1
       t@@ -38,7 +38,7 @@ The options are
        .TP "\w'\fL-f \fIformat\fLXX'u"
        .BI -f format
        Use the 
       -.IM print (3) -style
       +.MR print (3) -style
        .I format
        .IR print
        for printing each (floating point) number.
 (DIR) diff --git a/man/man1/sftpcache.1 b/man/man1/sftpcache.1
       t@@ -7,7 +7,7 @@ sftpcache \- cache sftp connections
        .SH DESCRIPTION
        .I Sftpcache
        multiplexes clients onto persistent 
       -.IM sftp (1)
       +.MR sftp (1)
        connections.
        It runs
        .I sftp
       t@@ -16,7 +16,7 @@ and posts a socket named
        .IB system .sftp
        in the name space directory
        (see
       -.IM intro (4) ).
       +.MR intro (4) ).
        Clients can connect to the socket, one at a time,
        to interact with the
        .I sftp
       t@@ -24,13 +24,13 @@ session.
        .PP
        .I Sftpcache
        is used by
       -.IM netfiles (1) .
       +.MR netfiles (1) .
        .SH SOURCE
        .B \*9/src/cmd/sftpcache.c
        .SH SEE ALSO
       -.IM ssh (1) ,
       -.IM sftp (1) ,
       -.IM netfiles (1)
       +.MR ssh (1) ,
       +.MR sftp (1) ,
       +.MR netfiles (1)
        .SH BUGS
        .I Sftpcache
        only works with OpenSSH versions 4.3 and earlier;
 (DIR) diff --git a/man/man1/sleep.1 b/man/man1/sleep.1
       t@@ -28,4 +28,4 @@ while (){
        .SH SOURCE
        .B \*9/src/cmd/sleep.c
        .SH "SEE ALSO"
       -.IM sleep (3)
       +.MR sleep (3)
 (DIR) diff --git a/man/man1/snarfer.1 b/man/man1/snarfer.1
       t@@ -30,14 +30,14 @@ running
        keeps the X11 snarf buffer in sync with the Carbon snarf buffer,
        working around a bug in the OS X X11 server.
        See
       -.IM getsnarf (3)
       +.MR getsnarf (3)
        for more details.
        .SH SOURCE
        .B \*9/src/cmd/snarfer
        .SH SEE ALSO
        Unix's
        .IR xclipboard (1),
       -.IM getsnarf (3)
       +.MR getsnarf (3)
        .SH BUGS
        Both
        .I xclipboard
 (DIR) diff --git a/man/man1/soelim.1 b/man/man1/soelim.1
       t@@ -11,19 +11,19 @@ soelim \- preprocess so inclusion commands in troff input
        .I Soelim
        reads the specified files or the standard input and performs
        the textual inclusion implied by
       -.IM troff (1)
       +.MR troff (1)
        directives of the form
        .TP
        .B "\&.so some_file
        .PP
        when they appear at the beginning of input lines.  This is useful when
        using programs such as
       -.IM tbl (1)
       +.MR tbl (1)
        that do not normally do this, allowing
        placement of individual tables or other text objects in separate files
        to be run as a part of a large document.
        .SH SOURCE
        .B \*9/bin/soelim
        .SH "SEE ALSO"
       -.IM deroff (1) ,
       -.IM troff (1)
       +.MR deroff (1) ,
       +.MR troff (1)
 (DIR) diff --git a/man/man1/sort.1 b/man/man1/sort.1
       t@@ -242,8 +242,8 @@ come out in their original order.
        .SH SOURCE
        .B \*9/src/cmd/sort.c
        .SH SEE ALSO
       -.IM uniq (1) ,
       -.IM look (1)
       +.MR uniq (1) ,
       +.MR look (1)
        .SH DIAGNOSTICS
        .I Sort
        comments and exits with non-null status for various trouble
 (DIR) diff --git a/man/man1/spell.1 b/man/man1/spell.1
       t@@ -31,7 +31,7 @@ not sanctioned there\(emon the standard output.
        .PP
        .I Spell
        ignores constructs of
       -.IM troff (1)
       +.MR troff (1)
        and its standard preprocessors.
        It understands these options:
        .TP
       t@@ -82,10 +82,10 @@ the script
        source for
        .I sprog
        .SH SEE ALSO
       -.IM deroff (1)
       +.MR deroff (1)
        .SH BUGS
        The heuristics of
       -.IM deroff (1)
       +.MR deroff (1)
        used to excise formatting information are imperfect.
        .PP
        The spelling list's coverage is uneven;
 (DIR) diff --git a/man/man1/split.1 b/man/man1/split.1
       t@@ -41,7 +41,7 @@ File divisions occur at each line
        that matches a regular
        .IR expression ;
        see 
       -.IM regexp (7) .
       +.MR regexp (7) .
        Multiple
        .B -e
        options may appear.
       t@@ -77,6 +77,6 @@ to lower case.
        .B \*9/src/cmd/split.c
        .SH SEE ALSO
        .IR sed (1), 
       -.IM awk (1) ,
       -.IM grep (1) ,
       -.IM regexp (7)
       +.MR awk (1) ,
       +.MR grep (1) ,
       +.MR regexp (7)
 (DIR) diff --git a/man/man1/src.1 b/man/man1/src.1
       t@@ -19,11 +19,11 @@ examines the named
        to find the corresponding source code, which is then sent to the editor using
        .B B
        (see
       -.IM sam (1) ).
       +.MR sam (1) ).
        If
        .I file
        is an
       -.IM rc (1)
       +.MR rc (1)
        script, the source is the file itself.
        If
        .I file
       t@@ -35,7 +35,7 @@ and
        will point the editor at the line that begins the definition.
        .I Src
        uses
       -.IM db (1)
       +.MR db (1)
        to extract the symbol table information that identifies the source.
        .PP
        .I Src
       t@@ -78,6 +78,6 @@ src -s strcmp rc
        .SH SOURCE
        .B \*9/bin/src
        .SH "SEE ALSO"
       -.IM db (1) ,
       -.IM plumb (1) ,
       -.IM sam (1) .
       +.MR db (1) ,
       +.MR plumb (1) ,
       +.MR sam (1) .
 (DIR) diff --git a/man/man1/ssam.1 b/man/man1/ssam.1
       t@@ -63,8 +63,8 @@ Count frequency of words read from standard input.
        .B \*9/bin/ssam
        .SH SEE ALSO
        .IR sed (1), 
       -.IM sam (1) ,
       -.IM regexp (7)
       +.MR sam (1) ,
       +.MR regexp (7)
        .PP
        Rob Pike,
        ``The text editor sam''.
 (DIR) diff --git a/man/man1/ssh-agent.1 b/man/man1/ssh-agent.1
       t@@ -10,9 +10,9 @@ ssh-agent \- SSH authentication agent
        .SH DESCRIPTION
        .I Ssh-agent
        presents
       -.IM factotum (4)
       +.MR factotum (4)
        using the interface that
       -.IM ssh (1)
       +.MR ssh (1)
        requires.
        .PP
        Once
       t@@ -33,7 +33,7 @@ via a Unix socket named
        .B ssh-agent.socket
        in the name space directory
        (see
       -.IM intro (4) ).
       +.MR intro (4) ).
        Note that although the socket is posted in the name space
        directory, it is not for 9P conversations.
        .I Ssh
       t@@ -81,10 +81,10 @@ Invoke this one with
        .B 9
        .BR ssh-agent ;
        see
       -.IM 9 (1) .
       +.MR 9 (1) .
        .SH EXAMPLES
        Assume
       -.IM factotum (4)
       +.MR factotum (4)
        is already running and initialized with keys.
        .PP
        Start a new agent, copying the commands by hand:
       t@@ -103,7 +103,7 @@ $
        .EE
        .PP
        Start the agent from
       -.IM sh (1) :
       +.MR sh (1) :
        .IP
        .EX
        $ eval `9 ssh-agent -e`
       t@@ -111,7 +111,7 @@ $
        .EE
        .PP
        Start the agent from
       -.IM rc (1) :
       +.MR rc (1) :
        .IP
        .EX
        % eval `{9 ssh-agent}
       t@@ -128,9 +128,9 @@ tux% ^D
        .SH SOURCE
        .B \*9/src/cmd/auth/ssh-agent.c
        .SH SEE ALSO
       -.IM ssh (1) ,
       -.IM rsa (1) ,
       -.IM factotum (4)
       +.MR ssh (1) ,
       +.MR rsa (1) ,
       +.MR factotum (4)
        .SH BUGS
        A surprise rather than a bug:
        .I ssh-agent
 (DIR) diff --git a/man/man1/strings.1 b/man/man1/strings.1
       t@@ -25,4 +25,4 @@ line with the offset of the continuation line.
        .SH SOURCE
        .B \*9/src/cmd/strings.c
        .SH SEE ALSO
       -.IM nm (1)
       +.MR nm (1)
 (DIR) diff --git a/man/man1/sum.1 b/man/man1/sum.1
       t@@ -73,5 +73,5 @@ summed.
        .br
        .B \*9/src/cmd/sha1sum.c
        .SH "SEE ALSO"
       -.IM cmp (1) ,
       -.IM wc (1)
       +.MR cmp (1) ,
       +.MR wc (1)
 (DIR) diff --git a/man/man1/tar.1 b/man/man1/tar.1
       t@@ -112,14 +112,14 @@ archive entries.
        .B z
        Operate on compressed tar archives.
        The type of compression is inferred from the file name extension:
       -.IM gzip (1)
       +.MR gzip (1)
        for
        .B .tar.gz
        and
        .BR .tgz ;
        .I bzip2
        (see
       -.IM gzip (1) )
       +.MR gzip (1) )
        for
        .BR .tar.bz ,
        .BR .tbz ,
       t@@ -153,8 +153,8 @@ can be used to copy hierarchies thus:
        .SH SEE ALSO
        .I 9ar
        in
       -.IM 9c (1) ,
       -.IM bundle (1)
       +.MR 9c (1) ,
       +.MR bundle (1)
        .SH BUGS
        There is no way to ask for any but the last
        occurrence of a file.
 (DIR) diff --git a/man/man1/tbl.1 b/man/man1/tbl.1
       t@@ -11,7 +11,7 @@ tbl \- format tables for nroff or troff
        is a preprocessor for formatting tables for
        .I nroff
        or
       -.IM troff (1) .
       +.MR troff (1) .
        The input
        .I files
        are copied to the standard output,
       t@@ -74,7 +74,7 @@ recognize
        and
        .I y
        as
       -.IM eqn (1)
       +.MR eqn (1)
        delimiters
        .PD
        .RE
       t@@ -275,8 +275,8 @@ Bernardsville        2018        3.30
        .B \*9/src/cmd/tbl
        .SH SEE ALSO
        .IR troff (1), 
       -.IM eqn (1) ,
       -.IM doctype (1)
       +.MR eqn (1) ,
       +.MR doctype (1)
        .br
        M. E. Lesk and L. L. Cherry,
        ``TBL\(ema Program to Format Tables'',
 (DIR) diff --git a/man/man1/tcs.1 b/man/man1/tcs.1
       t@@ -36,7 +36,7 @@ is
        the
        .SM UTF
        encoding described in
       -.IM utf (7) .
       +.MR utf (7) .
        The
        .B -l
        option lists the character sets known to
       t@@ -164,4 +164,4 @@ Print an up to date list of the supported character sets.
        .SH SEE ALSO
        .IR ascii (1), 
        .IR rune (3), 
       -.IM utf (7) .
       +.MR utf (7) .
 (DIR) diff --git a/man/man1/test.1 b/man/man1/test.1
       t@@ -182,7 +182,7 @@ and must be enclosed in quotes.
        .I Test
        is a dubious way to check for specific character strings:
        it uses a process to do what an
       -.IM rc (1)
       +.MR rc (1)
        match or switch statement can do.
        The first example is not only inefficient but wrong, because
        .I test
 (DIR) diff --git a/man/man1/time.1 b/man/man1/time.1
       t@@ -18,4 +18,4 @@ followed by the command line.
        .SH SOURCE
        .B \*9/src/cmd/time.c
        .SH "SEE ALSO"
       -.IM prof (1)
       +.MR prof (1)
 (DIR) diff --git a/man/man1/touch.1 b/man/man1/touch.1
       t@@ -27,9 +27,9 @@ is present.
        .SH SOURCE
        .B \*9/src/cmd/touch.c
        .SH SEE ALSO
       -.IM ls (1) ,
       -.IM stat (3) ,
       -.IM chmod (1)
       +.MR ls (1) ,
       +.MR stat (3) ,
       +.MR chmod (1)
        .SH BUGS
        .I Touch
        will not touch directories.
 (DIR) diff --git a/man/man1/tr.1 b/man/man1/tr.1
       t@@ -94,4 +94,4 @@ tr -cs A-Za-z '
        .SH SOURCE
        .B \*9/src/cmd/tr.c
        .SH "SEE ALSO"
       -.IM sed (1)
       +.MR sed (1)
 (DIR) diff --git a/man/man1/tr2post.1 b/man/man1/tr2post.1
       t@@ -15,7 +15,7 @@ converts
        .I files
        (or standard input),
        which should be the device-independent output of
       -.IM troff (1) ,
       +.MR troff (1) ,
        into the PostScript printer language.
        .PP
        The options are:
       t@@ -47,11 +47,11 @@ logical pages per physical page
        Using this option emits PostScript with invalid document structuring
        comments.
        It will print fine but will not view correctly in
       -.IM gv (1)
       +.MR gv (1)
        or
        .I psv
        (see
       -.IM page (1) ).
       +.MR page (1) ).
        .TP
        .BI -o " pagelist
        Print only the pages in the
       t@@ -110,5 +110,5 @@ psv /tmp/a.ps
        .SH SOURCE
        .B \*9/src/cmd/postscript/tr2post
        .SH SEE ALSO
       -.IM troff (1) ,
       -.IM psfonts (1)
       +.MR troff (1) ,
       +.MR psfonts (1)
 (DIR) diff --git a/man/man1/troff.1 b/man/man1/troff.1
       t@@ -176,18 +176,18 @@ font width tables for
        .SH SOURCE
        .B \*9/src/cmd/troff
        .SH "SEE ALSO"
       -.IM lpr (1) ,
       -.IM proof (1) ,
       -.IM tr2post (1) ,
       +.MR lpr (1) ,
       +.MR proof (1) ,
       +.MR tr2post (1) ,
        .IR eqn (1), 
        .IR tbl (1), 
        .IR pic (1), 
       -.IM grap (1) ,
       +.MR grap (1) ,
        .IR doctype (1), 
       -.IM ms (7) ,
       -.IM image (7) ,
       -.IM tex (1) ,
       -.IM deroff (1)
       +.MR ms (7) ,
       +.MR image (7) ,
       +.MR tex (1) ,
       +.MR deroff (1)
        .br
        J. F. Ossanna and B. W. Kernighan,
        ``Troff User's Manual''
 (DIR) diff --git a/man/man1/troff2html.1 b/man/man1/troff2html.1
       t@@ -13,7 +13,7 @@ troff2html \- convert troff output into HTML
        .SH DESCRIPTION
        .I Troff2html
        reads the
       -.IM troff (1)
       +.MR troff (1)
        output in the named
        .IR files ,
        default standard input,
       t@@ -28,10 +28,10 @@ Its main use is for
        (see Plan 9's
        .IR httpd (8)),
        which converts
       -.IM man (1)
       +.MR man (1)
        pages into HTML
        and depends on a specially annotated set of
       -.IM man (7)
       +.MR man (7)
        macros, invoked by
        .B troff
        .BR -manhtml .
       t@@ -58,7 +58,7 @@ x X html manref end cp 1
        .EE
        .PP
        which are used to create HTML hyperlinks around text of the form
       -.IM cp (1)
       +.MR cp (1)
        pointing to
        .BR /magic/man2html/1/cp .
        .PP
       t@@ -69,14 +69,14 @@ Plan 9's
        On the one hand, because it uses the input,
        .B ms2html
        can handle
       -.IM pic (1) ,
       -.IM eqn (1) ,
       +.MR pic (1) ,
       +.MR eqn (1) ,
        etc., which
        .I troff2html
        does not handle at all; on the other hand,
        .B ms2html
        understands only
       -.IM ms (7)
       +.MR ms (7)
        documents and is easily confused by complex
        .B troff
        constructions.
       t@@ -84,7 +84,7 @@ constructions.
        has the reverse properties: it does not handle the preprocessors but its output
        is reliable and (modulo helper annotations) is independent of macro package.
        .SH SEE ALSO
       -.IM troff (1) ,
       +.MR troff (1) ,
        Plan 9's
        .IR ms2html (1),
        .I man2html
 (DIR) diff --git a/man/man1/tweak.1 b/man/man1/tweak.1
       t@@ -35,14 +35,14 @@ If the file is a subfont, a second line presents a hexadecimal 16-bit
        .B offset
        to be applied to character values from the subfont
        (typically as stored in a font file; see
       -.IM font (7) );
       +.MR font (7) );
        and the subfont's
        .BR n ,
        .BR height ,
        and
        .B ascent
        as defined in
       -.IM cachechars (3) .
       +.MR cachechars (3) .
        .PP
        By means described below, magnified views of portions of the images
        may be displayed.
       t@@ -61,7 +61,7 @@ default font; the character's
        and
        .BR width
        as defined in
       -.IM cachechars (3) ;
       +.MR cachechars (3) ;
        and
        .BR iwidth ,
        the physical width of the image in the subfont's image.
       t@@ -158,9 +158,9 @@ The program will complain once about modified but unwritten files.
        .SH SOURCE
        .B \*9/src/cmd/draw/tweak.c
        .SH "SEE ALSO"
       -.IM cachechars (3) ,
       -.IM image (7) ,
       -.IM font (7)
       +.MR cachechars (3) ,
       +.MR image (7) ,
       +.MR font (7)
        .SH BUGS
        For a program written to adjust width tables in fonts,
        .I tweak
 (DIR) diff --git a/man/man1/uniq.1 b/man/man1/uniq.1
       t@@ -56,4 +56,4 @@ Fields are skipped before characters.
        .IR sort (1) 
        .SH BUGS
        Field selection and comparison should be compatible with 
       -.IM sort (1) .
       +.MR sort (1) .
 (DIR) diff --git a/man/man1/vac.1 b/man/man1/vac.1
       t@@ -115,7 +115,7 @@ Do not include the file or directory specified by
        This option may be repeated multiple times.
        .I Exclude
        can be a shell pattern as accepted by
       -.IM rc (1) ,
       +.MR rc (1) ,
        with one extension:
        .B \&...
        matches any sequence of characters including slashes.
       t@@ -225,5 +225,5 @@ If listing files, print metadata in addition to the names.
        .SH SOURCE
        .B \*9/src/cmd/vac
        .SH "SEE ALSO"
       -.IM vacfs (4) ,
       -.IM venti (8)
       +.MR vacfs (4) ,
       +.MR venti (8)
 (DIR) diff --git a/man/man1/venti.1 b/man/man1/venti.1
       t@@ -40,7 +40,7 @@ read, write, copy \- simple Venti clients
        .SH DESCRIPTION
        Venti is a SHA1-addressed block storage server.
        See 
       -.IM venti (7)
       +.MR venti (7)
        for a full introduction.
        .PP
        .I Read
       t@@ -167,13 +167,13 @@ messages send/received.
        .SH SOURCE
        .B \*9/src/cmd/venti
        .SH SEE ALSO
       -.IM vac (1) ,
       -.IM venti (3) ,
       -.IM vacfs (4) ,
       -.IM venti (7) ,
       -.IM vbackup (8) ,
       -.IM venti (8) ,
       -.IM venti-fmt (8)
       +.MR vac (1) ,
       +.MR venti (3) ,
       +.MR vacfs (4) ,
       +.MR venti (7) ,
       +.MR vbackup (8) ,
       +.MR venti (8) ,
       +.MR venti-fmt (8)
        .SH BUGS
        There should be programs to read and write
        venti files and directories.
 (DIR) diff --git a/man/man1/web.1 b/man/man1/web.1
       t@@ -81,7 +81,7 @@ URL passed to
        and
        .I wmail
        are invoked as start commands in the
       -.IM plumber (4) 's
       +.MR plumber (4) 's
        rules for opening web pages and writing mail messages.
        .SH FILES
        .TP
       t@@ -93,4 +93,4 @@ and
        .SH SOURCE
        .B \*9/bin
        .SH SEE ALSO
       -.IM plumber (4)
       +.MR plumber (4)
 (DIR) diff --git a/man/man1/wintext.1 b/man/man1/wintext.1
       t@@ -22,11 +22,11 @@ wintext, ", "" \- access text in current window
        prints the text of the current
        .I win
        (see
       -.IM acme (1) ),
       -.IM 9term (1) ,
       +.MR acme (1) ),
       +.MR 9term (1) ,
        or
        (Unix's)
       -.IM tmux (1)
       +.MR tmux (1)
        window to standard output.
        .PP
        .I \*y
       t@@ -43,7 +43,7 @@ prints the last command executed.
        prints the last command that
        .I \*y
        would print and then executes it by piping it into
       -.IM rc (1) .
       +.MR rc (1) .
        .PP
        Both
        .I \*y
       t@@ -61,7 +61,7 @@ or
        .BR # .
        .SH EXAMPLES
        Print the
       -.IM ls (1)
       +.MR ls (1)
        and
        .I lc
        commands executed in this window:
       t@@ -87,8 +87,8 @@ ramfs   rc      read    rio     rm
        %
        .EE
        .SH SEE ALSO
       -.IM 9term (1) ,
       -.IM acme (1)
       +.MR 9term (1) ,
       +.MR acme (1)
        .SH SOURCE
        .B \*9/bin
        .SH BUGS
       t@@ -96,5 +96,5 @@ ramfs   rc      read    rio     rm
        and
        .I \*(yy
        are hard to type in shells other than
       -.IM rc (1) .
       +.MR rc (1) .
        .\" and in troff!
 (DIR) diff --git a/man/man1/winwatch.1 b/man/man1/winwatch.1
       t@@ -17,7 +17,7 @@ winwatch \- monitor rio windows
        .SH DESCRIPTION
        .I Winwatch
        displays the labels of all current
       -.IM rio (1)
       +.MR rio (1)
        windows, refreshing the display every second.
        Right clicking a window's label unhides, raises and gives focus to that window.
        Typing
       t@@ -53,5 +53,5 @@ Excluding winwatch and stats from being shown.
        .SH SOURCE
        .B \*9/src/cmd/winwatch.c
        .SH SEE ALSO
       -.IM rio (1) ,
       -.IM regexp (7) .
       +.MR rio (1) ,
       +.MR regexp (7) .
 (DIR) diff --git a/man/man1/xd.1 b/man/man1/xd.1
       t@@ -91,7 +91,7 @@ followed by an asterisk.
        .SH SOURCE
        .B \*9/src/cmd/xd.c
        .SH "SEE ALSO"
       -.IM db (1)
       +.MR db (1)
        .SH BUGS
        The various output formats don't line up properly in the output of
        .IR xd .
 (DIR) diff --git a/man/man1/yacc.1 b/man/man1/yacc.1
       t@@ -23,7 +23,7 @@ to produce a program
        This program must be loaded with a lexical analyzer function,
        .B yylex(void)
        (often generated by
       -.IM lex (1) ),
       +.MR lex (1) ),
        with a
        .B main(int argc, char *argv[])
        program, and with an error handling routine,
       t@@ -115,7 +115,7 @@ option reverses this.
        The parser accepts
        .SM UTF
        input text (see
       -.IM utf (7) ),
       +.MR utf (7) ),
        which has a couple of effects.
        First, the return value of
        .B yylex()
       t@@ -156,7 +156,7 @@ parser prototype using stdio
        .SH SOURCE
        .B \*9/src/cmd/yacc.c
        .SH "SEE ALSO"
       -.IM lex (1)
       +.MR lex (1)
        .br
        S. C. Johnson and R. Sethi,
        ``Yacc: A parser generator'',
 (DIR) diff --git a/man/man1/yesterday.1 b/man/man1/yesterday.1
       t@@ -91,8 +91,8 @@ by convention, root of the dump file system
        .SH SOURCE
        .B \*9/bin/yesterday
        .SH SEE ALSO
       -.IM diff (1) ,
       -.IM hist (1) ,
       -.IM vbackup (8)
       +.MR diff (1) ,
       +.MR hist (1) ,
       +.MR vbackup (8)
        .SH BUGS
        It's hard to use this command without singing.
 (DIR) diff --git a/man/man3/0intro.3 b/man/man3/0intro.3
       t@@ -49,7 +49,7 @@ automatically, so it is rarely necessary to tell the loader
        which
        libraries a program needs;
        see
       -.IM 9c (1) .
       +.MR 9c (1) .
        .PP
        The library to which a function belongs is defined by the
        header file that defines its interface.
       t@@ -121,7 +121,7 @@ and
        plus macros that define the layout of
        .IR jmp_buf
        (see
       -.IM setjmp (3) );
       +.MR setjmp (3) );
        .\" definitions of the bits in the floating-point control register
        .\" as used by
        .\" .IR getfcr (2);
       t@@ -198,27 +198,27 @@ by
        or
        .I create
        (see
       -.IM open (3) ).
       +.MR open (3) ).
        These calls return an integer called a
        .IR "file descriptor"
        which identifies the file
        to subsequent I/O calls,
        notably
       -.IM read (3)
       +.MR read (3)
        and
        .IR write .
        The system allocates the numbers by selecting the lowest unused descriptor.
        They are allocated dynamically; there is no visible limit to the number of file
        descriptors a process may have open.
        They may be reassigned using
       -.IM dup (3) .
       +.MR dup (3) .
        File descriptors are indices into a
        kernel resident
        .IR "file descriptor table" .
        Each process has an associated file descriptor table.
        In threaded programs
        (see
       -.IM thread (3) ),
       +.MR thread (3) ),
        the file descriptor table is shared by all the procs.
        .PP
        By convention,
       t@@ -236,22 +236,22 @@ Files are normally read or written in sequential order.
        The I/O position in the file is called the
        .IR "file offset"
        and may be set arbitrarily using the
       -.IM seek (3)
       +.MR seek (3)
        system call.
        .PP
        Directories may be opened like regular files.
        Instead of reading them with
       -.IM read (3) ,
       +.MR read (3) ,
        use the
        .B Dir
        structure-based
        routines described in
       -.IM dirread (3) .
       +.MR dirread (3) .
        The entry
        corresponding to an arbitrary file can be retrieved by
        .IR dirstat
        (see
       -.IM stat (3) )
       +.MR stat (3) )
        or
        .IR dirfstat ;
        .I dirwstat
       t@@ -262,9 +262,9 @@ write back entries, thus changing the properties of a file.
        New files are made with
        .I create
        (see
       -.IM open (3) )
       +.MR open (3) )
        and deleted with
       -.IM remove (3) .
       +.MR remove (3) .
        Directories may not directly be written;
        .IR create ,
        .IR remove ,
       t@@ -273,27 +273,27 @@ and
        .I fwstat
        alter them.
        .PP
       -.IM Pipe (3)
       +.MR Pipe (3)
        creates a connected pair of file descriptors,
        useful for bidirectional local communication.
        .SS "Process execution and control"
        A new process is created
        when an existing one calls
       -.IM fork (2) .
       +.MR fork (2) .
        The new (child) process starts out with
        copies of the address space and most other attributes
        of the old (parent) process.
        In particular,
        the child starts out running
        the same program as the parent;
       -.IM exec (3)
       +.MR exec (3)
        will bring in a different one.
        .PP
        Each process has a unique integer process id;
        a set of open files, indexed by file descriptor;
        and a current working directory
        (changed by
       -.IM chdir (2) ).
       +.MR chdir (2) ).
        .PP
        Each process has a set of attributes \(em memory, open files,
        name space, etc. \(em that may be shared or unique.
       t@@ -302,9 +302,9 @@ Flags to
        control the sharing of these attributes.
        .PP
        A process terminates by calling
       -.IM exits (3) .
       +.MR exits (3) .
        A parent process may call
       -.IM wait (3)
       +.MR wait (3)
        to wait for some child to terminate.
        A bit of status information
        may be passed from
       t@@ -317,14 +317,14 @@ The Plan 9 interface persists here, although the functionality does not.
        Instead, empty strings are converted to exit status 0 and non-empty strings to 1.
        .PP
        A process can go to sleep for a specified time by calling
       -.IM sleep (3) .
       +.MR sleep (3) .
        .PP
        There is a
        .I notification
        mechanism for telling a process about events such as address faults,
        floating point faults, and messages from other processes.
        A process uses
       -.IM notify (3)
       +.MR notify (3)
        to register the function to be called (the
        .IR "notification handler" )
        when such events occur.
       t@@ -334,12 +334,12 @@ the main C library works properly in multiprocess programs;
        .IR malloc ,
        .IR print ,
        and the other routines use locks (see
       -.IM lock (3) )
       +.MR lock (3) )
        to synchronize access to their data structures.
        The graphics library defined in
        .B <draw.h>
        is also multi-process capable; details are in
       -.IM graphics (3) .
       +.MR graphics (3) .
        In general, though, multiprocess programs should use some form of synchronization
        to protect shared data.
        .PP
       t@@ -365,12 +365,12 @@ Therefore, a program that shouldn't block unexpectedly will use a process
        to serve the I/O request, passing the result to the main processes
        over a channel when the request completes.
        For examples of this design, see
       -.IM ioproc (3)
       +.MR ioproc (3)
        or
       -.IM mouse (3) .
       +.MR mouse (3) .
        .SH SEE ALSO
        .IR nm (1), 
       -.IM 9c (1)
       +.MR 9c (1)
        .SH DIAGNOSTICS
        Math functions in
        .I libc
       t@@ -378,14 +378,14 @@ return
        special values when the function is undefined for the
        given arguments or when the value is not representable
        (see
       -.IM nan (3) ).
       +.MR nan (3) ).
        .PP
        Some of the functions in
        .I libc
        are system calls and many others employ system calls in their implementation.
        All system calls return integers,
        with \-1 indicating that an error occurred;
       -.IM errstr (3)
       +.MR errstr (3)
        recovers a string describing the error.
        Some user-level library functions also use the
        .I errstr
 (DIR) diff --git a/man/man3/9p-cmdbuf.3 b/man/man3/9p-cmdbuf.3
       t@@ -44,7 +44,7 @@ bytes at
        using
        .I tokenize
        (see
       -.IM getfields (3) ).
       +.MR getfields (3) ).
        It returns a
        .B Cmdbuf
        structure holding pointers to each field in the message.
       t@@ -116,4 +116,4 @@ is a good example.
        .SH SOURCE
        .B \*9/src/lib9p/parse.c
        .SH SEE ALSO
       -.IM 9p (3)
       +.MR 9p (3)
 (DIR) diff --git a/man/man3/9p-fid.3 b/man/man3/9p-fid.3
       t@@ -73,7 +73,7 @@ and
        .BR Reqpool s.
        They are primarily used by the 9P server loop
        described in 
       -.IM 9p (3) .
       +.MR 9p (3) .
        .PP
        .B Fid
        structures are intended to represent
       t@@ -115,7 +115,7 @@ element points at a
        .B File
        structure 
        (see
       -.IM 9p-file (3) )
       +.MR 9p-file (3) )
        corresponding to the fid.
        The
        .B aux
       t@@ -200,5 +200,5 @@ structures.
        .SH SOURCE
        .B \*9/src/lib9p
        .SH SEE ALSO
       -.IM 9p (3) ,
       -.IM 9p-file (3)
       +.MR 9p (3) ,
       +.MR 9p-file (3)
 (DIR) diff --git a/man/man3/9p-file.3 b/man/man3/9p-file.3
       t@@ -144,7 +144,7 @@ When creating new file references by copying pointers,
        call 
        .I incref
        (see
       -.IM lock (3) )
       +.MR lock (3) )
        to update the reference count.
        To note the removal of a reference to a file, call
        .IR closefile .
       t@@ -218,6 +218,6 @@ return nf;
        .SH SOURCE
        .B \*9/src/lib9p/file.c
        .SH SEE ALSO
       -.IM 9p (3)
       +.MR 9p (3)
        .SH BUGS
        The reference counting is cumbersome.
 (DIR) diff --git a/man/man3/9p-intmap.3 b/man/man3/9p-intmap.3
       t@@ -122,5 +122,5 @@ and
        .SH SOURCE
        .B \*9/src/lib9p/intmap.c
        .SH SEE ALSO
       -.IM 9p (3) ,
       -.IM 9p-fid (3)
       +.MR 9p (3) ,
       +.MR 9p-fid (3)
 (DIR) diff --git a/man/man3/9p.3 b/man/man3/9p.3
       t@@ -110,13 +110,13 @@ and
        .B Fid
        structures are allocated one-to-one with uncompleted
        requests and active fids, and are described in
       -.IM 9p-fid (3) .
       +.MR 9p-fid (3) .
        .PP
        The behavior of
        .I srv
        depends on whether there is a file tree
        (see
       -.IM 9p-file (3) )
       +.MR 9p-file (3) )
        associated with the server, that is,
        whether the
        .B tree
       t@@ -178,11 +178,11 @@ as
        .BI /srv/ name .
        .IP
        Fork a child process via
       -.IM rfork (3)
       +.MR rfork (3)
        or
        .I procrfork
        (see
       -.IM thread (3) ),
       +.MR thread (3) ),
        using the
        .BR RFFDG ,
        .RR RFNOTEG ,
       t@@ -214,7 +214,7 @@ The parent returns to the caller.
        .LP
        If any error occurs during
        this process, the entire process is terminated by calling
       -.IM sysfatal (3) .
       +.MR sysfatal (3) .
        .SS Service functions
        The functions in a 
        .B Srv
       t@@ -332,7 +332,7 @@ where
        is the program name variable as set by
        .I ARGBEGIN
        (see
       -.IM arg (3) ).
       +.MR arg (3) ).
        .TP
        .I Attach
        The
       t@@ -707,7 +707,7 @@ the service loop (which runs in a separate process
        from its caller) terminates using 
        .I _exits
        (see
       -.IM exits (3) ).
       +.MR exits (3) ).
        .PD
        .PP
        If the 
       t@@ -752,6 +752,6 @@ or is maintained elsewhere.
        .SH SOURCE
        .B \*9/src/lib9p
        .SH SEE ALSO
       -.IM 9p-fid (3) ,
       -.IM 9p-file (3) ,
       +.MR 9p-fid (3) ,
       +.MR 9p-file (3) ,
        .IR intro (9p)
 (DIR) diff --git a/man/man3/9pclient.3 b/man/man3/9pclient.3
       t@@ -149,7 +149,7 @@ connects to a service named
        .I name
        in the current name space directory
        (see
       -.IM intro (4) ).
       +.MR intro (4) ).
        Both attach to the root of the file system
        using the attach name
        .IR aname .
       t@@ -228,7 +228,7 @@ the allocated structures will be freed and the
        file descriptor corresponding to the connection
        will be closed
        (see
       -.IM close (2) ).
       +.MR close (2) ).
        Fids are not reference counted: when
        .I fsclose
        is called, the clunk transaction and freeing of storage
       t@@ -308,7 +308,7 @@ sets the offset; the
        and
        .I type
        arguments are used as in
       -.IM seek (3) .
       +.MR seek (3) .
        Calling
        .I fspread
        or
       t@@ -340,7 +340,7 @@ for the given fid.
        .PP
        .I Fsaccess
        behaves like Unix's
       -.IM access (2) .
       +.MR access (2) .
        .I Fsremove
        removes the named path.
        .I Fsfremove
       t@@ -358,7 +358,7 @@ are like
        and
        .I vfprint
        (see
       -.IM print (3) )
       +.MR print (3) )
        but write to 
        .BR CFid* s.
        .PP
       t@@ -376,7 +376,7 @@ is similar but reads the entire directory.
        The returned pointer should be freed with
        .I free
        (see
       -.IM malloc (3) )
       +.MR malloc (3) )
        when no longer needed.
        .PP
        .I Fsdirfstat
       t@@ -396,7 +396,7 @@ structure returned by
        should be freed with
        .I free
        (see
       -.IM malloc (3) )
       +.MR malloc (3) )
        when no longer needed.
        .PP
        .I Fsdirstat
       t@@ -418,7 +418,7 @@ opens a file on the 9P server
        for reading or writing but returns a Unix file descriptor
        instead of a fid structure.
        The file descriptor is actually one end of a
       -.IM pipe (2) .
       +.MR pipe (2) .
        A proxy process on the other end is ferrying data
        between the pipe and the 9P fid.
        Because of the implementation as a pipe,
       t@@ -443,18 +443,18 @@ If the
        flag is set, the library calls
        .I threadexitsall
        (see
       -.IM thread (3) )
       +.MR thread (3) )
        when it detects EOF on a 9P connection.
        .SH SOURCE
        .B \*9/src/lib9pclient
        .SH SEE ALSO
       -.IM intro (4) ,
       +.MR intro (4) ,
        .IR intro (9p),
        .I fsaopen
        and
        .I nsaopen
        in
       -.IM auth (3)
       +.MR auth (3)
        .SH BUGS
        The implementation
        should use a special version string to distinguish between
 (DIR) diff --git a/man/man3/acme.3 b/man/man3/acme.3
       t@@ -141,7 +141,7 @@ char*        evsmprint(char *fmt, va_list arg)
        .SH DESCRIPTION
        .I Libacme
        provides a simple C interface for interacting with
       -.IM acme (1)
       +.MR acme (1)
        windows.
        .PP
        A
       t@@ -168,7 +168,7 @@ Most of the library routines access files in the window's
        .I acme
        directory.
        See
       -.IM acme (4)
       +.MR acme (4)
        for details.
        Many library routines take a format string
        .I fmt
       t@@ -179,11 +179,11 @@ denotes the result of formatting the string and arguments
        using
        .I smprint
        (see
       -.IM print (3) ).
       +.MR print (3) ).
        .PP
        .I Pipetowin
        runs the
       -.IM rc (1)
       +.MR rc (1)
        command line
        .I fmt\fR, \fP...
        with 
       t@@ -199,7 +199,7 @@ Otherwise the command inherits the caller's standard error.
        .PP
        .I Pipewinto
        runs the 
       -.IM rc (1)
       +.MR rc (1)
        command line
        .I fmt\fR, \fP...
        with the window's
       t@@ -300,7 +300,7 @@ to position
        relative to
        .I type
        (see
       -.IM seek (3) ).
       +.MR seek (3) ).
        .PP
        .I Winwrite
        writes the
       t@@ -317,7 +317,7 @@ The fields correspond to the fields in
        .IR acme 's
        event messages.
        See 
       -.IM acme (4)
       +.MR acme (4)
        for detailed explanations.
        The fields are:
        .TP
       t@@ -384,7 +384,7 @@ that it should be handled internally.
        returns a pointer to a
        .B Channel
        (see
       -.IM thread (3) )
       +.MR thread (3) )
        on which event structures (not pointers) can be read.
        The first call to
        .I wineventchan
       t@@ -404,20 +404,20 @@ after calling
        and
        .I evsmprint
        are like
       -.IM malloc (3) ,
       +.MR malloc (3) ,
        .IR realloc ,
        .IR strdup
        (see
       -.IM strcat (3) ),
       +.MR strcat (3) ),
        and
        .IR vsmprint
        (see
       -.IM print (3) ),
       +.MR print (3) ),
        but they call
       -.IM sysfatal (3)
       +.MR sysfatal (3)
        on error rather than returning nil.
        .SH SOURCE
        .B \*9/src/libacme
        .SH SEE ALSO
       -.IM acme (1) ,
       -.IM acme (4)
       +.MR acme (1) ,
       +.MR acme (4)
 (DIR) diff --git a/man/man3/addpt.3 b/man/man3/addpt.3
       t@@ -185,4 +185,4 @@ They are implemented as macros.
        .SH SOURCE
        .B \*9/src/libdraw
        .SH SEE ALSO
       -.IM graphics (3)
       +.MR graphics (3)
 (DIR) diff --git a/man/man3/aes.3 b/man/man3/aes.3
       t@@ -39,13 +39,13 @@ cryptographically strongly unpredictable.
        .SH SOURCE
        .B \*9/src/libsec
        .SH SEE ALSO
       -.IM mp (3) ,
       -.IM blowfish (3) ,
       -.IM des (3) ,
       -.IM dsa (3) ,
       -.IM elgamal (3) ,
       -.IM rc4 (3) ,
       -.IM rsa (3) ,
       -.IM sechash (3) ,
       -.IM prime (3) ,
       -.IM rand (3)
       +.MR mp (3) ,
       +.MR blowfish (3) ,
       +.MR des (3) ,
       +.MR dsa (3) ,
       +.MR elgamal (3) ,
       +.MR rc4 (3) ,
       +.MR rsa (3) ,
       +.MR sechash (3) ,
       +.MR prime (3) ,
       +.MR rand (3)
 (DIR) diff --git a/man/man3/allocimage.3 b/man/man3/allocimage.3
       t@@ -135,7 +135,7 @@ The
        field will have been set to the identifying number used by
        .B /dev/draw
        (see
       -.IM draw (3) ),
       +.MR draw (3) ),
        and the
        .I cache
        field will be zero.
       t@@ -148,7 +148,7 @@ The
        field will be set to the number of bits per pixel specified
        by the channel descriptor
        (see
       -.IM image (7) ).
       +.MR image (7) ).
        .I Allocimage
        returns 0 if the server has run out of image memory.
        .PP
       t@@ -191,7 +191,7 @@ These routines permit unrelated applications sharing a display to share an image
        for example they provide the mechanism behind
        .B getwindow
        (see
       -.IM graphics (3) ).
       +.MR graphics (3) ).
        .PP
        The RGB values in a color are
        .I premultiplied
       t@@ -214,7 +214,7 @@ values between image and user space or external files.
        There is a fixed format for the exchange and storage of
        image data
        (see
       -.IM image (7) ).
       +.MR image (7) ).
        .PP
        .I Unloadimage
        reads a rectangle of pixels from image
       t@@ -271,7 +271,7 @@ but for
        bytes of compressed image
        .I data
        (see
       -.IM image (7) ).
       +.MR image (7) ).
        On each call to
        .IR cloadimage,
        the
       t@@ -289,7 +289,7 @@ return the number of bytes copied.
        .PP
        .I Readimage
        creates an image from data contained in an external file (see
       -.IM image (7)
       +.MR image (7)
        for the file format);
        .I fd
        is a file descriptor obtained by opening such a file for reading.
       t@@ -333,10 +333,10 @@ To allocate a single-pixel replicated image that may be used to paint a region r
        .SH SOURCE
        .B \*9/src/libdraw
        .SH "SEE ALSO"
       -.IM graphics (3) ,
       -.IM draw (3) ,
       -.IM draw (3) ,
       -.IM image (7)
       +.MR graphics (3) ,
       +.MR draw (3) ,
       +.MR draw (3) ,
       +.MR image (7)
        .SH DIAGNOSTICS
        These functions return pointer 0 or integer \-1 on failure, usually due to insufficient
        memory.
 (DIR) diff --git a/man/man3/arg.3 b/man/man3/arg.3
       t@@ -20,7 +20,7 @@ These macros assume the names
        and
        .I argv
        are in scope; see
       -.IM exec (3) .
       +.MR exec (3) .
        .I ARGBEGIN
        and
        .I ARGEND
       t@@ -58,7 +58,7 @@ but instead of returning zero
        runs
        .I code
        and, if that returns, calls
       -.IM abort (3) .
       +.MR abort (3) .
        A typical value for
        .I code
        is 
 (DIR) diff --git a/man/man3/arith3.3 b/man/man3/arith3.3
       t@@ -266,4 +266,4 @@ Subtract the coordinates of two points.
        .SH SOURCE
        .B \*9/src/libgeometry
        .SH "SEE ALSO
       -.IM matrix (3)
       +.MR matrix (3)
 (DIR) diff --git a/man/man3/atof.3 b/man/man3/atof.3
       t@@ -129,7 +129,7 @@ after calling
        .SH SOURCE
        .B \*9/src/lib9
        .SH SEE ALSO
       -.IM fscanf (3)
       +.MR fscanf (3)
        .SH DIAGNOSTICS
        Zero is returned if the beginning of the input string is not
        interpretable as a number; even in this case,
       t@@ -175,4 +175,4 @@ are preprocessor macros defined as
        and
        .IR p9atoll ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/auth.3 b/man/man3/auth.3
       t@@ -95,7 +95,7 @@ CFsys*        nsamount(char *name, char *aname);
        .SH DESCRIPTION
        .PP
        This library, in concert with
       -.IM factotum (4) ,
       +.MR factotum (4) ,
        is used to authenticate users.
        It provides the primary interface to
        .IR factotum .
       t@@ -168,7 +168,7 @@ It provides the primary interface to
        The following routines use the
        .B AuthInfo
        structure returned after a successful authentication by
       -.IM factotum (4) .
       +.MR factotum (4) .
        .PP
        .ne 8
        .EX
       t@@ -212,11 +212,11 @@ file, as opened by
        An
        .B sprint
        (see
       -.IM print (3) )
       +.MR print (3) )
        of 
        .I fmt
        and the variable arg list yields a key template (see
       -.IM factotum (4) )
       +.MR factotum (4) )
        specifying the key to use.
        The template must specify at least the protocol (
        .BI proto= xxx )
       t@@ -258,7 +258,7 @@ arranges a connection to
        either by opening
        .B /mnt/factotum/rpc
        or by using 
       -.IM 9pclient (3)
       +.MR 9pclient (3)
        to connect to a
        .B factotum
        service posted in the current name space.
       t@@ -266,7 +266,7 @@ The returned connection
        is freed using
        .IR auth_freerpc .
        Individual commands can be sent to
       -.IM factotum (4)
       +.MR factotum (4)
        by invoking
        .IR auth_rpc .
        .PP
       t@@ -418,7 +418,7 @@ and
        but execute the protocol on a
        .B CFid*
        (see
       -.IM 9pclient (3) )
       +.MR 9pclient (3) )
        instead of a file descriptor.
        .PP
        .I Fsamount
       t@@ -429,15 +429,15 @@ are like
        and
        .I nsmount
        (see
       -.IM 9pclient (3) )
       +.MR 9pclient (3) )
        but use
        .I factotum
        to authenticate to the file servers.
        .SH SOURCE
        .B \*9/src/libauth
        .SH SEE ALSO
       -.IM factotum (4) ,
       -.IM authsrv (3)
       +.MR factotum (4) ,
       +.MR authsrv (3)
        .SH DIAGNOSTICS
        These routines set
        .IR errstr .
 (DIR) diff --git a/man/man3/authsrv.3 b/man/man3/authsrv.3
       t@@ -68,7 +68,7 @@ If
        is non-nil,
        the network database
        (see
       -.IM ndb (1) )
       +.MR ndb (1) )
        is queried for an entry which contains
        .B authdom=\fIad\fP
        or
       t@@ -212,8 +212,8 @@ to recieve an answer.
        .SH SOURCE
        .B \*9/src/libauthsrv
        .SH SEE ALSO
       -.IM passwd (1) ,
       -.IM dial (3) ,
       +.MR passwd (1) ,
       +.MR dial (3) ,
        Plan 9's
        .IR authsrv (6).
        .SH DIAGNOSTICS
 (DIR) diff --git a/man/man3/bin.3 b/man/man3/bin.3
       t@@ -82,7 +82,7 @@ are ignored, and the result is the same as calling
        and
        .I bingrow
        allocate large chunks of memory using
       -.IM malloc (3)
       +.MR malloc (3)
        and return pieces of these chunks.
        The chunks are
        .IR free 'd
       t@@ -91,7 +91,7 @@ upon a call to
        .SH SOURCE
        .B \*9/src/libbin
        .SH SEE ALSO
       -.IM malloc (3)
       +.MR malloc (3)
        .SH DIAGNOSTICS
        .I binalloc
        and
 (DIR) diff --git a/man/man3/bio.3 b/man/man3/bio.3
       t@@ -93,7 +93,7 @@ for mode
        or creates for mode
        .BR OWRITE .
        It calls
       -.IM malloc (3)
       +.MR malloc (3)
        to allocate a buffer.
        .PP
        .I Bfdopen
       t@@ -104,7 +104,7 @@ for mode
        or
        .BR OWRITE .
        It calls
       -.IM malloc (3)
       +.MR malloc (3)
        to allocate a buffer.
        .PP
        .I Binit
       t@@ -173,7 +173,7 @@ of the most recent string returned by
        .PP
        .I Brdstr
        returns a
       -.IM malloc (3) -allocated
       +.MR malloc (3) -allocated
        buffer containing the next line of input delimited by
        .IR delim ,
        terminated by a NUL (0) byte.
       t@@ -225,7 +225,7 @@ may back up a maximum of five bytes.
        uses
        .I charstod
        (see
       -.IM atof (3) )
       +.MR atof (3) )
        and
        .I Bgetc
        to read the formatted
       t@@ -246,7 +246,7 @@ and a negative value is returned if a read error occurred.
        .PP
        .I Bseek
        applies
       -.IM seek (3)
       +.MR seek (3)
        to
        .IR bp .
        It returns the new file offset.
       t@@ -278,7 +278,7 @@ on the output stream.
        .PP
        .I Bprint
        is a buffered interface to
       -.IM print (3) .
       +.MR print (3) .
        If this causes a
        .IR write
        to occur and there is an error,
       t@@ -325,10 +325,10 @@ written.
        .SH SOURCE
        .B \*9/src/libbio
        .SH SEE ALSO
       -.IM open (3) ,
       -.IM print (3) ,
       -.IM exits (3) ,
       -.IM utf (7) ,
       +.MR open (3) ,
       +.MR print (3) ,
       +.MR exits (3) ,
       +.MR utf (7) ,
        .SH DIAGNOSTICS
        .I Bio
        routines that return integers yield
 (DIR) diff --git a/man/man3/blowfish.3 b/man/man3/blowfish.3
       t@@ -40,13 +40,13 @@ must be a multiple of eight bytes as padding is currently unsupported.
        .SH SOURCE
        .B \*9/src/libsec
        .SH SEE ALSO
       -.IM mp (3) ,
       -.IM aes (3) ,
       -.IM des (3) ,
       -.IM dsa (3) ,
       -.IM elgamal (3) ,
       -.IM rc4 (3) ,
       -.IM rsa (3) ,
       -.IM sechash (3) ,
       -.IM prime (3) ,
       -.IM rand (3)
       +.MR mp (3) ,
       +.MR aes (3) ,
       +.MR des (3) ,
       +.MR dsa (3) ,
       +.MR elgamal (3) ,
       +.MR rc4 (3) ,
       +.MR rsa (3) ,
       +.MR sechash (3) ,
       +.MR prime (3) ,
       +.MR rand (3)
 (DIR) diff --git a/man/man3/cachechars.3 b/man/man3/cachechars.3
       t@@ -30,7 +30,7 @@ A
        may contain too many characters to hold in memory
        simultaneously.
        The graphics library and draw device (see
       -.IM draw (3) )
       +.MR draw (3) )
        cooperate to solve this problem by maintaining a cache of recently used
        character images.
        The details of this cooperation need not be known by most programs:
       t@@ -127,7 +127,7 @@ A
        .B Font
        consists of an overall height and ascent
        and a collection of subfonts together with the ranges of runes (see
       -.IM utf (7) )
       +.MR utf (7) )
        they represent.
        Fonts are described by the following structures.
        .IP
       t@@ -181,7 +181,7 @@ The
        and
        .LR ascent
        fields of Font are described in
       -.IM graphics (3) .
       +.MR graphics (3) .
        .L Sub
        contains
        .L nsub
       t@@ -302,12 +302,12 @@ for replacement when the cache is full.
        .SH SOURCE
        .B \*9/src/libdraw
        .SH SEE ALSO
       -.IM graphics (3) ,
       -.IM allocimage (3) ,
       -.IM draw (3) ,
       -.IM subfont (3) ,
       -.IM image (7) ,
       -.IM font (7)
       +.MR graphics (3) ,
       +.MR allocimage (3) ,
       +.MR draw (3) ,
       +.MR subfont (3) ,
       +.MR image (7) ,
       +.MR font (7)
        .SH DIAGNOSTICS
        All of the functions use the graphics error function (see
       -.IM graphics (3) ).
       +.MR graphics (3) ).
 (DIR) diff --git a/man/man3/cleanname.3 b/man/man3/cleanname.3
       t@@ -31,4 +31,4 @@ must contain room for at least two bytes.
        .SH SOURCE
        .B \*9/src/lib9/cleanname.c
        .SH SEE ALSO
       -.IM cleanname (1)
       +.MR cleanname (1)
 (DIR) diff --git a/man/man3/color.3 b/man/man3/color.3
       t@@ -19,7 +19,7 @@ int        cmap2rgba(int col)
        .SH DESCRIPTION
        These routines convert between `true color' red/green/blue triples and the Plan 9 color map.
        See
       -.IM color (7)
       +.MR color (7)
        for a description of RGBV, the standard color map.
        .PP
        .I Rgb2cmap
       t@@ -41,16 +41,16 @@ and the next 8 representing blue, then green, then red, as for
        .I cmap2rgba
        shifted up 8 bits.
        This 32-bit representation is the format used by 
       -.IM draw (3)
       +.MR draw (3)
        and
       -.IM memdraw (3)
       +.MR memdraw (3)
        library routines that
        take colors as arguments.
        .SH SOURCE
        .B \*9/src/libdraw
        .SH SEE ALSO
       -.IM graphics (3) ,
       -.IM allocimage (3) ,
       -.IM draw (3) ,
       -.IM image (7) ,
       -.IM color (7)
       +.MR graphics (3) ,
       +.MR allocimage (3) ,
       +.MR draw (3) ,
       +.MR image (7) ,
       +.MR color (7)
 (DIR) diff --git a/man/man3/complete.3 b/man/man3/complete.3
       t@@ -86,15 +86,15 @@ function frees a
        structure and its contents.
        .PP
        In
       -.IM rio (1)
       +.MR rio (1)
        and
       -.IM acme (1) ,
       +.MR acme (1) ,
        file name completion is triggered by a control-F character or an Insert character.
        .SH SOURCE
        .B \*9/src/libcomplete
        .SH SEE ALSO
       -.IM rio (1) ,
       -.IM acme (1)
       +.MR rio (1) ,
       +.MR acme (1)
        .SH DIAGNOSTICS
        The
        .I complete
 (DIR) diff --git a/man/man3/ctime.3 b/man/man3/ctime.3
       t@@ -26,7 +26,7 @@ long        tm2sec(Tm *tm)
        converts a time
        .I clock
        such as returned by
       -.IM time (3)
       +.MR time (3)
        into
        .SM ASCII
        (sic)
       t@@ -85,8 +85,8 @@ is not
        .br
        .B \*9/src/lib9/tm2sec.c
        .SH "SEE ALSO"
       -.IM date (1) ,
       -.IM time (3)
       +.MR date (1) ,
       +.MR time (3)
        .SH BUGS
        The return values point to static data
        whose content is overwritten by each call.
       t@@ -112,4 +112,4 @@ are preprocessor macros defined as
        and
        .IR p9tm2sec ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/des.3 b/man/man3/des.3
       t@@ -132,13 +132,13 @@ using
        .SH SOURCE
        .B \*9/src/libsec
        .SH SEE ALSO
       -.IM mp (3) ,
       -.IM aes (3) ,
       -.IM blowfish (3) ,
       -.IM dsa (3) ,
       -.IM elgamal (3) ,
       -.IM rc4 (3) ,
       -.IM rsa (3) ,
       -.IM sechash (3) ,
       -.IM prime (3) ,
       -.IM rand (3)
       +.MR mp (3) ,
       +.MR aes (3) ,
       +.MR blowfish (3) ,
       +.MR dsa (3) ,
       +.MR elgamal (3) ,
       +.MR rc4 (3) ,
       +.MR rsa (3) ,
       +.MR sechash (3) ,
       +.MR prime (3) ,
       +.MR rand (3)
 (DIR) diff --git a/man/man3/dial.3 b/man/man3/dial.3
       t@@ -264,7 +264,7 @@ int callkremvax(void)
        .EE
        .PP
        Connect to a Unix socket served by
       -.IM acme (4) :
       +.MR acme (4) :
        .IP
        .EX
        int dialacme(void)
       t@@ -346,4 +346,4 @@ are preprocessor macros defined as
        .IR p9announce ,
        and so on;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/dirread.3 b/man/man3/dirread.3
       t@@ -19,11 +19,11 @@ long dirreadall(int fd, Dir **buf)
        #define        DIRMAX        (sizeof(Dir)+STATMAX)
        .SH DESCRIPTION
        The data returned by a
       -.IM read (3)
       +.MR read (3)
        on a directory is a set of complete directory entries
        in a machine-independent format, exactly equivalent to
        the result of a
       -.IM stat (3)
       +.MR stat (3)
        on each file or subdirectory in the directory.
        .I Dirread
        decodes the directory entries into a machine-dependent form.
       t@@ -35,11 +35,11 @@ structures
        whose address is returned in
        .B *buf
        (see
       -.IM stat (3)
       +.MR stat (3)
        for the layout of a
        .BR Dir ).
        The array is allocated with
       -.IM malloc (3)
       +.MR malloc (3)
        each time
        .I dirread
        is called.
       t@@ -50,7 +50,7 @@ is like
        but reads in the entire directory; by contrast,
        .I dirread
        steps through a directory one
       -.IM read (3)
       +.MR read (3)
        at a time.
        .PP
        Directory entries have variable length.
       t@@ -85,9 +85,9 @@ The file offset is advanced by the number of bytes actually read.
        .SH SOURCE
        .B \*9/src/lib9/dirread.c
        .SH SEE ALSO
       -.IM intro (3) ,
       -.IM open (3) ,
       -.IM read (3)
       +.MR intro (3) ,
       +.MR open (3) ,
       +.MR read (3)
        .SH DIAGNOSTICS
        .I Dirread
        and
 (DIR) diff --git a/man/man3/draw.3 b/man/man3/draw.3
       t@@ -259,7 +259,7 @@ The clipping region may be modified dynamically using
        .TP
        .B chan
        The pixel channel format descriptor, as described in
       -.IM image (7) .
       +.MR image (7) .
        The value should not be modified after the image is created.
        .TP
        .B depth
       t@@ -268,7 +268,7 @@ number of bits per pixel in the picture;
        it is identically
        .B chantodepth(chan)
        (see
       -.IM graphics (3) )
       +.MR graphics (3) )
        and is provided as a convenience.
        The value should not be modified after the image is created.
        .TP
       t@@ -712,7 +712,7 @@ what
        is to
        .B atan
        (see
       -.IM sin (3) ).
       +.MR sin (3) ).
        .TP
        .BI border( dst\fP,\fP\ r\fP,\fP\ i\fP,\fP\ color\fP,\fP\ sp\fP)
        .I Border
       t@@ -810,11 +810,11 @@ is non-zero.
        .SH SOURCE
        .B \*9/src/libdraw
        .SH SEE ALSO
       -.IM graphics (3) ,
       -.IM stringsize (3) ,
       -.IM color (7) ,
       -.IM utf (7) ,
       -.IM addpt (3)
       +.MR graphics (3) ,
       +.MR stringsize (3) ,
       +.MR color (7) ,
       +.MR utf (7) ,
       +.MR addpt (3)
        .PP
        T. Porter, T. Duff.
        ``Compositing Digital Images'', 
 (DIR) diff --git a/man/man3/drawfcall.3 b/man/man3/drawfcall.3
       t@@ -30,15 +30,15 @@ int        readwsysmsg(int fd, uchar *buf, uint nbuf)
        uint        sizeW2M(Wsysmsg *w)
        .SH DESCRIPTION
        These routines are analogues of the routines described in 
       -.IM fcall (3) .
       +.MR fcall (3) .
        They manipulate graphics device protocol messages
        rather than 9P protocol messages.
        The graphics device protocol is used for internal 
        communication between the
       -.IM devdraw (1)
       +.MR devdraw (1)
        graphics server
        and the
       -.IM draw (3)
       +.MR draw (3)
        library.
        A
        .B Wsysmsg
       t@@ -48,6 +48,6 @@ The protocol is intentionally undocumented and may change.
        .SH SOURCE
        .B \*9/src/libdraw/drawfcall.c
        .SH SEE ALSO
       -.IM devdraw (1) ,
       -.IM draw (3) ,
       -.IM graphics (3)
       +.MR devdraw (1) ,
       +.MR draw (3) ,
       +.MR graphics (3)
 (DIR) diff --git a/man/man3/dsa.3 b/man/man3/dsa.3
       t@@ -84,7 +84,7 @@ and
        generated by
        .IR DSAprimes
        (see
       -.IM prime (3) ).
       +.MR prime (3) ).
        Otherwise,
        .B p
        and
       t@@ -128,17 +128,17 @@ are provided to manage signature storage.
        converts an ASN1 formatted DSA private key into the corresponding
        .B DSApriv
        structure; see 
       -.IM rsa (3)
       +.MR rsa (3)
        for other ASN1 routines.
        .SH SOURCE
        .B \*9/src/libsec
        .SH SEE ALSO
       -.IM mp (3) ,
       -.IM aes (3) ,
       -.IM blowfish (3) ,
       -.IM des (3) ,
       -.IM rc4 (3) ,
       -.IM rsa (3) ,
       -.IM sechash (3) ,
       -.IM prime (3) ,
       -.IM rand (3)
       +.MR mp (3) ,
       +.MR aes (3) ,
       +.MR blowfish (3) ,
       +.MR des (3) ,
       +.MR rc4 (3) ,
       +.MR rsa (3) ,
       +.MR sechash (3) ,
       +.MR prime (3) ,
       +.MR rand (3)
 (DIR) diff --git a/man/man3/dup.3 b/man/man3/dup.3
       t@@ -36,4 +36,4 @@ To avoid name conflicts with the underlying system,
        is a preprocessor macro defined as
        .IR p9dup ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/elgamal.3 b/man/man3/elgamal.3
       t@@ -113,13 +113,13 @@ are provided to manage signature storage.
        .SH SOURCE
        .B \*9/src/libsec
        .SH SEE ALSO
       -.IM mp (3) ,
       -.IM aes (3) ,
       -.IM blowfish (3) ,
       -.IM des (3) ,
       -.IM dsa (3) ,
       -.IM rc4 (3) ,
       -.IM rsa (3) ,
       -.IM sechash (3) ,
       -.IM prime (3) ,
       -.IM rand (3)
       +.MR mp (3) ,
       +.MR aes (3) ,
       +.MR blowfish (3) ,
       +.MR des (3) ,
       +.MR dsa (3) ,
       +.MR rc4 (3) ,
       +.MR rsa (3) ,
       +.MR sechash (3) ,
       +.MR prime (3) ,
       +.MR rand (3)
 (DIR) diff --git a/man/man3/encode.3 b/man/man3/encode.3
       t@@ -49,9 +49,9 @@ of 8.
        .PP
        .I Encodefmt
        can be used with
       -.IM fmtinstall (3)
       +.MR fmtinstall (3)
        and
       -.IM print (3)
       +.MR print (3)
        to print encoded representations of byte arrays.
        The verbs are
        .TP
 (DIR) diff --git a/man/man3/encrypt.3 b/man/man3/encrypt.3
       t@@ -84,4 +84,4 @@ are preprocessor macros defined as
        and
        .IR p9decrypt ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/errstr.3 b/man/man3/errstr.3
       t@@ -53,7 +53,7 @@ the result is an empty string.
        The verb
        .B r
        in
       -.IM print (3)
       +.MR print (3)
        calls
        .I errstr
        and outputs the error string.
       t@@ -92,8 +92,8 @@ will reset
        .I Errstr
        always returns 0.
        .SH SEE ALSO
       -.IM intro (3) ,
       -.IM perror (3)
       +.MR intro (3) ,
       +.MR perror (3)
        .SH BUGS
        The implementation sets
        .I errno
       t@@ -104,4 +104,4 @@ When
        .I errno
        is set to other values, the error string
        is synthesized using
       -.IM strerror (3) .
       +.MR strerror (3) .
 (DIR) diff --git a/man/man3/event.3 b/man/man3/event.3
       t@@ -93,12 +93,12 @@ enum{
        These routines provide an interface to multiple sources of input for unthreaded
        programs.
        Threaded programs (see
       -.IM thread (3) )
       +.MR thread (3) )
        should instead use the threaded mouse and keyboard interface described
        in
       -.IM mouse (3)
       +.MR mouse (3)
        and
       -.IM keyboard (3) .
       +.MR keyboard (3) .
        .PP
        .I Einit
        must be called first.
       t@@ -113,7 +113,7 @@ the mouse and keyboard events will be enabled;
        in this case,
        .IR initdraw
        (see
       -.IM graphics (3) )
       +.MR graphics (3) )
        must have already been called.
        The user must provide a function called
        .IR eresized
       t@@ -123,7 +123,7 @@ is running has been resized; the argument
        is a flag specifying whether the program must call
        .I getwindow
        (see
       -.IM graphics (3) )
       +.MR graphics (3) )
        to re-establish a connection to its window.
        After resizing (and perhaps calling
        .IR getwindow ),
       t@@ -266,7 +266,7 @@ The return is the same as for
        .IR eread .
        .PP
        As described in
       -.IM graphics (3) ,
       +.MR graphics (3) ,
        the graphics functions are buffered.
        .IR Event ,
        .IR eread ,
       t@@ -370,15 +370,15 @@ changes the cursor image to that described by the
        .B Cursor
        .I c
        (see
       -.IM mouse (3) ).
       +.MR mouse (3) ).
        If
        .B c
        is nil, it restores the image to the default arrow.
        .SH SOURCE
        .B \*9/src/libdraw
        .SH "SEE ALSO"
       -.IM rio (1) ,
       -.IM graphics (3) ,
       -.IM plumb (3) ,
       +.MR rio (1) ,
       +.MR graphics (3) ,
       +.MR plumb (3) ,
        .\" .IR cons (3),
       -.IM draw (3)
       +.MR draw (3)
 (DIR) diff --git a/man/man3/exec.3 b/man/man3/exec.3
       t@@ -25,11 +25,11 @@ points to the name of the file
        to be executed; it must not be a directory, and the permissions
        must allow the current user to execute it
        (see
       -.IM stat (3) ).
       +.MR stat (3) ).
        It should also be a valid binary image, as defined by the local
        operating system, or a shell script
        (see
       -.IM rc (1) ).
       +.MR rc (1) ).
        The first line of a
        shell script must begin with
        .L #!
       t@@ -92,24 +92,24 @@ files remain open across
        .B OCEXEC
        OR'd
        into the open mode; see
       -.IM open (3) );
       +.MR open (3) );
        and the working directory and environment
        (see
       -.IM getenv (3) )
       +.MR getenv (3) )
        remain the same.
        However, a newly
        .I exec'ed
        process has no notification handlers
        (see
       -.IM notify (3) ).
       +.MR notify (3) ).
        .SH SOURCE
        .B \*9/src/lib9/exec.c
        .br
        .B \*9/src/lib9/execl.c
        .SH SEE ALSO
       -.IM prof (1) ,
       -.IM intro (3) ,
       -.IM stat (3)
       +.MR prof (1) ,
       +.MR intro (3) ,
       +.MR stat (3)
        .SH DIAGNOSTICS
        If these functions fail, they return and set
        .IR errstr .
       t@@ -138,4 +138,4 @@ are preprocessor macros defined as
        and
        .IR p9execl ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/exits.3 b/man/man3/exits.3
       t@@ -39,7 +39,7 @@ explanation of the reason for
        exiting, or a null pointer or empty string to indicate normal termination.
        The string is passed to the parent process, prefixed by the name and process
        id of the exiting process, when the parent does a
       -.IM wait (3) .
       +.MR wait (3) .
        .PP
        Before calling
        .I _exits
       t@@ -85,8 +85,8 @@ cancels a previous registration of an exit function.
        .br
        .B \*9/src/lib9/_exits.c
        .SH "SEE ALSO"
       -.IM fork (2) ,
       -.IM wait (3)
       +.MR fork (2) ,
       +.MR wait (3)
        .SH BUGS
        Because of limitations of Unix, the exit status of a
        process can only be an 8-bit integer.
       t@@ -117,4 +117,4 @@ are preprocessor macros defined as
        and
        .IR p9atexitdont ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/fcall.3 b/man/man3/fcall.3
       t@@ -225,7 +225,7 @@ by a successful call to
        Another structure is
        .BR Dir ,
        used by the routines described in
       -.IM stat (3) .
       +.MR stat (3) .
        .I ConvM2D
        converts the machine-independent form starting at
        .I ap
       t@@ -293,7 +293,7 @@ contain a validly formatted machine-independent
        entry suitable as an argument, for example, for the
        .B wstat
        (see
       -.IM stat (3) )
       +.MR stat (3) )
        system call.
        It checks that the sizes of all the elements of the the entry sum to exactly
        .IR nbuf ,
       t@@ -321,7 +321,7 @@ for an incorrectly formatted entry.
        and
        .I dirmodefmt
        are formatting routines, suitable for
       -.IM fmtinstall (3) .
       +.MR fmtinstall (3) .
        They convert
        .BR Dir* ,
        .BR Fcall* ,
       t@@ -343,7 +343,7 @@ with format letter
        .PP
        .I Read9pmsg
        calls
       -.IM read (3)
       +.MR read (3)
        multiple times, if necessary, to read an entire 9P message into
        .BR buf .
        The return value is 0 for end of file, or -1 for error; it does not return
       t@@ -351,7 +351,7 @@ partial messages.
        .SH SOURCE
        .B \*9/src/lib9
        .SH SEE ALSO
       -.IM intro (3) ,
       -.IM 9p (3) ,
       -.IM stat (3) ,
       +.MR intro (3) ,
       +.MR 9p (3) ,
       +.MR stat (3) ,
        .IR intro (9p)
 (DIR) diff --git a/man/man3/flate.3 b/man/man3/flate.3
       t@@ -173,7 +173,7 @@ The block functions return the number of bytes produced when they succeed.
        .I Mkcrctab
        allocates
        (using
       -.IM malloc (3) ),
       +.MR malloc (3) ),
        initializes, and returns a table for rapid computation of 32 bit CRC values using the polynomial
        .IR poly .
        .I Blockcrc
 (DIR) diff --git a/man/man3/fmtinstall.3 b/man/man3/fmtinstall.3
       t@@ -94,16 +94,16 @@ int        fmtrunestrcpy(Fmt *f, Rune *s);
        int        errfmt(Fmt *f);
        .SH DESCRIPTION
        The interface described here allows the construction of custom
       -.IM print (3)
       +.MR print (3)
        verbs and output routines.
        In essence, they provide access to the workings of the formatted print code.
        .PP
        The
       -.IM print (3)
       +.MR print (3)
        suite maintains its state with a data structure called
        .BR Fmt .
        A typical call to
       -.IM print (3)
       +.MR print (3)
        or its relatives initializes a
        .B Fmt
        structure, passes it to subsidiary routines to process the output,
       t@@ -154,7 +154,7 @@ to generate the output.
        These behave like
        .B fprint
        (see
       -.IM print (3) )
       +.MR print (3) )
        or
        .B vfprint
        except that the characters are buffered until
       t@@ -207,7 +207,7 @@ In
        are the width and precision, and
        .IB fp ->flags
        the decoded flags for the verb (see
       -.IM print (3)
       +.MR print (3)
        for a description of these items).
        The standard flag values are:
        .B FmtSign
       t@@ -282,7 +282,7 @@ produced.
        .PP
        Some internal functions may be useful to format primitive types.
        They honor the width, precision and flags as described in
       -.IM print (3) .
       +.MR print (3) .
        .I Fmtrune
        formats a single character
        .BR r .
       t@@ -307,7 +307,7 @@ regardless of whether the output is bytes or runes.
        This function prints an error message with a variable
        number of arguments and then quits.
        Compared to the corresponding example in
       -.IM print (3) ,
       +.MR print (3) ,
        this version uses a smaller buffer, will never truncate
        the output message, but might generate multiple
        .B write
       t@@ -364,9 +364,9 @@ main(...)
        .SH SOURCE
        .B \*9/src/lib9/fmt
        .SH SEE ALSO
       -.IM print (3) ,
       -.IM utf (7) ,
       -.IM errstr (3)
       +.MR print (3) ,
       +.MR utf (7) ,
       +.MR errstr (3)
        .SH DIAGNOSTICS
        These routines return negative numbers or nil for errors and set
        .IR errstr .
 (DIR) diff --git a/man/man3/frame.3 b/man/man3/frame.3
       t@@ -73,9 +73,9 @@ enum{
        This library supports
        .I frames
        of editable text in a single font on raster displays, such as in
       -.IM sam (1)
       +.MR sam (1)
        and
       -.IM 9term (1) .
       +.MR 9term (1) .
        Frames may hold any character except NUL (0).
        Long lines are folded and tabs are at fixed intervals.
        .PP
       t@@ -239,7 +239,7 @@ If a
        .B Frame
        is being moved but not resized, that is, if the shape of its containing
        rectangle is unchanged, it is sufficient to use
       -.IM draw (3)
       +.MR draw (3)
        to copy the containing rectangle from the old to the new location and then call
        .I frsetrects
        to establish the new geometry.
       t@@ -357,6 +357,6 @@ and
        .SH SOURCE
        .B \*9/src/libframe
        .SH SEE ALSO
       -.IM graphics (3) ,
       -.IM draw (3) ,
       -.IM cachechars (3) .
       +.MR graphics (3) ,
       +.MR draw (3) ,
       +.MR cachechars (3) .
 (DIR) diff --git a/man/man3/genrandom.3 b/man/man3/genrandom.3
       t@@ -25,11 +25,11 @@ number generator.  The X9.17 generator is seeded by 24
        truly random bytes read via
        .I truerand
        (see
       -.IM rand (3) ).
       +.MR rand (3) ).
        .PP
        .I Prng
        uses the native
       -.IM rand (3)
       +.MR rand (3)
        pseudo-random number generator to fill the buffer.  Used with
        .IR srand ,
        this function can produce a reproducible stream of pseudo random
       t@@ -38,8 +38,8 @@ numbers useful in testing.
        Both functions may be passed to
        .I mprand
        (see
       -.IM mp (3) ).
       +.MR mp (3) ).
        .SH SOURCE
        .B \*9/src/libsec
        .SH SEE ALSO
       -.IM mp (3)
       +.MR mp (3)
 (DIR) diff --git a/man/man3/get9root.3 b/man/man3/get9root.3
       t@@ -49,7 +49,7 @@ if different from
        should be freed with
        .I free
        (see
       -.IM malloc (3) )
       +.MR malloc (3) )
        when no longer needed.
        .PP
        As a convention, programs should never
       t@@ -57,7 +57,7 @@ As a convention, programs should never
        paths obtained from user input.
        .SH EXAMPLE
        The
       -.IM plumber (4)
       +.MR plumber (4)
        uses this code to find unrooted file names included by plumb rules.
        .IP
        .EX
       t@@ -69,7 +69,7 @@ fd = open(unsharp(buf), OREAD);
        .br
        .B \*9/src/lib9/unsharp.c
        .SH SEE ALSO
       -.IM intro (4)
       +.MR intro (4)
        .SH BUGS
        .I Get9root
        could be smarter about finding the tree when
 (DIR) diff --git a/man/man3/getenv.3 b/man/man3/getenv.3
       t@@ -18,7 +18,7 @@ int   putenv(char *name, char *val)
        fetches the environment value associated with
        .I name
        into memory allocated with
       -.IM malloc (3) ,
       +.MR malloc (3) ,
        0-terminates it,
        and returns a pointer to that area.
        If no file exists, 0
       t@@ -44,4 +44,4 @@ are preprocessor macros defined as
        and
        .IR p9putenv ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/getfields.3 b/man/man3/getfields.3
       t@@ -75,9 +75,9 @@ with
        non-zero,
        except that fields may be quoted using single quotes, in the manner
        of
       -.IM rc (1) .
       +.MR rc (1) .
        See
       -.IM quote (3)
       +.MR quote (3)
        for related quote-handling software.
        .PP
        .I Tokenize
       t@@ -91,5 +91,5 @@ set to \f5"\et\er\en "\fP.
        .SH SEE ALSO
        .I strtok
        in
       -.IM strcat (3) ,
       -.IM quote (3) .
       +.MR strcat (3) ,
       +.MR quote (3) .
 (DIR) diff --git a/man/man3/getns.3 b/man/man3/getns.3
       t@@ -14,9 +14,9 @@ returns a pointer to a malloced string that contains the
        path to the name space directory for the current process.
        The name space directory is a clumsy substitute
        for Plan 9's per-process name spaces; see 
       -.IM intro (4)
       +.MR intro (4)
        for details.
        .SH SOURCE
        .B \*9/src/lib9/getns.c
        .SH SEE ALSO
       -.IM intro (4)
       +.MR intro (4)
 (DIR) diff --git a/man/man3/getsnarf.3 b/man/man3/getsnarf.3
       t@@ -20,7 +20,7 @@ returns a copy of the current buffer;
        the returned pointer should be freed with
        .I free
        (see
       -.IM malloc (3) )
       +.MR malloc (3) )
        when no longer needed.
        .PP
        .I Putsnarf
       t@@ -36,4 +36,4 @@ will convert as necessary.
        .SH SOURCE
        .B \*9/src/libdraw/snarf.c
        .SH SEE ALSO
       -.IM snarfer (1)
       +.MR snarfer (1)
 (DIR) diff --git a/man/man3/getuser.3 b/man/man3/getuser.3
       t@@ -19,7 +19,7 @@ name of the user who
        owns the current process.
        .I Getuser
        calls
       -.IM getuid (2)
       +.MR getuid (2)
        and then reads
        .B /etc/passwd
        to find the corresponding name.
       t@@ -33,7 +33,7 @@ looks first for an environment variable
        If there is no such variable,
        .I sysname
        calls
       -.IM gethostname (2)
       +.MR gethostname (2)
        and truncates the returned name at the first dot.
        If
        .I gethostname 
 (DIR) diff --git a/man/man3/getwd.3 b/man/man3/getwd.3
       t@@ -23,10 +23,10 @@ bytes in the buffer provided.
        .SH SOURCE
        .B \*9/src/lib9/getwd.c
        .SH "SEE ALSO"
       -.IM pwd (1)
       +.MR pwd (1)
        .SH DIAGNOSTICS
        On error, zero is returned.
       -.IM Errstr (3)
       +.MR Errstr (3)
        may be consulted for more information.
        .SH BUGS
        To avoid name conflicts with the underlying system,
       t@@ -34,4 +34,4 @@ To avoid name conflicts with the underlying system,
        is a preprocessor macro defined as
        .IR p9getwd ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/graphics.3 b/man/man3/graphics.3
       t@@ -107,7 +107,7 @@ extern Font    *font
        A
        .B Display
        structure represents a connection to the graphics device,
       -.IM draw (3) ,
       +.MR draw (3) ,
        holding all graphics resources associated with the connection,
        including in particular raster image data in use by the client program.
        The structure is defined (in part) as:
       t@@ -135,7 +135,7 @@ A
        .B Point
        is a location in an Image
        (see below and
       -.IM draw (3) ),
       +.MR draw (3) ),
        such as the display, and is defined as:
        .IP
        .EX
       t@@ -184,18 +184,18 @@ contains the coordinates of the first point beyond the rectangle.
        The
        .B Image
        data structure is defined in
       -.IM draw (3) .
       +.MR draw (3) .
        .PP
        A
        .B Font
        is a set of character images, indexed by runes (see
       -.IM utf (7) ).
       +.MR utf (7) ).
        The images are organized into
        .BR Subfonts ,
        each containing the images for a small, contiguous set of runes.
        The detailed format of these data structures,
        which are described in detail in
       -.IM cachechars (3) ,
       +.MR cachechars (3) ,
        is immaterial for most applications.
        .B Font
        and
       t@@ -210,7 +210,7 @@ and
        the distance from the top of the highest character to the bottom of
        the lowest character (and hence, the interline spacing).
        See
       -.IM cachechars (3)
       +.MR cachechars (3)
        for more details.
        .PP
        .I Buildfont
       t@@ -221,7 +221,7 @@ returning a
        pointer that can be used by
        .B string
        (see
       -.IM draw (3) )
       +.MR draw (3) )
        to draw characters from the font.
        .I Openfont
        does the same, but reads the description
       t@@ -231,7 +231,7 @@ frees a font.
        In contrast to Plan 9, font names in Plan 9 from User Space are
        a small language describing the desired font.
        See
       -.IM font (7)
       +.MR font (7)
        for details.
        .PP
        A
       t@@ -274,7 +274,7 @@ structure representing the connection),
        (an
        .B Image
        representing the display memory itself or, if
       -.IM rio (1)
       +.MR rio (1)
        is running, the client's window),
        and
        .B font
       t@@ -287,7 +287,7 @@ which is written to
        .B /dev/label
        if non-nil
        so that it can be used to identify the window when hidden (see
       -.IM rio (1) ).
       +.MR rio (1) ).
        The font is created by reading the named
        .I font
        file.  If
       t@@ -301,7 +301,7 @@ if
        is not set, it imports the default (usually minimal)
        font from the operating system.
        (See
       -.IM font (7)
       +.MR font (7)
        for a full discussion of font syntaxes.)
        The global
        .I font
       t@@ -322,7 +322,7 @@ is nil, the library provides a default, called
        Another effect of
        .I initdraw
        is that it installs
       -.IM print (3)
       +.MR print (3)
        formats
        .I Pfmt
        and
       t@@ -360,9 +360,9 @@ and
        files; and
        .I ref
        specifies the refresh function to be used to create the window, if running under
       -.IM rio (1)
       +.MR rio (1)
        (see
       -.IM window (3) ).
       +.MR window (3) ).
        .\" .PP
        .\" The function
        .\" .I newwindow
       t@@ -435,11 +435,11 @@ by looking in
        to find the name of the window and opening it using
        .B namedimage
        (see
       -.IM allocimage (3) ).
       +.MR allocimage (3) ).
        The resulting window will be created using the refresh method
        .I ref
        (see
       -.IM window (3) );
       +.MR window (3) );
        this should almost always be
        .B Refnone
        because
       t@@ -456,7 +456,7 @@ defining the window (or the overall display, if no window system is running); an
        a pointer to the
        .B Screen
        representing the root of the window's hierarchy. (See
       -.IM window (3) .
       +.MR window (3) .
        The overloading of the
        .B screen
        word is an unfortunate historical accident.)
       t@@ -528,15 +528,15 @@ the window boundaries; otherwise
        is a no-op.
        .PP
        The graphics functions described in
       -.IM draw (3) ,
       -.IM allocimage (3) ,
       -.IM cachechars (3) ,
       +.MR draw (3) ,
       +.MR allocimage (3) ,
       +.MR cachechars (3) ,
        and
       -.IM subfont (3)
       +.MR subfont (3)
        are implemented by writing commands to files under
        .B /dev/draw
        (see
       -.IM draw (3) );
       +.MR draw (3) );
        the writes are buffered, so the functions may not take effect immediately.
        .I Flushimage
        flushes the buffer, doing all pending graphics operations.
       t@@ -546,7 +546,7 @@ is non-zero, any changes are also copied from the `soft screen' (if any) in the
        driver to the visible frame buffer.
        The various allocation routines in the library flush automatically, as does the event
        package (see
       -.IM event (3) );
       +.MR event (3) );
        most programs do not need to call
        .IR flushimage .
        It returns \-1 on error.
       t@@ -563,13 +563,13 @@ and
        .I chantostr
        convert between the channel descriptor strings
        used by
       -.IM image (7)
       +.MR image (7)
        and the internal 
        .B ulong
        representation 
        used by the graphics protocol
        (see
       -.IM draw (3) 's
       +.MR draw (3) 's
        .B b
        message).
        .B Chantostr
       t@@ -599,7 +599,7 @@ if(getwindow(display, Refnone) < 0)
        .EE
        .PP
        To create and set up a new
       -.IM rio (1)
       +.MR rio (1)
        window,
        .IP
        .EX
       t@@ -630,23 +630,23 @@ if(gengetwindow(display, "/tmp/winname",
        .SH SOURCE
        .B \*9/src/libdraw
        .SH "SEE ALSO"
       -.IM rio (1) ,
       -.IM addpt (3) ,
       -.IM allocimage (3) ,
       -.IM cachechars (3) ,
       -.IM subfont (3) ,
       -.IM draw (3) ,
       -.IM event (3) ,
       -.IM frame (3) ,
       -.IM print (3) ,
       -.IM window (3) ,
       -.IM draw (3) ,
       +.MR rio (1) ,
       +.MR addpt (3) ,
       +.MR allocimage (3) ,
       +.MR cachechars (3) ,
       +.MR subfont (3) ,
       +.MR draw (3) ,
       +.MR event (3) ,
       +.MR frame (3) ,
       +.MR print (3) ,
       +.MR window (3) ,
       +.MR draw (3) ,
        .\" .IR rio (4),
       -.IM image (7) ,
       -.IM font (7)
       +.MR image (7) ,
       +.MR font (7)
        .SH DIAGNOSTICS
        An error function may call
       -.IM errstr (3)
       +.MR errstr (3)
        for further diagnostics.
        .SH BUGS
        The names
 (DIR) diff --git a/man/man3/html.3 b/man/man3/html.3
       t@@ -1411,7 +1411,7 @@ would not otherwise fit), and
        .SH SOURCE
        .B \*9/src/libhtml
        .SH SEE ALSO
       -.IM fmt (1)
       +.MR fmt (1)
        .PP
        W3C World Wide Web Consortium,
        ``HTML 4.01 Specification''.
 (DIR) diff --git a/man/man3/ioproc.3 b/man/man3/ioproc.3
       t@@ -80,14 +80,14 @@ and
        execute the
        similarly named library or system calls
        (see
       -.IM close (2) ,
       -.IM dial (3) ,
       -.IM open (3) ,
       -.IM read (3) ,
       -.IM fcall (3) ,
       -.IM sendfd (3) ,
       +.MR close (2) ,
       +.MR dial (3) ,
       +.MR open (3) ,
       +.MR read (3) ,
       +.MR fcall (3) ,
       +.MR sendfd (3) ,
        and
       -.IM sleep (3) )
       +.MR sleep (3) )
        in the slave process associated with
        .IR io .
        It is an error to execute more than one call
       t@@ -187,10 +187,10 @@ ioread(Ioproc *io, int fd, void *a, long n)
        .SH SOURCE
        .B \*9/src/libthread
        .SH SEE ALSO
       -.IM dial (3) ,
       -.IM open (3) ,
       -.IM read (3) ,
       -.IM thread (3)
       +.MR dial (3) ,
       +.MR open (3) ,
       +.MR read (3) ,
       +.MR thread (3)
        .SH BUGS
        .I Iointerrupt
        is currently unimplemented.
 (DIR) diff --git a/man/man3/ip.3 b/man/man3/ip.3
       t@@ -126,7 +126,7 @@ The string representation of Ethernet addresses is exactly
        .PP
        .I Eipfmt
        is a
       -.IM print (3)
       +.MR print (3)
        formatter for Ethernet (verb
        .BR E )
        addresses,
       t@@ -340,4 +340,4 @@ point to point.
        .SH SOURCE
        .B \*9/src/libip
        .SH SEE ALSO
       -.IM print (3)
       +.MR print (3)
 (DIR) diff --git a/man/man3/isalpharune.3 b/man/man3/isalpharune.3
       t@@ -35,7 +35,7 @@ in particular a subset of their properties as defined in the Unicode standard.
        Unicode defines some characters as alphabetic and specifies three cases:
        upper, lower, and title.
        Analogously to
       -.IM isalpha (3)
       +.MR isalpha (3)
        for
        .SM ASCII\c
        ,
 (DIR) diff --git a/man/man3/keyboard.3 b/man/man3/keyboard.3
       t@@ -23,14 +23,14 @@ void                        closekeyboard(Keyboard *kc)
        .SH DESCRIPTION
        These functions access and control a keyboard interface
        for character-at-a-time I/O in a multi-threaded environment, usually in combination with
       -.IM mouse (3) .
       +.MR mouse (3) .
        They use the message-passing
        .B Channel
        interface in the threads library
        (see
       -.IM thread (3) );
       +.MR thread (3) );
        programs that wish a more event-driven, single-threaded approach should use
       -.IM event (3) .
       +.MR event (3) .
        .PP
        .I Initkeyboard
        opens a connection to the keyboard and returns a
       t@@ -86,10 +86,10 @@ structure.
        .SH SOURCE
        .B \*9/src/libdraw
        .SH SEE ALSO
       -.IM graphics (3) ,
       -.IM draw (3) ,
       -.IM event (3) ,
       -.IM thread (3) .
       +.MR graphics (3) ,
       +.MR draw (3) ,
       +.MR event (3) ,
       +.MR thread (3) .
        .SH BUGS
        Because the interface delivers complete runes,
        there is no way to report lesser actions such as
 (DIR) diff --git a/man/man3/lock.3 b/man/man3/lock.3
       t@@ -80,7 +80,7 @@ are rendezvous points.
        Locks and rendezvous points have trivial implementations in programs
        not using the thread library
        (see
       -.IM thread (3) ),
       +.MR thread (3) ),
        since such programs have no concurrency.
        .PP
        Used carelessly, spin locks can be expensive and can easily generate deadlocks.
 (DIR) diff --git a/man/man3/mach-cmd.3 b/man/man3/mach-cmd.3
       t@@ -64,7 +64,7 @@ fields) of all currently open headers
        (see
        .I symopen
        in
       -.IM mach-symbol (3) ).
       +.MR mach-symbol (3) ).
        When dynamically linked objects have been attached,
        they are present in this linked list,
        and therefore included in searches by
       t@@ -73,7 +73,7 @@ and therefore included in searches by
        and
        .I findsym
        (see
       -.IM mach-symbol (3) ).
       +.MR mach-symbol (3) ).
        .TP
        .I corhdr
        The file header for the core dump, if any.
       t@@ -118,9 +118,9 @@ loaded.
        uses all of these functions while
        parsing an argument vector as would be passed to
        a debugger like
       -.IM db (1)
       +.MR db (1)
        or
       -.IM acid (1) .
       +.MR acid (1) .
        It expects a list of executable files, core dump files, or process ids,
        given in any order.
        If extra arguments are given (for example, more than one executable, or both
       t@@ -133,9 +133,9 @@ fills them in as best it can.
        .SH SOURCE
        .B \*9/src/libmach
        .SH "SEE ALSO
       -.IM mach (3) ,
       -.IM mach-file (3) ,
       -.IM mach-map (3)
       +.MR mach (3) ,
       +.MR mach-file (3) ,
       +.MR mach-map (3)
        .SH BUGS
        The interface needs to be changed to support
        multiple threads, each with its own register set.
 (DIR) diff --git a/man/man3/mach-file.3 b/man/man3/mach-file.3
       t@@ -161,10 +161,10 @@ The memory at
        should be freed via
        .I free
        (see
       -.IM malloc (3) )
       +.MR malloc (3) )
        when no longer needed.
        .SH SOURCE
        .B \*9/src/libmach
        .SH "SEE ALSO"
       -.IM mach (3) ,
       -.IM mach-map (3)
       +.MR mach (3) ,
       +.MR mach-map (3)
 (DIR) diff --git a/man/man3/mach-map.3 b/man/man3/mach-map.3
       t@@ -133,10 +133,10 @@ via
        data structures that provides access to an address space
        and register set.
        The functions described in
       -.IM mach-file (3)
       +.MR mach-file (3)
        are typically used to construct these maps.
        Related library functions described in 
       -.IM mach-symbol (3)
       +.MR mach-symbol (3)
        provide similar access to symbol tables.
        .PP
        Each
       t@@ -178,7 +178,7 @@ The
        .B rw
        function is most commonly used to provide
        access to executing processes via
       -.IM ptrace (2)
       +.MR ptrace (2)
        and to zeroed segments.
        .PP
        .I Allocmap
       t@@ -346,7 +346,7 @@ such locations are useful for passing specific constants to
        functions expect locations, such as
        .I unwind
        (see
       -.IM mach-stack (3) ).
       +.MR mach-stack (3) ).
        .PP
        .I Loccmp
        compares two locations, returning negative, zero, or positive
       t@@ -360,7 +360,7 @@ which are ordered before indirections.
        .PP
        .I Locfmt
        is a 
       -.IM print (3) -verb
       +.MR print (3) -verb
        that formats a
        .B Loc
        structure
       t@@ -371,7 +371,7 @@ Indirection locations are needed in some contexts (e.g., when
        using
        .I findlsym
        (see
       -.IM mach-symbol (3) )),
       +.MR mach-symbol (3) )),
        but bothersome in most.
        .I Locsimplify
        rewrites indirections as absolute memory addresses, by evaluating
       t@@ -397,8 +397,8 @@ function families as necessary.
        .SH SOURCE
        .B \*9/src/libmach
        .SH "SEE ALSO"
       -.IM mach (3) ,
       -.IM mach-file (3)
       +.MR mach (3) ,
       +.MR mach-file (3)
        .SH DIAGNOSTICS
        These routines set
        .IR errstr .
 (DIR) diff --git a/man/man3/mach-stack.3 b/man/man3/mach-stack.3
       t@@ -68,7 +68,7 @@ a new
        .I rget
        function, and a symbol 
        (see
       -.IM mach-symbol (3) )
       +.MR mach-symbol (3) )
        describing the current function
        (nil if no symbol is known).
        The value returned by the tracer
       t@@ -180,6 +180,6 @@ trace(Map *map, ulong pc, ulong callerpc,
        .SH SOURCE
        .B \*9/src/libmach
        .SH SEE ALSO
       -.IM mach (3)
       +.MR mach (3)
        .SH BUGS
        Need to talk about Regs
 (DIR) diff --git a/man/man3/mach-swap.3 b/man/man3/mach-swap.3
       t@@ -114,4 +114,4 @@ and low 32-bits are in
        .SH SOURCE
        .B \*9/src/libmach
        .SH "SEE ALSO"
       -.IM mach (3)
       +.MR mach (3)
 (DIR) diff --git a/man/man3/mach-symbol.3 b/man/man3/mach-symbol.3
       t@@ -61,10 +61,10 @@ int        fnbound(ulong pc, ulong bounds[2])
        .SH DESCRIPTION
        These functions provide machine-independent access to the
        symbol table of an executable file or executing process.
       -.IM Mach (3) ,
       -.IM mach-file (3) ,
       +.MR Mach (3) ,
       +.MR mach-file (3) ,
        and
       -.IM mach-map (3)
       +.MR mach-map (3)
        describe additional library functions for
        accessing executable files and executing processes.
        .PP
       t@@ -74,7 +74,7 @@ uses the data in the
        structure filled by
        .I crackhdr
        (see
       -.IM mach-file (3) )
       +.MR mach-file (3) )
        to initialize in-memory structures used to access the symbol
        tables contained in the file.
        .IR Symclose
       t@@ -371,6 +371,6 @@ in the system error buffer where it is available via
        .SH SOURCE
        .B \*9/src/libmach
        .SH "SEE ALSO"
       -.IM mach (3) ,
       -.IM mach-file (3) ,
       -.IM mach-map (3)
       +.MR mach (3) ,
       +.MR mach-file (3) ,
       +.MR mach-map (3)
 (DIR) diff --git a/man/man3/mach.3 b/man/man3/mach.3
       t@@ -40,7 +40,7 @@ points at the structure for the architecture being debugged.
        It is set implicitly by
        .I crackhdr
        (see
       -.IM mach-file (3) )
       +.MR mach-file (3) )
        and can be set explicitly by calling
        .I machbyname
        or
       t@@ -66,31 +66,31 @@ Mac OS X).
        Other manual pages
        describe the library functions in detail.
        .PP
       -.IM Mach-cmd (3)
       +.MR Mach-cmd (3)
        describes some convenience routines for attaching to
        processes and core files.
        .PP
       -.IM Mach-file (3)
       +.MR Mach-file (3)
        describes the manipulation of binary files.
        .PP
       -.IM Mach-map (3)
       +.MR Mach-map (3)
        describes the interface to address spaces and register sets
        in executable files and executing programs.
        .PP
       -.IM Mach-stack (3)
       +.MR Mach-stack (3)
        describes support for unwinding the stack.
        .PP
       -.IM Mach-swap (3)
       +.MR Mach-swap (3)
        describes helper functions for accessing data
        in a particular byte order.
        .PP
       -.IM Mach-symbol (3)
       +.MR Mach-symbol (3)
        describes the interface to debugging symbol information.
        .SH SOURCE
        .B \*9/src/libmach
        .SH "SEE ALSO
       -.IM mach-file (3) ,
       -.IM mach-map (3) ,
       -.IM mach-stack (3) ,
       -.IM mach-swap (3) ,
       -.IM mach-symbol (3)
       +.MR mach-file (3) ,
       +.MR mach-map (3) ,
       +.MR mach-stack (3) ,
       +.MR mach-swap (3) ,
       +.MR mach-symbol (3)
 (DIR) diff --git a/man/man3/malloc.3 b/man/man3/malloc.3
       t@@ -132,8 +132,8 @@ the source of allocation.
        .SH SEE ALSO
        .I trump
        (in
       -.IM acid (1) ),
       -.IM getcallerpc (3)
       +.MR acid (1) ),
       +.MR getcallerpc (3)
        .SH DIAGNOSTICS
        .I Malloc, realloc
        and
       t@@ -153,7 +153,7 @@ The
        library for
        .I acid
        can be used to obtain traces of malloc execution; see
       -.IM acid (1) .
       +.MR acid (1) .
        .SH BUGS
        The different specification of
        .I calloc
       t@@ -182,4 +182,4 @@ are preprocessor macros defined as
        and
        .IR p9free ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/matrix.3 b/man/man3/matrix.3
       t@@ -347,4 +347,4 @@ coordinates.
        .SH SOURCE
        .B \*9/src/libgeometry/matrix.c
        .SH "SEE ALSO
       -.IM arith3 (3)
       +.MR arith3 (3)
 (DIR) diff --git a/man/man3/memdraw.3 b/man/man3/memdraw.3
       t@@ -168,7 +168,7 @@ type defines memory-resident rectangular pictures and the methods to draw upon t
        differ from
        .BR Image s
        (see
       -.IM draw (3) )
       +.MR draw (3) )
        in that they are manipulated directly in user memory rather than by
        RPCs to the
        .B /dev/draw
       t@@ -176,7 +176,7 @@ hierarchy.
        The
        .Bmemdraw
        library is the basis for the kernel
       -.IM draw (3)
       +.MR draw (3)
        driver and also used by a number of programs that must manipulate
        images without a display.
        .PP
       t@@ -273,7 +273,7 @@ images with a given rectangle and channel descriptor
        (see
        .B strtochan
        in
       -.IM graphics (3) ),
       +.MR graphics (3) ),
        creating a fresh
        .B Memdata
        structure and associated storage.
       t@@ -294,7 +294,7 @@ writes a compressed representation of
        to file descriptor
        .IR fd .
        For more on bitmap formats, see
       -.IM image (7) .
       +.MR image (7) .
        .I Freememimage
        frees images returned by any of these routines.
        The
       t@@ -326,7 +326,7 @@ and \-1 in case of an error.
        .I Memfillcolor
        fills an image with the given color, a 32-bit number as
        described in
       -.IM color (3) .
       +.MR color (3) .
        .PP
        .IR Memarc ,
        .IR mempoly ,
       t@@ -344,7 +344,7 @@ are identical to the
        and
        .IR gendraw ,
        routines described in
       -.IM draw (3) ,
       +.MR draw (3) ,
        except that they operate on
        .BR Memimage s
        rather than
       t@@ -366,9 +366,9 @@ analogues of
        and
        .B string
        (see
       -.IM subfont (3)
       +.MR subfont (3)
        and
       -.IM graphics (3) ),
       +.MR graphics (3) ),
        except that they operate
        only on
        .BR Memsubfont s
       t@@ -433,15 +433,15 @@ prints to a serial line rather than the screen, for obvious reasons.
        .SH SOURCE
        .B \*9/src/libmemdraw
        .SH SEE ALSO
       -.IM addpt (3) ,
       -.IM color (3) ,
       -.IM draw (3) ,
       -.IM graphics (3) ,
       -.IM memlayer (3) ,
       -.IM stringsize (3) ,
       -.IM subfont (3) ,
       -.IM color (7) ,
       -.IM utf (7)
       +.MR addpt (3) ,
       +.MR color (3) ,
       +.MR draw (3) ,
       +.MR graphics (3) ,
       +.MR memlayer (3) ,
       +.MR stringsize (3) ,
       +.MR subfont (3) ,
       +.MR color (7) ,
       +.MR utf (7)
        .SH BUGS
        .I Memimagestring
        is unusual in using a subfont rather than a font,
 (DIR) diff --git a/man/man3/memlayer.3 b/man/man3/memlayer.3
       t@@ -97,18 +97,18 @@ int        memunload(Memimage *i, Rectangle r,
        .PP
        .SH DESCRIPTION
        These functions build upon the
       -.IM memdraw (3)
       +.MR memdraw (3)
        interface to maintain overlapping graphical windows on in-memory images.
        They are used by the kernel to implement the windows interface presented by
       -.IM draw (3)
       +.MR draw (3)
        and
       -.IM window (3)
       +.MR window (3)
        and probably have little use outside of the kernel.
        .PP
        The basic function is to extend the definition of a
        .B Memimage
        (see
       -.IM memdraw (3) )
       +.MR memdraw (3) )
        to include overlapping windows defined by the
        .B Memlayer
        type.
       t@@ -270,7 +270,7 @@ They have the signatures of
        and
        .I memimageline
        (see
       -.IM memdraw (3) )
       +.MR memdraw (3) )
        but accept
        .B Memlayer
        or
       t@@ -294,12 +294,12 @@ bytes of data in
        .I buf
        are in compressed image format
        (see
       -.IM image (7) ).
       +.MR image (7) ).
        .SH SOURCE
        .B \*9/src/libmemlayer
        .SH SEE ALSO
       -.IM graphics (3) ,
       -.IM memdraw (3) ,
       -.IM stringsize (3) ,
       -.IM window (3) ,
       -.IM draw (3)
       +.MR graphics (3) ,
       +.MR memdraw (3) ,
       +.MR stringsize (3) ,
       +.MR window (3) ,
       +.MR draw (3)
 (DIR) diff --git a/man/man3/memory.3 b/man/man3/memory.3
       t@@ -109,7 +109,7 @@ All these routines have portable C implementations in
        .\" Most also have machine-dependent assembly language implementations in
        .\" .BR \*9/lib9/$objtype .
        .SH SEE ALSO
       -.IM strcat (3)
       +.MR strcat (3)
        .SH BUGS
        ANSI C does not require
        .I memcpy
 (DIR) diff --git a/man/man3/mouse.3 b/man/man3/mouse.3
       t@@ -49,9 +49,9 @@ They use the message-passing
        .B Channel
        interface in the threads library
        (see
       -.IM thread (3) );
       +.MR thread (3) );
        programs that wish a more event-driven, single-threaded approach should use
       -.IM event (3) .
       +.MR event (3) .
        .PP
        The state of the mouse is recorded in a structure,
        .BR Mouse ,
       t@@ -107,7 +107,7 @@ are a
        naming the device file connected to the mouse and an
        .I Image
        (see
       -.IM draw (3) )
       +.MR draw (3) )
        on which the mouse will be visible.
        Typically the file is
        nil,
       t@@ -136,7 +136,7 @@ The actual value sent may be discarded; the receipt of the message
        tells the program that it should call
        .B getwindow
        (see
       -.IM graphics (3) )
       +.MR graphics (3) )
        to reconnect to the window.
        .PP
        .I Readmouse
       t@@ -152,7 +152,7 @@ or message sent on the channel.
        It calls
        .B flushimage
        (see
       -.IM graphics (3) )
       +.MR graphics (3) )
        before blocking, so any buffered graphics requests are displayed.
        .PP
        .I Closemouse
       t@@ -174,14 +174,14 @@ is nil, the cursor is set to the default.
        The format of the cursor data is spelled out in
        .B <cursor.h>
        and described in
       -.IM graphics (3) .
       +.MR graphics (3) .
        .PP
        .I Getrect
        returns the dimensions of a rectangle swept by the user, using the mouse,
        in the manner
       -.IM rio (1)
       +.MR rio (1)
        or
       -.IM sam (1)
       +.MR sam (1)
        uses to create a new window.
        The
        .I but
       t@@ -220,7 +220,7 @@ struct Menu
        behaves the same as its namesake
        .I emenuhit
        described in
       -.IM event (3) ,
       +.MR event (3) ,
        with two exceptions.
        First, it uses a
        .B Mousectl
       t@@ -230,7 +230,7 @@ it creates the menu as a true window on the
        .B Screen
        .I scr
        (see
       -.IM window (3) ),
       +.MR window (3) ),
        permitting the menu to be displayed in parallel with other activities on the display.
        If
        .I scr
       t@@ -244,8 +244,8 @@ restoring the display when the menu is removed.
        .SH SOURCE
        .B \*9/src/libdraw
        .SH SEE ALSO
       -.IM graphics (3) ,
       -.IM draw (3) ,
       -.IM event (3) ,
       -.IM keyboard (3) ,
       -.IM thread (3) .
       +.MR graphics (3) ,
       +.MR draw (3) ,
       +.MR event (3) ,
       +.MR keyboard (3) ,
       +.MR thread (3) .
 (DIR) diff --git a/man/man3/mousescrollsize.3 b/man/man3/mousescrollsize.3
       t@@ -28,15 +28,15 @@ causes a half-window scroll increment.
        .PP
        .I Mousescrollsize
        is used by
       -.IM 9term (1)
       +.MR 9term (1)
        and
       -.IM acme (1)
       +.MR acme (1)
        to set their scrolling behavior.
        .SH SOURCE
        .B \*9/src/libdraw/scroll.c
        .SH SEE ALSO
       -.IM 9term (1) ,
       -.IM acme (1)
       +.MR 9term (1) ,
       +.MR acme (1)
        .SH BUGS
        .I Libdraw
        expects up and down scroll wheel events to be expressed as clicks of mouse buttons 4 and 5,
 (DIR) diff --git a/man/man3/mp.3 b/man/man3/mp.3
       t@@ -315,9 +315,9 @@ is
        the buffer is allocated.
        .I Mpfmt
        can be used with
       -.IM fmtinstall (3)
       +.MR fmtinstall (3)
        and
       -.IM print (3)
       +.MR print (3)
        to print hexadecimal representations of
        .BR mpint s.
        .PP
 (DIR) diff --git a/man/man3/mux.3 b/man/man3/mux.3
       t@@ -123,7 +123,7 @@ nil if an error occurred.
        .I Muxprocs
        allocates new procs 
        (see
       -.IM thread (3) )
       +.MR thread (3) )
        in which to run
        .I send
        and
       t@@ -146,7 +146,7 @@ that need to remain active.
        .I Libmux
        also provides a non-blocking interface, useful for programs forced
        to use a
       -.IM select (3) -based
       +.MR select (3) -based
        main loop.
        .I Muxrpcstart
        runs the first half of
       t@@ -176,7 +176,7 @@ with
        .SH SOURCE
        .B \*9/src/libmux
        .SH SEE ALSO
       -.IM thread (3) ,
       +.MR thread (3) ,
        .IR intro (9p)
        .SH BUGS
        .I Libmux
 (DIR) diff --git a/man/man3/ndb.3 b/man/man3/ndb.3
       t@@ -88,13 +88,13 @@ Ndbtuple*        ndbsubstitute(Ndbtuple *t, Ndbtuple *from, Ndbtuple *to);
        These routines are used by network administrative programs to search
        the network database.
        They operate on the database files described in
       -.IM ndb (7) .
       +.MR ndb (7) .
        .PP
        .I Ndbopen
        opens the database
        .I file
        and calls
       -.IM malloc (3)
       +.MR malloc (3)
        to allocate a buffer for it.
        If
        .I file
       t@@ -128,7 +128,7 @@ is used to find each successive match.
        On a successful search both return a linked list of
        .I Ndbtuple
        structures acquired by
       -.IM malloc (3)
       +.MR malloc (3)
        that represent the attribute/value pairs in the
        entry.
        On failure they return zero.
       t@@ -450,8 +450,8 @@ directory of network database files
        .SH SOURCE
        .B \*9/src/libndb
        .SH SEE ALSO
       -.IM ndb (1)
       -.IM ndb (7)
       +.MR ndb (1)
       +.MR ndb (7)
        .SH DIAGNOSTICS
        .IR Ndbgetvalue
        and
 (DIR) diff --git a/man/man3/needstack.3 b/man/man3/needstack.3
       t@@ -45,7 +45,7 @@ is a no-op.
        .I Needstack
        should be thought of as a comment checked at run time,
        like
       -.IM assert (3) .
       +.MR assert (3) .
        .SH EXAMPLE
        The X Window library implementation of
        .I XLookupString
       t@@ -57,7 +57,7 @@ before making calls to
        .IR XLookupString .
        If a thread (in this case, the keyboard-reading thread used
        inside the
       -.IM draw (3)
       +.MR draw (3)
        library)
        does not allocate a large enough stack, the problem is diagnosed
        immediately rather than left to corrupt memory.
       t@@ -66,4 +66,4 @@ immediately rather than left to corrupt memory.
        .br
        .B \*9/src/libthread
        .SH SEE ALSO
       -.IM thread (3)
       +.MR thread (3)
 (DIR) diff --git a/man/man3/notify.3 b/man/man3/notify.3
       t@@ -33,12 +33,12 @@ or writing on a closed pipe, a
        is posted to communicate the exception.
        A note may also be posted by another process
        via
       -.IM postnote (3) .
       +.MR postnote (3) .
        On Unix, notes are implemented as signals.
        .PP
        When a note is received, the action taken depends on the note.
        See
       -.IM signal (7)
       +.MR signal (7)
        for the full description of the defaults.
        .PP
        The default actions may be overridden.
       t@@ -53,10 +53,10 @@ replaces the previous handler, if any.
        An argument of zero cancels a previous handler,
        restoring the default action.
        A
       -.IM fork (2)
       +.MR fork (2)
        system call leaves the handler registered in
        both the parent and the child;
       -.IM exec (3)
       +.MR exec (3)
        restores the default behavior.
        Handlers may not perform floating point operations.
        .PP
       t@@ -112,17 +112,17 @@ set up with
        using the
        .I notejmp
        function (see
       -.IM setjmp (3) ).
       +.MR setjmp (3) ).
        .PP
        Unix provides a fixed set of notes (typically there are 32) called
        .IR signals .
        It also allows a process to block certain notes from being delivered
        (see
       -.IM sigprocmask (2) )
       +.MR sigprocmask (2) )
        and to ignore certain notes by setting the signal hander to the special value
        .B SIG_IGN
        (see
       -.IM signal (2) ).
       +.MR signal (2) ).
        .I Noteenable
        and
        .I notedisable
       t@@ -137,7 +137,7 @@ is called upon receipt of the note; if the handler is not called, the note is di
        Regardless of the origin of the note or the presence of a handler,
        if the process is being debugged
        (see
       -.IM ptrace (2) )
       +.MR ptrace (2) )
        the arrival of a note puts the process in the
        .B Stopped
        state and awakens the debugger.
       t@@ -252,7 +252,7 @@ are usually generated by the operating system.
        .br
        .B \*9/src/lib9/atnotify.c
        .SH SEE ALSO
       -.IM intro (3) ,
       +.MR intro (3) ,
        .I notejmp
        in
       -.IM setjmp (3)
       +.MR setjmp (3)
 (DIR) diff --git a/man/man3/open.3 b/man/man3/open.3
       t@@ -34,7 +34,7 @@ says to truncate the file
        to zero length before opening it;
        .B OCEXEC
        says to close the file when an
       -.IM exec (3)
       +.MR exec (3)
        or
        .I execl
        system call is made;
       t@@ -48,7 +48,7 @@ are always appended to the end of the file.
        fails if the file does not exist or the user does not have
        permission to open it for the requested purpose
        (see
       -.IM stat (3)
       +.MR stat (3)
        for a description of permissions).
        The user must have write permission on the
        .I file
       t@@ -61,7 +61,7 @@ system call
        (unlike the implicit
        .I open
        in
       -.IM exec (3) ),
       +.MR exec (3) ),
        .B OEXEC
        is actually identical to
        .BR OREAD .
       t@@ -143,8 +143,8 @@ allows the file descriptor to be reused.
        .SH SOURCE
        .B \*9/src/lib9
        .SH SEE ALSO
       -.IM intro (3) ,
       -.IM stat (3)
       +.MR intro (3) ,
       +.MR stat (3)
        .SH DIAGNOSTICS
        These functions set
        .IR errstr .
       t@@ -169,4 +169,4 @@ are preprocessor macros defined as
        and
        .IR p9create ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/opentemp.3 b/man/man3/opentemp.3
       t@@ -25,7 +25,7 @@ to
        .L z
        are tried until the name of a file that does not yet exist
        (see
       -.IM access (2) )
       +.MR access (2) )
        is generated.
        .I Opentemp
        then opens the file for the given
       t@@ -49,4 +49,4 @@ will never return the same name.
        .SH "SEE ALSO
        .I create
        in
       -.IM open (3)
       +.MR open (3)
 (DIR) diff --git a/man/man3/pipe.3 b/man/man3/pipe.3
       t@@ -25,7 +25,7 @@ is available for reading from
        After the pipe has been established,
        cooperating processes
        created by subsequent
       -.IM fork (2)
       +.MR fork (2)
        calls may pass data through the
        pipe with
        .I read
       t@@ -53,14 +53,14 @@ calls.
        .\" .IR stat (3)).
        .PP
        When all the data has been read from a pipe and the writer has closed the pipe or exited,
       -.IM read (3)
       +.MR read (3)
        will return 0 bytes.  Writes to a pipe with no reader will generate a note
        .BR "sys: write on closed pipe" .
        .SH SOURCE
        .B \*9/src/lib9/pipe.c
        .SH SEE ALSO
       -.IM intro (3) ,
       -.IM read (3)
       +.MR intro (3) ,
       +.MR read (3)
        .SH DIAGNOSTICS
        Sets
        .IR errstr .
       t@@ -79,7 +79,7 @@ Unix pipes are not guaranteed to be bidirectional.
        In order to ensure a bidirectional channel,
        .I p9pipe
        creates Unix domain sockets via the
       -.IM socketpair (2)
       +.MR socketpair (2)
        instead of Unix pipes.
        .PP
        The implementation of pipes as Unix domain sockets
       t@@ -89,11 +89,11 @@ Unix's dup device.  If a Unix domain socket is open as file
        descriptor 0, some implementations disallow the opening of
        .BR /dev/fd/0 ;
        instead one must
       -.IM connect (2)
       +.MR connect (2)
        to it.
        If this functionality is important
        (as it is for
       -.IM rc (1) ),
       +.MR rc (1) ),
        one must
        .B #undef
        .B pipe
 (DIR) diff --git a/man/man3/plumb.3 b/man/man3/plumb.3
       t@@ -68,7 +68,7 @@ Plumbmsg*        plumbrecvfid(CFid *fid)
        int        plumbsendtofid(CFid *fid, Plumbmsg *m)
        .SH DESCRIPTION
        These routines manipulate
       -.IM plumb (7)
       +.MR plumb (7)
        messages, transmitting them, receiving them, and
        converting them between text and these data structures:
        .IP
       t@@ -99,7 +99,7 @@ struct Plumbattr
        opens the named plumb
        .IR port ,
        using
       -.IM open (3)
       +.MR open (3)
        mode
        .IR omode .
        If
       t@@ -108,11 +108,11 @@ begins with a slash, it is taken as a literal file name;
        otherwise
        .I plumbopen
        searches for the location of the
       -.IM plumber (4)
       +.MR plumber (4)
        service and opens the port there.
        .PP
        For programs using the
       -.IM event (3)
       +.MR event (3)
        interface,
        .I eplumb
        registers, using the given
       t@@ -121,9 +121,9 @@ receipt of messages from the named
        .IR port .
        .PP
        The library mounts the 
       -.IM plumber (4)
       +.MR plumber (4)
        service on demand (using the
       -.IM 9pclient (3) )
       +.MR 9pclient (3) )
        library and reuses the mount instance for future 
        calls to
        .IR plumbopen .
       t@@ -157,7 +157,7 @@ to
        frees all the data associated with the message
        .IR m ,
        all the components of which must therefore have been allocated with
       -.IM malloc (3) .
       +.MR malloc (3) .
        .PP
        .I Plumbrecv
        returns the next message available on the file descriptor
       t@@ -259,7 +259,7 @@ The file descriptor returned by
        is created with
        .I fsopenfd
        (see
       -.IM 9pclient (3) ),
       +.MR 9pclient (3) ),
        which masks information about read and write errors.
        This is acceptable for use in
        .I plumbrecv
       t@@ -276,10 +276,10 @@ that preserves the exact error details.
        .SH SOURCE
        .B \*9/src/libplumb
        .SH SEE ALSO
       -.IM plumb (1) ,
       -.IM event (3) ,
       -.IM plumber (4) ,
       -.IM plumb (7)
       +.MR plumb (1) ,
       +.MR event (3) ,
       +.MR plumber (4) ,
       +.MR plumb (7)
        .SH DIAGNOSTICS
        When appropriate, including when a
        .I plumbsend
 (DIR) diff --git a/man/man3/post9pservice.3 b/man/man3/post9pservice.3
       t@@ -11,11 +11,11 @@ int post9pservice(int fd, char *name, char *mtpt)
        .SH DESCRIPTION
        .I Post9pservice
        invokes
       -.IM 9pserve (4)
       +.MR 9pserve (4)
        to post a new 9P service in the current 
        ``name space''
        (see
       -.IM intro (4) )
       +.MR intro (4) )
        named
        .IR name .
        Clients connecting to the posted service
       t@@ -30,10 +30,10 @@ is non-nil,
        mounts the service on
        .IR mtpt ,
        using
       -.IM 9pfuse (4) .
       +.MR 9pfuse (4) .
        .SH "SEE ALSO
       -.IM intro (4) ,
       -.IM 9pfuse (4) ,
       -.IM 9pserve (4)
       +.MR intro (4) ,
       +.MR 9pfuse (4) ,
       +.MR 9pserve (4)
        .SH SOURCE
        .B \*9/src/lib9/post9p.c
 (DIR) diff --git a/man/man3/postnote.3 b/man/man3/postnote.3
       t@@ -38,8 +38,8 @@ Returns zero if the write succeeds, otherwise \-1.
        .SH SOURCE
        .B \*9/src/lib9/postnote.c
        .SH "SEE ALSO"
       -.IM notify (3) ,
       -.IM intro (3)
       +.MR notify (3) ,
       +.MR intro (3)
        .SH DIAGNOSTICS
        Sets
        .IR errstr .
 (DIR) diff --git a/man/man3/prime.3 b/man/man3/prime.3
       t@@ -93,8 +93,8 @@ slow algorithm.
        .SH SOURCE
        .B \*9/src/libsec
        .SH SEE ALSO
       -.IM aes (3)
       -.IM blowfish (3) ,
       -.IM des (3) ,
       -.IM elgamal (3) ,
       -.IM rsa (3) ,
       +.MR aes (3)
       +.MR blowfish (3) ,
       +.MR des (3) ,
       +.MR elgamal (3) ,
       +.MR rsa (3) ,
 (DIR) diff --git a/man/man3/print.3 b/man/man3/print.3
       t@@ -67,7 +67,7 @@ writes to the named output
        file descriptor:
        a buffered form
        is described in
       -.IM bio (3) .
       +.MR bio (3) .
        .I Sprint
        places text
        followed by the NUL character
       t@@ -104,7 +104,7 @@ is like
        .IR sprint ,
        except that it prints into and returns a string of the required length, which is
        allocated by
       -.IM malloc (3) .
       +.MR malloc (3) .
        .PP
        The routines
        .IR runesprint ,
       t@@ -361,7 +361,7 @@ The
        .B S
        verb is similar, but it interprets its pointer as an array
        of runes (see
       -.IM utf (7) );
       +.MR utf (7) );
        the runes are converted to
        .SM UTF
        before output.
       t@@ -389,10 +389,10 @@ but that will change if pointers and integers are different sizes.
        The
        .B r
        verb takes no arguments; it copies the error string returned by a call to
       -.IM errstr (3) .
       +.MR errstr (3) .
        .PP
        Custom verbs may be installed using
       -.IM fmtinstall (3) .
       +.MR fmtinstall (3) .
        .SH EXAMPLE
        This function prints an error message with a variable
        number of arguments and then quits.
       t@@ -415,9 +415,9 @@ void fatal(char *msg, ...)
        .SH SOURCE
        .B \*9/src/lib9/fmt
        .SH SEE ALSO
       -.IM fmtinstall (3) ,
       -.IM fprintf (3) ,
       -.IM utf (7)
       +.MR fmtinstall (3) ,
       +.MR fprintf (3) ,
       +.MR utf (7)
        .SH DIAGNOSTICS
        Routines that write to a file descriptor or call
        .IR malloc
       t@@ -425,7 +425,7 @@ set
        .IR errstr .
        .SH BUGS
        The formatting is close to that specified for ANSI
       -.IM fprintf (3) ;
       +.MR fprintf (3) ;
        the main difference is that
        .B b
        and
 (DIR) diff --git a/man/man3/proto.3 b/man/man3/proto.3
       t@@ -127,6 +127,6 @@ generic prototype file.
        .SH SOURCE
        .B \*9/src/libdisk/proto.c
        .SH SEE ALSO
       -.IM mk9660 (1) ,
       +.MR mk9660 (1) ,
        Plan 9's
        .IR mkfs (8)
 (DIR) diff --git a/man/man3/pushtls.3 b/man/man3/pushtls.3
       t@@ -108,7 +108,7 @@ used by a client to resume a previously negotiated security association.
        On output, the connection directory is set, as with
        .B listen
        (see
       -.IM dial (3) ).
       +.MR dial (3) ).
        The input
        .I cert
        is freed and a freshly allocated copy of the remote's certificate
       t@@ -149,7 +149,7 @@ The private key corresponding to
        .I cert.pem
        should have been previously loaded into factotum.
        (See
       -.IM rsa (3)
       +.MR rsa (3)
        .\" XXX should be rsa(8)
        for more about key generation.)
        By setting
       t@@ -175,8 +175,8 @@ PEM certificate files
        .\" .br
        .B \*9/src/libsec/port
        .SH "SEE ALSO"
       -.IM dial (3) ,
       -.IM thumbprint (7) ;
       +.MR dial (3) ,
       +.MR thumbprint (7) ;
        Plan 9's
        .IR factotum (4)
        and
 (DIR) diff --git a/man/man3/qball.3 b/man/man3/qball.3
       t@@ -68,7 +68,7 @@ and normal to the axis.
        .SH SOURCE
        .B \*9/src/libgeometry/qball.c
        .SH SEE ALSO
       -.IM quaternion (3)
       +.MR quaternion (3)
        .br
        Ken Shoemake,
        ``Animating Rotation with Quaternion Curves'',
 (DIR) diff --git a/man/man3/quaternion.3 b/man/man3/quaternion.3
       t@@ -121,7 +121,7 @@ The following routines operate on rotations or orientations represented as unit 
        .TP
        .B mtoq
        Convert a rotation matrix (see
       -.IM matrix (3) )
       +.MR matrix (3) )
        to a unit quaternion.
        .TP
        .B qtom
       t@@ -148,12 +148,12 @@ This is just a rotation about the same axis by half the angle.
        .SH SOURCE
        .B \*9/src/libgeometry/quaternion.c
        .SH SEE ALSO
       -.IM matrix (3) ,
       -.IM qball (3)
       +.MR matrix (3) ,
       +.MR qball (3)
        .SH BUGS
        To avoid name conflicts with NetBSD,
        .I qdiv
        is a preprocessor macro defined as 
        .IR p9qdiv ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/quote.3 b/man/man3/quote.3
       t@@ -58,10 +58,10 @@ The empty string is represented by two quotes,
        The first four functions act as variants of
        .B strdup
        (see
       -.IM strcat (3) ).
       +.MR strcat (3) ).
        Each returns a
        freshly allocated copy of the string, created using
       -.IM malloc (3) .
       +.MR malloc (3) .
        .I Quotestrdup
        returns a quoted copy of
        .IR s ,
       t@@ -75,7 +75,7 @@ The
        versions of these functions do the same for
        .CW Rune
        strings (see
       -.IM runestrcat (3) ).
       +.MR runestrcat (3) ).
        .PP
        The string returned by
        .I quotestrdup
       t@@ -124,13 +124,13 @@ blanks, control characters, and quotes are always quoted.
        is provided as a
        .I doquote
        function that flags any character special to
       -.IM rc (1) .
       +.MR rc (1) .
        .PP
        .I Quotestrfmt
        and
        .I quoterunestrfmt
        are
       -.IM print (3)
       +.MR print (3)
        formatting routines that produce quoted strings as output.
        They may be installed by hand, but
        .I quotefmtinstall
       t@@ -154,21 +154,21 @@ statements so the compiler can type-check uses of
        and
        .B %Q
        in
       -.IM print (3)
       +.MR print (3)
        format strings.
        .SH SOURCE
        .B \*9/src/lib9/quote.c
        .br
        .B \*9/src/lib9/fmt/fmtquote.c
        .SH "SEE ALSO
       -.IM rc (1) ,
       -.IM malloc (3) ,
       -.IM print (3) ,
       -.IM strcat (3)
       +.MR rc (1) ,
       +.MR malloc (3) ,
       +.MR print (3) ,
       +.MR strcat (3)
        .SH BUGS
        Because it is provided by the format library,
        .I doquote
        is a preprocessor macro defined as
        .IR fmtdoquote ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/rand.3 b/man/man3/rand.3
       t@@ -125,7 +125,7 @@ truly random bytes read from
        .PP
        .I Prng
        uses the native
       -.IM rand (3)
       +.MR rand (3)
        pseudo-random number generator to fill the buffer.  Used with
        .IR srand ,
        this function can produce a reproducible stream of pseudo random
       t@@ -138,7 +138,7 @@ and
        may be passed to
        .I mprand
        (see
       -.IM mp (3) ).
       +.MR mp (3) ).
        .PP
        .I Fastrand
        uses
       t@@ -161,7 +161,7 @@ to return a uniform
        .B \*9/src/libsec/port
        .SH "SEE ALSO
        .\" .IR cons (3),
       -.IM mp (3)
       +.MR mp (3)
        .SH BUGS
        .I Truerand
        and
       t@@ -181,7 +181,7 @@ are preprocessor macros defined as
        .IR p9lrand ,
        and so on;
        see
       -.IM intro (3) .
       +.MR intro (3) .
        .ie \n(HT .ds HT "
        .el .ds HT " (see HTML-formatted man page for link)
        .PP
 (DIR) diff --git a/man/man3/rc4.3 b/man/man3/rc4.3
       t@@ -43,13 +43,13 @@ structure keeps track of the algorithm.
        .SH SOURCE
        .B \*9/src/libsec
        .SH SEE ALSO
       -.IM mp (3) ,
       -.IM aes (3) ,
       -.IM blowfish (3) ,
       -.IM des (3) ,
       -.IM dsa (3) ,
       -.IM elgamal (3) ,
       -.IM rsa (3) ,
       -.IM sechash (3) ,
       -.IM prime (3) ,
       -.IM rand (3)
       +.MR mp (3) ,
       +.MR aes (3) ,
       +.MR blowfish (3) ,
       +.MR des (3) ,
       +.MR dsa (3) ,
       +.MR elgamal (3) ,
       +.MR rsa (3) ,
       +.MR sechash (3) ,
       +.MR prime (3) ,
       +.MR rand (3)
 (DIR) diff --git a/man/man3/read.3 b/man/man3/read.3
       t@@ -65,7 +65,7 @@ if this is not the same as requested.
        and
        .I Pwrite
        equivalent to a
       -.IM seek (3)
       +.MR seek (3)
        to
        .I offset
        followed by a
       t@@ -83,10 +83,10 @@ without interference.
        .SH SOURCE
        .B \*9/src/lib9/readn.c
        .SH SEE ALSO
       -.IM intro (3) ,
       +.MR intro (3) ,
        .IR open (3), 
       -.IM dup (3) ,
       -.IM pipe (3)
       +.MR dup (3) ,
       +.MR pipe (3)
        .SH DIAGNOSTICS
        These functions set
        .IR errstr .
 (DIR) diff --git a/man/man3/readcolmap.3 b/man/man3/readcolmap.3
       t@@ -63,14 +63,14 @@ Both return 0 on success, or \-1 on error, setting
        .PP
        Changing the hardware color map does not change
        the color map used by the
       -.IM draw (3)
       +.MR draw (3)
        operator to convert between
        mapped and true color or greyscale images,
        which is described in 
       -.IM color (7) .
       +.MR color (7) .
        .SH SOURCE
        .B \*9/src/libdraw
        .SH "SEE ALSO"
       -.IM graphics (3) ,
       -.IM draw (3) ,
       -.IM color (7)
       +.MR graphics (3) ,
       +.MR draw (3) ,
       +.MR color (7)
 (DIR) diff --git a/man/man3/readcons.3 b/man/man3/readcons.3
       t@@ -31,7 +31,7 @@ is non-zero, the input is not echoed to the screen.
        A stripped-down version of
        .I netkey
        (see
       -.IM passwd (1) ):
       +.MR passwd (1) ):
        .IP
        .EX
        pass = readcons("password", nil, 1);
 (DIR) diff --git a/man/man3/regexp.3 b/man/man3/regexp.3
       t@@ -42,11 +42,11 @@ compiles a
        regular expression and returns
        a pointer to the generated description.
        The space is allocated by
       -.IM malloc (3)
       +.MR malloc (3)
        and may be released by
        .IR free .
        Regular expressions are exactly as in
       -.IM regexp (7) .
       +.MR regexp (7) .
        .PP
        .I Regcomplit
        is like
       t@@ -196,7 +196,7 @@ array elements should be used.
        .SH SOURCE
        .B \*9/src/libregexp
        .SH "SEE ALSO"
       -.IM grep (1)
       +.MR grep (1)
        .SH DIAGNOSTICS
        .I Regcomp
        returns 
 (DIR) diff --git a/man/man3/rfork.3 b/man/man3/rfork.3
       t@@ -15,14 +15,14 @@ int rfork(int flags)
        is a partial implementation of the Plan 9 system call.
        It can be used to manipulate some process state and to create
        new processes a la 
       -.IM fork (2) .
       +.MR fork (2) .
        It cannot be used to create shared-memory processes 
        (Plan 9's
        .B RFMEM
        flag); for that functionality use
        .I proccreate
        (see 
       -.IM thread (3) ).
       +.MR thread (3) ).
        .PP
        The
        .I flags
       t@@ -45,7 +45,7 @@ If set, the child process will be dissociated from the parent. Upon
        exit the child will leave no
        .B Waitmsg
        (see
       -.IM wait (3) )
       +.MR wait (3) )
        for the parent to collect.
        .\" .TP
        .\" .B RFNAMEG
       t@@ -81,9 +81,9 @@ for the parent to collect.
        Each process is a member of a group of processes that all
        receive notes when a note is sent to the group
        (see
       -.IM postnote (3)
       +.MR postnote (3)
        and
       -.IM signal (2) ).
       +.MR signal (2) ).
        The group of a new process is by default the same as its parent, but if
        .B RFNOTEG
        is set (regardless of
       t@@ -154,7 +154,7 @@ will sleep, if necessary, until required process resources are available.
        Calling
        .B rfork(RFFDG|RFPROC)
        is equivalent to calling
       -.IM fork (2) .
       +.MR fork (2) .
        .SH SOURCE
        .B \*9/src/lib9/rfork.c
        .SH DIAGNOSTICS
 (DIR) diff --git a/man/man3/rsa.3 b/man/man3/rsa.3
       t@@ -197,7 +197,7 @@ The subject line is conventionally of the form
        using the quoting conventions of
        .I tokenize
        (see
       -.IM getfields (3) ).
       +.MR getfields (3) ).
        .PP
        .I X509req
        creates an X.509 certification request.
       t@@ -241,14 +241,14 @@ struct PEMChain
        .SH SOURCE
        .B \*9/src/libsec
        .SH SEE ALSO
       -.IM mp (3) ,
       -.IM aes (3) ,
       -.IM blowfish (3) ,
       -.IM des (3) ,
       -.IM dsa (3) ,
       -.IM elgamal (3) ,
       -.IM rc4 (3) ,
       -.IM sechash (3) ,
       -.IM prime (3) ,
       -.IM rand (3)
       +.MR mp (3) ,
       +.MR aes (3) ,
       +.MR blowfish (3) ,
       +.MR des (3) ,
       +.MR dsa (3) ,
       +.MR elgamal (3) ,
       +.MR rc4 (3) ,
       +.MR sechash (3) ,
       +.MR prime (3) ,
       +.MR rand (3)
        .\" .IR pem (8)
 (DIR) diff --git a/man/man3/rune.3 b/man/man3/rune.3
       t@@ -189,5 +189,5 @@ returns
        .br
        .B \*9/src/lib9/utf/utfrune.c
        .SH SEE ALSO
       -.IM utf (7) ,
       -.IM tcs (1)
       +.MR utf (7) ,
       +.MR tcs (1)
 (DIR) diff --git a/man/man3/runestrcat.3 b/man/man3/runestrcat.3
       t@@ -56,12 +56,12 @@ Rune*        runestrstr(Rune *s1, Rune *s2)
        .SH DESCRIPTION
        These functions are rune string analogues of
        the corresponding functions in 
       -.IM strcat (3) .
       +.MR strcat (3) .
        .SH SOURCE
        .B \*9/src/lib9
        .SH SEE ALSO
       -.IM memory (3) ,
       -.IM rune (3) ,
       -.IM strcat (3)
       +.MR memory (3) ,
       +.MR rune (3) ,
       +.MR strcat (3)
        .SH BUGS
        The outcome of overlapping moves varies among implementations.
 (DIR) diff --git a/man/man3/searchpath.3 b/man/man3/searchpath.3
       t@@ -13,9 +13,9 @@ char*        searchpath(char *name)
        searches for the executable
        .I name
        in the same way that
       -.IM sh (1)
       +.MR sh (1)
        and
       -.IM rc (1)
       +.MR rc (1)
        do.
        .PP
        The environment variable
       t@@ -32,9 +32,9 @@ returns a pointer to a malloced string containing a path
        or simply
        .IR name )
        suitable for use in 
       -.IM open (3)
       +.MR open (3)
        or 
       -.IM exec (3) .
       +.MR exec (3) .
        .PP
        If
        .I name
 (DIR) diff --git a/man/man3/sechash.3 b/man/man3/sechash.3
       t@@ -138,14 +138,14 @@ and
        .I sha1unpickle
        unmarshal a pickled digest.
        All four routines return a pointer to a newly
       -.IM malloc (3) 'd
       +.MR malloc (3) 'd
        object.
        .SH SOURCE
        .B \*9/src/libsec
        .SH SEE ALSO
       -.IM aes (3) ,
       -.IM blowfish (3) ,
       -.IM des (3) ,
       -.IM elgamal (3) ,
       -.IM rc4 (3) ,
       -.IM rsa (3)
       +.MR aes (3) ,
       +.MR blowfish (3) ,
       +.MR des (3) ,
       +.MR elgamal (3) ,
       +.MR rc4 (3) ,
       +.MR rsa (3)
 (DIR) diff --git a/man/man3/seek.3 b/man/man3/seek.3
       t@@ -39,8 +39,8 @@ Seeking in a pipe is a no-op.
        .SH SOURCE
        .B \*9/src/lib9/seek.c
        .SH SEE ALSO
       -.IM intro (3) ,
       -.IM open (3)
       +.MR intro (3) ,
       +.MR open (3)
        .SH DIAGNOSTICS
        Sets
        .IR errstr .
       t@@ -50,4 +50,4 @@ To avoid name conflicts with the underlying system,
        is a preprocessor macro defined as
        .IR p9seek ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/sendfd.3 b/man/man3/sendfd.3
       t@@ -20,14 +20,14 @@ and
        can be used to pass an open file descriptor over
        a Unix domain socket from one process to another.
        Since
       -.IM pipe (3)
       +.MR pipe (3)
        is implemented with
       -.IM socketpair (2)
       +.MR socketpair (2)
        instead of
       -.IM pipe (2) ,
       +.MR pipe (2) ,
        .I socket
        can be a file descriptor obtained from
       -.IM pipe (3) .
       +.MR pipe (3) .
        .PP
        .I Sendfd
        sends the file descriptor
       t@@ -51,7 +51,7 @@ will not.
        .SH SOURCE
        .B \*9/src/lib9/sendfd.c
        .SH SEE ALSO
       -.IM socketpair (2) ,
       +.MR socketpair (2) ,
        .I sendmsg
        in
       -.IM send (2)
       +.MR send (2)
 (DIR) diff --git a/man/man3/setjmp.3 b/man/man3/setjmp.3
       t@@ -46,7 +46,7 @@ was called.
        is the same as
        .I longjmp
        except that it is to be called from within a note handler (see
       -.IM notify (3) ).
       +.MR notify (3) ).
        The
        .I uregs
        argument should be the first argument passed to the note handler.
       t@@ -58,7 +58,7 @@ can also be used to switch stacks.
        .SH SOURCE
        .B \*9/src/lib9/jmp.c
        .SH SEE ALSO
       -.IM notify (3)
       +.MR notify (3)
        .SH BUGS
        .PP
        .I Notejmp
       t@@ -78,7 +78,7 @@ are preprocessor macros defined as
        and
        .IR p9jmp_buf ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
        .PP
        .I P9setjmp
        is implemented as a preprocessor macro that calls
 (DIR) diff --git a/man/man3/sleep.3 b/man/man3/sleep.3
       t@@ -27,7 +27,7 @@ Sleep returns \-1 if interrupted, 0 otherwise.
        causes an
        .B alarm
        note (see
       -.IM notify (3) )
       +.MR notify (3) )
        to be sent to the invoking process after the number of milliseconds
        given by the argument.
        Successive calls to
       t@@ -39,7 +39,7 @@ the alarm clock.
        .SH SOURCE
        .B \*9/src/lib9/sleep.c
        .SH SEE ALSO
       -.IM intro (3)
       +.MR intro (3)
        .SH DIAGNOSTICS
        These functions set
        .IR errstr .
       t@@ -53,4 +53,4 @@ are preprocessor macros defined as
        and
        .IR p9alarm ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/stat.3 b/man/man3/stat.3
       t@@ -105,7 +105,7 @@ struct Dir {
        .EE
        .PP
        The returned structure is allocated by
       -.IM malloc (3) ;
       +.MR malloc (3) ;
        freeing it also frees the associated strings.
        .PP
        This structure and
       t@@ -283,9 +283,9 @@ to retrieve the initial values first.
        .SH SOURCE
        .B \*9/src/lib9/dirstat.c
        .SH SEE ALSO
       -.IM intro (3) ,
       -.IM fcall (3) ,
       -.IM dirread (3) ,
       +.MR intro (3) ,
       +.MR fcall (3) ,
       +.MR dirread (3) ,
        .IR stat (9p)
        .SH DIAGNOSTICS
        The
       t@@ -305,7 +305,7 @@ or
        is too short for the returned data, the return value will be
        .B BIT16SZ
        (see
       -.IM fcall (3) )
       +.MR fcall (3) )
        and the two bytes
        returned will contain the initial count field of the
        returned data;
 (DIR) diff --git a/man/man3/strcat.3 b/man/man3/strcat.3
       t@@ -222,7 +222,7 @@ is returned.
        returns a pointer to a distinct copy of the null-terminated string
        .I s
        in space obtained from
       -.IM malloc (3)
       +.MR malloc (3)
        or
        .L 0
        if no space can be obtained.
       t@@ -244,14 +244,14 @@ operates analogously, but ignores ASCII case differences when comparing strings.
        .SH SOURCE
        .B \*9/src/lib9
        .SH SEE ALSO
       -.IM memory (3) ,
       -.IM rune (3) ,
       -.IM runestrcat (3)
       +.MR memory (3) ,
       +.MR rune (3) ,
       +.MR runestrcat (3)
        .SH BUGS
        These routines know nothing about
        .SM UTF.
        Use the routines in
       -.IM rune (3)
       +.MR rune (3)
        as appropriate.
        Note, however, that the definition of
        .SM UTF
 (DIR) diff --git a/man/man3/string.3 b/man/man3/string.3
       t@@ -268,4 +268,4 @@ The input stack has a maximum depth of 32 nested include files.
        .SH SOURCE
        .B \*9/src/libString
        .SH SEE ALSO
       -.IM bio (3)
       +.MR bio (3)
 (DIR) diff --git a/man/man3/stringsize.3 b/man/man3/stringsize.3
       t@@ -57,13 +57,13 @@ are analogous, but accept an array of runes rather than
        .SH SOURCE
        .B \*9/src/libdraw
        .SH "SEE ALSO"
       -.IM addpt (3) ,
       -.IM cachechars (3) ,
       -.IM subfont (3) ,
       -.IM draw (3) ,
       -.IM draw (3) ,
       -.IM image (7) ,
       -.IM font (7)
       +.MR addpt (3) ,
       +.MR cachechars (3) ,
       +.MR subfont (3) ,
       +.MR draw (3) ,
       +.MR draw (3) ,
       +.MR image (7) ,
       +.MR font (7)
        .SH DIAGNOSTICS
        Because strings are loaded dynamically, these routines may generate I/O
        to the server and produce calls to the graphics error function.
 (DIR) diff --git a/man/man3/subfont.3 b/man/man3/subfont.3
       t@@ -53,13 +53,13 @@ Font*        mkfont(Subfont *f, Rune min)
        .SH DESCRIPTION
        Subfonts are the components of fonts that hold the character images.
        A font comprises an array of subfonts; see
       -.IM cachechars (3) .
       +.MR cachechars (3) .
        A new
        .B Subfont
        is allocated and initialized with
        .IR allocsubfont .
        See
       -.IM cachechars (3)
       +.MR cachechars (3)
        for the meaning of
        .IR n ,
        .IR height ,
       t@@ -81,7 +81,7 @@ The appropriate fields of the returned
        structure are set to
        the passed arguments, and the image is registered as a subfont
        with the graphics device
       -.IM draw (3) .
       +.MR draw (3) .
        .I Allocsubfont
        returns 0 on failure.
        .PP
       t@@ -97,7 +97,7 @@ on
        if
        .B f->info
        was not allocated by
       -.IM malloc (3)
       +.MR malloc (3)
        it should be zeroed before calling
        .IR subffree .
        .PP
       t@@ -150,7 +150,7 @@ Although it is principally a routine internal to the library,
        may be substituted by the application to provide a less file-oriented subfont naming scheme.
        .PP
        The format of a subfont file is described in
       -.IM font (7) .
       +.MR font (7) .
        Briefly, it contains a image with all the characters in it,
        followed by a subfont header, followed by character information.
        .I Readsubfont
       t@@ -181,13 +181,13 @@ the part of a subfont file that comes after the image.  It should be preceded by
        a call to
        .IR writeimage
        (see
       -.IM allocimage (3) ).
       +.MR allocimage (3) ).
        .PP
        .I Stringsubfont
        is analogous to
        .B string
        (see
       -.IM draw (3) )
       +.MR draw (3) )
        for subfonts.  Rather than use the underlying font caching primitives,
        it calls
        .B draw
       t@@ -224,12 +224,12 @@ bitmap font file tree
        .SH SOURCE
        .B \*9/src/libdraw
        .SH SEE ALSO
       -.IM graphics (3) ,
       -.IM allocimage (3) ,
       -.IM draw (3) ,
       -.IM cachechars (3) ,
       -.IM image (7) ,
       -.IM font (7)
       +.MR graphics (3) ,
       +.MR allocimage (3) ,
       +.MR draw (3) ,
       +.MR cachechars (3) ,
       +.MR image (7) ,
       +.MR font (7)
        .SH DIAGNOSTICS
        All of the functions use the graphics error function (see
       -.IM graphics (3) ).
       +.MR graphics (3) ).
 (DIR) diff --git a/man/man3/sysfatal.3 b/man/man3/sysfatal.3
       t@@ -16,17 +16,17 @@ void sysfatal(char *fmt, ...)
        prints to standard error the name of the running program,
        a colon and a space, 
        the message described by the
       -.IM print (3)
       +.MR print (3)
        format string
        .I fmt
        and subsequent arguments, and a newline.
        It then calls
       -.IM exits (3)
       +.MR exits (3)
        with the formatted message as argument.
        The program's name is the value of
        .BR argv0 ,
        which will be set if the program uses the
       -.IM arg (3)
       +.MR arg (3)
        interface to process its arguments.
        If
        .B argv0
       t@@ -44,7 +44,7 @@ The message is a line with several fields:
        the name of the machine writing the message;
        the date and time;
        the message specified by the 
       -.IM print (3)
       +.MR print (3)
        format
        .I fmt
        and any following arguments;
       t@@ -60,9 +60,9 @@ can be used safely in multi-threaded programs.
        .br
        .B \*9/src/lib9/syslog.c
        .SH "SEE ALSO"
       -.IM intro (3) ,
       -.IM errstr (3) ,
       +.MR intro (3) ,
       +.MR errstr (3) ,
        the
        .B %r
        format in
       -.IM print (3)
       +.MR print (3)
 (DIR) diff --git a/man/man3/thread.3 b/man/man3/thread.3
       t@@ -267,10 +267,10 @@ in arbitrary ways and should synchronize their
        actions using
        .B qlocks
        (see
       -.IM lock (3) )
       +.MR lock (3) )
        or channel communication.
        System calls such as
       -.IM read (3)
       +.MR read (3)
        block the entire proc;
        all threads in a proc block until the system call finishes.
        .PP
       t@@ -364,7 +364,7 @@ are threaded analogues of
        and
        .I execl
        (see
       -.IM exec (3) );
       +.MR exec (3) );
        on success,
        they replace the calling thread
        and invoke the external program, never returning.
       t@@ -400,7 +400,7 @@ and
        .I threadexec
        will duplicate 
        (see
       -.IM dup (3) )
       +.MR dup (3) )
        the three file descriptors in
        .I fd 
        onto standard input, output, and error for the external program
       t@@ -443,14 +443,14 @@ stop the running of the program.
        returns a channel of pointers to
        .B Waitmsg
        structures (see
       -.IM wait (3) ).
       +.MR wait (3) ).
        When an exec'ed process exits, a pointer to a
        .B Waitmsg
        is sent to this channel.
        These
        .B Waitmsg
        structures have been allocated with
       -.IM malloc (3)
       +.MR malloc (3)
        and should be freed after use.
        .PP
        A
       t@@ -611,13 +611,13 @@ calls.
        .PP
        .I Chanprint
        formats its arguments in the manner of
       -.IM print (3)
       +.MR print (3)
        and sends the result to the channel
        .IR c.
        The string delivered by
        .I chanprint
        is allocated with
       -.IM malloc (3)
       +.MR malloc (3)
        and should be freed upon receipt.
        .PP
        Thread library functions do not return on failure;
       t@@ -628,10 +628,10 @@ Threaded programs should use
        in place of
        .I atnotify
        (see
       -.IM notify (3) ).
       +.MR notify (3) ).
        .PP
        It is safe to use
       -.IM sysfatal (3)
       +.MR sysfatal (3)
        in threaded programs.
        .I Sysfatal
        will print the error string and call
       t@@ -673,7 +673,7 @@ To create new processes, use
        .SH FILES
        .B \*9/acid/thread
        contains useful
       -.IM acid (1)
       +.MR acid (1)
        functions for debugging threaded programs.
        .PP
        .B \*9/src/libthread/test
       t@@ -681,8 +681,8 @@ contains some example programs.
        .SH SOURCE
        .B \*9/src/libthread
        .SH SEE ALSO
       -.IM intro (3) ,
       -.IM ioproc (3)
       +.MR intro (3) ,
       +.MR ioproc (3)
        .SH BUGS
        To avoid name conflicts,
        .IR alt ,
       t@@ -707,7 +707,7 @@ and so on.
        is defined as a macro that expands to
        .IR threadyield .
        See
       -.IM intro (3) .
       +.MR intro (3) .
        .PP
        Threadint,
        threadintgrp,
 (DIR) diff --git a/man/man3/time.3 b/man/man3/time.3
       t@@ -41,4 +41,4 @@ are preprocessor macros defined as
        and
        .IR p9nsec ;
        see
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/udpread.3 b/man/man3/udpread.3
       t@@ -65,4 +65,4 @@ to send a response back to the sender of the original packet.
        .SH SOURCE
        .B \*9/src/lib9/udp.c
        .SH SEE ALSO
       -.IM ip (3)
       +.MR ip (3)
 (DIR) diff --git a/man/man3/venti-cache.3 b/man/man3/venti-cache.3
       t@@ -112,9 +112,9 @@ the block's cache address.
        allocates a new cache using the client connection
        .I z
        (see
       -.IM venti-conn (3)
       +.MR venti-conn (3)
        and
       -.IM venti-client (3) ),
       +.MR venti-client (3) ),
        with
        .I maxmem
        bytes of memory.
       t@@ -195,7 +195,7 @@ The default
        function is 
        .I vtwrite
        (see
       -.IM venti-client (3) );
       +.MR venti-client (3) );
        .I vtsetcachewrite
        sets it.
        .I Vtsetcachewrite
       t@@ -230,8 +230,8 @@ or, more commonly, that cache blocks are being leaked.
        .SH SOURCE
        .B \*9/src/libventi
        .SH SEE ALSO
       -.IM venti (3) ,
       -.IM venti-client (3) ,
       -.IM venti-conn (3) ,
       -.IM venti-file (3) ,
       -.IM venti (7)
       +.MR venti (3) ,
       +.MR venti-client (3) ,
       +.MR venti-conn (3) ,
       +.MR venti-file (3) ,
       +.MR venti (7)
 (DIR) diff --git a/man/man3/venti-client.3 b/man/man3/venti-client.3
       t@@ -53,7 +53,7 @@ int        vtping(VtConn *z)
        extern int ventidoublechecksha1;  /* default 1 */
        .SH DESCRIPTION
        These routines execute the client side of the 
       -.IM venti (7)
       +.MR venti (7)
        protocol.
        .PP
        .I Vtrpc
       t@@ -84,7 +84,7 @@ is typically called only indirectly, via
        calls
        .I vtversion
        (see
       -.IM venti-conn (3) )
       +.MR venti-conn (3) )
        and
        .IR vthello ,
        in that order, returning success only
       t@@ -171,14 +171,14 @@ in the same proc should start separate procs running
        and
        .I vtrecvproc
        as described in
       -.IM venti-conn (3) .
       +.MR venti-conn (3) .
        .SH SOURCE
        .B \*9/src/libventi
        .SH SEE ALSO
       -.IM venti (3) ,
       -.IM venti-conn (3) ,
       -.IM venti-packet (3) ,
       -.IM venti (7)
       +.MR venti (3) ,
       +.MR venti-conn (3) ,
       +.MR venti-packet (3) ,
       +.MR venti (7)
        .SH DIAGNOSTICS
        .I Vtrpc
        and
 (DIR) diff --git a/man/man3/venti-conn.3 b/man/man3/venti-conn.3
       t@@ -90,21 +90,21 @@ for reading and writing.
        .I Vtdial
        dials the given network address
        (see
       -.IM dial (3) )
       +.MR dial (3) )
        and returns a corresponding connection.
        It returns nil if the connection cannot be established.
        .PP
        .I Vtversion
        exchanges version information with the remote side
        as described in
       -.IM venti (7) .
       +.MR venti (7) .
        The negotiated version is stored in
        .IB z ->version \fR.
        .PP
        .I Vtsend
        writes a packet
        (see
       -.IM venti-packet (3) )
       +.MR venti-packet (3) )
        on the connection
        .IR z .
        The packet
       t@@ -115,7 +115,7 @@ be returned by
        .I vtsend
        will add the two-byte length field
        (see
       -.IM venti (7) )
       +.MR venti (7) )
        at the begnning.
        .I Vtsend
        frees
       t@@ -137,7 +137,7 @@ and
        block until the packet can be written or read from the network.
        In a threaded program
        (see
       -.IM thread (3) ),
       +.MR thread (3) ),
        this may not be desirable.
        If the caller arranges for
        .IR vtsendproc
       t@@ -192,12 +192,12 @@ as they are sent or received.
        .SH SOURCE
        .B \*9/src/libventi
        .SH SEE ALSO
       -.IM venti (1) ,
       -.IM venti (3) ,
       -.IM venti-client (3) ,
       -.IM venti-packet (3) ,
       -.IM venti-server (3) ,
       -.IM venti (7)
       +.MR venti (1) ,
       +.MR venti (3) ,
       +.MR venti-client (3) ,
       +.MR venti-packet (3) ,
       +.MR venti-server (3) ,
       +.MR venti (7)
        .SH DIAGNOSTICS
        Routines that return pointers return nil on error.
        Routines returning integers return 0 on success, \-1 on error.
 (DIR) diff --git a/man/man3/venti-fcall.3 b/man/man3/venti-fcall.3
       t@@ -109,7 +109,7 @@ converts a
        .B VtEntry
        structure describing a Venti file
        (see
       -.IM venti (7) )
       +.MR venti (7) )
        into a 40-byte
        .RB ( VtEntrySize )
        structure at
       t@@ -122,7 +122,7 @@ converts a
        .B VtFcall
        structure describing a Venti protocol message
        (see
       -.IM venti (7) )
       +.MR venti (7) )
        into a packet.
        .I Vtfcallunpack
        does the reverse conversion.
       t@@ -130,7 +130,7 @@ does the reverse conversion.
        The fields in a
        .B VtFcall
        are named after the protocol fields described in
       -.IM venti (7) ,
       +.MR venti (7) ,
        except that the
        .B type
        field is renamed
       t@@ -158,7 +158,7 @@ and the packet
        The block type enumeration defined in
        .B <venti.h>
        (presented in 
       -.IM venti (7) )
       +.MR venti (7) )
        differs from the one used on disk and in the network
        protocol.
        The disk and network representation uses different
       t@@ -232,7 +232,7 @@ is nil, the label is ignored.
        and
        .I vtscorefmt
        are
       -.IM print (3)
       +.MR print (3)
        formatters to print
        .B VtFcall
        structures and scores.
       t@@ -244,9 +244,9 @@ is installed as
        .SH SOURCE
        .B \*9/src/libventi
        .SH SEE ALSO
       -.IM venti (1) ,
       -.IM venti (3) ,
       -.IM venti (7)
       +.MR venti (1) ,
       +.MR venti (3) ,
       +.MR venti (7)
        .SH DIAGNOSTICS
        .IR Vtentrypack ,
        .IR vtfcallpack ,
 (DIR) diff --git a/man/man3/venti-file.3 b/man/man3/venti-file.3
       t@@ -99,7 +99,7 @@ void        vtfileunlock(VtFile *f);
        .SH DESCRIPTION
        These routines provide a simple interface to create and
        manipulate Venti file trees (see
       -.IM venti (7) ).
       +.MR venti (7) ).
        .PP
        .I Vtfilecreateroot
        creates a new Venti file.
       t@@ -226,7 +226,7 @@ if an error is encountered.
        .I Vtfilewrite
        writes to an in-memory copy of the data blocks
        (see
       -.IM venti-cache (3) )
       +.MR venti-cache (3) )
        instead of writing directly to Venti.
        .I Vtfileflush
        writes all copied blocks associated with 
       t@@ -319,7 +319,7 @@ in the same directory block.
        .SH SOURCE
        .B \*9/src/libventi/file.c
        .SH SEE ALSO
       -.IM venti-cache (3) ,
       -.IM venti-conn (3) ,
       -.IM venti-client (3) ,
       -.IM venti (7)
       +.MR venti-cache (3) ,
       +.MR venti-conn (3) ,
       +.MR venti-client (3) ,
       +.MR venti (7)
 (DIR) diff --git a/man/man3/venti-log.3 b/man/man3/venti-log.3
       t@@ -122,9 +122,9 @@ passed nil log structures.
        .PP
        The server library
        (see
       -.IM venti-conn (3)
       +.MR venti-conn (3)
        and
       -.IM venti-server (3) )
       +.MR venti-server (3) )
        writes debugging information to the log named
        .IR VtServerLog ,
        which defaults to the string
       t@@ -132,5 +132,5 @@ which defaults to the string
        .SH SOURCE
        .B \*9/src/libventi
        .SH SEE ALSO
       -.IM venti (3) ,
       -.IM venti (8)
       +.MR venti (3) ,
       +.MR venti (8)
 (DIR) diff --git a/man/man3/venti-mem.3 b/man/man3/venti-mem.3
       t@@ -35,7 +35,7 @@ void        vtfree(void *ptr)
        .SH DESCRIPTION
        These routines allocate and free memory.
        On failure, they print an error message and call
       -.IM sysfatal (3) .
       +.MR sysfatal (3) .
        They do not return.
        .PP
        .I Vtbrk
       t@@ -63,4 +63,4 @@ when no longer needed.
        .SH SOURCE
        .B \*9/src/libventi
        .SH SEE ALSO
       -.IM venti (3)
       +.MR venti (3)
 (DIR) diff --git a/man/man3/venti-packet.3 b/man/man3/venti-packet.3
       t@@ -129,7 +129,7 @@ because fragments may not be filled completely.
        compares the data sections of two packets as
        .I memcmp
        (see
       -.IM memory (3) )
       +.MR memory (3) )
        would.
        .PP
        .I Packetconcat
       t@@ -260,7 +260,7 @@ bytes at offset
        .SH SOURCE
        .B \*9/src/libventi
        .SH SEE ALSO
       -.IM venti (3)
       +.MR venti (3)
        .SH DIAGNOSTICS
        These functions return errors only when passed
        invalid inputs,
 (DIR) diff --git a/man/man3/venti-server.3 b/man/man3/venti-server.3
       t@@ -33,7 +33,7 @@ VtReq*        vtgetreq(VtSrv *srv)
        void        vtrespond(VtReq *req)
        .SH DESCRIPTION
        These routines execute the server side of the
       -.IM venti (7)
       +.MR venti (7)
        protocol.
        .PP
        .I Vtsrvhello
       t@@ -115,8 +115,8 @@ blocks written to it and returns error on all reads.
        .SH SOURCE
        .B \*9/src/libventi
        .SH SEE ALSO
       -.IM venti (3) ,
       -.IM venti-conn (3) ,
       -.IM venti-packet (3) ,
       -.IM venti (7) ,
       -.IM venti (8)
       +.MR venti (3) ,
       +.MR venti-conn (3) ,
       +.MR venti-packet (3) ,
       +.MR venti (7) ,
       +.MR venti (8)
 (DIR) diff --git a/man/man3/venti-zero.3 b/man/man3/venti-zero.3
       t@@ -52,5 +52,5 @@ is the score of the zero-length block.
        .br
        .B \*9/src/libventi/zeroscore.c
        .SH SEE ALSO
       -.IM venti (3) ,
       -.IM venti (7)
       +.MR venti (3) ,
       +.MR venti (7)
 (DIR) diff --git a/man/man3/venti.3 b/man/man3/venti.3
       t@@ -15,61 +15,61 @@ This manual page describes general utility functions.
        .PP
        Other manual pages describe the library functions in detail.
        .PP
       -.IM Venti-cache (3)
       +.MR Venti-cache (3)
        describes a simple in-memory block cache to help clients.
        .PP
       -.IM Venti-conn (3)
       +.MR Venti-conn (3)
        describes routines for manipulating network connections
        between Venti clients and servers.
       -.IM Venti-client (3)
       +.MR Venti-client (3)
        and
       -.IM venti-server (3)
       +.MR venti-server (3)
        describe routines for writing clients
        and servers on top of these.
        .PP
       -.IM Venti-fcall (3)
       +.MR Venti-fcall (3)
        describes the C representation of Venti protocol messages
        and data structures.
        It also describes routines that convert between the C representation
        and the network and disk representations.
        .PP
       -.IM Venti-file (3)
       +.MR Venti-file (3)
        describes routines for writing clients that manipulate
        Venti file trees
        (see
       -.IM venti (7) ).
       +.MR venti (7) ).
        .PP
       -.IM Venti-log (3)
       +.MR Venti-log (3)
        describes routines to access in-memory log buffers
        as well as the logging that is done automatically by
        the library.
        .PP
       -.IM Venti-mem (3)
       +.MR Venti-mem (3)
        describes wrappers around the canonical
       -.IM malloc (3)
       +.MR malloc (3)
        routines that abort on error.
        .PP
       -.IM Venti-packet (3)
       +.MR Venti-packet (3)
        describes routines for 
        manipulating zero-copy chains of
        data buffers.
        .PP
       -.IM Venti-zero (3)
       +.MR Venti-zero (3)
        describes routines to zero truncate and zero extend blocks
        (see
       -.IM venti (7) ).
       +.MR venti (7) ).
        .SH SOURCE
        .B \*9/src/libventi
        .SH SEE ALSO
       -.IM venti (1) ,
       -.IM venti-cache (3) ,
       -.IM venti-client (3) ,
       -.IM venti-fcall (3) ,
       -.IM venti-file (3)
       -.IM venti-log (3) ,
       -.IM venti-mem (3) ,
       -.IM venti-packet (3) ,
       -.IM venti-server (3) ,
       -.IM venti-zero (3) ,
       -.IM venti (7) ,
       -.IM venti (8)
       +.MR venti (1) ,
       +.MR venti-cache (3) ,
       +.MR venti-client (3) ,
       +.MR venti-fcall (3) ,
       +.MR venti-file (3)
       +.MR venti-log (3) ,
       +.MR venti-mem (3) ,
       +.MR venti-packet (3) ,
       +.MR venti-server (3) ,
       +.MR venti-zero (3) ,
       +.MR venti (7) ,
       +.MR venti (8)
 (DIR) diff --git a/man/man3/wait.3 b/man/man3/wait.3
       t@@ -29,9 +29,9 @@ int                awaitfor(int pid, char *s, int n)
        .SH DESCRIPTION
        .I Wait
        causes a process to wait for any child process (see
       -.IM fork (2)
       +.MR fork (2)
        and
       -.IM rfork (3) )
       +.MR rfork (3) )
        to exit.
        It returns a
        .B Waitmsg
       t@@ -62,7 +62,7 @@ the time spent in system calls, and the child's elapsed real time,
        all in units of milliseconds.
        .B Msg
        contains the message that the child specified in
       -.IM exits (3) .
       +.MR exits (3) .
        For a normal exit,
        .B msg[0]
        is zero,
       t@@ -78,7 +78,7 @@ returns immediately, with return value nil.
        The
        .B Waitmsg
        structure is allocated by
       -.IM malloc (3)
       +.MR malloc (3)
        and should be freed after use.
        For programs that only need the pid of the exiting program,
        .I waitpid
       t@@ -114,7 +114,7 @@ The filled-in buffer
        may be parsed (after appending a NUL) using
        .IR tokenize
        (see
       -.IM getfields (3) );
       +.MR getfields (3) );
        the resulting fields are, in order, pid, the three times, and the exit string,
        which will be
        .B ''
       t@@ -139,8 +139,8 @@ returns
        .PP
        .B \*9/src/lib9/await.c
        .SH "SEE ALSO"
       -.IM rfork (3) ,
       -.IM exits (3) ,
       +.MR rfork (3) ,
       +.MR exits (3) ,
        .SH DIAGNOSTICS
        These routines set
        .IR errstr .
       t@@ -156,4 +156,4 @@ are preprocessor macros defined as
        and
        .IR p9waitfor ;
        see 
       -.IM intro (3) .
       +.MR intro (3) .
 (DIR) diff --git a/man/man3/window.3 b/man/man3/window.3
       t@@ -121,7 +121,7 @@ to color the window initially, and a refresh method
        The refresh methods are
        .BR Refbackup ,
        which provides backing store and is the method used by
       -.IM rio (1)
       +.MR rio (1)
        for its clients;
        .BR Refnone ,
        which provides no refresh and is designed for temporary uses
       t@@ -142,7 +142,7 @@ pointer that may be treated like any other image.
        In particular, it is freed by calling
        .B freeimage
        (see
       -.IM allocimage (3) ).
       +.MR allocimage (3) ).
        The following functions, however, apply only to windows, not regular images.
        .PP
        .B Bottomwindow
       t@@ -199,13 +199,13 @@ and screen position
        .RI ( scr ).
        Their usage is shown in the Examples section.
        .PP
       -.IM Rio (1)
       +.MR Rio (1)
        creates its client windows with backing store,
        .BR Refbackup .
        The graphics initialization routine,
        .B initdraw
        (see
       -.IM graphics (3) ),
       +.MR graphics (3) ),
        builds a
        .B Screen
        upon this, and then allocates upon that another window indented
       t@@ -234,10 +234,10 @@ actual screen position of the window unless it is recorded separately.
        .SH SOURCE
        .B \*9/src/libdraw
        .SH SEE ALSO
       -.IM graphics (3) ,
       -.IM draw (3) ,
       -.IM cachechars (3) ,
       -.IM draw (3)
       +.MR graphics (3) ,
       +.MR draw (3) ,
       +.MR cachechars (3) ,
       +.MR draw (3)
        .SH BUGS
        The refresh method
        .B Refmesg
 (DIR) diff --git a/man/man4/0intro.4 b/man/man4/0intro.4
       t@@ -15,7 +15,7 @@ In Plan 9, the kernel mount device
        \fImnt\fR(3)
        acts as a client to the 9P servers mounted in the current name space,
        translating system calls such as
       -.IM open (2)
       +.MR open (2)
        into 9P transactions such as
        .IR open (9p).
        The kernel also multiplexes the potentially many processes onto a single 9P conversation
       t@@ -30,17 +30,17 @@ On Unix, 9P clients do not access servers via the traditional
        file system call interface.  Only the Unix name space can be accessed
        that way.
        Instead, 9P clients use the
       -.IM 9pclient (3)
       +.MR 9pclient (3)
        library to connect and interact directly with particular 9P servers.
        The
       -.IM 9p (1)
       +.MR 9p (1)
        command-line client is useful for interactive use and in shell scripts.
        .PP
        To preserve the façade of a single 9P conversation with each server,
        9P servers invoke
       -.IM 9pserve (4) ,
       +.MR 9pserve (4) ,
        typically via
       -.IM post9pservice (3) .
       +.MR post9pservice (3) .
        .I 9pserve
        announces a 9P service at a particular
        network address and multiplexes the clients that connect to
       t@@ -58,7 +58,7 @@ Setting the
        .B $NAMESPACE
        environment variable overrides this default.
        The
       -.IM namespace (1)
       +.MR namespace (1)
        command prints the current name space directory.
        .PP
        Occasionally it is useful to be able to connect the input or output
       t@@ -73,7 +73,7 @@ implementation of
        (see also
        .I fsopenfd
        in
       -.IM 9pclient (3) )
       +.MR 9pclient (3) )
        returns the read or write end of a pipe;
        a helper process transfers data between the other end of the pipe
        and the 9P server.
 (DIR) diff --git a/man/man4/9import.4 b/man/man4/9import.4
       t@@ -19,7 +19,7 @@ tool allows an arbitrary
        on a remote
        .I system,
        with the capability of running the Plan 9
       -.IM exportfs (4)
       +.MR exportfs (4)
        service,
        to be imported into the local name space.
        Usually
       t@@ -31,7 +31,7 @@ A process is started on the
        remote machine, with authority of the user of
        .IR 9import ,
        to perform work for the local machine using the
       -.IM exportfs (4)
       +.MR exportfs (4)
        service.
        The default port used is TCP 17007.
        If
       t@@ -55,11 +55,11 @@ Use
        .I keypattern
        to select a key to authenticate to the remote side
        (see
       -.IM auth (2) ).
       +.MR auth (2) ).
        .TP
        .B -p
        Push the
       -.IM aan (8)
       +.MR aan (8)
        filter onto the connection to protect against
        temporary network outages.
        .TP
       t@@ -69,11 +69,11 @@ Post the connection's mountable file descriptor as
        .SH SOURCE
        .B \*9/src/cmd/9import.c
        .SH SEE ALSO
       -.IM srv (4) ,
       -.IM aan (8) ,
       -.IM listen1 (8) ,
       +.MR srv (4) ,
       +.MR aan (8) ,
       +.MR listen1 (8) ,
        .B cs
        in
       -.IM ndb (7)
       +.MR ndb (7)
        .SH BUGS
        Encryption is not implemented.
 (DIR) diff --git a/man/man4/9pserve.4 b/man/man4/9pserve.4
       t@@ -50,7 +50,7 @@ and clunks any outstanding fids belonging to the client.
        .PP
        .I 9pserve
        is typically not invoked directly; use
       -.IM post9pservice (3)
       +.MR post9pservice (3)
        instead.
        .PP
        The options are:
       t@@ -73,7 +73,7 @@ rewrite all attach messages to use
        and
        .IR afid ;
        used to implement
       -.IM srv (4) 's
       +.MR srv (4) 's
        .B -a
        option
        .TP
       t@@ -90,8 +90,8 @@ instead assume 9P2000 and a maximum message size of
        .IR msize
        .PD
        .SH "SEE ALSO
       -.IM intro (4) ,
       +.MR intro (4) ,
        .IR intro (9p),
       -.IM 9pfuse (4)
       +.MR 9pfuse (4)
        .SH SOURCE
        .B \*9/src/cmd/9pserve.c
 (DIR) diff --git a/man/man4/acme.4 b/man/man4/acme.4
       t@@ -15,7 +15,7 @@ acme \- control files for text windows
        \&... ]
        .SH DESCRIPTION
        The text window system
       -.IM acme (1)
       +.MR acme (1)
        serves a variety of files for reading, writing, and controlling
        windows.
        Some of them are virtual versions of system files for dealing
       t@@ -28,7 +28,7 @@ When a command is run under
        a directory holding these files is posted as the 9P service
        .B acme
        (using
       -.IM 9pserve (4) ).
       +.MR 9pserve (4) ).
        .PP
        Some of these files supply virtual versions of services available from the underlying
        environment, in particular the character terminal files in Plan 9's
       t@@ -47,7 +47,7 @@ Other files are unique to
        is a subdirectory used by
        .B win
        (see
       -.IM acme (1) )
       +.MR acme (1) )
        as a mount point for the
        .I acme
        files associated with the window in which
       t@@ -436,5 +436,5 @@ except that reads stop at the end address.
        .SH SOURCE
        .B \*9/src/cmd/acme
        .SH SEE ALSO
       -.IM rio (1) ,
       -.IM acme (1)
       +.MR rio (1) ,
       +.MR acme (1)
 (DIR) diff --git a/man/man4/factotum.4 b/man/man4/factotum.4
       t@@ -127,7 +127,7 @@ RSA encryption and signatures, used by SSH and TLS.
        passwords in the clear.
        .TP
        .B vnc
       -.IM vnc (1) 's
       +.MR vnc (1) 's
        challenge/response.
        .TP
        .B wep
       t@@ -186,7 +186,7 @@ cpu server.  On starting, it will attempt to get a
        key from NVRAM using
        .B readnvram
        (see
       -.IM authsrv (3) ),
       +.MR authsrv (3) ),
        prompting for anything it needs.
        It will never subsequently prompt for a
        key that it doesn't have.
       t@@ -245,7 +245,7 @@ specific to each supported protocol.
        .PP
        All keys can have additional attibutes that act either as comments
        or as selectors to distinguish them in the
       -.IM auth (3)
       +.MR auth (3)
        library calls.
        .PP
        The factotum owner can use any key stored by factotum.
       t@@ -305,7 +305,7 @@ such as
        and
        .B auth_challenge
        (see
       -.IM auth (3) )
       +.MR auth (3) )
        to specify which key and protocol to use for an authentication.
        Like a key tuple, a key template is also a list of
        .IB attribute = value
       t@@ -367,7 +367,7 @@ turned on by the
        option.
        .PP
        By default when factotum starts it looks for a
       -.IM secstore (1)
       +.MR secstore (1)
        account on $auth for the user and, if one exists,
        prompts for a secstore password in order to fetch
        the file
       t@@ -385,7 +385,7 @@ sets a public/private keypair for ssh authentication,
        generated by
        .B ssh_genkey
        (see
       -.IM ssh (1) ).
       +.MR ssh (1) ).
        .PD
        .SS "Confirming key use
        .PP
       t@@ -481,11 +481,11 @@ RPC's) until done
        if successful, reading back an
        .I AuthInfo
        structure (see
       -.IM authsrv (3) ).
       +.MR authsrv (3) ).
        .PP
        The RPC protocol is normally embodied by one of the
        routines in
       -.IM auth (3) .
       +.MR auth (3) .
        We describe it here should anyone want to extend
        the library.
        .PP
       t@@ -545,7 +545,7 @@ necessary
        authentication has succeeded, an
        .B AuthInfo
        structure (see
       -.IM auth (3) )
       +.MR auth (3) )
        can be retrieved with an
        .B authinfo
        RPC
       t@@ -703,7 +703,7 @@ and
        are intended to be proxied via
        .I auth_proxy
        (see
       -.IM auth (3) ).
       +.MR auth (3) ).
        .\" The protocols follow
        .\" .IR p9any (7)
        .\" and
       t@@ -736,7 +736,7 @@ before being sent over the network.
        .PP
        .I Vnc
        is the challenge-response protocol used by
       -.IM vnc (1) ;
       +.MR vnc (1) ;
        valid roles are
        .B client
        and
       t@@ -840,7 +840,7 @@ a string: a space-separated quoted user name and password
        that can be parsed with
        .I tokenize
        (see
       -.IM getfields (3) ).
       +.MR getfields (3) ).
        Conventionally, client keys have distinguishing attributes
        like
        .B service
       t@@ -905,7 +905,7 @@ and
        .BR !dk
        specifying the private half of the key;
        see
       -.IM rsa (3) .
       +.MR rsa (3) .
        Conventionally,
        .I rsa
        keys also have
       t@@ -972,7 +972,7 @@ attributes.
        If the key is to be used for signing, it must also have a
        .B !secret
        attribute; see
       -.IM dsa (3) .
       +.MR dsa (3) .
        Conventionally,
        .I dsa
        keys
       t@@ -1019,4 +1019,4 @@ The response is a hexadecimal string of length 32.
        .SH SOURCE
        .B \*9/src/cmd/auth/factotum
        .SH SEE ALSO
       -.IM ssh-agent (1)
       +.MR ssh-agent (1)
 (DIR) diff --git a/man/man4/fontsrv.4 b/man/man4/fontsrv.4
       t@@ -20,7 +20,7 @@ fontsrv \- file system access to host fonts
        presents the host window system's fonts
        in the standard Plan 9 format
        (see
       -.IM font (7) ).
       +.MR font (7) ).
        It serves a virtual directory tree mounted at
        .I mtpt
        (if the
       t@@ -72,14 +72,14 @@ representing 32-character Unicode ranges.
        .PP
        .I Openfont
        (see
       -.IM graphics (3) )
       +.MR graphics (3) )
        recognizes font paths beginning with
        .B /mnt/font
        and implements them by invoking
        .IR fontsrv ;
        it need not be running already.
        See
       -.IM font (7)
       +.MR font (7)
        for a full discussion of font name syntaxes.
        .SH EXAMPLES
        List the fonts on the system:
       t@@ -96,7 +96,7 @@ or:
        .EE
        .LP
        Run
       -.IM acme (1)
       +.MR acme (1)
        using the operating system's Monaco as the fixed-width font:
        .IP
        .EX
       t@@ -104,7 +104,7 @@ using the operating system's Monaco as the fixed-width font:
        .EE
        .LP
        Run
       -.IM sam (1)
       +.MR sam (1)
        using the same font:
        .IP
        .EX
       t@@ -113,7 +113,7 @@ using the same font:
        .SH SOURCE
        .B \*9/src/cmd/fontsrv
        .SH SEE ALSO
       -.IM font (7)
       +.MR font (7)
        .SH BUGS
        .PP
        Due to OS X restrictions,
 (DIR) diff --git a/man/man4/fossil.4 b/man/man4/fossil.4
       t@@ -148,10 +148,10 @@ will be named
        The attach name used in
        .I mount
        (see
       -.IM bind (1) ,
       -.IM bind (2)
       +.MR bind (1) ,
       +.MR bind (2)
        and
       -.IM attach (5) )
       +.MR attach (5) )
        selects a file system to be served
        and optionally a subtree,
        in the format
       t@@ -163,7 +163,7 @@ An empty attach name selects
        normally requires all users except
        .L none
        to provide authentication tickets on each
       -.IM attach (5) .
       +.MR attach (5) .
        To keep just anyone from connecting,
        .L none
        is only allowed to attach after another user
       t@@ -179,7 +179,7 @@ flag to
        or
        .B srv
        (see
       -.IM fossilcons (8) ).
       +.MR fossilcons (8) ).
        .PP
        The groups called
        .B noworld
       t@@ -207,7 +207,7 @@ readable by the world but writable only to the developers.
        starts a new instance of the fossil file server.
        It is configured mainly through console commands,
        documented in
       -.IM fossilcons (8) .
       +.MR fossilcons (8) .
        .PP
        The options are:
        .TF "-c\fI cmd
       t@@ -239,7 +239,7 @@ and
        which starts a file server console on
        .BI /srv/ cons \fR.
        See
       -.IM fossilcons (8)
       +.MR fossilcons (8)
        for more information.
        .TP
        .BI -f " file
       t@@ -269,7 +269,7 @@ for inconsistencies.
        is deprecated in favor of the console
        .B check
        command (see
       -.IM fossilcons (8) ).
       +.MR fossilcons (8) ).
        .I Flchk
        prints
        .I fossil
       t@@ -375,7 +375,7 @@ system stored on Venti at
        The score should have been generated by
        .I fossil
        rather than by
       -.IM vac (1) ,
       +.MR vac (1) ,
        so that the appropriate snapshot metadata is present.
        .PD
        .PP
       t@@ -450,7 +450,7 @@ See the discussion of the
        and
        .B uname
        commands in
       -.IM fossilcons (8)
       +.MR fossilcons (8)
        for more about the user table.
        .ne 3
        .PP
       t@@ -488,13 +488,13 @@ command to prepare the script.
        .SH SOURCE
        .B \*9/src/cmd/fossil
        .SH SEE ALSO
       -.IM yesterday (1) ,
       -.IM fs (3) ,
       -.IM fs (4) ,
       -.IM srv (4) ,
       -.IM fossilcons (8) ,
       -.IM loadfossil (8) ,
       -.IM venti (8)
       +.MR yesterday (1) ,
       +.MR fs (3) ,
       +.MR fs (4) ,
       +.MR srv (4) ,
       +.MR fossilcons (8) ,
       +.MR loadfossil (8) ,
       +.MR venti (8)
        .SH BUGS
        It is possible that the disk format (but not the Venti format)
        will change in the future, to make the disk a full cache
 (DIR) diff --git a/man/man4/import.4 b/man/man4/import.4
       t@@ -48,7 +48,7 @@ the path have different meanings on the two systems.)
        connects to
        .I system
        using
       -.IM ssh (1) .
       +.MR ssh (1) .
        It invokes
        .I import
        on the remote system to carry out the remote
       t@@ -109,5 +109,5 @@ sam &
        .SH SOURCE
        .B \*9/src/cmd/import.c
        .SH SEE ALSO
       -.IM 9pserve (4) ,
       -.IM intro (4)
       +.MR 9pserve (4) ,
       +.MR intro (4)
 (DIR) diff --git a/man/man4/plumber.4 b/man/man4/plumber.4
       t@@ -14,17 +14,17 @@ plumber \- file system for interprocess messaging
        The
        .I plumber
        is a user-level file server that receives, examines, rewrites, and dispatches
       -.IM plumb (7)
       +.MR plumb (7)
        messages between programs.
        Its behavior is programmed by a
        .I plumbing
        file (default
        .BR $HOME/lib/plumbing )
        in the format of
       -.IM plumb (7) .
       +.MR plumb (7) .
        .PP
        Its services are posted via
       -.IM 9pserve (4)
       +.MR 9pserve (4)
        as
        .BR plumb ,
        and consist of two
       t@@ -39,14 +39,14 @@ for dispatching messages to applications.
        Programs use
        .B fswrite
        (see
       -.IM 9pclient (3) )
       +.MR 9pclient (3) )
        to deliver messages to the
        .B send
        file, and
        .I fsread
        to receive them from the corresponding port.
        For example,
       -.IM sam (1) 's
       +.MR sam (1) 's
        .B plumb
        menu item or the
        .B B
       t@@ -115,13 +115,13 @@ statements
        .TP
        .B plumb
        mount name for
       -.IM plumber (4) .
       +.MR plumber (4) .
        .SH SOURCE
        .B \*9/src/cmd/plumb
        .SH "SEE ALSO"
       -.IM plumb (1) ,
       -.IM plumb (3) ,
       -.IM plumb (7)
       +.MR plumb (1) ,
       +.MR plumb (3) ,
       +.MR plumb (7)
        .\" .SH BUGS
        .\" .IR Plumber 's
        .\" file name space is fixed, so it is difficult to plumb
 (DIR) diff --git a/man/man4/ramfs.4 b/man/man4/ramfs.4
       t@@ -21,7 +21,7 @@ By default
        posts its service as
        .B ramfs
        using
       -.IM 9pserve (4) .
       +.MR 9pserve (4) .
        .PP
        The
        .B -S
       t@@ -46,5 +46,5 @@ It can also be used to provide high-performance temporary files.
        .SH SOURCE
        .B \*9/src/cmd/ramfs.c
        .SH "SEE ALSO"
       -.IM 9p (3) ,
       -.IM 9pserve (4)
       +.MR 9p (3) ,
       +.MR 9pserve (4)
 (DIR) diff --git a/man/man4/smugfs.4 b/man/man4/smugfs.4
       t@@ -24,7 +24,7 @@ is a user-level file system that provides access to images
        stored on the SmugMug photo sharing service.
        It logs in after
        obtaining a password from 
       -.IM factotum (4)
       +.MR factotum (4)
        using
        .B server=smugmug.com
        and
       t@@ -32,7 +32,7 @@ and
        (if any)
        as key criteria
        (see
       -.IM auth (3) ).
       +.MR auth (3) ).
        Then 
        .I smugfs
        serves a virtual directory tree mounted at
       t@@ -265,7 +265,7 @@ SmugMug,
        If multiple categories or albums have the same name,
        only one will be accessible via the file system interface.
        Renaming the accessible one via Unix's
       -.IM mv (1)
       +.MR mv (1)
        will resolve the problem.
        .PP
        Boolean values appear as
 (DIR) diff --git a/man/man4/srv.4 b/man/man4/srv.4
       t@@ -22,7 +22,7 @@ srv, 9fs \- start network file service
        dials the given address and initializes the connection to serve the 9P protocol.
        It then posts the resulting connection in the current name space 
        (see
       -.IM intro (4) )
       +.MR intro (4) )
        as
        .I srvname 
        (default
       t@@ -70,7 +70,7 @@ available as service
        .IR sources .
        .I 9fs
        is an
       -.IM rc (1)
       +.MR rc (1)
        script; examine it to see what local conventions apply.
        .SH EXAMPLES
        List the root directory on 
       t@@ -98,6 +98,6 @@ sudo mount -t 9p -o trans=unix,uname=$USER,dfltuid=`id -u`,dfltgid=`id -g`
        .br
        .B \*9/bin/9fs
        .SH "SEE ALSO
       -.IM dial (3) ,
       -.IM intro (4) ,
       -.IM netfiles (1)
       +.MR dial (3) ,
       +.MR intro (4) ,
       +.MR netfiles (1)
 (DIR) diff --git a/man/man4/tapefs.4 b/man/man4/tapefs.4
       t@@ -91,7 +91,7 @@ Tenth Edition research Unix systems (4KB block size).
        .PP
        .I Zipfs
        interprets zip archives (see
       -.IM gzip (1) ).
       +.MR gzip (1) ).
        .SH SOURCE
        .PP
        These commands are constructed in a highly stereotyped
       t@@ -103,7 +103,7 @@ in
        .BR \*9/src/cmd/tapefs ,
        which in
        turn derive substantially from
       -.IM ramfs (4) .
       +.MR ramfs (4) .
        .SH "SEE ALSO
       -.IM intro (7) ,
       -.IM ramfs (4) .
       +.MR intro (7) ,
       +.MR ramfs (4) .
 (DIR) diff --git a/man/man4/vacfs.4 b/man/man4/vacfs.4
       t@@ -26,7 +26,7 @@ vacfs \- a Venti-based file system
        .SH DESCRIPTION
        .I Vacfs
        interprets the file system created by
       -.IM vac (1)
       +.MR vac (1)
        so that it can be mounted into a Plan 9 file hierarchy.
        The data for the file system is stored on a Venti server
        with a root fingerprint specified in
       t@@ -81,6 +81,6 @@ The amount of memory, in bytes, allocated to the block cache. The default is 16M
        .SH SOURCE
        .B \*9/src/cmd/vac
        .SH "SEE ALSO"
       -.IM vac (1) ,
       +.MR vac (1) ,
        Plan 9's
        .IR venti (8)
 (DIR) diff --git a/man/man7/color.7 b/man/man7/color.7
       t@@ -121,11 +121,11 @@ which is scaled so 0 represents fully transparent and 255 represents opaque colo
        The alpha is
        .I premultiplied
        into the other channels, as described in the paper by Porter and Duff cited in
       -.IM draw (3) .
       +.MR draw (3) .
        The function
        .B setalpha
        (see
       -.IM allocimage (3) )
       +.MR allocimage (3) )
        aids the initialization of color values with non-trivial alpha.
        .PP
        The packing of pixels into bytes and words is odd.
       t@@ -138,13 +138,13 @@ the byte ordering is blue, green, red.
        .PP
        To maintain a constant external representation,
        the
       -.IM draw (3)
       +.MR draw (3)
        interface
        as well as the 
        various graphics libraries represent colors 
        by 32-bit numbers, as described in 
       -.IM color (3) .
       +.MR color (3) .
        .SH "SEE ALSO"
       -.IM color (3) ,
       -.IM graphics (3) ,
       -.IM draw (3)
       +.MR color (3) ,
       +.MR graphics (3) ,
       +.MR draw (3)
 (DIR) diff --git a/man/man7/face.7 b/man/man7/face.7
       t@@ -25,7 +25,7 @@ per color)).
        The large files serve no special purpose; they are stored
        as images
        (see
       -.IM image (7) ).
       +.MR image (7) ).
        The small files are the `icons'  displayed by
        .B faces
        and
       t@@ -110,6 +110,6 @@ which then appears as a domain name in the
        .B .dict
        files.
        .SH "SEE ALSO"
       -.IM mail (1) ,
       -.IM tweak (1) ,
       -.IM image (7)
       +.MR mail (1) ,
       +.MR tweak (1) ,
       +.MR image (7)
 (DIR) diff --git a/man/man7/font.7 b/man/man7/font.7
       t@@ -5,7 +5,7 @@ font, subfont \- external format for fonts and subfonts
        .B #include <draw.h>
        .SH DESCRIPTION
        Fonts and subfonts are described in
       -.IM cachechars (3) .
       +.MR cachechars (3) .
        .PP
        External bitmap fonts are described by a plain text file that can be read using
        .IR openfont .
       t@@ -21,7 +21,7 @@ with an optional starting position within the subfont,
        and the file name names an external file suitable for
        .I readsubfont
        (see
       -.IM graphics (3) ).
       +.MR graphics (3) ).
        The minimum number of a covered range is mapped to the specified starting position
        (default zero) of the
        corresponding subfont.
       t@@ -36,11 +36,11 @@ that can be read and written using
        and
        .I writesubfont
        (see
       -.IM subfont (3) ).
       +.MR subfont (3) ).
        The format for subfont files is: an image containing character glyphs,
        followed by a subfont header, followed by character information.
        The image has the format for external image files described in
       -.IM image (7) .
       +.MR image (7) .
        The subfont header has 3
        decimal strings:
        .BR n ,
       t@@ -72,7 +72,7 @@ are irrelevant.
        .PP
        Note that the convention of using the character with value zero (NUL) to represent
        characters of zero width (see
       -.IM draw (3) )
       +.MR draw (3) )
        means that fonts should have, as their zeroth character,
        one with non-zero width.
        .SS "Font Names
       t@@ -121,7 +121,7 @@ The command
        .B .
        lists the available fonts.
        See
       -.IM fontsrv (4)
       +.MR fontsrv (4)
        for more.
        .PP
        If the font name has the form
       t@@ -136,7 +136,7 @@ The Plan 9 bitmap fonts were designed for screens with pixel density around 100 
        When used on screens with pixel density above 200 DPI,
        the bitmap fonts are automatically pixel doubled.
        Similarly, fonts loaded from
       -.IM fontsrv (4)
       +.MR fontsrv (4)
        are automatically doubled in size by varying the effective
        .I size
        path element.
       t@@ -184,7 +184,7 @@ a system-installed vector font on high-density displays:
        .B \*9/font/*
        font directories
        .SH "SEE ALSO"
       -.IM graphics (3) ,
       -.IM draw (3) ,
       -.IM cachechars (3) ,
       -.IM subfont (3)
       +.MR graphics (3) ,
       +.MR draw (3) ,
       +.MR cachechars (3) ,
       +.MR subfont (3)
 (DIR) diff --git a/man/man7/htmlroff.7 b/man/man7/htmlroff.7
       t@@ -2,7 +2,7 @@
        .SH NAME
        htmlroff \- HTML formatting and typesetting
        .SH DESCRIPTION
       -.IM Htmlroff (1)
       +.MR Htmlroff (1)
        accepts 
        .I troff
        input with a few extensions and changes.
       t@@ -200,7 +200,7 @@ inside
        .B <sub>
        tags.  
        This heuristic handles simple equations formatted by
       -.IM eqn (1) .
       +.MR eqn (1) .
        .SS Conditional input
        .PP
        To make it easier to write input files that can be formatted by both
       t@@ -315,7 +315,7 @@ For example,
        redefines the
        .B PS
        macro that marks the beginning of a
       -.IM pic (1)
       +.MR pic (1)
        picture:
        .IP
        .EX
 (DIR) diff --git a/man/man7/image.7 b/man/man7/image.7
       t@@ -5,9 +5,9 @@ image \- external format for images
        .B #include <draw.h>
        .SH DESCRIPTION
        Images are described in
       -.IM graphics (3) ,
       +.MR graphics (3) ,
        and the definition of pixel values is in
       -.IM color (7) .
       +.MR color (7) .
        Fonts and images are stored in external files
        in machine-independent formats.
        .PP
       t@@ -21,7 +21,7 @@ and
        and
        .B writememimage
        (see
       -.IM memdraw (3) ).
       +.MR memdraw (3) ).
        An uncompressed image file starts with 5
        strings:
        .BR chan ,
       t@@ -37,7 +37,7 @@ value is a textual string describing the pixel format
        (see
        .B strtochan
        in
       -.IM graphics (3)
       +.MR graphics (3)
        and the discussion of channel descriptors below),
        and the rectangle coordinates are decimal strings.
        The rest of the file contains the
       t@@ -73,7 +73,7 @@ The
        and
        .B unloadimage
        functions described in
       -.IM allocimage (3)
       +.MR allocimage (3)
        also deal with rows in this format, stored in user memory.
        .PP
        The channel format string is a sequence of two-character channel descriptions,
       t@@ -110,7 +110,7 @@ In particular
        .B 'r8g8b8'
        pixels have byte ordering blue, green, and red within the file.
        See
       -.IM color (7)
       +.MR color (7)
        for more details of the pixel format.
        .PP
        A venerable yet deprecated format replaces the channel string
       t@@ -179,7 +179,7 @@ as used by
        (see Plan 9's
        .IR faces (1)
        and
       -.IM face (7) )
       +.MR face (7) )
        and 16\(mu16
        cursors, can be stored textually, suitable for inclusion in C source.
        Each line of text represents one scan line as a
       t@@ -188,18 +188,18 @@ bytes, shorts, or words in C format.
        For cursors, each line defines a pair of bytes.
        (It takes two images to define a cursor; each must be stored separately
        to be processed by programs such as
       -.IM tweak (1) .)
       +.MR tweak (1) .)
        Face files of one bit per pixel are stored as a sequence of shorts,
        those of larger pixel sizes as a sequence of longs.
        Software that reads these files must deduce the image size from
        the input; there is no header.
        These formats reflect history rather than design.
        .SH "SEE ALSO"
       -.IM jpg (1) ,
       -.IM tweak (1) ,
       -.IM graphics (3) ,
       -.IM draw (3) ,
       -.IM allocimage (3) ,
       -.IM color (7) ,
       -.IM face (7) ,
       -.IM font (7)
       +.MR jpg (1) ,
       +.MR tweak (1) ,
       +.MR graphics (3) ,
       +.MR draw (3) ,
       +.MR allocimage (3) ,
       +.MR color (7) ,
       +.MR face (7) ,
       +.MR font (7)
 (DIR) diff --git a/man/man7/keyboard.7 b/man/man7/keyboard.7
       t@@ -49,15 +49,15 @@ in particular, control-J is a line feed and control-M a carriage return.
        .PP
        The down arrow,
        used by
       -.IM 9term (1) ,
       -.IM acme (1) ,
       +.MR 9term (1) ,
       +.MR acme (1) ,
        and
       -.IM sam (1) ,
       +.MR sam (1) ,
        causes windows to scroll forward.
        The up arrow scrolls backward.
        .PP
        Characters in Plan 9 are runes (see
       -.IM utf (7) ).
       +.MR utf (7) ).
        Any rune can be typed using a compose key followed by several
        other keys.
        The compose key is also generally near the lower right of the main key area:
       t@@ -92,11 +92,11 @@ the compose key followed by a two- or three-character sequence.
        The full list is too long to repeat here, but is contained in the file
        .L \*9/lib/keyboard
        in a format suitable for
       -.IM grep (1)
       +.MR grep (1)
        or
       -.IM look (1) .
       +.MR look (1) .
        To add a sequence, edit that file and then rebuild
       -.IM devdraw (1) .
       +.MR devdraw (1) .
        .PP
        There are several rules guiding the design of the sequences, as
        illustrated by the following examples.
       t@@ -235,10 +235,10 @@ to run them automatically at startup.
        sorted table of characters and keyboard sequences
        .PD
        .SH "SEE ALSO"
       -.IM intro (1) ,
       -.IM ascii (1) ,
       -.IM tcs (1) ,
       -.IM 9term (1) ,
       -.IM acme (1) ,
       -.IM sam (1) ,
       -.IM utf (7)
       +.MR intro (1) ,
       +.MR ascii (1) ,
       +.MR tcs (1) ,
       +.MR 9term (1) ,
       +.MR acme (1) ,
       +.MR sam (1) ,
       +.MR utf (7)
 (DIR) diff --git a/man/man7/man.7 b/man/man7/man.7
       t@@ -82,9 +82,9 @@ font- or size-setting macros.
        The
        .B -man
        macros admit equations and tables in the style of
       -.IM eqn (1)
       +.MR eqn (1)
        and
       -.IM tbl (1) ,
       +.MR tbl (1) ,
        but do not support arguments on
        .B .EQ
        and
       t@@ -113,7 +113,7 @@ The root directory of the Plan 9 installation.
        .B \*9/tmac/tmac.antimes
        .SH SEE ALSO
        .IR troff (1), 
       -.IM man (1)
       +.MR man (1)
        .SH REQUESTS
        .ta \w'.TH n c x 'u +\w'Cause 'u +\w'Argument\ 'u
        .di xx
 (DIR) diff --git a/man/man7/map.7 b/man/man7/map.7
       t@@ -80,7 +80,7 @@ in the map file.
        Both the map file and the index file are ordered by
        patch latitude and longitude.
        .SH "SEE ALSO"
       -.IM map (7)
       +.MR map (7)
        .br
        The data comes from the World Data Bank I and II and
        U.S. Government sources: the Census Bureau, Geological
 (DIR) diff --git a/man/man7/mhtml.7 b/man/man7/mhtml.7
       t@@ -19,14 +19,14 @@ mhtml \- macros for formatting HTML
        \&...
        .SH DESCRIPTION
        This package of
       -.IM htmlroff (1)
       +.MR htmlroff (1)
        macro definitions provides convenient macros for formatting HTML.
        It is usually used along with 
       -.IM troff (1)
       +.MR troff (1)
        macro packages such as
       -.IM man (7)
       +.MR man (7)
        and
       -.IM ms (7) .
       +.MR ms (7) .
        .I Mhtml
        replaces some macros defined in the other packages,
        so it should be listed after them on the
       t@@ -64,7 +64,7 @@ before invoking
        Accumulate footnotes and print them at the end of the
        document under a \fBNotes\fP heading.
        These replace the macros in
       -.IM ms (7) .
       +.MR ms (7) .
        To emit the notes accumulated so far, invoke
        .BR .NOTES .
        .TP
       t@@ -75,7 +75,7 @@ and
        .B .PE
        with a PNG image corresponding to the output of
        running
       -.IM troff (1)
       +.MR troff (1)
        on the input.
        .TP
        .B .TS\fR, \fP.TE
       t@@ -100,6 +100,6 @@ percent of the current output width.
        .SH FILES
        .B \*9/tmac/tmac.html
        .SH  SEE ALSO
       -.IM htmlroff (1) ,
       -.IM htmlroff (7) ,
       -.IM ms (7)
       +.MR htmlroff (1) ,
       +.MR htmlroff (7) ,
       +.MR ms (7)
 (DIR) diff --git a/man/man7/mpictures.7 b/man/man7/mpictures.7
       t@@ -10,7 +10,7 @@ mpictures \- picture inclusion macros
        .SH DESCRIPTION
        .I Mpictures
        macros insert PostScript pictures into
       -.IM troff (1)
       +.MR troff (1)
        documents.
        The macros are:
        .TP
       t@@ -129,7 +129,7 @@ comment is present, the picture is
        assumed to fill an 8.5\(mu11-inch page.
        Nothing prevents the picture from being placed off the page.
        .SH SEE ALSO
       -.IM troff (1)
       +.MR troff (1)
        .SH DIAGNOSTICS
        A picture file that can't be read by the PostScript
        postprocessor is replaced by white space.
 (DIR) diff --git a/man/man7/ms.7 b/man/man7/ms.7
       t@@ -18,7 +18,7 @@ ms \- macros for formatting manuscripts
        This package of
        .I nroff
        and
       -.IM troff (1)
       +.MR troff (1)
        macro definitions provides a canned formatting
        facility for tech%nical papers in various formats.
        .PP
       t@@ -38,11 +38,11 @@ impunity after the first
        .LR .na .
        .PP
        Output of the
       -.IM eqn (1) ,
       -.IM tbl (1) ,
       -.IM pic (1)
       +.MR eqn (1) ,
       +.MR tbl (1) ,
       +.MR pic (1)
        and
       -.IM grap (1)
       +.MR grap (1)
        preprocessors
        for equations, tables, pictures, and graphs is acceptable as input.
        .SH FILES
       t@@ -57,8 +57,8 @@ Tenth Edition, Volume 2.
        .br
        .IR eqn (1), 
        .IR troff (1), 
       -.IM tbl (1) ,
       -.IM pic (1)
       +.MR tbl (1) ,
       +.MR pic (1)
        .SH REQUESTS
        .ta \w'..ND \fIdate\fR 'u +\w'Initial 'u +\w'Cause 'u
        .br
       t@@ -153,7 +153,7 @@ Implies
        produced by
        .I neqn
        or
       -.IM eqn (1) .
       +.MR eqn (1) .
        .ti0
        \fL\&.EQ\fP \fIx y\fR        -        yes        Display equation.
        Equation number is
       t@@ -234,7 +234,7 @@ is subsection level (default 1).
        \fL\&.P2\fP        -        yes        End program display.
        .ti0
        \fL\&.PE\fP        -        yes        End picture; see
       -.IM pic (1) .
       +.MR pic (1) .
        .ti0
        \fL\&.PF\fP        -        yes        End picture; restore vertical
        position.
       t@@ -280,7 +280,7 @@ font automatically bold.
        Default is 5 10 15 ...
        .ti0
        \fL\&.TE\fP        -        yes        End table; see
       -.IM tbl (1) .
       +.MR tbl (1) .
        .ti0
        \fL\&.TH\fP        -        yes        End heading section of table.
        .ti0
 (DIR) diff --git a/man/man7/ndb.7 b/man/man7/ndb.7
       t@@ -59,7 +59,7 @@ Within tuples, pairs on the same line bind tighter than
        pairs on different lines.
        .PP
        Programs search the database directly using the routines in
       -.IM ndb (3) .
       +.MR ndb (3) .
        .\" or indirectly using
        .\" .B ndb/cs
        .\" and
       t@@ -292,8 +292,8 @@ tcp=9fs        port=564
        first database file searched
        .SH "SEE ALSO"
        .\" .IR dial (2),
       -.IM ndb (1) ,
       -.IM ndb (3)
       +.MR ndb (1) ,
       +.MR ndb (3)
        .\" .IR dhcpd (8),
        .\" .IR ipconfig (8),
        .\" .IR con (1)
 (DIR) diff --git a/man/man7/plot.7 b/man/man7/plot.7
       t@@ -340,4 +340,4 @@ Restore previous environment.
        .PD
        .SH "SEE ALSO"
        .IR plot (1), 
       -.IM graph (1)
       +.MR graph (1)
 (DIR) diff --git a/man/man7/plumb.7 b/man/man7/plumb.7
       t@@ -6,7 +6,7 @@ plumb \- format of plumb messages and rules
        .SH DESCRIPTION
        .SS "Message format
        The messages formed by the
       -.IM plumb (3)
       +.MR plumb (3)
        library are formatted for transmission between
        processes into textual form, using newlines to separate
        the fields.
       t@@ -61,7 +61,7 @@ A missing field is represented by an empty line.
        The
        .B plumber
        (see
       -.IM plumb (1) )
       +.MR plumb (1) )
        receives messages on its
        .B send
        port (applications
       t@@ -271,7 +271,7 @@ rule should be specified in a rule set.
        .RE
        .PP
        The arguments to all rules may contain quoted strings, exactly as in
       -.IM rc (1) .
       +.MR rc (1) .
        They may also contain simple string variables, identified by a leading dollar sign
        .BR $ .
        Variables may be set, between rule sets, by assignment statements in the style of
       t@@ -341,7 +341,7 @@ field of the message.
        .B $plan9
        The root directory of the Plan 9 tree
        (see
       -.IM get9root (3) ).
       +.MR get9root (3) ).
        .RE
        .SH EXAMPLE
        The following is a modest, representative file of plumbing rules.
       t@@ -403,7 +403,7 @@ default rules file.
        .TP
        .B plumb
        service name for
       -.IM plumber (4) .
       +.MR plumber (4) .
        .TP
        .B \*9/plumb
        directory for
       t@@ -416,7 +416,7 @@ public macro definitions.
        .B \*9/plumb/basic
        basic rule set.
        .SH "SEE ALSO"
       -.IM plumb (1) ,
       -.IM plumb (3) ,
       -.IM plumber (4) ,
       -.IM regexp (7)
       +.MR plumb (1) ,
       +.MR plumb (3) ,
       +.MR plumber (4) ,
       +.MR regexp (7)
 (DIR) diff --git a/man/man7/regexp.7 b/man/man7/regexp.7
       t@@ -4,9 +4,9 @@ regexp \- Plan 9 regular expression notation
        .SH DESCRIPTION
        This manual page describes the regular expression
        syntax used by the Plan 9 regular expression library
       -.IM regexp (3) .
       +.MR regexp (3) .
        It is the form used by
       -.IM egrep (1)
       +.MR egrep (1)
        before
        .I egrep
        got complicated.
       t@@ -130,4 +130,4 @@ A match to any part of a regular expression
        extends as far as possible without preventing
        a match to the remainder of the regular expression.
        .SH "SEE ALSO"
       -.IM regexp (3)
       +.MR regexp (3)
 (DIR) diff --git a/man/man7/thumbprint.7 b/man/man7/thumbprint.7
       t@@ -9,7 +9,7 @@ for example by calling
        and
        .B okThumbprint
        (see
       -.IM pushtls (3) ),
       +.MR pushtls (3) ),
        check the remote side's public key by comparing against
        thumbprints from a trusted list.
        The list is maintained by people who set local policies
       t@@ -38,4 +38,4 @@ For example, a web server might have thumbprint
        x509 sha1=8fe472d31b360a8303cd29f92bd734813cbd923c cn=*.cs.bell-labs.com
        .EE
        .SH "SEE ALSO"
       -.IM pushtls (3)
       +.MR pushtls (3)
 (DIR) diff --git a/man/man7/utf.7 b/man/man7/utf.7
       t@@ -57,7 +57,7 @@ in order to work properly with non-\c
        .SM ASCII
        input.
        See
       -.IM rune (3) .
       +.MR rune (3) .
        .PP
        Letting numbers be binary,
        a rune x is converted to a multibyte
       t@@ -85,7 +85,7 @@ In the inverse mapping,
        any sequence except those described above
        is incorrect and is converted to rune hexadecimal 0080.
        .SH "SEE ALSO"
       -.IM ascii (1) ,
       -.IM tcs (1) ,
       -.IM rune (3) ,
       +.MR ascii (1) ,
       +.MR tcs (1) ,
       +.MR rune (3) ,
        .IR "The Unicode Standard" .
 (DIR) diff --git a/man/man7/venti.7 b/man/man7/venti.7
       t@@ -14,19 +14,19 @@ of clients.
        This manual page documents the basic concepts of
        block storage using Venti as well as the Venti network protocol.
        .PP
       -.IM Venti (1)
       +.MR Venti (1)
        documents some simple clients.
       -.IM Vac (1) ,
       -.IM vacfs (4) ,
       +.MR Vac (1) ,
       +.MR vacfs (4) ,
        and
       -.IM vbackup (8)
       +.MR vbackup (8)
        are more complex clients.
        .PP
       -.IM Venti (3)
       +.MR Venti (3)
        describes a C library interface for accessing
        Venti servers and manipulating Venti data structures.
        .PP
       -.IM Venti (8)
       +.MR Venti (8)
        describes the programs used to run a Venti server.
        .PP
        .SS "Scores
       t@@ -40,11 +40,11 @@ Scores may have an optional
        prefix, typically used to
        describe the format of the data.
        For example, 
       -.IM vac (1)
       +.MR vac (1)
        uses a
        .B vac:
        prefix, while
       -.IM vbackup (8)
       +.MR vbackup (8)
        uses prefixes corresponding to the file system
        types: 
        .BR ext2: ,
       t@@ -93,7 +93,7 @@ Keeping this parallel representation is a minor annoyance
        but makes it possible for general programs like
        .I venti/copy
        (see
       -.IM venti (1) )
       +.MR venti (1) )
        to traverse the block tree without knowing the specific details
        of any particular program's data.
        .SS "Block Types
       t@@ -202,7 +202,7 @@ Text strings are represented similarly,
        using a two-byte count with
        the text itself stored as a UTF-encoded sequence
        of Unicode characters (see
       -.IM utf (7) ).
       +.MR utf (7) ).
        Text strings are not
        .SM NUL\c
        -terminated:
       t@@ -395,7 +395,7 @@ Use
        and
        .I vtfromdisktype
        (see
       -.IM venti (3) )
       +.MR venti (3) )
        to convert a block type enumeration value
        .RB ( VtDataType ,
        etc.)
       t@@ -457,9 +457,9 @@ in the
        packet may be either 2 or 4 bytes;
        the total packet length distinguishes the two cases.
        .SH SEE ALSO
       -.IM venti (1) ,
       -.IM venti (3) ,
       -.IM venti (8)
       +.MR venti (1) ,
       +.MR venti (3) ,
       +.MR venti (8)
        .br
        Sean Quinlan and Sean Dorward,
        ``Venti: a new approach to archival storage'',
 (DIR) diff --git a/man/man8/fossilcons.8 b/man/man8/fossilcons.8
       t@@ -340,7 +340,7 @@ con /srv/fscons
        .SH DESCRIPTION
        These are configuration and maintenance commands
        executed at the console of a 
       -.IM fossil (4)
       +.MR fossil (4)
        file server.
        The commands are split into three groups above:
        file server configuration,
       t@@ -372,11 +372,11 @@ a file in any file system served by
        .I 9p
        executes a 9P transaction; the arguments
        are in the same format used by
       -.IM 9pcon (8) .
       +.MR 9pcon (8) .
        .PP
        .I Bind
        behaves similarly to
       -.IM bind (1) .
       +.MR bind (1) .
        It is useful when fossil
        is started without devices it needs configured
        into its namespace.
       t@@ -389,7 +389,7 @@ standard error.
        .PP
        .I Echo
        behaves identically to
       -.IM echo (1) ,
       +.MR echo (1) ,
        writing to the console.
        .PP
        .I Listen
       t@@ -492,7 +492,7 @@ the string used to represent this user in the 9P protocol
        .TP
        .I leader
        the group's leader (see Plan 9's
       -.IM stat (5)
       +.MR stat (5)
        for a description of the special privileges held by a group leader)
        .TP
        .I members
       t@@ -821,7 +821,7 @@ removing a non-empty directory.
        A subsequent
        .I flchk
        (see
       -.IM fossil (4) )
       +.MR fossil (4) )
        will identify the abandoned storage so it can be reclaimed with
        .I bfree
        commands.
       t@@ -1013,7 +1013,7 @@ takes a temporary snapshot of the current file system,
        recording it in 
        .BI /snapshot/ yyyy / mmdd / hhmm \fR,
        as described in 
       -.IM fossil (4) .
       +.MR fossil (4) .
        The
        .B -a
        flag causes 
       t@@ -1021,7 +1021,7 @@ flag causes
        to take an archival snapshot, recording it in
        .BI /archive/ yyyy / mmdd \fR,
        also described in
       -.IM fossil (4) .
       +.MR fossil (4) .
        By default the snapshot is taken of
        .BR /active ,
        the root of the active file system.
       t@@ -1132,7 +1132,7 @@ writes dirty blocks in memory to the disk.
        .PP
        .I Vac
        prints the Venti score for a
       -.IM vac (1)
       +.MR vac (1)
        archive containing the tree rooted
        at
        .IR dir ,
 (DIR) diff --git a/man/man8/getflags.8 b/man/man8/getflags.8
       t@@ -16,7 +16,7 @@ not take arguments, or a letter followed by the space-separated
        names of its arguments.
        .I Getflags 
        prints an 
       -.IM rc (1)
       +.MR rc (1)
        script on standard output which initializes the
        environment variable
        .BI $flag x
       t@@ -51,15 +51,15 @@ and
        .BR $0 ,
        the program name
        (see
       -.IM rc (1) ).
       +.MR rc (1) ).
        If run under 
       -.IM sh (1) ,
       +.MR sh (1) ,
        which does not set
        .BR $0 ,
        the program name must be given explicitly on the command line.
        .SH EXAMPLE
        Parse the arguments for Plan 9's
       -.IM leak (1) :
       +.MR leak (1) :
        .IP
        .EX
        flagfmt='b,s,f binary,r res,x width'
       t@@ -74,4 +74,4 @@ if(! ifs=() eval `{getflags $*} || ~ $#* 0){
        .br
        .B \*9/src/cmd/usage.c
        .SH SEE ALSO
       -.IM arg (3)
       +.MR arg (3)
 (DIR) diff --git a/man/man8/listen1.8 b/man/man8/listen1.8
       t@@ -34,4 +34,4 @@ flag causes verbose logging on standard output.
        .SH SOURCE
        .B \*9/src/cmd/listen1.c
        .SH "SEE ALSO"
       -.IM dial (3)
       +.MR dial (3)
 (DIR) diff --git a/man/man8/mkfs.8 b/man/man8/mkfs.8
       t@@ -34,7 +34,7 @@ copies files from the file tree
        to a
        .B kfs
        file system (see
       -.IM kfs (4) ).
       +.MR kfs (4) ).
        The kfs service is mounted on
        .I root
        (default
       t@@ -47,7 +47,7 @@ The
        .I proto
        files are read
        (see
       -.IM proto (2)
       +.MR proto (2)
        for their format)
        and any files specified in them that are out of date are copied to
        .BR /n/kfs .
       t@@ -183,5 +183,5 @@ disk/mkext -u -d /n/newfs < arch
        .br
        .B \*9/src/cmd/disk/mkext.c
        .SH "SEE ALSO"
       -.IM prep (8) ,
       -.IM tar (1)
       +.MR prep (8) ,
       +.MR tar (1)
 (DIR) diff --git a/man/man8/vbackup.8 b/man/man8/vbackup.8
       t@@ -70,7 +70,7 @@ back up Unix file systems to Venti
        .SH DESCRIPTION
        These programs back up and restore standard
        Unix file system images stored in
       -.IM venti (8) .
       +.MR venti (8) .
        Images stored in
        .I venti
        are named by
       t@@ -102,7 +102,7 @@ The argument
        .I disk
        should be a disk or disk partition device
        that would be appropriate to pass to
       -.IM mount (8) .
       +.MR mount (8) .
        .PP
        The optional argument
        .I score
       t@@ -135,7 +135,7 @@ The default
        is the name returned by 
        .I sysname
        (see
       -.IM getuser (3) ).
       +.MR getuser (3) ).
        The default
        .I mtpt
        is the place where
       t@@ -149,7 +149,7 @@ command.
        The default is the name returned by
        .I sysname
        (see
       -.IM getuser (3) ).
       +.MR getuser (3) ).
        .TP
        .B -n
        No-op mode: do not write any blocks to the server
       t@@ -207,7 +207,7 @@ to zero unused blocks instead.
        .PP
        .I Vftp
        presents an
       -.IM ftp (1) -like
       +.MR ftp (1) -like
        interface to a physical or backed-up disk image.
        It is used mainly for debugging.
        Type
       t@@ -228,7 +228,7 @@ must be run by the user
        Because
        .I address
        is passed to the host OS kernel rather than interpreted by
       -.IM dial (3) ,
       +.MR dial (3) ,
        it must be only an IP address, not a full dial address.
        .PP
        .I Vnfs
 (DIR) diff --git a/man/man8/venti-backup.8 b/man/man8/venti-backup.8
       t@@ -104,8 +104,8 @@ for a version that does this.
        .SH SOURCE
        .B \*9/src/cmd/venti/srv
        .SH SEE ALSO
       -.IM venti (7) ,
       -.IM venti (8)
       +.MR venti (7) ,
       +.MR venti (8)
        .SH BUGS
        .I Wrarena
        can't read a pipe or network connection containing an arena;
 (DIR) diff --git a/man/man8/venti-fmt.8 b/man/man8/venti-fmt.8
       t@@ -99,9 +99,9 @@ syncindex \- prepare and maintain a venti server
        These commands aid in the setup, maintenance, and debugging of
        venti servers.
        See
       -.IM venti (7)
       +.MR venti (7)
        for an overview of the venti system and
       -.IM venti (8)
       +.MR venti (8)
        for an overview of the data structures used by the venti server.
        .PP
        Note that the units for the various sizes in the following
       t@@ -195,7 +195,7 @@ formats the given
        .I file
        as a Bloom filter
        (see
       -.IM venti (7) ).
       +.MR venti (7) ).
        The options are:
        .TF "\fL-s\fI size"
        .PD
       t@@ -264,7 +264,7 @@ overflow.  The total size of the index should be about 2% to 10% of
        the total size of the arenas, but the exact percentage depends both on the
        index block size and the compressed size of blocks stored.
        See the discussion in
       -.IM venti (8)
       +.MR venti (8)
        for more.
        .PP
        .I Fmtindex
       t@@ -401,8 +401,8 @@ Increase the verbosity of output.
        .SH SOURCE
        .B \*9/src/cmd/venti/srv
        .SH SEE ALSO
       -.IM venti (7) ,
       -.IM venti (8)
       +.MR venti (7) ,
       +.MR venti (8)
        .SH BUGS
        .I Buildindex
        should allow an individual index section to be rebuilt.
 (DIR) diff --git a/man/man8/venti.8 b/man/man8/venti.8
       t@@ -40,7 +40,7 @@ venti \- archival storage server
        .I Venti
        is a SHA1-addressed archival storage server.
        See 
       -.IM venti (7)
       +.MR venti (7)
        for a full introduction to the system.
        This page documents the structure and operation of the server.
        .PP
       t@@ -138,7 +138,7 @@ less than 10 are not very useful;
        greater than 24 are probably a waste of memory.
        .I Fmtbloom
        (see
       -.IM venti-fmt (8) )
       +.MR venti-fmt (8) )
        can be given either
        .I nhash
        or
       t@@ -220,7 +220,7 @@ The venti server announces two network services, one
        .BR venti ,
        17034) serving
        the venti protocol as described in
       -.IM venti (7) ,
       +.MR venti (7) ,
        and one serving HTTP
        (conventionally TCP port 
        .BR http ,
       t@@ -333,7 +333,7 @@ with
        or 
        .I fmtisect
        (see
       -.IM venti-fmt (8) ).
       +.MR venti-fmt (8) ).
        In particular, only the configuration needs to be
        changed if a component is moved to a different file.
        .PP
       t@@ -506,11 +506,11 @@ Start the server and check the storage statistics:
        .SH SOURCE
        .B \*9/src/cmd/venti/srv
        .SH "SEE ALSO"
       -.IM venti (1) ,
       -.IM venti (3) ,
       -.IM venti (7) ,
       -.IM venti-backup (8)
       -.IM venti-fmt (8)
       +.MR venti (1) ,
       +.MR venti (3) ,
       +.MR venti (7) ,
       +.MR venti-backup (8)
       +.MR venti-fmt (8)
        .br
        Sean Quinlan and Sean Dorward,
        ``Venti: a new approach to archival storage'',
       t@@ -523,7 +523,7 @@ Venti should not require the user to decide how to
        partition its memory usage.
        .PP
        Users of shells other than 
       -.IM rc (1)
       +.MR rc (1)
        will not be able to use the program names shown.
        One solution is to define
        .B "V=$PLAN9/bin/venti"
 (DIR) diff --git a/tmac/tmac.an b/tmac/tmac.an
       t@@ -209,7 +209,10 @@
        .HY
        .}f
        ..
       -.de IM
       +.\" MR - manual reference, as in .MR cat (1) ,
       +.\" $3 is the punctuation after the reference ends, if any.
       +.de MR
       +.nh
        .}S 2 1 \& "\Xhtml manref start \\$1 \\$2\\$1" "\\$2\Xhtml manref end \\$1 \\$2\\$3"
        .HY
        .}f