I am trying to add a glossary to a document written with the amsbook class using gls2bib and glossaries-extra. Unfortunately, there seems to be a weird interaction between glossaries-extra and the table of contents in amsbook. I suspect that it has something to do with glossaries-extra attempting to rewrite the custom \markleft command defined by amsbook (see §5.1 of the glossaries-extra.sty v1.45 manual and §2.26 of the amsclass v2.20.6 manual).

Indeed, the following MWE compiles using amsart but not using amsbook:

  name={my entry},
% \documentclass{amsart}  % works
\documentclass{amsbook}   % does not work
% Compiles with amsbook if the following
% line is commented out:

\gls{a} is a glossary entry.


Here is the error produced by pdflatex glossary && bib2gls glossary && pdflatex glossary with the amsbook line uncommented:

(./glossary.aux) (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd)
(./glossary.toc) [1{/home/rak/.texlive2020/texmf-var/fonts/map/pdftex/updmap/pd
! Argument of \glsxtrifinmark has an extra }.
<inserted text>
l.22 \end

Adding \glsxtrRevertMarks right before \begin{document} gets the MWE to compile with amsbook, but the glossary then has two entries in the table of contents.

  • 1
    I had a similar problem with the glossary showing up twice in the TOC when using amsart. Adding importing glossaries-extra with toc = false removed exactly one of them (I don't know what's going on tho...:/).
    – Aaron Wild
    May 17, 2021 at 10:10


You must log in to answer this question.

Browse other questions tagged .