[Solved] Skip first page in page count - formula don't work

Discuss the word processor

[Solved] Skip first page in page count - formula don't work

Postby TheRuler » Wed Jan 16, 2019 5:28 pm

I'm trying to get the page number count to not include the first page.

I press F2 and inserts formula "=page - 1", which does absolutely nothing no matter how many times I update fields.

the document has 8 pages, and =page - 1 returns 8, not 7 as expected.
if I add a new page and update fields it displays the total number of pages.

any good ideas?

thanks!
Last edited by Hagar Delest on Fri Jan 18, 2019 8:39 am, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 4.1.6 / Windows 10
TheRuler
 
Posts: 4
Joined: Wed Jan 16, 2019 5:24 pm

Re: trying to skip first page in page count - formula don't

Postby TheRuler » Wed Jan 16, 2019 5:36 pm

I can off course do =page - 2, I just don't understand why the original formula, and how it's explained in the doc's doesn't work
OpenOffice 4.1.6 / Windows 10
TheRuler
 
Posts: 4
Joined: Wed Jan 16, 2019 5:24 pm

Re: trying to skip first page in page count - formula don't

Postby FJCC » Wed Jan 16, 2019 6:13 pm

Page numbering is not controlled with formulas but with page styles. There is a tutorial here.

First, you need to open the Styles and Formatting dialog with the menu item Format -> Styles and Formatting. There is a group of small icons near the top left of the dialog. Click the fourth one to display the page styles. Make sure that the drop down list at the bottom of the dialog says All.

With the OpenOffice cursor on the first page of you document, double click the First Page style in the Styles and Formatting dialog. This will apply that style to your first page.

Go to the second page and insert a header or footer by selecting the menu Insert -> Header (or Footer) -> Default. You should now have a Footer/Header on all pages except the first.

Insert a page number in the Header/Footer with the menu Insert -> Fields -> Page Number

Right click on the first paragraph of the second page. If the page has a heading (not the header), that counts as a paragraph. Select Paragraph. On the Text Flow tab in the Breaks area click Insert, set Type to Page, set Position to Before, select With Page Style Default and set the Page Number to 1. Click OK.

Applying the First Page style to your first page may not give you the layout you want on that page. You can right click on the style name in the Formatting and Styles dialog, select Modify and change the style in any way to get the formatting you want.
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7084
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: trying to skip first page in page count - formula don't

Postby TheRuler » Wed Jan 16, 2019 6:25 pm

wow. all that for counting pages? doesn't writer know how many pages there is in the document? What has visual styles to do with page numbers? oh well.. I got it working with a little hack (put the value in a table column, because for some reason styles affect the value from formula).

This is where I found the solution: https://wiki.openoffice.org/wiki/Docume ... e_count%3F)

thanks!
OpenOffice 4.1.6 / Windows 10
TheRuler
 
Posts: 4
Joined: Wed Jan 16, 2019 5:24 pm

Re: trying to skip first page in page count - formula don't

Postby jrkrideau » Sat Jan 19, 2019 1:01 pm

TheRuler wrote:wow. all that for counting pages? doesn't writer know how many pages there is in the document? What has visual styles to do with page numbers? oh well.. I got it working with a little hack (put the value in a table column, because for some reason styles affect the value from formula).

This is where I found the solution: https://wiki.openoffice.org/wiki/Docume ... e_count%3F)

thanks!

I am not sure of what you are doing but it sounds like very bad practice in AOO Writer. There is a good chance that you are buggering up your page numbering in the long run.

FJCC's instructions show the correct way to do this in Writer. Remember you are dealing with a very sophisticated word processor and kludges are not a good idea. BTW, one you have done this sort of thing a couple of times it is very fast and easy.
OpenOffice 4.1.6; Ubuntu 18.04
jrkrideau
Volunteer
 
Posts: 3679
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: [Solved] Skip first page in page count - formula don't w

Postby John_Ha » Sat Jan 19, 2019 2:24 pm

TheRuler wrote:any good ideas?

It is dealt with in exhausting detail in the tutorial on page numbering and in the Writer Guide. Read either or both.

As a new poster you will find much useful information in the Writer FAQ, the Writer Tutorials, the up to date Writer guide and the Writer Manual. May I suggest you bookmark the pages.

Press F1 to access the Help screen and search for your problem

The chapter headings in the manual are:

1 - Introducing Writer
2 - Setting up Writer
3 - Working with Text
4 - Formatting Pages
5 - Printing, Exporting, Faxing and E-Mailing
6 - Introduction to Styles
7 - Working with Styles
8 - Working with Graphics
9 - Working with Tables
10 - Working with Templates
11 - Using Mail Merge
12 - Tables of Contents, Indexes and Bibliographies
13 - Working with Master Documents
14 - Working with Fields
15 - Using Forms in Writer
16 - Customizing Writer – Keyboard shortcuts.

When a pop-up window opens, click the Help button for extensive help on that function - it is often more comprehensive than the manual.

You may find this explanation helps your understanding.

You can get full information on Page Styles, Page Breaks and Page Numbering in Chapter 4 - Formatting Pages of the Writer Manual. Also see the Writer Tutorials where you will find [Example] Document structure and numbering and [Tutorial] Page numbering.

