Image by: opensource.com CC-by-SA 4.0
A few weeks ago, we worked with a technical writing intern to collect popular articles from Both.org into a book. You can download Introduction to Linux for free as a PDF, or purchase it at cost from Lulu.com.
We formatted the book interior using LibreOffice. I love using LibreOffice to format these kinds of projects. Formatting a book interior with LibreOffice is pretty simple. With LibreOffice, you can make a simple book interior or a formal book interior; for this book project, we created a simple book interior. Here’s how we did it.
Each chapter is a separate file
You might be tempted to create a book interior as one large file. And while that’s certainly possible, it’s actually a lot harder to work in a single huge file. Instead, break up the book so each chapter is a separate file, then use LibreOffice’s master document feature to bring it all together at the end.
Let’s create a simple 4-part “book,” with separate chapters as you might find in a formal report, with Introduction, Methods, Results, and Discussion. I’ve used “lorem ipsum” text here as placeholder content.

If my LibreOffice screenshot doesn’t look familiar to you, that might be because I prefer the “sidebar” layout. This interface view makes it easier for me to work with the paragraphs styles, character styles, page styles, and other styles in LibreOffice. You can choose this layout by using View > User Interface.. and selecting the “sidebar” layout.

The “sidebar” layout minimizes what’s on the top toolbar, and brings up a “Styles” menu on the side. I also like to use the “navigator” pane, which is on the left.
Bring it together in a master document
With each chapter in a separate file, you can bring everything together in a “master document.” The master document allows you to rearrange the content (each chapter file) and redefine all of the styles.

The master document is a powerful feature in LibreOffice. With a master document, it doesn’t matter (that much) how you’ve defined the styles in each chapter—you can redefine the styles in the master document so that everything looks the same. The key is that each chapter should use the same styles like Heading 1, Body Text, and so on.

Add the front matter text
I prefer to add the front matter text before inserting the chapters. When I create book interiors, I start with a title page, copyright page, and table of contents page. I use the Title paragraph style for the title, Subtitle paragraph style for the subtitle, and Body Text for the other content.

LibreOffice can create the table of contents for us, so I’ve only inserted a placeholder for that in this example. We can use LibreOffice to build the table of contents later.
Insert the content
Use the “Insert” menu in the navigator to add the chapter files. Click the “file and arrow” icon to open a menu where you can insert files.

LibreOffice actually inserts the new content at the top of the file, and each file gets added in alphabetical order: discussion.odt, intro.odt, methods.odt, results.odt, then Text (the front matter text that we just typed). That’s okay, because the navigator allows us to move the content around, so it’s easy enough to fix later.

Click and drag each item in the navigator to rearrange each chapter, and to put the front matter at the top. For this example, I arranged the content as Text, intro.odt, methods.odt, discussion.odt, and results.odt.

Format the content
My sample content used the default LibreOffice styles: Liberation Serif for the paragraphs, and Liberation Sans for the headings. I prefer different formatting, which we can fix using the “Styles” sidebar on the right. At the same time, we can apply other formatting for this book interior. I made these changes:
Paragraphs and headings
Right-click on “Default Paragraph Style” in the “Styles” sidebar and change the font to one that’s better suited for print. For this example, I used Palatino at 11-point. If you don’t have this font, use the P052 font; this is a free equivalent to the Palatino font that is provided by Ghostscript, so should be available on every system.

Right-click on the “Heading” style and change the font to one that looks better in print, such as Century Gothic.
Modify the “Heading 1” style to use the same font weight and style as the “Heading” style. Since “Heading 1” inherits its styles from “Heading,” you can just use the “Reset to Parent” button, and “Heading 1” will use the same styles as the parent style for that tab.

I also centered the “Heading 1” (chapter tile), and added an extra inch above the chapter title.
Make changes to the other styles to suit your preferences. Right-click on each style that you want to change, and use the tabs in the pop-up window to modify the styles as you wish. For example, I also used “Justified” alignment and applied automatic hyphenation for the “Body Text” style.
Also modify the “Subtitle” style to insert a new page break after it.

And edit the “Heading 1” style to insert a new page break before it, using a “Right Page” style.

Page size
Use the “Page Styles” tab in the “Styles” sidebar to modify the page size. For the book, we used a 6×9 Trade Paperback size with 0.75-inch margins. For this demonstration, I’ve used a 4×6 page size with 0.5-inch margins, which would be too small for a real book, but it allows each chapter to fill up more than one page in this demonstration.

Note that you will also need to update “First Page,” “Left Page,” and “Right Page” to make sure they all have the correct size and margins. For a longer book, you might need to add extra space on the inside margins: the left margin for “Right Page” and the right margin for “Left Page.” I’ve used 0.75-inch inside margins. My “First Page” style has a 2-inch top margin.A
After defining the “First Page” style, it’s a good idea to apply it to the cover page. This is, by default, the first page in the document. Just scroll back to the top of the file, click anywhere in the book’s title or subtitle, then double-click on the “First Page” style in the “Styles” sidebar.
Page headers and footers
Click at the bottom of a “Left Page” and “Right Page” to insert a page footer. Insert a field here for the page number, using the Insert > Field > Page Number menu.

Do the same to add a page header on “Left Page” and “Right Page.” I usually type in the book’s title for the header. You can also use the document’s metadata to define the book’s title, and use another field in the header; I’ll keep it simple in this example.
Modify the “Footer” and “Header” styles to center the text and apply a bottom border. I also prefer a smaller font size for the header and footer.

Insert the table of contents
Finally, we can insert the table of contents. You can actually insert a table of contents at any time, but I prefer to do it at the end so I can focus on the contents first.
Highlight the placeholder text on the copyright page, and use the Insert > Table of Contents and Index menu action to add a new table of contents.

For this table of contents, I am only interested in the chapters, not any sections within each chapter. To include only the chapters in the table of contents, let LibreOffice create the table of contents for the entire document up to level 1, from the headings. This will use only the “Heading 1” paragraph styles to create the table of contents.

I usually modify the “Contents Heading” style to make the Table of Contents title look like a chapter, and to insert a page break before it. Use the styles to apply the formatting you like.

It’s always a good idea to let LibreOffice refresh the table of contents before you export the master document as a PDF. Just right-click on the table of contents, and select “Update Table of Contents” from the drop-down menu.

Book interiors with LibreOffice
I like using LibreOffice to create my book interiors because it gives me so much flexibility to make my content look the way I want. While this list of steps might seem long, that’s only because I’ve modified everything to make the book’s interior look a particular way, including paragraphs, headings, pages, and table of contents.
Most importantly, this book interior always starts new chapters on the right, which is how most people expect chapters to appear in a printed book. If you use the “Book view” for LibreOffice (the “double page” icon at the bottom of the LibreOffice window, next to the “zoom” slider) you can see that some chapters have an automatically-inserted blank page on the left, such as the Introduction:

When you export the master document as a PDF, be sure to select the option to add the automatically-inserted blank pages.

The final product is ready to be bound as a professional book interior. For the Introduction to Linux book, we used Lulu.com so people could buy a print copy. You can also work with a local print shop to produce and bind the book for you, which is how I make the workbooks for the in-person training and workshops that I provide as a consultant.
It’s easy with LibreOffice. I recommend using only styles to apply the formatting in each chapter, so you can modify the styles later in the master document to make everything look the same throughout your book.