Latest news 2024-07-03: Ebook sale (1st – 31st July 2024): short story cybercrime fiction Unsocial Media free; short story cybercrime fiction Smile for the Camera free; short story noir crime fiction I’ve Heard the Mermaid Sing free; crime fiction novel The Private Enemy US$1.99; illustrated children’s story The Foolish Hedgehog US$0.99.


A selection of images or sample documents related to my books or packages or to code I have helped develop. For some great examples of images created using LaTeX, have a look at the TikZ and PGF gallery on, or for some examples of what can be done with TeX have a look at The TeX showcase.

The purpose of LaTeX-related sections of the gallery is to illustrate various styles that can be created with the particular package. If you want to know how to do something not illustrated here or you want to know how to adapt one of these examples, please post your query to an appropriate site such as TeX on StackExchange or The LaTeX Community Forum.

Click on the images below for details. If you would like to know whenever a new item is added to the gallery, you can subscribe to the news RSS feed or login and use the Account page to subscribe to news notifications for the “gallery” tag.

If you have a small screen, you may prefer to switch on the small image setting.

Search for:
Search Tips

File List

View alphabetical list of all .tex and .bib files used in the examples that are available for download.


These are some sample documents that use the glossaries package. Most of these examples use dummy lorum ipsum text, one of them uses the sample image files provided by the mwe package, which is available on both MiKTeX and TeX Live, and one of them uses the sample bibliography file xampl.bib, which should be readily available in your TeX distribution. Make sure you have an up-to-date version of the glossaries package if you want to try any of these examples. For help with building the glossary see Incorporating makeglossaries or makeglossaries-lite or bib2gls into the document build.

Show More


The glossaries-extra package is an extension to the glossaries package. It provides better abbreviation handling and extra features, as demonstrated by these examples. For help with building the glossary see Incorporating makeglossaries or makeglossaries-lite or bib2gls into the document build.

Show More


With the base glossaries package you can sort and collate using makeindex or xindy or using TeX. (See the glossaries performance page for a comparison.)

The glossaries-extra package additionally provides a way of simply listing all defined entries in the order of definition without the need for an external tool, but it also provides another sorting and collation method and that’s with bib2gls. Some of the examples below can be found in bib2gls’s examples directory and are described in more detail in the “Examples” chapter of the bib2gls user manual. For help with building the glossary see Incorporating makeglossaries or makeglossaries-lite or bib2gls into the document build.


The default behaviour of bib2gls is to sort according to the value of the sort field. However, typically, this field should not be explicitly set. Instead, bib2gls has a set of fallback fields that vary according to the entry type. This example demonstrates the difference between using the sort fallback and using a field that’s been set in the .bib file.

image of glossary containing a mixture of symbols, abbreviations, entries with a description, and terms without a description

Logical Glossary Divisions (type vs group vs parent)

There’s a new section added to the bib2gls manual (version 1.9) regarding this topic. This example is an abridged version of that section. If you have a document with many terms that need listing, it’s likely that you may want to divide the terms into separate blocks for easier reading, but should you use type, group or parent? This example provides a guide to help you decide the answer.

image of document shown in PDF viewer with bookmarks showing the entry hierarchy


In this example, all defined entries are selected (without being referenced in the document) and listed in numerical order, where the numeric value is the approximate value of the given constant.

image of glossary with the constant's symbol followed by the description (and value or other representation)


In this example, all defined entries are selected (without being referenced in the document) and sorted according to the description field since the name is a symbol with no intuitive order.

image of glossary showing list of symbols ordered by their descriptions (symbols colour-coded according to category))

Cross-References (bib2gls)

With makeindex and xindy, cross-referencing is limited by their syntax and by the fact that they don’t have access to all the entry data. (Information passed to the indexing applications is limited to the sort value, the location and the output markup.) Since bib2gls has access to the complete entry data (obtained from the bib file), it is better able to handle cross-references. This example uses a mixture of cross-referencing techniques.

Image of glossary including cross-references

Mini-Glossary (bib2gls)

This example is an alternative to the mini-glossary example with \makeglossaries. It provides an environment that displays a mini list of terms at the end of it. This is in addition to the main glossary at the end of the document.

image of sample document with an equation followed by a short list of symbols and a full glossary at the end

Summary of Frequently Used Terms

One of the major differences between bib2gls and makeindex/xindy is that instead of creating a file containing the commands to typeset the glossary bib2gls creates a file containing the entry definitions structured in a way that allows \printunsrtglossary to display the glossary by simply iterating over the list of entries defined for the given glossary. This iterative approach makes it easier to filter the list so that only a subset of entries are displayed.

Image of summary of most frequently used terms

Inner or Nested Glossaries

As from glossaries-extra v1.44, it’s possible to have inner or nested glossaries with bib2gls. This is another way of creating logical divisions that uses the type field but can produce similar effects to using the group or parent fields. This means that you can create the illusion of a hierarchical glossary with different sort methods for different levels.

Image of hierarchical effect glossary with the top level entries in reverse alphabetical order.

Complex Field Assignments

Some fields contain duplicate content (for example, the name, first and text fields are often the same). It’s tiresome to have to repeat information when typing the entry information in the bib file. Some entry types automatically fill in the duplicate content for known fields (such as first and text). In other cases, you can use the replicate-fields resource option. However, there are some cases, where the content from one field is a concatenation of values from other fields. This can’t be handled by replicate-fields, but with bib2gls v3.3+, more complex cases can be achieved with the new assign-fields resource option.

image of document containing index of people and battles


Show More


Paulo Cereda’s cool automation tool arara has been upgraded to version 4.0 and with it comes some new localisation! Here are some screenshots. (That’s Broad Norfolk, in case you’re confused.)

Show More

Book Launch Photos

Photos from book launches.

Show More