Latest news 2020-07-03: SmashWords sale (ends 31st July 2020): 50% off crime/SF novel The Private Enemy and 100% off (free!) I’ve Heard the Mermaid Sing.

glossaries package FAQ

Categories:

FAQ Search Tips

I get the message “Token not allowed in a PDF string (PDFDocEncoding)” 🔗

Example warning:

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `\Glsentrytext'
This is a warning from the hyperref package not an error. As mentioned in Using Glossary Terms Without Links, you can’t use non-expandable commands in PDF bookmarks. The command is ignored (hyperref tells you this in the “removing `\Glsentrytext'” part of the warning) so you end up with just the expandable part (the label) in the bookmark. Remember that, as stated in the user manual, the commands that convert the first letter to upper case are non-expandable and therefore can’t be used in the bookmarks. Use \texorpdfstring to provide alternative text for the bookmark or you can use hyperref’s \pdfstringdefDisableCommands to temporarily disable the command while the bookmark is written. (See the hyperref manual for further details.)

Note that the glossaries-extra package provides commands designed for use within chapter or section headings. (See the section New Commands Designed for Chapter/Section Headings in the user manual.) These commands use \texorpdfstring for the PDF bookmarks (but no case-changing will be applied for the PDF text).

Last modified: 2020-07-01 11:10:41.


Category: glossaries package
Topic: (La)TeX Errors