OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: DOCBOOK-APPS: TOC and LOT entries when %page-number-restart% in use


Hi,

Now that we have %page-number-restart% working properly in JadeTex, there
are problems with TOC and LOT entries. They need to be prefixed with their
section number.

Attached is a patch to dbautoc.dsl (Norm's latest version, it might not
apply to what, say, RedHat is shipping).

I have offered it to Norm, but he hasn't replied as yet, so I offer it here
in return for the help provided in the past and likely needed in the future.

Note, I have added an extra variable to dbparam.dsl,
%chapter-title-page-separate%, which you will have to define as #f for
things to work properly.

That is part of some future enhancements I want to put through.
--- /home/rsharpe/docbook/dsssl/docbook/print/dbautoc.dsl	Tue Nov 28 20:34:18 2000
+++ /usr/lib/sgml/stylesheets/nwalsh-modular/print/dbautoc.dsl	Tue Mar  6 13:21:55 2001
@@ -77,11 +77,26 @@
 	      (element-label-sosofo tocentry)
 	      (literal (gentext-label-title-sep (gi tocentry)))))
 	(element-title-sosofo tocentry)))
-    (make leader (literal "."))
-    (make link
-      destination: (node-list-address tocentry)
-      (with-mode toc-page-number-mode
-	(process-node-list tocentry)))))
+    (if (and (= level 1)
+	     %chapter-title-page-separate%
+	     %page-number-restart%)
+	(empty-sosofo)    ;; Don't need the leader etc then
+	(make sequence
+	  (make leader (literal "."))
+	  (make link
+	    destination: (node-list-address tocentry)
+	    (make sequence
+	      (if %page-number-restart%
+		  (literal
+		   (string-append
+		    (if (= level 1)
+			(element-label tocentry #t)
+			(substring (element-label tocentry #t)
+				   0 (string-index (element-label tocentry #t) ".")))
+		    (gentext-intra-label-sep "_pagenumber")))
+		  (empty-sosofo))
+	      (with-mode toc-page-number-mode
+		(process-node-list tocentry))))))))

 ;; Build a TOC starting at nd reaching down depth levels.
 ;; The optional arguments are used on recursive calls to build-toc
@@ -127,8 +142,15 @@
     (make leader (literal "."))
     (make link
       destination: (node-list-address tocentry)
-      (with-mode toc-page-number-mode
-	(process-node-list tocentry)))))
+      (make sequence
+	(if %page-number-restart%
+	    (make sequence
+	     (literal (substring (element-label tocentry #t)
+			0 (string-index (element-label tocentry #t) "-")))
+	     (literal (gentext-intra-label-sep "_pagenumber")))
+	    (empty-sosofo))
+	(with-mode toc-page-number-mode
+	  (process-node-list tocentry))))))

 ;; Build a LOT starting at nd for all the lotgi's it contains.
 ;; The optional arguments are used on recursive calls to build-toc


Regards
-------
Richard Sharpe, sharpe@ns.aus.com
Samba (Team member, www.samba.org), Ethereal (Team member, www.ethereal.com)
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC