LibreOffice Writer Working With Page Styles

We previously looked at the properties for the Default Page Style, and by looking at the options you can probably begin to figure out what some of the other pre-defined Page Styles are about. The First Page style is like the Default style but you would turn off Headers and Footers, and perhaps make a few margin adjustments. Envelope is pretty clear. And now you know that Left Page and Right Page let you handle alternate pages with different formatting. But before we get into any tweaking, let’s stop and think about this.

We learned, when we were investigating Paragraph styles, that all styles live within Templates. And this is just as true for Page styles. If you have a document open and you make a change to a Page style, you have changed it for that document only, and it will not be there in the next document. So if you you are going to start creating or tweaking styles for your own uses, consider how they will be used:

  • If you want a style that will be your “default”, or which you plan to reuse regularly, you should first open your Default Template for editing, make your changes, and then save the Default Template. This is discussed in more detail here if you need a refresher. Note that I am assuming you have a already created a Default Template, but if not, that should be the first thing you do.
  • If you are working on a special project, create a Template for that project, and then create the Page styles, and indeed all of the other styles, that you need for that project. If you do this while editing the Template and save your changes, they will always be there while you are working.

So with that warning note, let’s run through an example that will illustrate some common uses of Page styles and how you can combine them for an elegant result. If you follow this example you will probably have learned enough to handle most of the problems you run across. And if you ever run into something you cannot figure out, there is the LibreOffice Users mailing list where you can post a question and get help from some very smart people.

Creating Your Template

So, for the purposes of seeing how this works, let’s create a Template for our documentation project. We will have a First page, then we we will have Left and Right pages that are different, and an Endnote page at the end. How will this work? Well, first create the Template. Just open any new Document, then go to File–>Templates–>Save and give it a name. I called mine Sample for Page Styles. Then go to File–>Templates–>Edit and open it for Editing. You should see at the very top of the page the name you gave it, with an extension .ott . If you see that you know you successfully created the Template, and that any changes you make and save here will be kept in the Template for future use.

Now select the First Page, right-click, and select Modify to bring up the Page Style Properties window. On the Organizer tab, make sure that you change the Next Page option. Right now it probably says Default, but remember we said we were going to have different Left and Right pages. We will be doing two-sided printing at the end to make this work, so imagine that the First page is like the first page of a book, and that is always on the right when the book is open. The the following page will be on the Left.

Then lets look at the other options. I think making the top margin larger is good since I want to start this a little further down on the first page, so I will make the Top margin 2″. I also want to allow for using a three-hole punch and putting it in a binder, so I want to add to the Left margin a little more space, so I add a half-inch, making it 1.29″ on my machine (if you are outside the U.S. your units will vary, of course). And I will make sure that the Headers and Footers are not turned on. That covers the First page.

Now I look at the Left page. As before, I select it, right-click, and select Modify. On the first tab, I make sure that the next page will be a Right page, but LibreOffice probably already has that covered since it is a Left Page style. On the next tab, I will leave many of the settings the way they are, but I do want to allow for using a three-hole punch again, but for a Left page I need to add the margin on the right side, so I increase the right margin to 1.29″.  Since I am using an Endnote page I don’t need to deal with Footnotes, but I do want a Page Number at the bottom, so I will have a Footer. I place a checkmark to turn the Footer on.

Now for the Right page. As before, select it, right-click, choose Modify, and on the first tab make sure the Next Style says Left Page. Then on the Page tab I will make sure that the left side margin is increased to 1.29″ to leave room for the punching and binding. And again, I turn on Footers.

Finally, let’s turn to the Endnote style.   Open for editing as before, and on the first tab note that the Next style says Endnote. That makes sense because this is a separate section at the end of the document, and you will have as many pages as you need for the Endnote. Because you may have multiple pages of endnotes, there are other considerations. For the purposes of punching and binding, we wanted to leave more room on the margin. But we don’t know ahead of time whether any given page will be a Left or a Right, so how do we do this? That is where the Mirrored option comes in. On the Page tab, select Mirrored as the Page layout option. Your left and right margin settings now become Inner and Outer, so you just select Inner and make that 1.29″.

Now, before you save your Template, on little thing you can do is make sure it always starts with the First page. To do that, double-click the First Page style to apply it. Because we changed the Top margin to two inches you should immediately see your insertion mark move down the page to the 2″ mark, which is a sign you were successful. Just go to File–>Save, and you will now save the Template.

Using Your Template

Now that you have your Template created, how do you use it? You would go to File–>New–>Templates and Documents. Select your Template, which should be in the My Templates area, and select Open. You should now see your insertion mark on a blank page at the point 2″ below the top, just we specified for the first page. Look at the bottom of the screen, and you will see that it says First Page. Then type in your title on the first page, such as  Sample Documentation Project. I make mine a Heading 1 when I do this, then I drop a couple of lines, and put my name as a Heading 2. If you are unclear on this, review the Paragraph-Level styles and Heading Styles previously discussed.

Now, you could just keep hitting the enter key until you got to the next page, but that is so amateur. Use a Page Break instead! Go to Insert–>Manual Break, and select Page Break. You will immediately be on the next page ready to go. Look at the bottom of the page and you will see that it says Left Page. And look at the ruler at the top and you will see that the Right margin is larger, just as we planned. I will adopt a convention that the Left pages all have Screen Shots, and the Right pages all have some explanatory text. So I insert a Screen Shot on my Left page. Insert another Page Break.

Now we are on the Right page. If you look at the bottom it will say Right Page, and if you look at the ruler up top you can see that the Left margin is now the larger one. (Remember, we set it to 1.29″).  So I write some explanatory text, and when I am done I enter another Page Break, and I am at the next Left page. Insert another Screen shot, insert another Page Break, then write some explanatory material, insert another Page Break, and so on.

I have created a sample document with the work we have done so far so you can see how this works. I did not do the Endnotes because that is a topic for another day. If you want to see this simple document download it here.

The Benefit

So far this lesson has been a lot of do-this-then-do-that, but let’s see where it gets us. The real benefit is when you consider what happens if you were working on a long document. Imagine you were trying to manually do all of this. Well, first of all, Writer doesn’t let you do that. but more importantly, by spending just a little time up front thinking about what you need to do and setting up your page styles, you can whip through the writing without having to stop and think about the page layout. You did that once, and it is done. Furthermore, if you look at the final product and decide the margins are not quite right, just modify the style and you’re done, but you still have all of the flexibility of making Left and Right different. And if you are in an organization where writing documentation this way is an ongoing process, just give the Template you created to all of your writers and you will have consistent work products from all of them.

Listen to the audio version of this post on Hacker Public Radio!