Difference between revisions of "Add Table of Contents or Index to reports"

From Gramps
Jump to: navigation, search
m (Getting started: internal markers)
m
 
Line 3: Line 3:
 
How to add a Table of Contents(TOC) or an index to a Gramps generated report in [https://www.libreoffice.org/download/ LibreOffice]. LibreOffice is a great companion for Gramps.
 
How to add a Table of Contents(TOC) or an index to a Gramps generated report in [https://www.libreoffice.org/download/ LibreOffice]. LibreOffice is a great companion for Gramps.
  
==Getting started==
+
==Background==
 
Gramps embeds invisible indexing markers in reports created in the Open Document Text (.odt) format. These indexing markers are also supported in the older Open Office (.sxw) formats.  
 
Gramps embeds invisible indexing markers in reports created in the Open Document Text (.odt) format. These indexing markers are also supported in the older Open Office (.sxw) formats.  
  
Line 10: Line 10:
 
These hidden tags allow the generation of a Table of Contents or an Index of names within reports.  
 
These hidden tags allow the generation of a Table of Contents or an Index of names within reports.  
  
Note that the hidden tags can also be used during post-process collation of Gramps generated reports with other materials. When pages of a such a collated document are re-flowed, the tags can allow a desktop publishing application to update pagination in indices, tables of content & end notes. Because post-process repagination is so ubiquitous, the addition of dated and paginated footers is more efficient in those external tools.  
+
Note that the hidden tags can also be used during post-process collation of Gramps generated reports with other materials. When pages of a such a collated document are re-flowed, the tags can allow a desktop publishing application to control pagination and generate their own style of indices, tables of content & end notes.  
{{-}}
+
 
 +
Because post-process repagination is so ubiquitous, the addition of dated and paginated footers is both easier and more efficient in those external desktop publishing suites. Footers spanning multiple reports is not a feature planned for the Gramps Books (report automation and collation) tool.
 +
 
 +
==Getting started==
 
[[File:Toc tutorial 1.jpg|thumb|right|450px|Fig. 1 Creating a Book Report]]
 
[[File:Toc tutorial 1.jpg|thumb|right|450px|Fig. 1 Creating a Book Report]]
 
The first step is to create a report. This example creates a book report to demonstrate that multiple reports can be combined.
 
The first step is to create a report. This example creates a book report to demonstrate that multiple reports can be combined.

Latest revision as of 18:08, 9 July 2022

How to add a Table of Contents(TOC) or an index to a Gramps generated report in LibreOffice. LibreOffice is a great companion for Gramps.

Background

Gramps embeds invisible indexing markers in reports created in the Open Document Text (.odt) format. These indexing markers are also supported in the older Open Office (.sxw) formats.

The HTML and PDF output formats have a different system of named anchors, designed to support hotlinking.

These hidden tags allow the generation of a Table of Contents or an Index of names within reports.

Note that the hidden tags can also be used during post-process collation of Gramps generated reports with other materials. When pages of a such a collated document are re-flowed, the tags can allow a desktop publishing application to control pagination and generate their own style of indices, tables of content & end notes.

Because post-process repagination is so ubiquitous, the addition of dated and paginated footers is both easier and more efficient in those external desktop publishing suites. Footers spanning multiple reports is not a feature planned for the Gramps Books (report automation and collation) tool.

Getting started

Fig. 1 Creating a Book Report

The first step is to create a report. This example creates a book report to demonstrate that multiple reports can be combined. From the menu select Reports->Books->Book Report.


Fig. 2 Book Report

This opens the book report dialog. It has two lists. The top list shows all the available reports that can be added to the book. The bottom list shows all the reports that have been added.

In this example, you can see that the book will include a title page, a Complete Individual Report, a Detailed Descendant Report and a Detailed Ancestor Report. Click OK to generate the report.


Insert a Table of Contents

Once the report has been generated, open it in LibreOffice.


Fig.3 Insert break > Type > Page Break

Many people like the Table of Contents to appear after the Title Page. To do so, first insert a page break after the text of the Title Page.

From the file menu, select Insert->Manual Break ...'. Choose Page Break and click OK

Fig. 4 Insert->Indexes and Tables->Indexes and Tables ....

Scroll to the newly inserted page and add the Table of Contents by selecting Insert->Indexes and Tables->Indexes and Tables ....


Fig. 5 Indexes and Tables - dialog

In the Indexes and Tables dialog, change the type to Table of Contents. Also, be sure that the Outline check box is unchecked and the Index Marks check box is checked. This tells LibreOffice to create the TOC from the marks that were embedded by Gramps.


Fig. 6 Example of a Table of Content

After you click OK, the Table of Contents should appear.


Insert an Index

Fig. 7 Insert break > Type > Page Break

Most people like the index to be at the end of the book. To do so, place the cursor at the very end of the book, and insert a page break like you did for the TOC.

From the file menu, select Insert->Manual Break ...'. Choose Page Break and click OK


Fig. 8 Indexes and Tables - dialog

Next, open the Indexes and Tables dialog like you did for the TOC. This time, change the type to Alphabetical Index.


Fig. 9 Example of an index

Click OK and the index will appear.

Conclusion

  • Adding a TOC(Table of Contents) and an Index to your documents can be done quickly.

See also