Glossary

Features to format a glossary or list of acronyms/abbreviaitons

Display graphics for glossary

The <glossary> element is used to format a glossary, list of acronyms or list of abbreviations in a book. The stylesheet p14-endmatter.xsl has all features and instructions to set up styles for glossaries. The glossary formats that can be set in the stylesheet are:
Nested inside a <glossary> element, you can mark up glossaries in XML using either of:

The XML book templates contain examples of glossaries and a list of acronyms using both of these options for markup.

The following diagram shows the decision-making process to add various XML markup for glossaries. Readers should also refer to the section on lists to see how to use variable lists for glossaries.

Diagram showing the decision-making process for selecting XML elements of a glossary

XML markup to edit

Put <glossary> element in preliminary matter and end matter. A <glossary> element can be put into the preliminary matter and the end matter. For example, this is useful if you need to put a list of abbreviations in the preliminary matter and a glossary in the endmatter. You mark up both book components using the <glossary> element and specify the position of each using different attribute values as shown in the following table. This markup changes text styles for page numbers (preliminary pages typically have roman page numbers while end matter pages have arabic numbers) and the location of the book table of contents in the preliminary pages.

XML markup Description
<glossary role="beforetoc"> Use this to put a <glossary> element before the book TOC
<glossary role="aftertoc"> Use this to put a <glossary> element after the book TOC
<glossary role="endmatter"> Use this when a <glossary> element is in the end matter—this changes the page number format to arabic

Stylesheet settings to edit

The relevant Stylesheet Guide page to set up text formats for glossaries is PDF-glossary.svg.