docbook: Sequential page numbering isn't.
Subject:
Re: Sequential page numbering isn't.
From:
"Rev. James Cort" ####@####.####
Date:
22 Oct 2001 13:46:33 -0000
Message-Id: <SIMEON.10110221438.A2979@turnip.uwe.ac.uk>
On 22 Oct 2001 01:29:11 +0900 Taketoshi Sano ####@####.####
wrote:
> Hi.
>
> "Rev. James Cort" ####@####.#### writes:
>
> > Hi,
> >
> > I'm working on a project which I'm writing in linuxdoc SGML. I've
> > noticed a few problems converting to ps and pdf, and wonder if anyone
> > here can help.
>
> > 2. If I choose to not to restart page numbers at each new section
> (ie. > define %page-number-restart% to #f), the pages aren't numbered
> > sequentially until the SECOND section in the book - irrespective of >
> whether the first section is declared as being a chapter or a preface.
> > Prior to this page numbers are restarted at every section. >
> > I'm using DocBook SGML 4.1 and a slightly-tweaked dsl, which I can
> make > available on the web or post to the list if necessary. I'm not
> certain > if the problem is my SGML, the DTDs or the stylesheets and I
> don't know > where to start looking.
>
> linuxdoc DTD doesn't have anything with DocBook DTD nor jade/jadetex.
> (Though sgmltools-lite provides a under-development way to
> convert linuxdoc DTD SGML soruce into DocBook DTD SGML source
> automatically.)
yeah, sorry, my mistake. I was very tired last Friday!
> From your mail, I'm impressed that you're writing your document
> in DocBook SGML and DSSSL stylesheets
> (as in "define %page-number-restart% to #f").
Just to clarify:
I'm using DocBook SGML and have made some minor tweaks using my own
dsssl stylesheet. The whole is based on DocBook SGML 4.1 using the
cygnus stylesheets.
I am going from SGML to postscript by executing the following commands:
jade -t tex -V tex_backend project.sgml
jadetex project.tex
jadetex project.tex
jadetex project.tex
jadetex project.tex
dvips -o project.ps -f project.dvi
The offending SGML reads as:
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!ENTITY plan SYSTEM "plan.sgml">
<!ENTITY definition SYSTEM "definition.sgml">
<!ENTITY biblio SYSTEM "bibliography.sgml">
<!ENTITY tcpip SYSTEM "tcpip.sgml">
]>
<book>
<bookinfo>
<abstract>
<para>
(This part has yet to be written)
</para>
</abstract>
<title>
Network Security
</title>
<author>
<firstname>
James
</firstname>
<surname>
Cort
</surname>
</author>
<copyright>
<year>
2001
</year>
<holder>
James Cort
</holder>
</copyright>
</bookinfo>
<dedication>
<para>
To Father, without whom I would
doubtless be doing something far more exciting, and Teresa, for putting
up with me while I was writing this project.
</para>
</dedication>
&definition;
&plan;
&tcpip;
&biblio;
</book>
Each external entity referenced takes the form:
<!--
Uncomment doctype declaration when using Emacs with PSGML
-->
<!--
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN" >
-->
<chapter>
<section>
<title>
Section Title
</title>
<para>
Lorem ipsum dolor sit amet. Caecilius est in
atrio quamquam cerberos, mit effit ecce
tractorum.
</para>
</section>
</chapter>
I am reasonably certain that the problem is not with the content of the
first entity referenced because if I swap the order in which the
entities are referenced the problem of the pages renumbering at the
start of the second section remains.
The changes made in the DSSSL are stored in the same directory under
the name project.dsl. This DSSSL is based on the cygnus print DSSSL
entitled dbparam.dsl - I copied the file to my working directory,
renamed it and have been working on that.
Here I reproduce the relevant sections of the edited DSSSL - I have
removed the comments for the sake of brevity:
;; REFERENCE TOC/LOT Apparatus
(define %generate-set-toc%
#f)
(define %generate-book-toc%
#t)
(define ($generate-book-lot-list$)
(list (normalize "table")
(normalize "figure")
(normalize "example")
(normalize "equation")))
(define %generate-part-toc%
#f)
(define %generate-part-toc-on-titlepage%
#t)
(define %generate-reference-toc%
#f)
(define %generate-reference-toc-on-titlepage%
#t)
(define %generate-article-toc%
#f)
(define %generate-article-toc-on-titlepage%
#t)
;; REFERENCE Titlepages
(define %generate-set-titlepage%
#t)
(define %generate-book-titlepage%
#t)
(define %generate-part-titlepage%
#t)
(define %generate-partintro-on-titlepage%
#t)
(define %generate-reference-titlepage%
#t)
(define %generate-article-titlepage%
#t)
(define %generate-article-titlepage-on-separate-page%
#f)
(define %titlepage-in-info-order%
#f)
(define %author-othername-in-middle%
#t)
;; REFERENCE RefEntries and FuncSynopses
(define %refentry-new-page%
#f)
(define %refentry-keep%
#t)
(define %refentry-generate-name%
#t)
(define %refentry-xref-italic%
#f)
(define %refentry-xref-manvolnum%
#t)
(define %funcsynopsis-style%
'ansi)
(define %kr-funcsynopsis-indent%
1pi)
(define %funcsynopsis-decoration%
#t)
;; REFERENCE Fonts
(define %refentry-name-font-family%
%mono-font-family%)
(define %title-font-family%
"Arial")
(define %body-font-family%
"Times New Roman")
(define %mono-font-family%
"Courier New")
(define %admon-font-family%
"Arial")
(define %guilabel-font-family%
"Arial")
(define %visual-acuity%
;; /REFENTRY ;; "presbyopic"
;; "large-type" "normal")
(define %hsize-bump-factor%
1.2)
(define %smaller-size-factor%
0.9)
(define %ss-size-factor%
;; /REFENTRY 0.6)
(define %ss-shift-factor%
0.4)
(define %verbatim-size-factor%
;; /REFENTRY 0.9)
(define %bf-size%
(case %visual-acuity% (("tiny") 10pt)
(("normal") 12pt) (("presbyopic") 14pt)
(("large-type") 24pt)))
(define-unit em %bf-size%)
(define %footnote-size-factor%
0.9)
;; REFERENCE Backends
(define tex-backend
#t)
(define mif-backend
#f)
(define rtf-backend
#f)
(define default-backend
#f)
(define (print-backend)
;; /REFENTRY
(cond
(tex-backend 'tex) (mif-backend 'mif)
(rtf-backend 'rtf) (else default-backend)))
;; REFERENCE Verbatim Environments
(define %verbatim-default-width%
80)
(define %number-synopsis-lines%
#f)
(define %number-funcsynopsisinfo-lines%
#f)
(define %number-literallayout-lines%
#f)
(define %number-address-lines%
#f)
(define %number-programlisting-lines%
#f)
(define %number-screen-lines%
#f)
(define %linenumber-mod%
5)
(define %linenumber-length%
3)
(define %linenumber-padchar%
"\no-break-space;")
(define ($linenumber-space$)
(literal "\no-break-space;"))
(define %indent-synopsis-lines%
#f)
(define %indent-funcsynopsisinfo-lines%
#f)
(define %indent-literallayout-lines%
#f)
(define %indent-address-lines%
#f)
(define %indent-programlisting-lines%
#f)
(define %indent-screen-lines%
#f)
(define %callout-fancy-bug%
#t)
(define %callout-default-col%
60)
;; REFERENCE Labelling
(define %section-autolabel%
#t)
(define %chapter-autolabel%
#t)
(define %label-preface-sections%
#t)
(define %qanda-inherit-numeration%
#f)
;; REFERENCE Running Heads
(define %chap-app-running-heads%
#t)
(define %chap-app-running-head-autolabel%
#t)
;; REFERENCE Paper/Page Characteristics
(define %paper-type%
"A4")
(define %two-side%
#f)
(define %writing-mode%
'left-to-right)
(define %page-n-columns%
1)
(define %titlepage-n-columns%
1)
(define %page-column-sep%
0.5in)
(define %page-balance-columns?%
#f)
(define %left-margin%
6pi)
(define %right-margin%
6pi)
(define %text-width%
(- %page-width% (+ %left-margin% %right-margin%)))
(define %body-width%
(- %text-width% %body-start-indent%))
(define %top-margin%
(if (equal? %visual-acuity% "large-type") 7.5pi
6pi))
(define %bottom-margin%
(if (equal? %visual-acuity% "large-type") 9.5pi
8pi))
(define %header-margin%
(if (equal? %visual-acuity% "large-type") 5.5pi
4pi))
(define %footer-margin%
4pi)
(define %page-number-restart%
#f)
(define %article-page-number-restart%
#f)
(define %generate-heading-level%
#t)
;; REFERENCE Quadding
(define %default-quadding%
'justify)
(define %line-spacing-factor%
2.0)
(define %head-before-factor%
0.75)
(define %head-after-factor%
0.5)
(define %body-start-indent%
4pi)
(define %para-sep%
(/ %bf-size% 0.8))
(define %block-sep%
(* %para-sep% 2.0))
--
James Cort