Creating Page Numbers In LibreOffice With Converted Styles

I looked at your “template” (technically an “ordinary” document). It shows a caricature of mechanical typewriter workflow (no offence intended), even by M$ Word standards. Absolutely everything is direct formatted (manual). There is even no use of DOCX styles for your headings.

Your best approach to convert it to ODF (Writer format) is to start from scratch because there is no formatting to salvage from it.

But, before starting this, read the excellent Bruce Byfield’s Designing with LO (you need to click on “More…” and scroll down a bit to access this book). It will explain what you’ll gain from styles. It is more clearly stated than in the Writer Guide (available from the same page).

If you want different layouts (page numbering or header/footer are elements of the layout) among your pages, you document must be composed of several “parts” (I use word “part” because “section” has a different technical meaning betwee Word and Writer). Each part is characterised by a page style (this concept does not exist in DOCX).

Therefore your first 10 pages will be controlled by a dedicated page style (or even perhaps several if you single out the cover). Built-in First Page is configured to switch automatically to Default Page Style on page crossing. Intended usage is either for the cover page (single use) followed by default pages; or for the first page of a chapter followed by running page in Default Page Style. It is up to you to decide which track you choose.

Even/odd pages are traditionally controlled by built-in Left Page and Right Page styles. They automatically alternate.

Transition between parts are done with a special page break inserted with Insert>More Breaks>Manual Break which allows you to select which page style is activated after the break and optionally a new starting page number. This transition can also be configured into Text Flow properties of a paragraph style so that it is automated. It is frequently done on Heading 1 applied to chapter headings, causing the chapter to start at top of a new page, without explicitly inserting a page break (because it is in the paragraph style configuration).

Generally speaking, Writer has 5 style categories:

  • paragraph to define the geometric and text flow properties of a paragraph; it also provides a default character style for the paragraph
    This is the sole category DOCX knows of.
  • character to apply typographical (visual) attributes to characters, different from the default in the paragraph style
  • page for global page layout, header, footer and note configuration
  • list: the name is misleading; it does not describe list formatting, it only controls the look of bullet or numbering
    This type of style must be applied over a paragraph in addition to the paragraph style. It can also be associated to a paragraph style, so that numbering is automatic as soon as the paragraph style is applied.
  • frame to control how images or side text annotations are positioned and interact with text
    This latter category is extremely difficult to master but is a key factor for layout stability when you have pictures or side notes. You can leave it aside when starting to learn Writer but keep in mind you’d need it in sophisticated documents.

You’ll find also something called table “style” but they are not styles in the traditional sense. Preferentially, stay away from them unless you accept unconditionally the layout chosen by the developer.

One last word: your “template” has extension .docx, i.e. it is a “standard” document. When you open it, you must care not to overwrite it. As far as I can remember, Word had a special extension for templates, .dotm? Writer makes also a distinction between templates with extension .ott and documents .odt… When you open an .ott, it creates an untitled .odt. Thus even if you save out of muscle memory, your template is not overwritten.

To create a template, proceed as usual and in the end File>Templates>Save as Template. Do it only through this command: template internals are slightly different from ordinary documents; changing the extension is not enough.

2 Likes

I am don’t understand, typically (always?), the foreword or introduction is not included in the page numbering of the body of the novel. I have given it its own numbering, i, ii, iii but you can delete the numbering field. I could include the foreword in the page numbering if you insist but the single paragraph spacing in the foreword is different to that used in the body of the novel so you might like to consider if you want it to be different.

Chapter 1 starts on Page 1 but the numbering does not show until page 2. Note that convention has it that page 1 is a right hand page (recto). This is built into Writer although I would guess that some workaround could be found if you insist on starting the novel on a left hand page as in your sample.

When you want to start a new chapter, just start a new paragraph with the working name of the chapter and press Ctrl+1 to apply Heading 1 style. That will create a page break with the Chapter heading on a page without number showing.

