From robert@sleipnir.watson.org Mon Mar  1 22:09:59 1999
Return-Path: <robert@sleipnir.watson.org>
Received: from sleipnir.watson.org (TROJANHORSE.RES.CMU.EDU [128.2.91.224])
	by hub.freebsd.org (Postfix) with ESMTP id 3B3B614C0E
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  1 Mar 1999 22:08:12 -0800 (PST)
	(envelope-from robert@sleipnir.watson.org)
Received: (from robert@localhost)
	by sleipnir.watson.org (8.9.3/8.9.1) id BAA07486;
	Tue, 2 Mar 1999 01:07:54 -0500 (EST)
	(envelope-from robert)
Message-Id: <199903020607.BAA07486@sleipnir.watson.org>
Date: Tue, 2 Mar 1999 01:07:54 -0500 (EST)
From: robert@fledge.watson.org
Sender: robert@sleipnir.watson.org
Reply-To: robert+freebsd@cyrus.watson.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: nroff mdoc formatting problem for long .Dt
X-Send-Pr-Version: 3.2

>Number:         10349
>Category:       docs
>Synopsis:       For long .Dt fields, rendering is broken-looking in mdoc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar  1 22:10:00 PST 1999
>Closed-Date:    Fri Dec 21 03:37:28 PST 2001
>Last-Modified:  Fri Dec 21 03:38:10 PST 2001
>Originator:     Robert Watson
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
>Environment:

FreeBSD 4.0, writing new man pages for library functions.  The function name
aud_delete_event_info is really long--perhaps too long, but it is a POSIX
library name. 

>Description:

When setting the .Dt field in the man page, it is rendered incorrectly in
standard man on a boring xterm:

.Dt aud_delete_event_info 3

becomes:

 
This is ugly and unsightly.  I'm not sure what the right solution is,
other than to truncate function names?  And that doesn't seem write from
a documentation perspective :-).  If it were possible for nroff to truncate
and trail off with a '...' that would probably be best, but I'm not skilled
in nroff.

>How-To-Repeat:

Do as above.

>Fix:

None known, sorry!

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->phantom 
Responsible-Changed-By: phantom 
Responsible-Changed-When: Mon Dec 20 10:39:24 PST 1999 
Responsible-Changed-Why:  
I'll take it. 

From: Ruslan Ermilov <ru@FreeBSD.org>
To: Robert Watson <rwatson@FreeBSD.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org,
	Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org>,
	Alexey Zelkin <phantom@cris.net>
Subject: Re: docs/10349: nroff mdoc formatting problem for long .Dt
Date: Mon, 8 Oct 2001 20:33:17 +0300

 On Tue, Mar 02, 1999 at 01:07:54AM -0500, robert@fledge.watson.org wrote:
 >=20
 > When setting the .Dt field in the man page, it is rendered incorrectly in
 > standard man on a boring xterm:
 >=20
 > .Dt aud_delete_event_info 3
 >=20
 > becomes:
 >=20
 > =20
 > This is ugly and unsightly.  I'm not sure what the right solution is,
 > other than to truncate function names?  And that doesn't seem write from
 > a documentation perspective :-).  If it were possible for nroff to trunca=
 te
 > and trail off with a '...' that would probably be best, but I'm not skill=
 ed
 > in nroff.
 >=20
 Does this look acceptable?
 
 Index: doc-common
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /home/ncvs/src/contrib/groff/tmac/doc-common,v
 retrieving revision 1.21.2.20
 diff -u -r1.21.2.20 doc-common
 --- doc-common	2001/08/16 06:53:07	1.21.2.20
 +++ doc-common	2001/10/08 17:29:17
 @@ -523,12 +523,25 @@
  .
  .\" NS doc-header macro
  .\" NS   print page header
 +.\" NS
 +.\" NS local variables:
 +.\" NS   doc-reg-dh
 +.\" NS   doc-reg-dh1
  .
  .de doc-header
  .  ev doc-env-dh
  .  doc-setup-page-layout
  .  if !\n[cR] \
  '    sp \n[doc-header-space]u
 +.  nr doc-reg-dh \w'\*[doc-caption-font]\*[doc-header-string]\f[P]'
 +.  nr doc-reg-dh1 \w'\*[doc-caption-font2]\*[doc-volume]\f[P]'
 +.  if (\n[doc-reg-dh] + \n[doc-reg-dh1] + \n[doc-reg-dh] >=3D \n[.lt]) \{\
 +.    while (\n[doc-reg-dh] + \n[doc-reg-dh1] + \n[doc-reg-dh] >=3D \n[.lt]=
 ) \{\
 +.      substring doc-header-string 1 -1
 +.      nr doc-reg-dh \w'\*[doc-caption-font]\*[doc-header-string]\|.\|.\|.=
 \f[P]'
 +.    \}
 +.    as doc-header-string "\|.\|.\|.
 +.  \}
  .  tl =07\*[doc-caption-font]\*[doc-header-string]\f[P]=07\*[doc-caption-f=
 ont2]\*[doc-volume]\f[P]=07\*[doc-caption-font]\*[doc-header-string]\f[P]=07
  '  sp \n[doc-header-space]u
  .  ev
 
 --=20
 Ruslan Ermilov		Oracle Developer/DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Fri Dec 21 03:37:28 PST 2001 
State-Changed-Why:  
Fixed in 5.0-CURRENT and 4.5-PRERELEASE. 


Responsible-Changed-From-To: phantom->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Fri Dec 21 03:37:28 PST 2001 
Responsible-Changed-Why:  

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=10349 
>Unformatted:
