From nobody@FreeBSD.org  Thu Aug  2 18:48:39 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 7DFC437B401
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  2 Aug 2001 18:48:38 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f731mck77350;
	Thu, 2 Aug 2001 18:48:38 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200108030148.f731mck77350@freefall.freebsd.org>
Date: Thu, 2 Aug 2001 18:48:38 -0700 (PDT)
From: Peter Johnson <freebsd@bilogic.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: niceheaders problems with index, pdf bookmarks
X-Send-Pr-Version: www-1.0

>Number:         29403
>Category:       docs
>Synopsis:       niceheaders problems with index, pdf bookmarks
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    murray
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 02 18:50:01 PDT 2001
>Closed-Date:    Sat Sep 1 19:38:01 PDT 2001
>Last-Modified:  Sat Sep 01 19:39:29 PDT 2001
>Originator:     Peter Johnson
>Release:        4.3-STABLE
>Organization:
>Environment:
FreeBSD matrix.bilogic.org 4.3-STABLE FreeBSD 4.3-STABLE #6: Sun Jul  1 20:41:50 CDT 2001     peter@matrix.bilogic.org:/usr/obj/usr/src/sys/WORKSTATION  i386

>Description:
The new niceheaders feature in doc/en_US.ISO8859-1/share/sgml/freebsd.dsl has a few minor problems: the new rule generation is incorrect for index generation (as the rule overwrites the second column of the first index page), and if you try to generate a PDF with bookmarks, an extra bookmark is added for every chapter, the index, and the glossary (the bookmark is blank for the index and glossary and "Chapter X" for chapters).

One caveat: I haven't tried reproducing these problems with the handbook, but I've noticed them in my own documentation project that I'm using the FreeBSD stylesheets for.
>How-To-Repeat:
1) Use NICE_HEADERS and GEN_INDEX together.
2) Generate PDF with bookmarks support.

>Fix:
apply the following patch to /doc/en_US.ISO8859-1/share/sgml/freebsd.dsl:
(the first section fixes the PDF bookmarks problem, the second fixes the niceheaders/index problem:
--- freebsd.dsl.orig	Thu Aug  2 20:38:52 2001
+++ freebsd.dsl	Thu Aug  2 20:33:48 2001
@@ -110,7 +110,7 @@
 	start-indent: 0pt
 	first-line-start-indent: 0pt
 	quadding: %component-title-quadding%
-;	heading-level: (if %generate-heading-level% 1 0)
+	heading-level: (if %generate-heading-level% 1 0)
 	keep-with-next?: #t
 
 	(if (string=? (element-label) "")
@@ -154,13 +154,11 @@
 	  (make sequence
 	    (process-node-list subtitles))))
 
-      (if (equal? (gi) (normalize "index"))
-        (empty-sosofo)
-	(make rule
-	  length: 475pt
-	  display-alignment: 'start
-	  space-before: (* (HSIZE 5) %head-before-factor%)
-	  line-thickness: 0.5pt)))))
+      (make rule
+	length: 475pt
+	display-alignment: 'start
+	space-before: (* (HSIZE 5) %head-before-factor%)
+	line-thickness: 0.5pt))))
 
       (element authorgroup
         (empty-sosofo))
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: murray 
State-Changed-When: Fri Aug 3 12:12:14 PDT 2001 
State-Changed-Why:  
Your fix for the rule problem on the Index has been committed, thanks! 



Responsible-Changed-From-To: freebsd-doc->murray 
Responsible-Changed-By: murray 
Responsible-Changed-When: Fri Aug 3 12:12:14 PDT 2001 
Responsible-Changed-Why:  
I'm working with the NICE_HEADERS stuff. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29403 

From: Nik Clayton <nik@freebsd.org>
To: Peter Johnson <freebsd@bilogic.org>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: docs/29403: niceheaders problems with index, pdf bookmarks
Date: Fri, 3 Aug 2001 21:52:47 +0100

 --a8Wt8u1KmwUX3Y2C
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Thu, Aug 02, 2001 at 06:48:38PM -0700, Peter Johnson wrote:
 > +      (make rule
 > +	length: 475pt
 > +	display-alignment: 'start
 > +	space-before: (* (HSIZE 5) %head-before-factor%)
 > +	line-thickness: 0.5pt))))
 
 "length" should probably be calculated as a function of the page width,
 and the left and right margins.
 
 N
 --=20
 FreeBSD: The Power to Serve             http://www.freebsd.org/
 FreeBSD Documentation Project           http://www.freebsd.org/docproj/
 
           --- 15B8 3FFC DDB4 34B0 AA5F  94B7 93A8 0764 2C37 E375 ---
 
 --a8Wt8u1KmwUX3Y2C
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.6 (FreeBSD)
 Comment: For info see http://www.gnupg.org
 
 iEYEARECAAYFAjtrDxoACgkQk6gHZCw343VVFQCeMr4QPVnDxvbBwOVG/Jk+SbZC
 ofQAn2NVCpZCDBwhbMn87XAlGgrpgyTC
 =VD/y
 -----END PGP SIGNATURE-----
 
 --a8Wt8u1KmwUX3Y2C--
State-Changed-From-To: feedback->closed 
State-Changed-By: murray 
State-Changed-When: Sat Sep 1 19:38:01 PDT 2001 
State-Changed-Why:  
The width of the rule is now based on body-width which is based on the 
page-width.  The rule is turned off for the index since that uses a 2 
column page sequence.  Thanks! 


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