docbook: Thread: Sequential page numbering isn't.


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Sequential page numbering isn't.
From: "Rev. James Cort" ####@####.####
Date: 19 Oct 2001 16:00:08 -0000
Message-Id: <SIMEON.10110191716.A4727@leek.uwe.ac.uk>

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.

1. When restarting page numbering at each chapter, the pages are 
numbered beautifully but the table of contents shows only the page 
portion of the chapter number. I'd like each entry in the table of 
contents to read:

2 Fooo ..................  2.1
  2.1 Bar and Baz........  2.3
  2.2 Gaz, gz............  2.7

...etc.
  

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.

I've definitely got the correct stylesheets and DTDs - are they 
frequently updated? Is it possible my copy is an older, buggy version?

I'm going from SGML to PS like this:

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

-- 
James Cort

Subject: Re: Sequential page numbering isn't.
From: David Merrill ####@####.####
Date: 20 Oct 2001 13:15:33 -0000
Message-Id: <20011020091351.E13988@lupercalia.net>

On Fri, Oct 19, 2001 at 04:59:54PM +0100, Rev. James Cort wrote:
> 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.
> 
> 1. When restarting page numbering at each chapter, the pages are 
> numbered beautifully but the table of contents shows only the page 
> portion of the chapter number. I'd like each entry in the table of 
> contents to read:
> 
> 2 Fooo ..................  2.1
>   2.1 Bar and Baz........  2.3
>   2.2 Gaz, gz............  2.7
> 
> ...etc.

Please post the offending code and one of the linuxdoc experts will
look at it.

-- 
Dr. David C. Merrill                     http://www.lupercalia.net
Linux Documentation Project                   ####@####.####
Collection Editor & Coordinator            http://www.linuxdoc.org

One World, One Web, One Program.
	--Advertisement for Internet Explorer

Ein Volk, Ein Reich, Ein Fuehrer.
	--Adolf Hitler
Subject: Re: Sequential page numbering isn't.
From: Taketoshi Sano ####@####.####
Date: 21 Oct 2001 16:43:19 -0000
Message-Id: <y5awv1plzxk.fsf@kgh12351.nifty.ne.jp>

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.)

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").

Are you sure that you're using linuxdoc SGML and it uses
jade/jadetex ?

Regards.
-- 
  Taketoshi Sano: ####@####.####
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





[<<] [<] Page 1 of 1 [>] [>>]


  ©The Linux Documentation Project, 2014. Listserver maintained by dr Serge Victor on ibiblio.org servers. See current spam statz.