From: Ian C. <Ian...@lo...> - 2001-06-30 09:46:33
|
[sorry for being long winded, but everything here is so complex with lots of interactions; I just want to make my thought processes really clear....] Sebastian Rahtz wrote: > you are saying that the page number should be reset *before* the > new page or two is done? that sounds counter-intuitive. If > page-number-restart should leave you cleanly on page 1, then the > \cleardoublepage will potentially make it page 3, no? I've looked at this this morning and here are my findings (+ patch): - page-number-restart is implemented as a simple extension... so there is no complex logic involved in openjade.... \PageNumberRestart is simply emitted when the function is invoked from the stylesheet. - The (Norman Walsh) stylesheet has the following logic (print/dbcompon.dsl) if first-chapter or book-start then page-number-restart endif This is right at the beginning of the simple-page-sequence. So, it is implicit that it wants the *current* s-p-s's page number to be reset to "1". As the RTF backend also uses this DSSSL code, and I assume works, then it is probably resonable to assume that the stylesheet is correct. - So openjade isn't doing anything in particular, the stylesheet expects page-number-restart to affect the *current* chapter. - So it is a bug in jadetex.... where \ifnum\PageNumberRestart=1 \global\c@page \@ne \fi is called in the EndSpS function which has the effect of resetting the *subsequent* s-p-s's page number to 1. My conclusion is that I need to move this bit of code.... This patch moves it to "JadeSetPage": --------------------------------------------------- diff -Naur jadetex-3.7-orig/jadetex.dtx jadetex-3.7/jadetex.dtx --- jadetex-3.7-orig/jadetex.dtx Fri Jun 22 22:41:03 2001 +++ jadetex-3.7/jadetex.dtx Sat Jun 30 10:11:29 2001 @@ -1606,6 +1606,9 @@ % Look out for the canonical 1in margins in TeX systems! % \begin{macrocode} \def\JadeSetPage{% + \ifnum\PageNumberRestart=1 + \global\c@page \@ne + \fi \ifnum\PageTwoSide=0 \global\@twosidefalse \else @@ -1741,9 +1744,6 @@ \fi \else \clearpage - \fi - \ifnum\PageNumberRestart=1 - \global\c@page \@ne \fi \fancyhf{}% \endDisplayNIC ---------------------------------------- If the dsssl variable %page-number-restart% is set to #f then I get the page numbering that I expect (chaper 1 starts at page 1, chapter 2 starts at whatever). two-sided behaviour works correctly - clear double page ends up with the correct numbers. if the dsssl variable %page-number-restart% is set to #t then the page numbers also work correctly - chapter 1 is 1-1, chapter 2 starts at 2-1 and so on. All well and good. BUT (there had to be one ;-). The problems are: The table of contents starts at (i) rather than including the title pages (i.e. not (v) if there are four recto/verso title pages... ... But I assume that this is a stylesheet problem - so I'm not too worried about that (it is what I would expect from investigaing the .tex output of openjade). The more significant issue is that the when %page-number-restart% is true then the table of contents pages do not appear..... (of course, this could be some other bug as I've just upgraded to the cvs version of the stylesheets). Anyway, please try this out and see what you get! Regards, Ian. |