I have managed to set page numbers to by document, but not with variations, such as not on the title page or TOC, changing number style non-text pages to lower case Roman numerals, etc.
Also, what I would like to do is to set Left-hand page headers to show the book title, while right-hand pages show Chapter headings, all with some sort of separator (dash, |, bullet?) between the page number and the title/heading. That is, to the right on left pages and to the left on right pages.
This is handled by separated your document into several āpartsā, each one controlled by a specific page style.
Considering the general nature of your question (not specifically targeting on a detail), I recommend you first read the chapter about page styles in the Writer Guide. Then come back on points where you fail.
When asking here, always mention OS name, exact LO version and save format. In particular, if you save DOCX, no luck because page styles donāt exist in DOCX. There is a very different feature to do the same but the conversion to-from DOCX will create an unmanageable mess in your document.
It really is annoying that when I try to āReplyā the site goes grey, and the reply gets deleted. But Iāll try again.
Writer 26.2.1.2 in Windows 11 (though my manual is for 24.2)
Iām trying to do as you suggest, but Iām getting backwards results. Up to Step 5 āSet up page numbers in the page headersā, all seemed okay, but while the header drop-down flag tells me that the first Default page is a left page, the header cursor is on the right, inside (toward the gutter) side. The page number is a ā1ā (an odd number). And the checked option below the āAlignmentā setting says āMirror on even pagesā⦠Shouldnāt that say āMirror on odd pagesā?
The next page (an odd page) is numbered ā2ā
Next, I go to each 'Heading 1" (Chapter start) page, to set them to "First Page) style, but they all promptly revert to Default Style. Is this right?
And all the pages numbers become zero (0) and the next (even) page become one (1). Thatās not what I had in mind at all.
Oh, and I just Updated my TOC. Every chapter now starts on page zero.
This suggests you have fiddled with the page number because there is no physical page 0.
Attach your document (or a reduced anonymised version of it) for analysis.
Probably canāt attach it. Itās 343 pages set at Letter size. But I might have found the problem, though I donāt know what to do with it.
At the very beginning, in the Status bar, the first page shows as ā1 - 3 of 343ā, except that there is no ā2ā.
At one point I had noticed that there seemed to be something that might have been a page (white background with characters) in the space between a couple of pages, showing from a gap between pages. I had double-clicked on the gap (eliminating the whitespace) then did it again (replacing the gap). The phantom was gone, but now shows a dotted blue line between the last page of a chapter and the first page of the next chapter. I donāt recall whether that dotted line had been there before.
Also, right-clicking on that Page section of the status bar, it shows 4 different items:
PageNumWizard_HEADER_Default Page Style2
PageNumWizard_HEADER_Default Page Style1
PageNumWizard_HEADER_Default Page Style2 Copy 1
PageNumWizard_HEADER_Default Page Style1 Copy 1,
each with a different character underscored
In order, the āPā of Page
The āSā of Style
the āCā of Copy
and the ā1ā of Copy.
Additionally, I noticed that only the first two chaptersā first pages showed āFirst Pageā style. All the rest were āDefaultā though I had deliberately set āFirst Pageā, as I mentioned.
Also, I had screwed with things before, trying to set each First Page on the right hand page. I did it by adding page breaks at places where the new Chapter had started on a left-hand page. But I deleted all of that later.
Have you unticked View>Whitespace? This view mode sometimes behaves weirdly.
A 343-page book canāt be attached (well bigger than the size limit). Make a copy. Delete pages 5-343. Attach the reduced version.
The View>Whitespace was not ticked.
Iāll try to cut it down
How do I do this? Iāve tried copy/paste. Iāve tried cut/paste. Iāve tried click and drag. Is it the Upload icon in this dialog box? Or File>Save Remote from Writer? Or something else?
Create a separate document using Writer. Save it on your computer.
Open a new comment on AskLO. The seventh icon from left looks like an office mail basket with an up-arrow: this is the upload tool. Click on it. Select the document from your computer. Press Open.
Okay.
Our Democracy first 5 pages.odt (17.8 KB)
Did that work?
I expect that you are working on other things besides my problem, but itās been a while. Is it as screwed up as all that?
Maybe this will help in diagnosing. The document started originally as a .docx. In fact, it might even have been started as a WordPerfect document, converted through several versions of Word to Word 2024 before I started converting it to Writer. That most recent conversion was done page-by-page and footnote-by-footnote copy/pasting unformatted, then placed under the various Writer styles, including several that I had to produce.
Is it possible that the problem is that it is still under Windows 11?
Have you read the examples on page styles in āChapter 8, Introduction to Stylesā in the Writer Guide?
https://books.libreoffice.org/en/WG252/WG2508-IntroStyles.html#toc26
Yes. I was following those instructions step-by-step.
I just opened the document on a LinuxMint 22.3 laptop, using Writer 24.2.7.2, and the (Page 1 - 3 of 343) thing doesnāt appear in the Status bar. Instead it shows (Pages 1 and 2 of 342 (Pages 0 and 1). A little different, but still with a zero phantom page. I think I wonāt mess with it until you have had your look-see.
Maybe if I delete my Title page and TOC, then regenerate them? What do you think?
I think the TOC just needs updating. After I right clicked it and selected Update Table of Contents the zeros for the page margins disappeared and I got a page number for Introduction. More importantly, there was a trailing 0 in the header field where I had added the Heading Name Contents, that disappeared too.
OurDemocracy_first5pages133079EA.odt (18.9 KB)
I saw what you did, and it seems to be almost exactly right, but when I tried to reproduce it, it didnāt work. āAlmostā only because the Introduction chapter page did not switch to āFirst Pageā in the Page Style bar. It showed as āFront Matterā, which is a style that my full document has never had.
The other differences are that
- my TOC still shows all zeros, and I canāt find that trailing zero you mentioned
- My Title Page shows as āFirst Pageā rather than as āTitle Pageā, also a style mine does show at all. and the big one
- In Book View, mine shows the phantom page 2, attached to the TOC (page 3). It is labeled āblank pageā in giant letters, into which the cursor will not go. The cursor stays in whatever page I placed it last, so it really is not attached to page 3. Oddly, my copy of the truncated file I sent you, does not show the āblank pageā. It only shows in the full 343 page document.
One other thing I noticed. In the Manual instructions for editing First Page, it specifies that the Header and Footer tabs untick the Header (or Footer) On options. In yours Header On is ticked.
I guess the two main questions now are, How do I get rid of the phantom āblank pageā? And where are the āFront Matterā and 'Title page ā styles?
I tried to get rid of the āblank pageā by deleting the last paragraph formatting mark in the Title page (page 1), but I got an error message saying that it was āRead-Only Content,ā and āWrite-protected content cannot be changed. No modification will be accepted.ā I suspect that has to do with the āProtected against manual changesā option under āInsert a TOCā.
I also just noticed that in the Navigator, there is now a blank Heading above the Introduction (my first Heading), and when highlighted, it shows a paragraph formatting mark under the TOC (page 3). I tried deleting that, and it moved the start of the Introduction up onto the TOC page, but did not remove the the blank page. The blank Heading went away when I changed the Formatting Mark to āBody Textā.
I next tried deleting the TOC and the Title page, saved, and inserted two new page breaks above the Introduction, but when I tried to Insert an new TOC, the blank page reappeared.
This is really frustrating.
Next attempt. I Saved and Backed-up my Documents, then tried to open the file in a Linux machine, and it worked fine. No phantom blank page, the TOC has all the right pages, but the Styles sidebar does not have the Front Matter or Title Page styles. Oddly, though, the file that I thought I had saved and backed-up, was without the title page or TOC, so Iām not sure what happened there.
I think I may have to try that again.
Redid the whole thing and when I tried to open the doc in the linux machine I was told that it was Read-only and locked by another user. I ticked the ānotifyā box and Opened on local. I now have the real one, with no TOC or Title page, and a bunch of zeros for Headings start pages. But the Blank Page is back.
What the hey?
Success. I think. By going back and forth between the Linux and Windows machines, I saved a good copy from the Linux machine to Windows by ignoring the warning that Saving As to replace the bad one (in Windows), would corrupt the file, but which could be uncorrupted by opening and closing again. I did that. I now have what looks like a good document. No phantom and all the TOC headings have actual pages. Now I have to try to set those pesky Headers again, the original object of this whole saga.
Wish me luck. Except I still donāt have the Title Page and Front Matter styles. What happened to them?
Okay. Here goes. Back to following the Header setup instructions, and in Step 5, I suppose this is written in cases where all this is being established in an as yet unwritten document, but the instruction says to āInsert two page breaks in the documentā. My question is: Does it matter where? At the very beginning, before the Title page, or is it okay to do it at the start of any page, or anywhere at all, since they get deleted again later? I really donāt want to go through all of this again.
I added a page style for the pages before the main body of the work as they might have a different numbering system, layout, etcā¦
Right click Default Page Style, select New, give it a name, check page size and margins, OK.
I created a new page style for Title page so it wouldnāt get altered by any changes to the First Page style in the main body. I probably should have made it right only but it is used only once.
Note that First Page by default is set to be Right only so if your previous chapter ends on a right page (odd numbered) then an automatic blank page will be inserted between the two.
Your sample shows Default Page Style. I wonder if there is a manual page break with a change of page number to start at page 1 (right hand page)?
In any event, you could click at the end of the first page and press Ctrl+Enter and add your copyright notice in page 2
You can untick it, it is only to show the page number.
Delete the blank heading
I changed the Default Page Style
- in Page tab to be Mirrored,
- in Header tab I unticked Same content on left and right pages. This allows your requirements of different content for right and left pages
Well. Here we are again, and I have weirdness to report.
I have duplicated the style setting that you set, and naturally, they donāt work for me as they did for you.
For instance, I now have a Title Page and Front Matter styles with the same āNext Styleā as yours, AND I have added a new Copyright page, as you suggest (and as I would have added eventually anyway). But what this does is that my entire document, all 358 pages of it (and this has apparently added about 14 pages somehow) is now Front Matter.
Now hereās the good part: Resetting the first page of the regular text (starting with the first page of my first (non-Introduction) chapter as First Page, or anything else (like āDefault Pageā), resets the Title Page to First Page, and the rest of the document, including the copyright page, the TOC, the Introduction, AND the page I just set as First Page, to Default Page style.
And updating the TOC changes the numbers either to (i, ii, iii) or (1, 2, 3) depending.
I have not yet tried to reset my Headers, but despite being āmirroredā the Header Formatting Marker appears only on the left side of pages.
So, let me try. Oops. Who would have guessed it? Now that everything is Front Matter (or Default), so are the two page breaks, rather than being a First Page/Default Page duo. Better and better.
I have also noticed that I cannot change the āContents 1ā font in the TOC, though I can change the TOC āContents Headingā font. Actually, I can āchangeā the Contents 1 font, but the font doesnāt change, only the setting.
All of this also happens in my LinuxMint copy.
If you listen carefully, you might be able to hear me scream.
Another new twist. I added the two page breaks (for Headers) at the front end, before the Title Page (which was set as āDefault Pageā), and it worked. I managed to set Headers, and they āmirrorā, but the same Chapter Heading (Introduction) now goes to the end of the book. Resetting the Title Page to āTitle Pageā changes everything else to Front Matter, and the Headers vanish. Resetting Title Page to āDefault Pageā, and they reappear. This is fun. (Not)
Between the front matter and the body of the document you need to enter a manual break, click Insert > More Breaks > Manual break. In the dialogue make sure Page Break is selected (default), for Page style select First Page and click Change page number if you want the page numbering to start at the body of your document.
It is up to how you see your Introduction, as to whether you include it in the body of your document or in the front matter.
You may choose to add a similar break for Appendix, etc. after the main body of the work.
In a right hand page
- Tab twice to get to the right-aligned tab.
- Click Insert > Field > More fields (Ctrl+F2)
- In the new dialogue, select the Document tab. Click on Heading and then in the right pane select Heading contents. In the field Up to level: make sure it is 1 (for Chapter numbers). Click Insert.
- Click in the header after the new field and press the spacebar then add your divider | and press the spacebar again
- In the dialogue click Page number (unstyled), Page number, As per page style then click Insert. Close
I think that is corruption from multiple conversions between .docx and odf. I cannot change how it is displayed in your document.
I can fix the problem by deleting the Table of Contents, then clicking Ctrl+A (select all), Ctrl+C and pasting it into a new document. You should then check that your page styles are OK
I woke up this morning to find that all my Front Matter (above the Introduction (even though the Introduction WAS Front Matter yesterday) had vanished, and that even my new Title Page and Front Matter styles were gone. That was soon fixed, but before I did the Insert>More Breaks>Manual Break trick, I saw that only the first two chapter first pages were in First Page style.
After I inserted the break, only the first chapter first page was in First Page style, and trying to set the other chapter first pages as First Page does nothing. They immediately switch themselves back to Default Page style.
Shouldnāt there be a setting that allows one to set all āHeading 1ā pages to First Page style?
Next I tried the Headings trick, but that pushed the heading into the right-hand margin. I tried to change the Right Margin setting in the Header tab of Default Page style, but all that changed was the grey illustration bar in that tab. The Heading remained in the margin, so I undid all that.
Yesterday, I had managed to get it right, at least when the Title Page was in Default Page style, as I mentioned. Iāll try that again in a minute, but one other thing is that I tried to change the First Page style to drop the Heading down the page a bit (2 inches) without the need to manually place a bunch of extra blank lines at the start of every First Page, but I noticed that that also lowered the placement of the Headers, So, I had to change that back as well.
More weirdness. Iām back to trying to set the Headers (Step 5 in the Manual). Following the instructions, in the Default Page page, on the left, even-numbered page (the drop-down header flag said left page), I had set the Headers On and the Footers Off, but here, when I āInserted Page Numberā, the dialog defaulted to the Footer, and when I set the Alignment to āLeftā, the ticked option said āMirror on even pagesā. And when I hit Okay, it set the Headers to the inside, gutter, side of each page. I did manage to insert the title and chapter heading into the left and right Headers, but if I change the Chapter title in another chapter First Page that gets sets everywhere, even in the one I had previously set. And I still canāt reset chapter First Pages away from Default Page style.
Oh, I redid the Headers, backwards this time, setting them on the Right side of Left-hand pages, and this time they did go to the outside margins.
I donāt know, of course, but I think that your suggestion that this corruption is the result of multiple conversions between .docx and .odt canāt be right. This copy was started in a blank .odt document into which I copy/pasted unformatted pages and footnotes one at a time. That took me two days to accomplish, after which I went back through the whole thing and set all the various styles as they were needed one at a time. That took another two days. This document should be pure .odt.
One last thing. Yesterday I also set several Bookmarks to quickly find my two tables and two additional things. I just noticed that the Bookmarks in the Navigator do not go to the Bookmarks I set. Today they go to the Page Numbers. And the Cross-References I set to track those Bookmarks are gone, too.