Contents | Start | End | Previous: KB0017: Converting a book to PDF | Next: KB0019: How do you pronounce Jutoh?


KB0018: Adding page numbers and a table of contents in OpenOffice/LibreOffice

See also:
Converting a book to PDF
Creating OpenDocument files for print and PDF in the Jutoh manual

You can export your project to ODT, perhaps for converting to a PDF file or a Word document. By default, Jutoh 2 adds page numbers and (if you have already created an advanced table of contents) a special table of contents with both hyperlinks and page numbers.

You can adjust the default page numbering behaviour and other header and footer details via the Page Layout panel in the Project Properties dialog, and via the Page tab in the Document Properties dialog. For more in this, see Creating OpenDocument files for print and PDF in the Jutoh manual.

For more on adding a special table of contents, see Building a table of contents in the Jutoh manual.

Adding page numbers and a table of contents manually

If you are using Jutoh 1, or for some other reason, you may wish to manually adjust the document in OpenOffice or LibreOffice Writer, to add page numbers and replace the table of contents with one that references pages instead of just locations in the document.

Follow these steps in LibreOffice (OpenOffice doesn’t currently support the Format | Title Page command but otherwise the steps are similar):

  1. Open the file in LibreOffice Writer.

  2. Mark the title page using Format | Title Page; enter 2 into Number of title pages (to skip the cover and title page) and choose Convert existing pages to title pages. Check Reset Page Numbering after title pages. Press OK.

  3. Choose Format | Choose Footer | Default. Click on the first available footer and choose Insert | Fields | Page Number.

  4. Select the page number field and centre it.

You can also add a header if you wish, perhaps containing the title of the book.

To add a table of contents with page numbers and not just links, follow these steps in OpenOffice Writer or LibreOffice Writer:

  1. Delete the Jutoh-generated table of contents.

  2. Click on Insert | Indexes and Tables | Indexes and Tables to show the Insert Index/Table dialog.

  3. We need to associate heading styles used in the document with levels in the table of contents, similar to how Jutoh works when searching for headings to put in the table of contents. Check Additional Styles, and click the "..." button. Assuming you are using "Heading 1", "Heading 2" and so on for headings in your document, click on each of these in the list and click on the >> button to position each at the appropriate point in the table: "Heading 1" at position 1, "Heading 2" at position 2, and so on. Press OK but don't dismiss the Insert Index/Table dialog yet.

  4. Now we need to make the entries hyperlinked. Click on the Entries tab and in the Structure area, click in the box just before the E# button, then click Hyperlink. Click in the box just after the E and click on Hyperlink. This creates LS and LE marks (Link Start and Link End). Click All to apply this to all entries, and then click OK to dismiss the dialog.

  5. Right-click over the special "Table of Contents" field that has been inserted in the document and choose Update Index/Table and you should find that a table of contents with page numbers appears.


Contents | Start | End | Previous: KB0017: Converting a book to PDF | Next: KB0019: How do you pronounce Jutoh?