Subject: Re: man page formatting.
To: None <tech-userlevel@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: tech-userlevel
Date: 12/08/1999 10:42:01
Chris G. Demetriou wrote:
> Simon Burge <simonb@netbsd.org> writes:
> > I was looking at some man pages(!), and noticed that some overflow
> > the heading at the top of the page. For example, here's the alpha
> > installboot(8)
> >
> > INSTALLBOOT(8)NetBSD System Manager's Manual (ALPHA ArchitectureINSTALLBOOT(8)
> >
> > The atari one doesn't include the "Architecture" section and comes out
> > like
> >
> > INSTALLBOOT(8) NetBSD System Manager's Manual INSTALLBOOT(8)
> >
> > Both look just fine however as postscript output. I was going to just
> > add the "Architecture" sectoin to some pages that were missing that
> > section, but the output as ascii looks pretty tacky.
> >
> > Any ideas on what is the best thing to do?
>
> So:
>
> (1) pages which are machine- or architecture-specific should be marked
> as being machine- or architecture-specific.
>
> (2) the overflow is Ugly. One possible solution is to describe the
> "architecture"-specific pages differently. (note that they're
> typically specific to "machine" or 'platform,' i.e. MACHINE, not
> "architecture," i.e. MACHINE_ARCH.)
>
> I coded a diff about half a year ago to make the titles say
> "NetBSD/foo Manual Name." It's not pretty, and I never had time to to
> pursue it further. I've included it below. i'd expect it's a bit out
> of date at this point (ports missing), but should be easily fixable.
>
>
> There should probably be a similar designation for MACHINE_ARCH values
> as well as MACHINE ones, too...
Does anyone have any problems with the trailling diff? Basically the
header of man pages changes from something like:
INSTALLBOOT(8)NetBSD System Manager's Manual (i386 Architecture)INSTALLBOOT(8)
to
INSTALLBOOT(8) NetBSD/i386 System Manager's Manual INSTALLBOOT(8)
Simon.
--
Index: doc-common
===================================================================
RCS file: /cvsroot/sharesrc/share/tmac/doc-common,v
retrieving revision 1.32
diff -p -u -r1.32 doc-common
--- doc-common 1999/08/23 21:20:27 1.32
+++ doc-common 1999/12/07 23:39:20
@@ -150,10 +150,39 @@
.if !"\\$2"" \{\
. ds cH \\$2
. if \\$2>=1 .if \\$2<=9 \{\
-. ds vT NetBSD Reference Manual
-. if \\$2>1 .if \\$2<6 .ds vT NetBSD Programmer's Manual
-. if "\\$2"8" .ds vT NetBSD System Manager's Manual
-. if "\\$2"9" .ds vT NetBSD Kernel Manual
+. ds vT NetBSD
+. if "\\$3"alpha" .as vT /\\$3\
+. if "\\$3"amiga" .as vT /\\$3\
+. if "\\$3"arm32" .as vT /\\$3\
+. if "\\$3"atari" .as vT /\\$3\
+. if "\\$3"bebox" .as vT /\\$3\
+. if "\\$3"evbsh3" .as vT /\\$3\
+. if "\\$3"hp300" .as vT /\\$3\
+. if "\\$3"hpcmips" .as vT /\\$3\
+. if "\\$3"i386" .as vT /\\$3\
+. if "\\$3"m68k" .as vT /\\$3\
+. if "\\$3"mac68k" .as vT /\\$3\
+. if "\\$3"macppc" .as vT /\\$3\
+. if "\\$3"mips" .as vT /\\$3\
+. if "\\$3"mmeye" .as vT /\\$3\
+. if "\\$3"mvme68k" .as vT /\\$3\
+. if "\\$3"newsmips" .as vT /\\$3\
+. if "\\$3"next68k" .as vT /\\$3\
+. if "\\$3"ofppc" .as vT /\\$3\
+. if "\\$3"pc532" .as vT /\\$3\
+. if "\\$3"pica" .as vT /\\$3\
+. if "\\$3"pmax" .as vT /\\$3\
+. if "\\$3"powerpc" .as vT /\\$3\
+. if "\\$3"sh3" .as vT /\\$3\
+. if "\\$3"sparc" .as vT /\\$3\
+. if "\\$3"sparc64" .as vT /\\$3\
+. if "\\$3"sun3" .as vT /\\$3\
+. if "\\$3"vax" .as vT /\\$3\
+. if "\\$3"x68k" .as vT /\\$3\
+. if \\$2>1 .if \\$2<6 .as vT Programmer's Manual
+. if "\\$2"7" .as vT Reference Manual
+. if "\\$2"8" .as vT System Manager's Manual
+. if "\\$2"9" .as vT Kernel Manual
. nr sN \\$2
. \}
. if "\\$2"unass" .ds vT DRAFT
@@ -170,21 +199,6 @@
. if "\\$3"KM" .ds vT NetBSD Kernel Manual
. if "\\$3"IND" .ds vT NetBSD Manual Master Index
. if "\\$3"LOCAL" .ds vT NetBSD Local Manual
-. if "\\$3"alpha" .as vT \ (ALPHA Architecture)
-. if "\\$3"amiga" .as vT \ (AMIGA Architecture)
-. if "\\$3"arm32" .as vT \ (ARM32 Architecture)
-. if "\\$3"atari" .as vT \ (ATARI Architecture)
-. if "\\$3"hp300" .as vT \ (HP300 Architecture)
-. if "\\$3"i386" .as vT \ (i386 Architecture)
-. if "\\$3"mac68k" .as vT \ (MAC68K Architecture)
-. if "\\$3"mvme68k" .as vT \ (MVME68K Architecture)
-. if "\\$3"pc532" .as vT \ (PC532 Architecture)
-. if "\\$3"pica" .as vT \ (PICA Architecture)
-. if "\\$3"pmax" .as vT \ (PMAX Architecture)
-. if "\\$3"sparc" .as vT \ (SPARC Architecture)
-. if "\\$3"sun3" .as vT \ (SUN3 Architecture)
-. if "\\$3"vax" .as vT \ (VAX Architecture)
-. if "\\$3"x68k" .as vT \ (X68K Architecture)
. if "\\*(vT"LOCAL" .ds vT \\$3
.\}
..