Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Of page styles and numbering
Of page styles and numbering
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
GridLox
Captain


Joined: May 02, 2009
Posts: 51
Location: Adelaide, South Australia

PostPosted: Sat Jul 24, 2010 11:06 pm    Post subject: Of page styles and numbering

I'd like to create a single document that consolidates two small documents. Thus I want to create two separate sections of the new document, each with its own page numbering and page count operating separately from the other - that is to say, each would start at 1/1 and independently proceed 1/2, 1/3 … .

I thought I recalled achieving this once before, but have been unable to replicate it, despite reading all I can find on page styles, footers, numbering etc. Having spent the better part of a day without achieving the desired outcome, I would really appreciate it if someone can assist me.

Many thanks Confused

_________________
"His hands were pure; but he had no hands"
Charles Peguy about Immanuel Kant.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun Jul 25, 2010 10:01 am    Post subject:

You can insert each file as a separate section into a new consolidation document by creating a new, empty master document by selecting the File :: New :: Master Document menu. Then drag an existing file into the new document. This will display the Insert Section dialog. Uncheck the "Protected" checkbox and press the OK button. This will insert your existing document as an editable subdocument in your new document.

Note that the headers and footers in your existing document will not appear in the new master document so you will need to recreate those headers. But first, you need to enable separate page numbering for each section. To do this, try the following steps:

1. Put the cursor at the very beginning of the second subdocument's section.

2. Select the Insert :: Manual Break menu. In the dialog that appears, select the "Page break" radio button, set the "Style" listbox to "First Page", check the "Change page number" checkbox, put "1" as the page number below the checkbox, and press the OK button.

After you have done the above steps, does the section document's page numbering restart at "1" for you? If so, now you can recreate your headers and footers by using the following steps. Note that after doing the above steps, each section can have its own separate headers and footers:

1. To insert a header or footer in the first section, put the cursor in the first section and select the Insert :: Header (or Footer) :: Default menu. For the second section, put the cursor in the second section and select the Insert :: Header (or Footer) :: First Page menu.

2. Open the existing document that the section is linked to, select the content in the header or footer, copy it, and then put the cursor in the newly inserted header or footer in the master document, and paste.

Do the above steps work for you?

Patrick
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Sun Jul 25, 2010 11:59 am    Post subject:

There are also some general tips for using Master Documents on the wiki at http://neowiki.neooffice.org/index.php/Using_a_Master_Document (and in linked articles).

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
GridLox
Captain


Joined: May 02, 2009
Posts: 51
Location: Adelaide, South Australia

PostPosted: Sun Jul 25, 2010 10:30 pm    Post subject:

Many thanks pluby and smokey. I won't have a chance to try your suggestions for a little while, but I will give them a go.

The thing that puzzled me was being able to get the individual page numbering going, but the total number of pages showed 3 when there were only 2, i.e. 1/3, 2/3 … when it should have been 1/2, 2/2.

Thanks once again. Very Happy

_________________
"His hands were pure; but he had no hands"
Charles Peguy about Immanuel Kant.
Back to top
GridLox
Captain


Joined: May 02, 2009
Posts: 51
Location: Adelaide, South Australia

PostPosted: Tue Jul 27, 2010 4:49 am    Post subject:

Hello Patrick and Smokey.

After reading and experimenting with notes in Writer Help > page numbers > inserting/defining/formatting> Using different page number styles, I came to the conclusion that it is possible to set up a single document that meets my requirements - and effectively does what you have suggested in using a Master Document. The document I created uses the establishment of a differently named page-style for each of the sections, along with manually inserted page breaks, to allow for separate page numbering in each section.

However one issue remains: How to get the "page-count" to function properly?

Firstly, it would appear that although the page-numbering can be individualised for different page styles, page-counts cannot. This would be a very useful feature. Is there anyway in which a macro can be created or some code inserted/modified, to achieve this outcome? Would I be able to do it (with some guidance)?

Secondly, the current page-count does not work properly in the document I have created. For the first page-style only, the page count goes up by two on every odd-numbered page. This means that (in conjunction with there also being one page of the second page-style), the first page is numbered 1/3 (when there is a total of only two pages). Page two of the first page-style is numbered 2/3 - which is of course correct, but page three of the first page-style is numbered 3/5 (and page four will be 4/5).

For each additional page of the second page-style, the page-count is only increased by one.

Even if individual page-counts for different page-styles is not an option, it would be nice to clear-up the peculiar behaviour of the current arrangement.

Graeme

_________________
"His hands were pure; but he had no hands"
Charles Peguy about Immanuel Kant.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Tue Jul 27, 2010 7:16 am    Post subject:

GridLox wrote:
Firstly, it would appear that although the page-numbering can be individualised for different page styles, page-counts cannot. This would be a very useful feature. Is there anyway in which a macro can be created or some code inserted/modified, to achieve this outcome? Would I be able to do it (with some guidance)?


Sorry, but that is not something that NeoOffice's underlying OpenOffice.org code supports. Page count is computed "per document", not per section. If you want separate page counts for each section, you will need to go back to using a separate documents instead of a master document.

GridLox wrote:
Secondly, the current page-count does not work properly in the document I have created. For the first page-style only, the page count goes up by two on every odd-numbered page. This means that (in conjunction with there also being one page of the second page-style), the first page is numbered 1/3 (when there is a total of only two pages). Page two of the first page-style is numbered 2/3 - which is of course correct, but page three of the first page-style is numbered 3/5 (and page four will be 4/5).


I cannot reproduce this behavior. Can you attach a sample master document and its linked documents so that I can try to reproduce this behavior?

You can attach files using the steps in this forum topic.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Jul 28, 2010 9:38 pm    Post subject:

After thinking about your two page count questions, I am starting to think that maybe I am not understanding what you ultimately want your document to look like.

I admit I am confused as to why you would need to have separate page counts in the same document. Having restarting page numbers is common, but I am having trouble guessing how the restarting page count fits in your document when it is printed out.

If you can describe what the end result looks like (maybe you are trying to conform to some document layout that an industry or group uses?), I might be able to come up with additional ideas for you.

Patrick
Back to top
GridLox
Captain


Joined: May 02, 2009
Posts: 51
Location: Adelaide, South Australia

PostPosted: Sun Aug 01, 2010 11:23 pm    Post subject:

Sorry for the delay in responding, Patrick.

I have attached a copy of the document under discussion.

I work in the fields of Psychology and Philosophy. There tends to be quite a lot of cross-disciplinary consideration involved in a single document. Thus it would be useful to know the page-count of a particular segment and, ultimately, to have page counts that run sequentially across separate documents. I already use the Hyperlink facility a great deal to enable 'live' cross-referencing between documents.

However, wish fulfillment aside, at the moment I am unable to obtain an accurate overall page count, because of the peculiar way in which it currently works in this document. If you increase the number of pages in the first page-style - by holding down the "return" key, you will notice the indicated page-count does not increase in the same manner as the actual number of pages.

Perhaps it's something I did when I set up the document?!

Hope you can help … Embarassed

_________________
"His hands were pure; but he had no hands"
Charles Peguy about Immanuel Kant.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Aug 02, 2010 11:50 am    Post subject:

Thank you for the sample document. I now understand the problem that you are seeing but after a bit of research I now know that is happening: NeoOffice's underlying OpenOffice.org code is inserting a blank page just before the page break that restarts page numbering.

The confusing part is that you do not see this automatically inserted blank page until you print, export to PDF, or view the document in preview mode by pressing the Page Preview toolbar button or selecting the File :: Page Preview menu.

The reason that a blank page is automatically inserted is that NeoOffice's underlying OpenOffice.org code forces all Writer documents to print like a book and pages are grouped in pairs of two pages where odd pages are on the left and right pages are on the right.

Since you inserted a page break and set the page number of that page to "1", the OpenOffice.org forces that page to be on the left since it is an odd number. If you have an odd number of pages before the page break ("1", "3", etc.), then OpenOffice.org inserts a blank page to ensure that the page with the page break is on the left. If you have an even number of pages before the page break ("2", "4", etc.), then no blank pages will be inserted and the page count will match what you see in Writer.

Unfortunately, there is no way to turn off this automatic blank page insertion behavior. Issue 88361 was created in OpenOffice.org's issue tracking system over 2 years ago, but Oracle's OpenOffice.org engineers still have not been able to implement a way to turn off this behavior.

If you really need to suppress the automatic insertion of blank pages, let us know and I will post a possible hacky workaround that you can try.

Patrick
Back to top
GridLox
Captain


Joined: May 02, 2009
Posts: 51
Location: Adelaide, South Australia

PostPosted: Mon Aug 02, 2010 9:04 pm    Post subject:

You really are a wiz, Patrick. Thank you very much for your detailed description and the time you spent in pursuing the issue. Let things be for the moment - no other program that I am able to access allows me to do what I would like with regard to document coordination.

I take it we are not able to access the OO code?! Anyway I (and surely you too) have more pressing matters right now.

Once again, my heartfelt thanks.
Graeme

_________________
"His hands were pure; but he had no hands"
Charles Peguy about Immanuel Kant.
Back to top
PGAGA
Captain


Joined: Jan 22, 2009
Posts: 50

PostPosted: Tue Aug 03, 2010 5:14 am    Post subject:

Tuesday, August 03, 2010

Have you tried the pager extension?

Phil
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Tue Aug 03, 2010 9:19 am    Post subject:

GridLox wrote:
I take it we are not able to access the OO code?! Anyway I (and surely you too) have more pressing matters right now.


We have full access to the OpenOffice.org and I routinely fix OpenOffice.org crashing bugs. The problem here is that per Oracle's OpenOffice.org developers in their comments in issue 88361, removing the automatic blank page insertion is difficult to do and is deeply embedded in the Writer code. In other words, they are saying that removing this behavior would require rewriting significant portions of the core

Unfortunately, our very limited donations only supports one full time developer (me) so this limits the current scope of the NeoOffice project to keeping a native version of OpenOffice.org running on Mac OS X and fixing any critical crashing and hanging bugs that our users find.

Because of these limits, making significant features changes like this one in the OpenOffice.org code is too big a problem for us to solve so we must hope that the Oracle's OpenOffice.org developers are able to make the changes.

Patrick
Back to top
GridLox
Captain


Joined: May 02, 2009
Posts: 51
Location: Adelaide, South Australia

PostPosted: Tue Aug 03, 2010 5:02 pm    Post subject:

Thanks Patrick - I for one, greatly appreciate the job you do.
_________________
"His hands were pure; but he had no hands"
Charles Peguy about Immanuel Kant.
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.