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: Re: DOCBOOK-APPS: How to output number of pages w/ Jade

On Mon, Oct 22, 2001 at 08:46:40PM +0200, Udo Stenzel wrote:
> I'd like to customize Norm's DSSSL-stylesheets so they put "page nn of
> mm" in the header where they only put "page nn".

That's a big problem it seems.  I implemented Norm's suggestion of
putting <anchor id="EOF"> near the end of the file.  If there is none,
I attempt to get the pagenum for the last element in the grove, but
unfortunately that does not work - I can't understand why.

The problem with the <anchor> solution (aside from being forced to
insert and maintain it), is that any back-matter generated material
(ToC, index...) doesn't get counted, so it is plain wrong in many

You'll notice I also tried (total-node-page-numbers), with no better

(define ($pagenumber-with-total-sosofo$)
  (make sequence
    (literal "Page ")
    (page-number-sosofo)		; FIXME: replace with $page-number-header-footer$ when
					; possible to parametrize font-posture ?
    (literal " of ")
    ;; use element with ID="EOF" for last page, or attempt to find last element
    (let ((eof-elt (element-with-id (normalize "eof"))))
      (if (node-list-empty? eof-elt)
	  (element-page-number-sosofo (last-descendant-node (sgml-root-element)))
	  (make link
	    destination: (idref-address (normalize "eof"))
	    (element-page-number-sosofo eof-elt))
;;;  (total-node-page-numbers (sgml-root-element))

Yann Dirson <Yann.Dirson@fr.alcove.com>                 http://www.alcove.com/
Free-Software Engineer				      Ingénieur Logiciel-Libre
Free-Software time manager    	       Responsable du temps Informatique-Libre

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

Powered by eList eXpress LLC