Be sure to download the two files in [Example] Document structure and numbering and format the example file - it will help you immeasurably.

It's all about Page Breaks.

It is very useful to make Page Breaks visible by Tools > Options (Preferences on Mac) > OpenOffice > Appearance > scroll to Text document > tick Section boundaries > choose a colour for Page and column breaks. Page Breaks now show on the screen as a thin coloured line and identify all Page Breaks. This is the default setting on later installations where Page Breaks appear as a thin blue line.

Also be sure to Set View > Non printing characters ..., to ON to see the paragraph breaks.

Page numbers

Page Numbers follow on sequentially from the previous page and there is nothing stored in the document to tell you what a given page number is because, apart from where a change is made, each page number is calculated by how far away from "its start" it is.

If you want to change the Page Number you must insert a Page Break and set the new Page Number. Go Insert > Manual Break > Page Break..., and a small pop-up window allows you to change the Page Number for the first (and hence subsequent) page(s) following the Page Break.

The Page Number you set is stored as an attribute of "the first paragraph on the page following the Page Break where the change in number is made". It can be seen, and changed, by placing the cursor in "the first paragraph on the page following the Page Break" and going Format > Paragraph > Text Flow .... The value " 0 " here means "page number follows on from the previous page number". Any value 17, 23 … etc means that this page starts at 17 or 23 etc.

There is an exception. If you define Page Style Fred to have a "Next Style Bill" then when you insert a Page Style Fred, the next page will automatically become Bill. In this case there is no Page Break between Fred and Bill, and Bill's "start" for numbering is Fred. Format > Paragraph in the first paragraph of Bill has no pagination information.

Page Styles – changing headers, footers and/or page formats

The Page Style following a Page Break can be exactly the same Page Style as the page before the Page Break or it can be a different Page Style.

If you want to change a header, change header text, change a footer, change footer text, change the page number, hide page number etc, you must insert a Page Break and you must select a Page Style which makes the change you want.

If you want to change the Page Style you must insert a Page Break and set the new Page Style. Go Insert > Manual Break > Page Break..., and a small pop-up window allows you to choose the Page Style for the first (and hence subsequent) page(s) following the Page Break.

Page Styles (and hence changed headers and footers); Page Breaks and Page Number are an attribute of "the first paragraph on the page following the Page Break where the change in number is made" even if the paragraph is empty or is a Heading (or is a table at the very top). Note that Heading means a Heading 1 or a Heading 2 etc, and not a Page header as in header/footer.

You can also manually insert or delete a Page Break; manually choose the Page Style (and hence change headers and footers); and manually change the Page Number; by placing the cursor in "the first paragraph on a page following a Page Break" and going Format > Paragraph > Text Flow > Breaks ... (or in the table, and going Table > Properties > Text Flow...) where all these options can be changed.

You can also delete a Page Break by Backspace, or by deleting highlighted text which includes the Page Break.

Debugging problems with page numbers or page styles, headers and footers

Debug Page Style changes / changed page numbering / changed header problems by placing the cursor in "the first paragraph on the page following the Page Break where the change in number is made" and going Format > Paragraph > Text Flow > Breaks .... What is the document telling Writer to do following the Page Break? If you see nothing there to cause the change, the document has become corrupted and (much!) more diagnosis is required. Remember if the Page Number here is " 0 " it means “page number follows on from previous page ...”

Be aware that there is no Page Break between different Page Styles if the second Page Style (Bill) is defined as the Next Style in the first Page Style(Fred). See Fred and Bill above.

Two words of caution

1. You can go Format > Page ..., and edit the format of the page in which the cursor is currently located. However, you are actually editing that page's Page Style, so all other pages which use that same Page Style will also have their formats changed.

2. Do not manually change the page number by editing any paragraph, not even the first paragraph on a page. You must only edit "the first paragraph on the page following the Page Break where the change in number is made". If you edit any other paragraph to change page number your document will go horribly wrong.
AOO 4.1.6, Windows 7 Home 64 bit

See the Writer Manual, the Writer FAQ, the Writer Tutorials and the Writer guide.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 6567
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Skip first page in page count - formula don't w

Postby Bill » Sat Jan 19, 2019 8:07 pm

I believe the OP was having a problem with the instructions for displaying the page count, not with page numbering:

How do I get my page count to not count my title page? (How do I offset the page count?)
AOO 4.1.6 and LO 6.2.0.3 on Manjaro MATE
Bill
Volunteer
 
Posts: 7169
Joined: Sat Nov 24, 2007 6:48 am

Re: [Solved] Skip first page in page count - formula don't w

Postby keme » Sat Jan 19, 2019 8:30 pm

Bill wrote:I believe the OP was having a problem with the instructions for displaying the page count, not with page numbering:

How do I get my page count to not count my title page? (How do I offset the page count?)
Exactly. He was also asking how to exclude the title page from the count.

The misunderstanding may be partly caused by object naming. The field Page will return the current page number where the field is inserted, but the document variable Page returns the total page count for the document.
User avatar
keme
Volunteer
 
Posts: 3100
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway


Return to Writer

Who is online

Users browsing this forum: No registered users and 24 guests