I have removed almost all the words in your sample so you can make it a template, (click File > Templates > Save as template, give it a name and select My Templates, OK.
Enter the title of your novel in the third page and it will show on the first page too.

Save in native format, .odt always or some of the features might not work. If someone wants a .docx, then File > Save a Copy and send that but carry on working in the original .odt

Have a play with this and see if you need changes.

[Edit] I hadn’t saved the last changes so here is updated version
NewTemplateForBooks131154EA.odt (11.8 KB)


[Edit 2]
To see the first Title after you have entered it on page 3, you will need to click in the menu Tools > Update > Update All. It might seem a bit over-the-top but if the title appears in other places then a change in the name can be updated in one place and all the related fields will get updated too, no variation in spelling or typos.
Empty paragraphs can cause problems, I removed empty paragraphs except for the one on the first page to easily get the different spacing from the top for the title. Any others are only there to show show where you can start typing.

1 Like

I am SO SO SO sorry you wasted your time on that one! I was distracted and sent the wrong file when I uploaded it (I had an ODT file which I had meant to, but somehow I got the wrong one).

I am so sorry you wasted your time on that file; it wasn’t the right one. Anyway, if you’re in the mood to play with it, I have the right one in this thread now and I don’t need the provided text to be anything different from what it is, it’s all of the weird formatting issues that came up (as described) that I am trying to fix so that with subsequent works, I basically have a “plug and play” template that I can easily work in and then print to PDF for my printer without there being any other (or new and exciting) issues. That’s what I’ve been after because I’m competent with the writing; the back-end stuff with all these different programs… not so much! :wink:

Thanks for all you did, even if you don’t choose to help with the proper file. I appreciate all you did. Thanks!

Barring all of this…

I found I have a file that seems to actually be working for me as far as all of the formatting goes and is in ODT format (yea!). The ONLY problem I have in that one is this: the first chapter where it starts is Converted3 and physical page 10 is numbered page 11. I need that first numbered page to be 4. I cannot find anywhere in the settings for my Converted3 that has page numbers or how it is picking that number to start on.

So, one (hopefully basic) question would be: is there a place without adding any other pages, forms or formats where I can go to change the page number for a Converted3 page style? Without inserting any new pages, above, below, etc. Is there one simple place to go, access it and see that there’s something about the page numbers that fixes this issue without adding any page numbers to any prior pages or causing any new problems?

If anyone can answer that and the response works, you’re my new hero! :wink:

This means your document was converted from DOCX. Page “description” is one area where Writer and Word differ largely. During conversion, Writer tries pragmatically to guess a decent equivalent page style. However, considering the huge differences in page management in both suites, you could end up with one page style per page (I met this calamity).

So your first task is to rebuild a “pure” ODF structure, otherwise you’ll experience a hopeless nightmarish situation. Redesign a “template” from scratch. Above all, don’t copy anything from your presently polluted document. Or only paste as unformatted text so that you import NO formatting from the “contaminated” file.

Welcome in the realm of “compatibility”.

1 Like

Yeah, I was trying to build one from scratch and it was going very poorly (it’s the ODT file I uploaded above) and had several specific issues that no one seems to know how to address. But basically, that’s where I’m at…

I have two potential templates, one which was converted from a DOCX where the only issue I have is that the first page number of the first chapter starts with the wrong number and, if I’m gathering what you are saying is correct, there is no way to easily change that one thing…

OR

The “pure” start I tried to create that has four issues, which seem to include the page numbering starting wrong.

I am not a fan.

In the easiest, simplest possible terms:
I need a template that allows me to have all of the same physical page characteristics (font, sizing, spacing, tabs, page layout, left-right gutters and whatever else I do not see) as my existing novels, unnumbered pages until the second page of the Prologue or first chapter (where I can choose that number!) and an easy way to continue that trend (unnumbered first pages of new chapters, next numbered page continuing the numbering when they pop back up, occasional blank/unnumbered pages for section breaks).

That’s it. Once I have that, I just need that to work - i.e. only putting in blank pages where I want them, not reformatting upon saves/opens (which shouldn’t be an issue with working in ODT format)…

I am VERY appreciative of the people who have popped in on this post to help. I’m frustrated because, as you noted, “conversions” seldom are seamless.

Thanks again for the help!

The file I posted earlier today (the proper ODT version of what I am making for a template) is my attempt to build a “pure” ODF structure. It seemed to be going okay for what I needed until I tried to apply a page number… when that happened, the weird, left/right, even/odd page style change occurred and I haven’t found how to fix that and move on.

Hi. A few questions

  1. What is the Section? It’s that to divide the book into, say three parts, each with its own chapters? If so, does page numbering continue? Will it have a name or just a number. Or is it like Volume where numbering would reset.
  2. Do you want wider margins on the inside and narrower on the outside so when it is bound, the margins aren’t too near the binding?
  3. Do you want chapter or section name (or number) in the header as well as the page number? If so, on a right or left page?
1 Like

Hi!

Thanks again for the response!

  1. The sections are, yes, divisions in the book that might require a few unnumbered blank pages (an even blank, a section title page, the back of that page blank as well), then new chapter. Those sections would each have their own chapters and the page numbering would continue in the new chapters.

  2. No changes to the margins on the left and right; those are all taken care of by my printer. My only issue with the margins is the top margin in my template was altered on one of the two sides (odd numbers, I think) to be lower than it it supposed to be.

  3. No, just the simple page number in the header. On both left and right pages. I’d like it to be the same text style, too, but I can’t seem to find how to change that… :wink:

So I have made changes:

  1. The underlining of the title on the page with author’s name didn’t cover the entire title in the .docx so it seemed that underlining wasn’t what you wanted so I used a typographical decoration I had made for another project; it could be replaced with a straight line instead
  2. A Section Title is made by writing the section title in a new paragraph and applying Heading 1 paragraph style (double click the paragraph style in the Sidebar or press Ctrl+1. I have put a placeholder in the first Section Title position.
    If you don’t need Sections in a book, then click in the paragraph of the placeholder and apply Heading 2 style (Ctrl+2) to start a first chapter
  3. Chapter headings are made by writing the chapter name in a new paragraph and applying Heading 2 paragraph style (Ctrl+2)
    If you don’t need numbered chapters then click Tools > Heading Numbering > Numbering, select Level 2 and set Number to None, delete the stop in the After field. OK.

[Edit]
I forgot to apply the relevant attributes to Heading 2 in sample, now replaced.
TemplateForNovels131154EA.odt (14.4 KB)

1 Like

Thank you… Sort of.

Look, I appreciate you trying to help, but:

  1. You continue to use the old file when you are making alterations,

  2. You are making needless alterations to the text and format I put into my template, which is not something I want. Everything I had there was what I wanted for the spacing, word placement, etc. I had the problem with page numbers, weird formatting for the even/odd pages, and the header spacing. Nothing else,

  3. You’re not actually addressing the problem I’m having with page numbers appearing on the second page of the the first chapter…

As such, these are not useful to me. If you wish to continue helping me with the problem, I would welcome you helping with the problem, but please leave the rest of my text alone. I need help with those three specific issues, nothing else. Thank you.

You are trying to format your book using Word methods which hide the power of styles and so appears as barely more than a typewriter.

You just need to write your text and let the styles do the formatting. Body Text is for the main body of the document, Heading 2 for Chapter Headings and Heading 1 for section headings. It is the only way to get consistent formatting and layout.

I reproduced those spacings and placement in the styles, e.g. for Chapter headings, 4 empty paragraphs at 20 pt (but did not allow for 1.15 line spacing) so that should be 92 pt = 3.25 cm. You can correct it by right clicking Heading 2, selecting Edit style and in the tab Indents and Spacing enter 92 pt in the Above paragraph field. OK.
TemplateForNovels131154EA_2.odt (14.4 KB)

Empty paragraphs and spacing with spaces can make inconsistent layout.

They start on the second page and appear on page 3 and onwards until the next Section or Chapter page, isn’t that what you wanted? Or did I misunderstand?

1 Like

Your line about “…which hide the power of styles and so appears as barely more than a typewriter.” is exactly right!

That is what I want.

I want my template to be little more than a consistent typewriter page formatted for the style I have declared. I want to be able to use LibreOffice as a simple word processor that I can save and print to PDF when I am done and have my new books look like the ones I have already written and published. I don’t want to have to learn about style and layout, etc. I want consistency and simplicity and I would rather do that manually than with bells and whistles.

I started with what I have for a template with exactly what I wanted in the text areas with three weird problems that had been generated in my attempts to make a template. I appreciate your willingness to try to help, but you keep trying to give me bells, whistles and additional functions - “power” - when what I want is essentially a typewriter program that has consistent margins, the occasional blank page where I want it and page numbers where I want them (numbered the way I’ve said).

Thank you, anyway, for your help. I will take some time to read the “Designing” book you referenced so I’m not wasting anyone’s time anymore.

So here is your mechanical “template”.
TemplateForNovels131154mechanical.odt (13.5 KB)

Every time you want to insert a new “section”

  1. Click Insert > More Breaks > Manual break and select Section Title page style, OK.
  2. Add the title and manually format your section title, then press Ctrl+Enter to create a page break
  3. Press Ctrl+Enter to enter another page break
  4. Type your manually formatted chapter title, press Enter to start a new line and start typing the body of the document

When you want to start a new chapter

  1. Click Insert > More Breaks > Manual break and select First Page page style, OK.
  2. Type your manually formatted chapter title, press Enter to start a new line and start typing the body of the document

Note you can accidentally start your chapter on a left page using this so be on your toes.
Note also that some settings will delete empty paragraphs and tabs at the start and end of paragraphs, see On win11 computer and using newest Writer: Tab disappears
This does not apply to paragraph spacing or correctly made indents

Compare the above steps to the properly styled document:
Every time you want to insert a new “section”

  1. type the title and press Ctrl+1

When you want to start a new chapter

  1. Type the title and press Ctrl+2
1 Like

Thanks!

I genuinely appreciate all of the time and effort you put into this. Thank you.

This is so close, by the way…

It still did not solve the weird issue with even and odd pages being two different styles, the page numbers only appearing on even numbered pages, and there are also now page numbers on 4 and 6 which shouldn’t have them, but thanks for trying.

I’m going to read the book on this and see how to fix these. Thanks again.

Try this
TemplateForNovels131154mechanical2.odt (13.5 KB)

EarnestAI,

STOP.
Your “solutions” are not helping. In addition to not actually assisting with my problem, you are creating templates that perpetrate new problems and issues.

Beyond that, it has become clear that you are an artificial intelligence.

Per the Digital Millennium Copyright Act, U.S. and applicable international copyright laws, and the copyright page within the template, we hereby state that you explicitly lack consent to work with our materials. You are hereby and requested and required to remove ALL of our content from your platform and programs. You do not have our consent to work with or retain our template(s), words, writing, format content.

Confirm receipt of this message and confirm you have deleted ALL current and prior template files provided, generated by or otherwise initially created from our files.

YOU DO NOT HAVE OUR CONSENT TO USE OUR TEMPLATE, even for the purpose of “providing solutions” to us. Remove all of our files from your A.I. and do not interact with any further posts/digital materials of ours here or in the future in perpetuity.

Thank you.

I cannot repair your file:
LO-WRiTER_NTfBs_v0001_irreparable_012732.odt (12.3 KB)

Your file is very poorly formatted, bordering on errors, and completely unformatted. I couldn’t improve anything in it! I can only recommend copying your text section by section and pasting it natively (without formatting) into an acceptably formatted file.


LO-WRiTER_NTfBs_v0002_012929.odt (15.5 KB)
Try this one, for example; the notes and instructions are in German, which shouldn’t be a problem. Your file reveals that you still have a lot to learn to achieve a flexible design, which my file is not, but rather specifically tailored to your requirements.


Note: I was unable to convert your /.docx/ file for editing and formatting in LO-WRitER, I could only read it! Switching from WORD to WRITER requires a completely different workflow than any attempt to edit an existing file in the other program!

Yeah, I had the wrong file there before. The one I just posted is the one I meant to put in. If you’re not able to help, that’s fine, but it does have weird issues that I do not understand… but… at least it is in the proper file format! :wink: