Latest news 2024-12-13: Ebook sale (12th December 2024 – 1st January 2025): cybercrime fiction short stories Unsocial Media and Smile for the Camera free; crime fiction short story The Briefcase 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.

Dickimaw Books - Gallery (All Predefined Glossary Styles)

This is a list of all the styles provided by the glossaries package and the glossaries-extra extension package. You can download the test file used to generate the documents below. The samples here used the test files example-glossaries-brief.tex, example-glossaries-symbols.tex, example-glossaries-childnoname.tex, example-glossaries-parent.tex or example-glossaries-multipar.tex provided with the glossaries package. If you have the glossaries package installed, they should already be on your path. If you get any undefined control sequence or undefined style errors, you probably need to update your version of glossaries (or glossaries-extra, where appropriate). You can click on the sample images below to view the PDF.

The bookindex, longextra and topic styles require the glossaries-extra extension package. The bib2gls examples in those sections use entries defined in sample .bib files provided by the glossaries-extra package and the testidx-glossaries package.

The number 1 appearing in red after the description indicates the position of the location (number) list. The locations are all page 1 in these examples, as the entries were all indexed on the first page of the sample document. In general, the location list will typically contain a comma-separated list of page numbers or number ranges. The number list can be suppressed using the nonumberlist option. (The number appears in red because the hyperref package has been loaded with internal hyperlinks set to that colour.)

Package options that affect the appearance of predefined styles are listed in section 2.3 Glossary Appearance Options of the glossaries user manual.

The glossary is typically divided into groups: symbols, numbers and then each letter group. In the case of the letter groups, the identifying group is given by the initial letter of the sort key. Most of the styles provide a visual separation between the letter groups. This may be either just a vertical gap or a group heading. If your glossary hasn’t been sorted alphabetically, then don’t have a visual indicator between groups, as the grouping no longer makes sense. Most of the basic predefined styles allow you to suppress the vertical gap between groups with the nogroupskip option.

Note that some styles use the post description hook \glspostdescription. This displays a full stop and adjusts the space factor if nopostdot=false and does nothing if nopostdot=true. The hook can be suppressed on an individual basis by using \nopostdesc in the entry’s description. The glossaries-extra package modifies \glspostdescription so that it first does \glsxtrpostdescription, which allows further customization according to the entry’s category. Version 1.02 of glossaries-extra provides patches to all the predefined styles that are missing \glspostdescription through the glossaries-extra-stylemods package. For example, to patch the styles in the glossary-longbooktabs package:

\usepackage{glossaries-extra}
\usepackage{glossary-longbooktabs}
\usepackage{glossaries-extra-stylemods}
or, more simply:
\usepackage[stylemods=longbooktabs]{glossaries-extra}

For other examples of glossary styles, see the main gallery.

glossary-inline

The glossary-inline package must be explicitly loaded using
\usepackage{glossary-inline}
This package only provides one style.

inline 🔗

The inline style is for in-line glossaries. This by default suppresses the location list (regardless of the nonumberlist setting) and the symbol (if provided). The chances are that you will probably also need to suppress the section header, which you can do using
 \renewcommand*{\glossarysection}[2][]{} 
or change it to a non-sectioning tag, for example:
 \renewcommand*{\glossarysection}[2][]{\textbf{#2}: } 
Note that the post description hook is done just once at the end of the glossary rather than after each entry. The glossaries-extra-stylesmods package changes this style to use just the \glsxtrpostdescription hook after each description, and doesn’t use the \glspostdescription hook.

inline style sample image

The name is formatted using \glsinlinenameformat. The default definition is:

\newcommand*{\glsinlinenameformat}[2]{\glstarget{#1}{#2}}
This can be redefined as required. For example, to make the name appear in small caps:
\renewcommand*{\glsinlinenameformat}[2]{\glstarget{#1}{\textsc{#2}}}

inline style with smallcap names sample image

One-level sub-entries are supported, but the child name won’t be displayed. For example, using the example-glossaries-childnoname.tex dummy entries and the subentrycounter option, which automatically numbers the sub-entries:

inline style with homographs sample image

Note that this inserts a colon between the top-level description and the sub-level entry.

glossary-list

The glossary-list package is automatically loaded by the glossaries package, unless explicitly excluded using the package option nolist or nostyles. The list styles use a description environment, and the style of that may be changed by the document class. All the list styles ignore the symbol field. You may prefer one of the tree-like styles instead.

Most of the list styles are incompatible with classicthesis. If you are using the classicthesis package with glossaries, you will need to change the default style (unless you are using glossaries v4.26+ which checks for classicthesis and switches the default style to index).

list 🔗

The list style puts the name in the optional argument of \item and so is not generally suitable for glossaries with long entry names. It works best with long descriptions. If you have short names and short descriptions, consider using one of the mcol styles. For long names and long descriptions, consider using one of the altlist styles instead. An extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically.

list style sample image

Note that the list style doesn’t display the names of sub-entries, and generally doesn’t work well with child entries. If I change the test file to example-glossaries-childnoname.tex then the glossary is as shown below. The space before the location list and the dot after it are hard-coded into the sub-entry style, so this style isn’t suitable for sub-entries with the location lists suppressed. If you have sub-entries, consider one of the other styles instead. (Versions below 4.22 were missing the space before the sub-entry descriptions, which made the location lists run into the next description, but even with that fixed, it’s still not a good style for glossaries with child entries.)

list style with no child names sample image

listgroup 🔗

The listgroup style is like the list style but adds a heading to each letter group. This style is inappropriate for entries that haven’t been sorted alphabetically.

listgroup style sample image

listhypergroup 🔗

The listhypergroup style is like the listgroup style but also adds a navigation line at the start of the list. There’s no point using this style if your document doesn’t have hyperlinks.

listhypergroup style sample image

altlist 🔗

The altlist style is like the list style but inserts a paragraph break after the name. This style is best suited for entries with long names and long descriptions. As with the list style, an extra vertical gap occurs between letter groups.

altlist style sample image

The altlist style allows one-level child entries and will start a new paragraph for each child entry, but the child name won’t be displayed. In the sample below I’ve used the example-glossaries-childnoname.tex file with the subentrycounter package option, which automatically numbers the sub-entries. This just makes them a bit easier to see in the sample and distinguishes them from the parent entry’s description.

altlist style with no child names sample image

altlistgroup 🔗

The altlistgroup style is like the altlist style but adds a heading to each letter group. This style is inappropriate for entries that haven’t been sorted alphabetically.

altlistgroup style sample image

altlisthypergroup 🔗

The altlisthypergroup style is like the altlistgroup style but also adds a navigation line at the start of the list. There’s no point using this style if your document doesn’t have hyperlinks.

altlisthypergroup style sample image

listdotted 🔗

The listdotted style leaves the optional argument of \item empty and after it places a box whose horizontal width is given by \glslistdottedwidth. (This length may be adjusted using \newlength as required.) This box contains the name and dotted leaders. The description is placed after the box. The location list is ignored regardless of the nonumberlist setting. The post description hook is also ignored. This style is only suitable for glossaries with both short entry names and short descriptions. This style inserts an extra vertical gap between groups, so use nogroupskip if you haven’t sorted your entries.

listdotted style sample image

This style is inappropriate for child entries. In the sample below, I’ve used the example-glossaries-parent.tex file with the subentrycounter option on, which automatically numbers the child entries.

listdotted style with child entries sample image

The numbering helps to highlight the sub-entries but the hierarchy has been flattened to just the top-level and one sub-level.

sublistdotted 🔗

The sublistdotted style is only suitable for one sub-level hierarchical entries. The parent (top-level) entry only has the name displayed (not the description). The top-level name is placed in the optional argument of \item and so will typically appear bold. This style is not suitable for documents where entries haven’t been sorted alphabetically. The post description hook isn’t used.

sublistdotted style sample image

The above sample image shows how poorly this style performs for glossaries with only top-level entries. If the sample file switches from example-glossaries-brief.tex to example-glossaries-parent.tex for the dummy entries, the result is much better:

sublistdotted style sample image

glossary-tree

The glossary-tree package is automatically loaded by the glossaries package unless you have used the notree or nostyles options. If you have short descriptions, you might want to consider one of the mcol styles that wrap the tree styles in the multicols environment. Alternatively, the bookindex style can be used if no descriptions are required.

index 🔗

The index style is like a standard index except that the entry name appears in bold (adjust by redefining \glstreenamefmt) and the symbol, if present, is placed in parentheses. A vertical gap appears between each letter group, so use nogroupskip for documents where the entries haven’t been sorted alphabetically. As with the standard theindex environment, this only allows for up to three levels (\item, \subitem and \subsubitem).

index style sample image

To illustrate the way this style displays symbols, the test file can be modified to use example-glossaries-symbols.tex instead of example-glossaries-brief.tex. This will also require the package option nopostdot as the symbol dummy entries contain the required sentence terminators.

index style with symbols sample image

To illustrate the way this style displays child entries, the test file can be modified to use example-glossaries-parent.tex.

index style with sub-entries sample image

Note that the index style isn’t well-suited for multi-paragraph descriptions. To illustrate this, the test file can be modified to use example-glossaries-multipar.tex.

index style with multi-paragraph descriptions sample image

Only the first paragraph of the description for each entry obeys the hanging indent. The subsequent paragraphs have lost the left indent.

This can be overcome for multi-paragraph descriptions in top-level entries with glossaries v4.26 and the following adjustment:

\renewcommand{\glstreeitem}{%
 \parindent0pt\par\hangindent40pt
 \everypar{\parindent50pt\hangindent40pt}}
This now produces:

index style with multi-paragraph descriptions sample image

This provides a convenient alternative to the list style. An alternative to altlist can be achieved by adding:

\renewcommand{\glstreepredesc}{\par
  \glstreeitem\parindent\hangindent}

index style with multi-paragraph descriptions simulating altlist sample image

indexgroup 🔗

The indexgroup style is like the index group style but it inserts group headers. This style is not appropriate for documents where the entries haven’t been sorted alphabetically.

indexgroup style sample image

indexhypergroup 🔗

The indexhypergroup style is like the indexgroup group style but it also has a navigation line at the start of the list. This is only of any use if your document has hyperlinks enabled.

indexhypergroup style sample image

tree 🔗

The tree style is like the index style except that there’s no maximum depth for sub-levels (to within the limits of the line width, naturally). Note that the more sub-levels that you have, the more confusing it can be to the reader. As with the index style, a vertical gap is inserted between the letter groups so use nogroupskip if your document doesn’t sort the entries alphabetically.

tree style sample image

To illustrate the way this style displays child entries, the test file can be modified to use example-glossaries-parent.tex.

tree style with sub-entries sample image

treegroup 🔗

The treegroup style is like the tree style but it inserts group headers. This style is not appropriate for documents where the entries haven’t been sorted alphabetically.

treegroup style sample image

treehypergroup 🔗

The treehypergroup style is like the treegroup style but it also has a navigation line at the start of the list. This is only of any use if your document has hyperlinks enabled.

treehypergroup style sample image

treenoname 🔗

The treenoname style is like the tree style except that, as it’s designed for homographs, the sub-entries don’t have the name displayed. If you don’t have any sub-entries, it appears the same as the tree style, so for the sample below I switched the dummy entry file from example-glossaries-brief.tex to example-glossaries-childnoname.tex. As with the tree style, a vertical gap is inserted between the letter groups, but even with the nogroupskip option, this style is still inappropriate for entries that haven’t been sorted alphabetically as sub-entries are likely to become separated from their parent entry.

treenoname style sample image

treenonamegroup 🔗

The treenonamegroup style is like the treenoname style but it inserts group headers. As with the treenoname example, the sample below uses the example-glossaries-childnoname.tex test file.

treenonamegroup style sample image

treenonamehypergroup 🔗

The treenonamehypergroup style is like the treenonamegroup style but it also has a navigation line at the start of the list. This is only of any use if your document has hyperlinks enabled. As with the treenoname example, the sample below uses the example-glossaries-childnoname.tex test file.

treenonamehypergroup style sample image

alttree 🔗

The alttree style is like the tree style except that the width available for the entry names must be supplied by the user. This can be a useful alternative to the tabular-like styles, such as the long style. The widest name can be specified with the command:
\glssetwidest[level]{widest name}
where widest name is the widest entry name. For example, for the test file example-glossaries-brief.tex:
\glssetwidest{consectetuer}
The optional argument can be used to set the name width for sub-levels. (The default value is 0 for the top-level.) If you forget to set the widest entry, the description will overlap the name. If no widest name has been specified for a particular sub-level, then the top-level name is used.

The drawback with this is that it means you need to know the widest name or work it out programmatically by looping over all entries. As from v4.22, the glossary-tree package provides

\glsfindwidesttoplevelname[glossary list]
which iterates over all the glossaries listed in the optional argument and finds the widest name over all entries that don’t have a parent. If the optional argument is omitted, the list contains all defined glossaries. For example:
\glsfindwidesttoplevelname
\setglossarystyle{alttree}
\printglossaries
This ensures that all the glossaries have the same width available for the name. Alternatively, you can redefine \glossarypreamble to compute the widest entry just for the current glossary. For example:
\renewcommand{\glossarypreamble}{\glsfindwidesttoplevelname[\currentglossary]}
\setglossarystyle{alttree}
\printglossaries

As with the tree style, a vertical gap is inserted between letter groups, so use the nogroupskip option if your entries aren’t sorted alphabetically.

alttree style sample image

If the widest name for any sub-entry level hasn’t been specified, the child names are given the same width box as the top-level names. This can lead to strange results. In the sample below I’ve used the example-glossaries-parent.tex file with:

\renewcommand{\glossarypreamble}{%
 \glsfindwidesttoplevelname[\currentglossary]%
}
Since this only sets the widest name for the top-level, the second sub-level isn’t wide enough for “nonummy quis” and the third level has excess space.

alttree style with child entries sample image

This can be corrected with:

\glssetwidest[1]{nonummy quis}
\glssetwidest[2]{duisnibh}

alttree style with child entries corrected sample image

alttreegroup 🔗

The alttreegroup style is like the alttree style but it inserts group headers. This style is not appropriate for documents where the entries haven’t been sorted alphabetically. As with the alttree style, you need to indicate the widest entry name.

alttreegroup style sample image

alttreehypergroup 🔗

The alttreehypergroup style is like the alttreegroup style but it also has a navigation line at the start of the list. This is only of any use if your document has hyperlinks enabled.

alttreehypergroup style sample image

glossary-mcols

The glossary-mcols package must be explicitly loaded using:
\usepackage{glossary-mcols}
This automatically loads the multicol package and the glossary-tree package (if not already loaded). The styles provided by this package are analogous to the tree styles above but the multicols environment is also used. The number of columns is given by \glsmcols, which defaults to 2. For example, to have a three column glossary:
\renewcommand{\glsmcols}{3}
\setglossarystyle{mcolindex}
Take care not to confuse this with the columns within the tabular-like styles, such as the long style.

If you don’t want the description displayed, you may prefer the bookindex style provided with the glossaries-extra extension package (which can adapted to show the descriptions and so can be used as an alternative to the mcolindexgroup style).

mcolindex 🔗

The mcolindex style is like the index style but contained within a multicols environment. As with the index style, a vertical gap is inserted between the letter groups so use nogroupskip if your document doesn’t sort the entries alphabetically.

mcolindex style sample image

mcolindexgroup 🔗

The mcolindexgroup style is like the indexgroup style but contained within a multicols environment. As with the indexgroup style, this style is inappropriate for entries that haven’t been alphabetically sorted. (An alternative to this style is the bookindex style provided with the glossaries-extra extension package.)

mcolindexgroup style sample image

mcolindexhypergroup 🔗

The mcolindexhypergroup style is like the indexhypergroup style but contained within a multicols environment. As with the indexhypergroup style, this style is inappropriate for documents that don’t have hyperlinks enabled.

mcolindexhypergroup style sample image

Note that this style bunches up the navigation line at the start of the first column. If you feel this is inappropriate, the next style mcolindexspannav may look better.

mcolindexspannav 🔗

The mcolindexspannav style (new to v4.22) is like the mcolindexhypergroup style but the navigation line is placed inside the optional argument of the multicols environment. This allows it to span across the columns.

mcolindexspannav style sample image

mcoltree 🔗

The mcoltree style is like the tree style but contained within a multicols environment. As with the tree style, a vertical gap is inserted between the letter groups so use nogroupskip if your document doesn’t sort the entries alphabetically.

mcoltree style sample image

mcoltreegroup 🔗

The mcoltreegroup style is like the treegroup style but contained within a multicols environment. As with the treegroup style, this style isn’t suitable for documents that don’t sort the entries alphabetically.

mcoltreegroup style sample image

mcoltreehypergroup 🔗

The mcoltreehypergroup style is like the treehypergroup style but contained within a multicols environment. As with the treehypergroup style, this style is inappropriate for documents that don’t have hyperlinks enabled.

mcoltreehypergroup style sample image

Note that this style bunches up the navigation line at the start of the first column. If you feel this is inappropriate, the next style mcoltreespannav may look better.

mcoltreespannav 🔗

The mcoltreespannav style (new to v4.22) is like the mcoltreehypergroup style but the navigation line is placed inside the optional argument of the multicols environment. This allows it to span across the columns.

mcoltreespannav style sample image

mcoltreenoname 🔗

The mcoltreenoname style is like the treenoname style but contained within a multicols environment. As with the treenoname example above, the sample below uses the example-glossaries-childnoname.tex test file.

mcoltreenoname style sample image

mcoltreenonamegroup 🔗

The mcoltreenonamegroup style is like the treenonamegroup style but contained within a multicols environment. As with the treenonamegroup example above, the sample below uses the example-glossaries-childnoname.tex test file.

mcoltreenonamegroup style sample image

mcoltreenonamehypergroup 🔗

The mcoltreenonamehypergroup style is like the treenonamehypergroup style but contained within a multicols environment. As with the treenonamegroup example above, the sample below uses the example-glossaries-childnoname.tex test file.

mcoltreenonamehypergroup style sample image

Note that this style bunches up the navigation line at the start of the first column. If you feel this is inappropriate, the next style mcoltreenonamespannav may look better.

mcoltreenonamespannav 🔗

The mcoltreenonamespannav style (new to v4.22) is like the mcoltreenonamehypergroup style but the navigation line is placed inside the optional argument of the multicols environment. This allows it to span across the columns.

mcoltreenonamespannav style sample image

mcolalttree 🔗

The mcolalttree style is like the alttree style but contained within a multicols environment. As with the alttree style, the widest name must be specified using \glssetwidest or \glsfindwidesttoplevelname, as described above for the alttree style.

mcolalttree style sample image

mcolalttreegroup 🔗

The mcolalttreegroup style is like the alttreegroup style but contained within a multicols environment. Again, the widest name must be specified.

mcolalttreegroup style sample image

mcolalttreehypergroup 🔗

The mcolalttreehypergroup style is like the alttreehypergroup style but contained within a multicols environment. Again, the widest name must be specified.

mcolalttreehypergroup style sample image

Note that this style bunches up the navigation line at the start of the first column. If you feel this is inappropriate, the next style mcolalttreespannav may look better.

mcolalttreespannav 🔗

The mcolalttreespannav style (new to v4.22) is like the mcolalttreehypergroup style but the navigation line is placed inside the optional argument of the multicols environment. This allows it to span across the columns.

mcolalttreespannav style sample image

glossary-long

The glossary-long package is automatically loaded by the glossaries package, unless explicitly excluded using the package option nolong or nostyles. The long styles use the longtable environment, so the glossary-long package automatically loads the longtable package.

Take care not to confuse these table styles with the mcols styles.

long 🔗

The long style starts the longtable environment with:
\begin{longtable}{lp{\glsdescwidth}}
The first column (left-aligned) is used for the entry name and the second column (a paragraph column whose width is given by \glsdescwidth) is used for the description and location list. The symbol field is ignored. If you want to change the horizontal alignment of the entire table, you can redefine the theglossary environment after you’ve set the style. For example:
\setglossarystyle{long}
\renewenvironment{theglossary}%
 {\begin{longtable}[l]{lp{\glsdescwidth}}}%
 {\end{longtable}}
(see the longtable documentation for further details). Note that the default is to centre the table, but this may not be apparent with brief descriptions. If you temporarily switch to the longborder, style you will be able to see the table bounds.

An extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically.

long style sample image

This style omits the name for sub-entries and is unsuitable for deeper than one-level sub-entries. The sample below uses the example-glossaries-childnoname.tex file with the subentrycounter option set, which automatically numbers the sub-entries.

long style homograph sample image

longborder 🔗

The longborder style is like the long style, but includes vertical and horizontal rules. Note that the long-booktabs style looks better, but this style can be useful for testing purposes if you’re not sure how much space the table is occupying.

longborder style sample image

longheader 🔗

The longheader style is like the long style, but includes a header row.

longheader style sample image

longheaderborder 🔗

The longheaderborder style is like a combination of the longheader and longborder styles. Note that the long-booktabs style looks better.

longheaderborder style sample image

long3col 🔗

The long3col style is like the long style, but has three columns instead of two. In this style, the longtable environment is begun with:
\begin{longtable}{lp{\glsdescwidth}p{\glspagelistwidth}}
The first column contains the name field, the second column contains the description and the third column contains the location list. Note that, as with the long style, the symbol isn’t displayed. Also, this style doesn’t use the post description hook, so the nopostdot option is ignored. A vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically.

long3col style sample image

As with the long style, this style omits the name for sub-entries and is unsuitable for deeper than one-level sub-entries. The sample below uses the example-glossaries-childnoname.tex file with the subentrycounter option set, which automatically numbers the sub-entries.

long3col style homograph sample image

long3colborder 🔗

The long3colborder style is like the longborder style, but with three columns.

long3colborder style sample image

long3colheader 🔗

The long3colheader style is like the longheader style, but with three columns.

long3colheader style sample image

long3colheaderborder 🔗

The long3colheaderborder style is like the longheaderborder style, but with three columns. Note that if you want rules, the long3col-booktabs style looks better.

long3colheaderborder style sample image

long4col 🔗

The long4col style is similar the long style, but has four columns instead of two. In this style, the longtable environment is begun with:
\begin{longtable}{llll}
The first column contains the name field, the second column contains the description, the third column contains the symbol, and the final column contains the location list. Note that that all four columns are specified using l which means that no line-breaking is permitted. Therefore this style is only suitable for entries with brief descriptions and an accompanying symbol. A vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. This style doesn’t use the post description hook.

Note that the test file loads example-glossaries-brief.tex, which doesn’t provide symbols for any of the dummy entries, so the symbol column is blank in the sample below. (The example-glossaries-symbols.tex test file has descriptions that are too long for this style.)

long4colstyle sample image

As with the long style, this style omits the name for sub-entries and is unsuitable for deeper than one-level sub-entries. The sample below uses the example-glossaries-childnoname.tex file with the subentrycounter option set, which automatically numbers the sub-entries.

long4col style homograph sample image

long4colborder 🔗

The long4colborder style is like the long4col style, but includes vertical and horizontal rules. The empty symbol column is more noticeable with this style.

long4colborder style sample image

long4colheader 🔗

The long4colheader style is like the long4col style, but includes a header row.

long4colheader style sample image

long4colheaderborder 🔗

The long4colheaderborder style is like the long4col style, but includes a header row and rules. Note that the long4col-booktabs style is preferable.

long4colheaderborder style sample image

altlong4col 🔗

The altlong4col style is similar the long4col style, but in this style, the longtable environment is begun using:
\begin{longtable}{lp{\glsdescwidth}lp{\glspagelistwidth}}
This means that multi-lined descriptions and long location lists may be present.

To illustrate the way this style displays symbols, the test file can be modified to use example-glossaries-symbols.tex instead of example-glossaries-brief.tex. A vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. This style doesn’t use the post description hook.

altlong4col style sample image

As with the long style, this style omits the name for sub-entries and is unsuitable for deeper than one-level sub-entries. The sample below uses the example-glossaries-childnoname.tex file with the subentrycounter option set, which automatically numbers the sub-entries. Since this set of test entries don’t have symbols, the symbol column is empty.

altlong4col style homograph sample image

altlong4colborder 🔗

The altlong4colborder style is like the altlong4col style, but includes vertical and horizontal rules.

altlong4colborder style sample image

altlong4colheader 🔗

The altlong4colheader style is like the altlong4col style, but includes a header row.

altlong4colheader style sample image

altlong4colheaderborder 🔗

The altlong4colheaderborder style is like the altlong4col style, but includes a header row and vertical and horizontal rules. Note that the altlong4col-booktabs style is preferable.

altlong4colheaderborder style sample image

glossary-longragged

The glossary-longragged package is not automatically loaded by the glossaries package, but is loaded by the glossary-longbooktabs package, so you either need
\usepackage{glossary-longragged}
or
\usepackage{glossary-longbooktabs}
The glossary-longragged package will automatically load the longtable and array packages. The styles provided in this package are analogous to the styles in the glossary-long package that have paragraph columns. The corresponding styles in this package use \raggedright to make the paragraph columns have ragged-right formatting. With narrow columns, this can look better than forcing normal paragraph justification. Note that there are no equivalent styles to the styles in the glossary-long package that don’t have paragraph columns (such as the long4col style).

longragged 🔗

The longragged style is similar the long style, but in this style, the longtable environment is begun using:
\begin{longtable}{l>{\raggedright}p{\glsdescwidth}}
As with the long style, an extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. With brief one-line descriptions, this appears the same as the long style, so the sample images here use the example-glossaries-symbol.tex test file with the nopostdot package option. Note that the symbol isn’t displayed with this style.

longragged style sample image

longraggedborder 🔗

The longraggedborder style is like the longragged style, but includes vertical and horizontal rules.

longraggedborder style sample image

longraggedheader 🔗

The longraggedheader style is like the longragged style, but includes a header row.

longraggedheader style sample image

longraggedheaderborder 🔗

The longraggedheaderborder style is like the longragged style, but includes a header row and vertical and horizontal rules. Note that the longragged-booktabs style is preferable.

longraggedheaderborder style sample image

longragged3col 🔗

The longragged3col style is similar the long3col style, but in this style, the longtable environment is begun with:
\begin{longtable}{l>{\raggedright}p{\glsdescwidth}%
       >{\raggedright}p{\glspagelistwidth}}
As with the long3col style, an extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. Again the symbol isn’t displayed. Note that this style doesn’t use the post description hook so the nopostdot setting has no effect.

longragged3col style sample image

longragged3colborder 🔗

The longragged3colborder style is like the longragged3col style, but includes vertical and horizontal rules.

longragged3colborder style sample image

longragged3colheader 🔗

The longragged3colheader style is like the longragged3col style, but includes a header row.

longragged3colheader style sample image

longragged3colheaderborder 🔗

The longragged3colheaderborder style is like the longragged3col style, but includes a header row and vertical and horizontal rules. Note that the longragged3col-booktabs style is preferable.

longragged3colheaderborder style sample image

altlongragged4col 🔗

The altlongragged4col style is similar the altlong4col style, but in this style, the longtable environment is begun with:
\begin{longtable}{l>{\raggedright}p{\glsdescwidth}l%
       >{\raggedright}p{\glspagelistwidth}}
As with the altlong4col style, an extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. Note that this style does use the post description hook, so the nopostdot setting has no effect.

altlongragged4col style sample image

altlongragged4colborder 🔗

The altlongragged4colborder style is like the altlongragged4col style, but includes vertical and horizontal rules.

altlongragged4colborder style sample image

altlongragged4colheader 🔗

The altlongragged4colheader style is like the altlongragged4col style, but includes a header row.

altlongragged4colheader style sample image

altlongragged4colheaderborder 🔗

The altlongragged4colheaderborder style is like the altlongragged4col style, but includes a header row and vertical and horizontal rules. Note that the altlongragged4col-booktabs style is preferable.

altlongragged4colheaderborder style sample image

glossary-longbooktabs

The glossary-longbooktabs style needs to be loaded explicitly, if required, using
\usepackage{glossary-longbooktabs}
This package automatically loads the booktabs package as well as the glossary-long and glossary-longragged packages. The glossary-longbooktabs package applies a patch to the longtable environment when any of the booktabs glossary styles are set. If the style setting is localised (for example, through the style key in \printglossary), then the patch is also localised. Most of the examples below all use the example-glossaries-symbols.tex test file, which has entries defined with an associated symbol.

If you are using glossaries-extra.sty, the longextra styles can be used to provide more flexibility.

long-booktabs 🔗

The long-booktabs style is similar the long style, but there is also a header row, and the horizontal rules \toprule, \midrule and \bottomrule provided by the booktabs package are used. As with the long style, an extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. Note that the symbol isn’t displayed with this style.

long-booktabs style sample image

long3col-booktabs 🔗

The long3col-booktabs style is similar the long3col style, but there is also a header row, and the horizontal rules \toprule, \midrule and \bottomrule provided by the booktabs package are used. As with the long3col style, an extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. Note that the symbol isn’t displayed with this style nor is the post description hook used.

long3col-booktabs style sample image

long4col-booktabs 🔗

The long4col-booktabs style is similar the long4col style, but there is also a header row, and the horizontal rules \toprule, \midrule and \bottomrule provided by the booktabs package are used. As with the long4col style, an extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. The test file example-glossaries-symbols.tex can’t be used with this example as some of the descriptions are too long, so the example-glossaries-brief.tex file has been used instead. Since none of the entries in that file have symbols, the third column is empty (except for the header). The post description hook isn’t used by this style.

long4col-booktabs style sample image

altlong4col-booktabs 🔗

The altlong4col-booktabs style is similar the altlong4col style, but there is also a header row, and the horizontal rules \toprule, \midrule and \bottomrule provided by the booktabs package are used. As with the altlong4col style, an extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. The post description hook isn’t used by this style.

altlong4col-booktabs style sample image

longragged-booktabs 🔗

The longragged-booktabs style is similar the longragged style, but there is also a header row, and the horizontal rules \toprule, \midrule and \bottomrule provided by the booktabs package are used. As with the longragged style, an extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. Note that the symbol isn’t displayed with this style.

longragged-booktabs style sample image

longragged3col-booktabs 🔗

The longragged3col-booktabs style is similar the longragged3col style, but there is also a header row, and the horizontal rules \toprule, \midrule and \bottomrule provided by the booktabs package are used. As with the longragged3col style, an extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. Note that the symbol isn’t displayed with this style nor is the post description hook used.

If you are using glossaries-extra you may want to consider the long-name-desc-loc style instead.

longragged3col-booktabs style sample image

altlongragged4col-booktabs 🔗

The altlongragged4col-booktabs style is similar the altlongragged4col style, but there is also a header row, and the horizontal rules \toprule, \midrule and \bottomrule provided by the booktabs package are used. As with the altlongragged4col style, an extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. This style doesn’t use the post description hook.

If you are using glossaries-extra you may want to consider the long-name-desc-sym-loc style instead.

altlongragged4col-booktabs style sample image

glossary-super

The glossary-super package is automatically loaded by the glossaries package, unless explicitly excluded using the package option nosuper or nostyles. The super styles use the supertabular environment, so the glossary-super package automatically loads the supertabular package.

Take care not to confuse these table styles with the mcols styles.

These styles are all analogous to the long styles.

super 🔗

The super style starts the supertabular environment with:
\tablehead{}\tabletail{}%
\begin{supertabular}{lp{\glsdescwidth}}
The first column (left-aligned) is used for the entry name and the second column (a paragraph column whose width is given by \glsdescwidth) is used for the description and location list. The symbol field is ignored. Note that, unlike the long style, the glossary isn’t centred. The alignment can be changed by redefining the theglossary environment after the super style has been set. For example:
\setglossarystyle{super}
  \renewenvironment{theglossary}%
    {\centering\tablehead{}\tabletail{}%
     \begin{supertabular}{lp{\glsdescwidth}}}%
    {\end{supertabular}}%

super style sample image

This style omits the name for sub-entries and is unsuitable for deeper than one-level sub-entries. The sample below uses the example-glossaries-childnoname.tex file with the subentrycounter option set, which automatically numbers the sub-entries. Note that this example has problematic page breaks. The long style performs much better.

super style homograph sample image

superborder 🔗

The superborder style is like the super style, but includes vertical and horizontal rules.

superborder style sample image

superheader 🔗

The superheader style is like the super style, but includes a header row.

superheader style sample image

superheaderborder 🔗

The superheaderborder style is like a combination of the superheader and superborder styles.

superheaderborder style sample image

super3col 🔗

The super3col style is like the super style, but has three columns instead of two. In this style, the supertabular environment is begun using:
\tablehead{}\tabletail{}%
\begin{supertabular}{lp{\glsdescwidth}p{\glspagelistwidth}}
The first column contains the name field, the second column contains the description and the third column contains the location list. Note that, as with the super style, the symbol isn’t displayed. Also, this style doesn’t use the post description hook, so the nopostdot option is ignored. A vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically.

super3col style sample image

This style omits the name for sub-entries and is unsuitable for deeper than one-level sub-entries. The sample below uses the example-glossaries-childnoname.tex file with the subentrycounter option set, which automatically numbers the sub-entries. Note that this example has problematic page breaks. The long3col style performs much better.

super3col style homograph sample image

super3colborder 🔗

The super3colborder style is like the superborder style, but with three columns.

super3colborder style sample image

super3colheader 🔗

The super3colheader style is like the superheader style, but with three columns.

super3colheader style sample image

super3colheaderborder 🔗

The super3colheaderborder style is like the superheaderborder style, but with three columns.

super3colheaderborder style sample image

super4col 🔗

The super4col style is similar the super style, but has four columns instead of two. In this style, the supertabular environment is begun with:
\tablehead{}\tabletail{}%
\begin{supertabular}{llll}
The first column contains the name field, the second column contains the description, the third column contains the symbol, and the final column contains the location list. Note that that all four columns are specified using l which means that no line-breaking is permitted. Therefore this style is only suitable for entries with brief descriptions and an accompanying symbol. A vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. This style doesn’t use the post description hook so the nopostdot option has no effect.

Note that the test file loads example-glossaries-brief.tex, which doesn’t provide symbols for any of the dummy entries, so the symbol column is blank in the sample below. (The example-glossaries-symbols.tex test file has descriptions that are too long for this style.)

super4colstyle sample image

This style omits the name for sub-entries and is unsuitable for deeper than one-level sub-entries. The sample below uses the example-glossaries-childnoname.tex file with the subentrycounter option set, which automatically numbers the sub-entries.

super4col style homograph sample image

super4colborder 🔗

The super4colborder style is like the super4col style, but includes vertical and horizontal rules. The empty symbol column is more noticeable with this style.

super4colborder style sample image

super4colheader 🔗

The super4colheader style is like the super4col style, but includes a header row.

super4colheader style sample image

super4colheaderborder 🔗

The super4colheaderborder style is like the super4col style, but includes a header row and rules.

super4colheaderborder style sample image

altsuper4col 🔗

The altsuper4col style is similar the super4col style, but in this style, the supertabular environment is begun with:
\tablehead{}\tabletail{}%
\begin{supertabular}{lp{\glsdescwidth}lp{\glspagelistwidth}}
This means that multi-lined descriptions and super location lists may be present. Note that this style doesn’t use the post description hook, so the nopostdot setting has no effect.

To illustrate the way this style displays symbols, the test file can be modified to use example-glossaries-symbols.tex instead of example-glossaries-brief.tex. A vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically.

altsuper4col style sample image

This style omits the name for sub-entries and is unsuitable for deeper than one-level sub-entries. The sample below uses the example-glossaries-childnoname.tex file with the subentrycounter option set, which automatically numbers the sub-entries. Note that this example has problematic page breaks. The altlong4col style performs much better.

altsuper4col style homograph sample image

altsuper4colborder 🔗

The altsuper4colborder style is like the altsuper4col style, but includes vertical and horizontal rules.

altsuper4colborder style sample image

altsuper4colheader 🔗

The altsuper4colheader style is like the altsuper4col style, but includes a header row.

altsuper4colheader style sample image

altsuper4colheaderborder 🔗

The altsuper4colheaderborder style is like the altsuper4col style, but includes a header row and vertical and horizontal rules.

altsuper4colheaderborder style sample image

glossary-superragged

The glossary-superragged package is not automatically loaded by the glossaries package, so you need to use
\usepackage{glossary-superragged}
The glossary-superragged package will automatically load the supertabular and array packages. The styles provided in this package are analogous to the styles in the glossary-super package that define paragraph columns. The corresponding styles in this package use \raggedright to make the paragraph columns have ragged-right formatting. With narrow columns, this can look better than forcing normal paragraph justification. Note that there are no equivalent styles to the styles in the glossary-super package that don’t have paragraph columns (such as the super4col style).

superragged 🔗

The superragged style is similar the super style, but in this style, the supertabular environment is begun with:
\tablehead{}\tabletail{}%
\begin{supertabular}{l>{\raggedright}p{\glsdescwidth}}
As with the super style, an extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. With brief one-line descriptions, this appears the same as the super style, so the sample images here use the example-glossaries-symbol.tex test file (which have longer descriptions than the brief dummy entries) with the nopostdot package option. Note that the symbol isn’t displayed with this style.

superragged style sample image

superraggedborder 🔗

The superraggedborder style is like the superragged style, but includes vertical and horizontal rules.

superraggedborder style sample image

superraggedheader 🔗

The superraggedheader style is like the superragged style, but includes vertical and horizontal rules.

superraggedheader style sample image

superraggedheaderborder 🔗

The superraggedheaderborder style is like the superragged style, but includes a header row and vertical and horizontal rules.

superraggedheaderborder style sample image

superragged3col 🔗

The superragged3col style is similar the super3col style, but in this style, the supertable environment is begun with:
\tablehead{}\tabletail{}%
\begin{supertabular}{l>{\raggedright}p{\glsdescwidth}%
>{\raggedright}p{\glspagelistwidth}}
As with the super3col style, an extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. Again the symbol isn’t displayed. Note that this style doesn’t use the post description hook so the nopostdot setting has no effect.

superragged3col style sample image

superragged3colborder 🔗

The superragged3colborder style is like the superragged3col style, but includes vertical and horizontal rules.

superragged3colborder style sample image

superragged3colheader 🔗

The superragged3colheader style is like the superragged3col style, but includes a header row.

superragged3colheader style sample image

superragged3colheaderborder 🔗

The superragged3colheaderborder style is like the superragged3col style, but includes a header row and vertical and horizontal rules.

superragged3colheaderborder style sample image

altsuperragged4col 🔗

The altsuperragged4col style is similar the altsuper4col style, but in this style, the supertabular environment is begun with:
\tablehead{}\tabletail{}%
\begin{supertabular}{l>{\raggedright}p{\glsdescwidth}l%
>{\raggedright}p{\glspagelistwidth}}
As with the altsuper4col style, an extra vertical gap is inserted between letter groups, so use the nogroupskip option if your entries haven’t been sorted alphabetically. Note that this style doesn’t use the post description hook, so the nopostdot setting has no effect.

altsuperragged4col style sample image

altsuperragged4colborder 🔗

The altsuperragged4colborder style is like the altsuperragged4col style, but includes vertical and horizontal rules.

altsuperragged4colborder style sample image

altsuperragged4colheader 🔗

The altsuperragged4colheader style is like the altsuperragged4col style, but includes a header row.

altsuperragged4colheader style sample image

altsuperragged4colheaderborder 🔗

The altsuperragged4colheaderborder style is like the altsuperragged4col style, but includes a header row and vertical and horizontal rules.

altsuperragged4colheaderborder style sample image

glossary-bookindex

The glossary-bookindex package is provided with the glossaries-extra extension package. It needs to be explicitly loaded either with:
\usepackage{glossary-bookindex}
or with the stylemods package option:
\usepackage[stylemods=bookindex]{glossaries-extra}
This package only provides one style, which is based on the index style, so this package automatically loads the glossary-tree package. The multicol package is also loaded to provide multiple columns, but the glossary-mcols package isn’t loaded as the provided style is more complex than the mcol styles and is not based on any of them.

bookindex 🔗

The bookindex style is designed for indexes rather than glossaries, so it only displays the name and location list by default. It’s designed for use with bib2gls (with the --group switch). It may also be used with the other indexing methods, but some features won’t be available. In particular, you may have problems with UTF-8 support with this style if you don’t use it with bib2gls (unless you use XeLaTeX or LuaLaTeX).

There are a number of hooks that can be used to adjust the style. You can also use the post-name hook, but you can’t use the post-description hook as the description isn’t shown. The default number of columns is 2, but this may be changed by redefining \glsxtrbookindexcols. Each letter group is headed by default and, if hyperref has been loaded, the letter group will also be added to the PDF bookmarks.

The following glossary was created with the test file used to generate the documents in the above examples, which uses makeindex rather than bib2gls:

bookindex style with makeglossaries sample image

The test entries are all ASCII, so in this case there are no problems caused by extended characters in the letter group headings. The PDF bookmarks (as displayed in Okular) are shown below:

image of PDF bookmarks

The location lists in the above document all simply contain “1” because each entry was indexed on page one by the command \glsaddall, which iterates over all the defined entries and performs \glsadd for each one. This just indexes without producing any text. Although this is useful in the test document to show where the location appears, the locations aren’t usually desired when using \glsaddall as it’s not helpful to the reader to have the same page appearing in every location list.

These types of iterative commands aren’t available with bib2gls as they require all the entries to be defined first. However, with bib2gls, the required entries aren’t defined on the first LaTeX run so the iterative commands have nothing to loop over. Instead, bib2gls can be instructed to select all entries defined in the designated .bib file with the selection option:

\GlsXtrLoadResources[
   selection=all, % select all entries in the given .bib file(s)
   src={entries1,entries2}% data given in entries1.bib and entries2.bib
]
In real documents, this is better than \glsaddall as it doesn’t automatically add an unnecessary location. This means that the closest matching test file (test-styles-bib2gls.tex) to the above doesn’t show any locations:
bookindex style with bib2gls sample image

If I add the following line to the test file’s document environment:

\Gls{lorem} and \gls{ac}.
then the difference in the style can now be observed:
bookindex style with bib2gls sample image containing two locations

Another way of demonstrating the position of the locations is to fake a location for each entry with:

\forglsentries{\thisentry}{%
 \GlsXtrSetField{\thisentry}{location}{\glsnoidxdisplayloc{}{page}{glsnumberformat}{1}}%
}
(This is used for the longextra samples shown later.)

With the standard \makeglossaries method, there is simply a space between the name and the location, but with bib2gls a comma is inserted if the location list is non-empty. If you are using bib2gls and don’t want any locations visible, then use the resource option save-locations=false rather than the package option nonumberlist.

The name is displayed using \glsxtrbookindexname{label}, which is simply defined as:

\newcommand*{\glsxtrbookindexname}[1]{\glossentryname{#1}}
You can redefine this to show the description as well, if required. For example:
\renewcommand*{\glsxtrbookindexname}[1]{%
 \glossentryname{#1} (\glsentrydesc{#1})%
}

To test if the entry has a description and to allow for the post-description hook and description-related category attributes, you can instead use:

\renewcommand*{\glsxtrbookindexname}[1]{%
 \glossentryname{#1}%
 \ifglshasdesc{#1}{ (\glossentrydesc{#1}\glspostdescription)}{}%
}
(This will also provide accessibility support, if enabled.)

bookindex style with bib2gls sample image showing descriptions

You can add other fields in a similar manner. Alternatively, you can use the post-name hook to make minor adjustments according to the entry’s category.

A more comprehensive view of the bookindex style can be obtained with the testidx-glossaries package (provided with testidx). The test file now implicitly loads glossaries-extra with the record option, so

\usepackage[bib2gls]{testidx-glossaries}
internally does:
\usepackage[record]{glossaries-extra}
The bookindex style is then loaded and set using:
\usepackage{glossary-bookindex}
\setglossarystyle{bookindex}
The testidx-glossaries package provides \tstidxmakegloss[options] which implements \makeglossaries or \makenoidxglossaries or a series of \GlsXtrLoadResources instructions, depending on the package setup. In this case, the document is setup to use bib2gls, so this command uses \GlsXtrLoadResources. The optional argument is applied to the final \GlsXtrLoadResources instance. For example, you can change the sort method for the alphabetical entries using:
\tstidxmakegloss[sort=sv]
(You can find the actual \GlsXtrLoadResources commands in the .log file if you use testidx-glossaries’s verbose package option.)

The dummy text (which includes commands like \gls) is generated with \testidx and the glossary is displayed with: \tstidxprintglossary[title=Index] which, in this case, does \printunsrtglossary[title=Index]

Since this page is about the way the glossary is displayed (the style) rather than how the glossary is sorted and collated, the testidx commands aren’t particularly important.

This example uses the fancyhdr package to display the first and last word in the page footer. The page style is switched on with:

\fancypagestyle{plain}{%
  \fancyhead{}%
  \lfoot{\glsxtrbookindexfirstmark}%
  \cfoot{\thepage}%
  \rfoot{\glsxtrbookindexlastmark}%
}%
\pagestyle{fancy}%
\lhead{\thepage}%
\lfoot{\glsxtrbookindexfirstmark}%
\cfoot{}%
\rfoot{\glsxtrbookindexlastmark}%

(See the fancyhdr documentation for more information about the page style commands.) The two commands provided by the glossary-bookindex package used in the page style are \glsxtrbookindexfirstmark (which displays the first marked word for that page) and \glsxtrbookindexlastmark (which displays the last marked word for that page).

The top-level entries need to have the name added to the list of page marks (for access with the two commands described above):

\renewcommand{\glsxtrbookindexname}[1]{%
  \glsxtrbookindexmarkentry{#1}%
  \glossentryname{#1}%
}
The sub-entries are omitted from the page marks:
\renewcommand{\glsxtrbookindexsubname}[1]{%
  \glossentryname{#1}%
}

These adjustments to the style require an extra LaTeX run, so the complete document build is:

pdflatex test-bookindex
bib2gls --group test-bookindex
pdflatex test-bookindex
pdflatex test-bookindex

The locations are in different colours to test the location encapsulator mechanism (the format key used in the optional argument of commands like \gls) and are not relevant to the style.

bookindex style with bib2gls sample image with first and last words in footer
(Download test-bookindex.tex.)

If you want to include descriptions in the style, you need to instruct the testidx-glossaries package to provide descriptions for the dummy entries with the desc option:

\usepackage[desc,bib2gls]{testidx-glossaries}

The name hook can be modified to include the description, as in the earlier example:

\renewcommand{\glsxtrbookindexname}[1]{%
  \glsxtrbookindexmarkentry{#1}%
  \glossentryname{#1}%
  \ifglshasdesc{#1}{: \glsentrydesc{#1}}{}%
}

If the sub-entries also need descriptions, then add similar code to \glsxtrbookindexsubname.

bookindex style with bib2gls sample image with descriptions showing and the first and last words in footer

The indentation is governed by \glstreeitem (defined in glossary-tree.sty) and is also used by the index style. You can alter the indentation by redefining this command. For example:

\renewcommand{\glstreeitem}{\par\hangindent 20pt\relax}

glossary-longextra

The glossary-longextra package is provided with the glossaries-extra extension package. It needs to be explicitly loaded either with:
\usepackage{glossary-longextra}
or with the stylemods package option:
\usepackage[stylemods=longextra]{glossaries-extra}
This package automatically loads the glossary-longbooktabs package.

The styles in this package use longtable by default. If you have a single-paged glossary and you’d rather use tabular then you can switch with \GlsLongExtraUseTabulartrue before you set the style. If you switch, you can change the default vertical alignment for the tabular environment by redefining \glslongextraTabularVAlign.

There are four types of columns that may be displayed by these styles: name, description, symbol and location. The style name indicates which columns are shown by that style and their order. For example, long-name-desc has just two columns: name and description (no symbol or location list).

The column alignments are given by the commands: \glslongextraNameAlign (defaults to l), \glslongextraDescAlign (defaults to >{\raggedright}p{\glsdescwidth}), \glslongextraSymbolAlign (defaults to c), and \glslongextraLocationAlign (defaults to >{\raggedright}p{\glspagelistwidth}). These may be redefined as required.

Unlike the base long styles, these styles have hooks to calculate the value of \glsdescwidth (the width of the description column). To take advantage of these hooks, it’s necessary to provide the widest entry name. This can simply be done with the set-widest resource option when using bib2gls. Alternatively, you can use \glslongextraSetWidest{text}, where text is the widest name. If you don’t do this, the table may end up too wide or too narrow.

The column headers are encapsulated with \glslongextraHeaderFmt, which just uses \textbf by default to give bold headers. As with the base long styles, the header text is given by: \entryname (for the name column), \descriptionname (for the description column), \symbolname (for the symbol column) and \pagelistname (for the location list column).

Unlike the other long styles provided with just the base glossaries package, these styles have a hook to format the group headings, but it does nothing by default. It’s defined as:

\newcommand{\glslongextraGroupHeading}[2]{}
The first argument is the number of columns provided by the style and the second is the group label (not title). The following simply adds the group header to the first column, without checking how many columns are available:
\renewcommand*{\glslongextraGroupHeading}[2]{%
  \glsxtrgetgrouptitle{#2}{\thisgrptitle}%
  \glslongextraHeaderFmt\thisgrptitle
  \tabularnewline*\noalign{\vskip\normalbaselineskip}%
}
Note that this uses \glsxtrgetgrouptitle to fetch the group title from the supplied label. The title is stored in my custom \thisgrptitle command, which I then format in the same way as the column headers. This doesn’t span the columns so be careful of long group titles, as they can interfere with the column width.

There are commands that govern the way the name, description, symbol and location are displayed. The name is formatted with \glslongextraNameFmt{label}. There’s a bug in version 1.37 that’s been corrected in v1.38. The correct definition is:

\newcommand{\glslongextraNameFmt}[1]{%
 \glsentryitem{#1}\glstarget{#1}{\glossentryname{#1}}%
}
This picks up the entrycounter package option (if given), sets the hypertarget (if hyperlinks are supported), checks the glossname and glossnamefont attributes, includes accessibility support (if enabled), and applies the post-name hook (if set).

The description is formatted with \glslongextraDescFmt{label} which is defined as:

\newcommand{\glslongextraDescFmt}[1]{%
  \glossentrydesc{#1}\glspostdescription
}
This checks the glossdesc and glossdescfont attributes, includes accessibility support (if enabled), and applies the post-description hook.

The symbol is formatted with \glslongextraSymbolFmt{label} which is defined as:

\newcommand{\glslongextraSymbolFmt}[1]{\glossentrysymbol{#1}}
This includes accessibility support (if enabled).

The location is formatted with \glslongextraLocationFmt{label}{location list} which is defined as:

\newcommand{\glslongextraLocationFmt}[2]{#2}
The location list supplied in the second argument may include a prefix, suffix or cross-reference list, depending on the document settings.

As with the base long styles, child entries are assumed to be homographs. The helper commands can be redefined to change this, but the tabular style will mask the hierarchical structure.

The name column for child entries is formatted with \glslongextraSubNameFmt{level}{label} but this just does the sub-entry counter (if enabled) and the hypertarget (if supported):

\newcommand{\glslongextraSubNameFmt}[2]{%
 \glssubentryitem{#2}\glstarget{#2}{\strut}%
}

The description column for child entries is formatted with \glslongextraSubDescFmt{level}{label} which defaults to the same as the top-level:

\newcommand{\glslongextraSubDescFmt}[2]{%
  \glslongextraDescFmt{#2}%
}
Similarly for the child symbols:
\newcommand{\glslongextraSubSymbolFmt}[2]{%
  \glslongextraSymbolFmt{#2}%
}

The location for child entries is formatted with \glslongextraSubLocationFmt{level}{label}{location list} which is defined as:

\newcommand{\glslongextraSubLocationFmt}[3]{#3}

long-name-desc 🔗

The long-name-desc style just has two columns: the name in the first column and the description in the second column. Neither the symbol nor the location list is displayed. I’ve used the example-glossaries-brief.bib example file for the sample document shown below.

long-name-desc style sample image

If the following code is added, then the group headings appear. If you are using bib2gls remember that you will need the --group (or -g) switch.

\renewcommand*{\glslongextraGroupHeading}[2]{%
  \glsxtrgetgrouptitle{#2}{\thisgrptitle}%
  \glslongextraHeaderFmt\thisgrptitle
  \tabularnewline*\noalign{\vskip\normalbaselineskip}%
}

long-name-desc style with group titles sample image

The following example has the subentrycounter package option and uses the example-glossaries-childnoname.bib sample file. Note that all child entries are treated the same way, regardless of their hierarchical level.

long-name-desc style with homograph child entries sample image

I haven’t used the set-widest resource option in any of the above, but the default setting produces a fairly reasonable width. In the next example below, I’ve included the geometry package with the showframe option to show the table in relation to the available text area:

\usepackage[a4paper,showframe]{geometry}
This demonstrates that the table is actually slightly too wide for the page:

long-name-desc style with page frame displayed sample image

If I add the set-widest option to \GlsXtrLoadResources then the result shows a better fit:

long-name-desc style with set-widest displayed sample image

long-name-desc-loc 🔗

The long-name-desc-loc style has three columns: the name in the first column, the description in the second column and the location list in the third column. The symbol isn’t displayed.

long-name-desc-loc style sample image

long-desc-name 🔗

The long-desc-name style just has two columns: the description in the first column and the name in the second column. Neither the symbol nor the location list is displayed.

long-desc-name style sample image

long-loc-desc-name 🔗

The long-loc-desc-name style has three columns: the location list in the first column, the description in the second column and the name in the third column. The symbol isn’t displayed.

long-loc-desc-name style sample image

long-name-desc-sym 🔗

The long-name-desc-sym style has three columns: the name in the first column, the description in the second column and the symbol in the third column. The location list isn’t displayed. I’ve used the example-glossaries-symbols.bib example file for the sample document shown below.

long-name-desc-sym style sample image

long-name-desc-sym-loc 🔗

The long-name-desc-sym-loc style has four columns: the name in the first column, the description in the second column, the symbol in the third column and the location list in the fourth column.

long-name-desc-sym-loc style sample image

long-name-sym-desc 🔗

The long-name-sym-desc style has three columns: the name in the first column, the symbol in the second column and the description in the third column. The location list isn’t displayed.

long-name-sym-desc style sample image

long-name-sym-desc-loc 🔗

The long-name-sym-desc-loc style has four columns: the name in the first column, the symbol in the second column, the description in the third column and the location list in the fourth column.

long-name-sym-desc-loc style sample image

long-sym-desc-name 🔗

The long-sym-desc-name style has three columns: the symbol in the first column, the description in the second column and the name in the third column. The location list isn’t displayed.

long-sym-desc-name style sample image

long-loc-sym-desc-name 🔗

The long-loc-sym-desc-name style has four columns: the location list in the first column, the symbol in the second column, the description in the third column and the name in the fourth column.

long-loc-sym-desc-name style sample image

long-desc-sym-name 🔗

The long-desc-sym-name style just has three columns: the description in the first column, the symbol in the second column and the name in the third column. The location list isn’t displayed.

long-desc-sym-name style sample image

long-loc-desc-sym-name 🔗

The long-loc-desc-sym-name style has four columns: the location list in the first column, the description in the second column, the symbol in the third column and the name in the fourth column.

long-loc-desc-sym-name style sample image

glossary-topic

The glossary-topic package is provided with the glossaries-extra extension package. (New to version 1.40.) It needs to be explicitly loaded either with:
\usepackage{glossary-topic}
or with the stylemods package option:
\usepackage[stylemods=topic]{glossaries-extra}

If you want to use this package with the set-widest resource option in bib2gls you will also need the glossary-tree package:

\usepackage[stylemods={tree,topic}]{glossaries-extra}

This package provides styles designed for glossaries that are lists of topics. That is, the top-level entries are considered topic titles (which may or may not have an associated symbol or description) and the sub-entries are items within that topic. By default the number list isn’t shown for the top-level entries but is shown after the description for sub-entries (unless suppressed with nonumberlist or save-locations=false).

The glossary-topic package automatically loads the multicol package.

topic 🔗

The topic style displays the name with the first letter converted to upper case in a large, bold font (\glstopicTitleFont). This includes the symbol in parentheses if supplied. A paragraph break follows.

There’s a hook \glstopicMarker before the name, which does nothing by default, but can be redefined to add the topic to the PDF bookmarks or the table of contents. For example:

\renewcommand*{\glstopicMarker}[1]{%
 \pdfbookmark[1]{topic.#1}{\glsentryname{#1}}}

If the description is set, this is shown with the first letter converted to upper case and is followed by the post-description hook.

The sub-entries are indented from the second level onwards in a similar manner to the tree style. If you want an effect like the alttree style then you need to load the glossary-tree package to provide \glssetwidest.

There are no letter group separators with this style by default so the nogroupskip option has no effect. If you want letter groups as well, you can redefine \glstopicGroupHeading. For example:

\renewcommand*{\glstopicGroupHeading}[1]{%
  \glsxtrgetgrouptitle{#1}{\thisgrptitle}%
  \section*{\thisgrptitle}%
}

The example below was created with:

\usepackage
 [
   record,% using bib2gls
   stylemods={topic},% load glossary-topic.sty
   postdot% add post-description dot
 ]
 {glossaries-extra}
and uses the hierarchical test set example-glossaries-parent.bib.

topic style sample image

Adding glossary-tree.sty and the set-widest option produces a different result:

topic style with set-widest sample image

topicmcols 🔗

The topicmcols style is very similar to the topic style but the child entries are placed inside a multicol environment. The default number of columns is 2. This can be changed by redefining \glstopicCols. If you prefer the starred form you can redefine \glstopicColsEnv:
\renewcommand*{\glstopicColsEnv}{multicols*}

As with the topic style, the formatting changes if the set-widest option is used. Example without set-widest:

topicmcols style sample image

Example with set-widest:

topicmcols style with set-widest sample image