Using LibreOffice to Format a Novel – Part 6: Contents Page and Nuclear Option
Contents Page
For ebooks you can create a Contents Page with hyperlinks linking to each of your chapters. After your Copyright page you can create a Contents page with the heading ‘Contents’ at the top.
You don’t necessarily have to do a contents page because ebook readers can use the Heading Paragraph Styles to automatically decide where the chapters are. However, the trouble is, computers are a bit crappy and like to get things wrong all the time to keep you on your toes. So it’s good practice to create your own contents page to make sure it’s how you want it.
Simply type the name of each chapter, one per line. Make sure the Paragraph Style you use has no indent, and make sure your list doesn’t go over one page. For some reason, over one page of contents is a problem for ebook readers.
You might have to make your page size a little bigger to fit it all on one page. Just make sure the entire manuscript is the same size throughout or the ebook software will go bananas.

Select the first line of your contents: Chapter 1. Select all the words you want in your hyperlink. Then either Menu > Insert > Hyperlink or click on the Chain icon at the top of the page.

In the pop up menu select the Document tab …

… then in the Target section, click on the Target In Document icon, which is a red circle.

You will get another pop up window with a list of objects you can link to. Click on Heading (remember we used the Heading Paragraph Styles for Chapter Titles) and you will see a list of all your chapters.

Click on Chapter 1 and select Apply. Then on the Hyperlink Pop up, also select Apply. This will add a hyperlink to Chapter 1 on your contents page.

Now, If you press Control and click on the link, or right click on the link and select Open Hyperlink, you will be taken to Chapter 1.
Do the same for Chapter 2. But this time, scroll back up to the end of Chapter 1. You can add a link to the end of each chapter that takes you back to the contents page.
At the end of Chapter 1, leave an empty line then add a line with words like ‘Back to Top’ or ‘Return to Contents’ or something similar. Select that and go through the link process again. Link it to your Contents page.

This link can be copied and pasted at the end of every chapter, and it should work, no problem. Check each hyperlink you do by pressing Control and Clicking on it just to be sure.
Linking to Text that isn’t a Heading
As I said, you don’t need to convert your Chapter Titles to Heading styles. You can create a Contents Page with hyperlinks that link to any part of your novel.
You do this by creating Bookmarks. Simply select the text (usually a title) you want to link to, then go the Menu > Insert > Bookmark. This will assign the selected text to Bookmark status.
Now, when you create your Contents links, in the Target In Document window, select Bookmarks and all your Bookmarked text will be listed there, ready to be linked to.
All done
Once you’re happy, you’re ready to upload. However, if you do have any problems, you might need to try the nuclear option.
Nuclear
You should be able to upload your ebook with no problems. However, if you’re a bit a dimbo and you’ve included some non-standard formatting or something, you might encounter problems. You might have to use the nuclear option to make your text clean. The Nuclear option removes all formatting.
To do the nuclear option: Make sure you’ve save a backup copy, then simply select you whole novel, copy and paste it into a notepad/text file.
Then copy and paste is back into a blank, new, LibreOffice document. Save it under a new name.
Using Find & Replace to Preserve Italics and Bold
The problem with the nuclear option, however, is it will remove all formatting, which will include any direct uses of, say, italics that you’ve used in your novel. Now, you’re not necessarily going to remember which parts were italicised, or the italics use might be too numerous to be so easily reapplied.
There is a way to preserve your italics (or bold) so they survive the nuclear process.
I found this on the OpenOffice forum very useful https://forum.openoffice.org/en/forum/viewtopic.php?t=9183
You can use Find & Replace to ‘tag’ your italics and bold. You basically replace all the instances of italics with <IT>word<IT> and for bold you can replace them with <B>word<B>
Bold might not be such of an issue. For me most of my use of bold is added for titles, so very easy to reinstall. I rarely use it in the main body of a novel. I do use italics a fair bit however. So italics are something I need to preserve.
So for italics:
- Edit > Find & Replace > More options > Check regular expressions.
- On Find, type (.*) (with parenthesis)
- With the cursor still on the Find box, click on Format and select Italics without changing the other options.
- On replace type <IT>$1<IT>
- Now when you click Replace All, the text in italics will be surrounded by the <IT> tags. After doing a similar process for bold, you can now go nuclear and clear all formatting.
Copy and paste your manuscript into a new document. You can now restore the italics (and bold):
- Again use Find & Replace with regular expressions applied
- Type (<IT>)([^<]*)\1 on Find
- With the cursor still on Find, click on No Format
- Type $2 on Replace
- With the cursor still on Replace, click on Format and select Italics without changing the other options. Click the Replace All button to change the tagged text back into italics.
Then with your freshly nuked document, you must add all the Paragraph Styles as before, so your manuscript looks presentable again.
As I’ve mentioned, you might want to change the page size from standard A4 to a book size (Format > Page Style) so that when your novel is converted into a PDF, it will be more readable. But apart from that, starting a fresh document should mean you end up with no errors.
Saving as a Word Document
Some ebook publishing services require you upload a Word document. Smashwords only accepted Word format, but Draft2Digital accepts odt format as well as Word.
If you need to save it as a Word file, you can do it by going to Menu > File > Save As.

At the bottom right of the pop up window there is a drop down menu that gives you various formats you can save as. Select Word 97–2003 (.doc). The later version, Word 2007–365 (.docx) didn’t work for Smashwords, although it might work your other services. However, whichever publishing service you are using, Word 97 is all you need.
And that concludes my little guide. You can ask me for any clarifications if you find me on Fedi, otherwise the rest is up to you. You just need to write you novel and get hold a great front cover! And you will soon be adored by millions of readers!
Easy!
[End of Transmission]