Subject: Re: man page formatting.
To: Simon Burge <simonb@netbsd.org>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-userlevel
Date: 11/22/1999 21:04:05
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...


cgd
-- 
Index: doc-common
===================================================================
RCS file: /cvsroot/src/share/tmac/doc-common,v
retrieving revision 1.30
diff -c -r1.30 doc-common
*** doc-common	1999/03/23 11:50:09	1.30
--- doc-common	1999/04/14 04:48:05
***************
*** 148,157 ****
  .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
  .			nr sN \\$2
  .		\}
  .		if "\\$2"unass"  .ds vT DRAFT
--- 148,173 ----
  .if !"\\$2"" \{\
  .	ds cH \\$2
  .		if \\$2>=1 .if \\$2<=9 \{\
! .			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"hp300"   .as vT /\\$3\ 
! .			if "\\$3"i386"    .as vT /\\$3\ 
! .			if "\\$3"mac68k"  .as vT /\\$3\ 
! .			if "\\$3"mvme68k" .as vT /\\$3\ 
! .			if "\\$3"pc532"   .as vT /\\$3\ 
! .			if "\\$3"pica"    .as vT /\\$3\ 
! .			if "\\$3"pmax"    .as vT /\\$3\ 
! .			if "\\$3"sparc"   .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
***************
*** 168,188 ****
  .	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
  .\}
  ..
--- 184,189 ----