3

If I comment out \RecordChanges below it compiles and works, otherwise I get:

    Package glossaries Warning: No file defined for glossary `[' on input line 13.

! Extra \endcsname.
\@@do@wrglossary ...\csname glo@#1@type\endcsname 
                                                  ]{\string \glossaryentry {...
l.13 A \gls{sample} 
                    entry

Here is the minimum example:

\documentclass{article}
\usepackage[colorlinks]{hyperref}
\usepackage{doc}
\usepackage{glossaries}

\RecordChanges

\makeglossaries
\newglossaryentry{sample}{name={sample}, description={a sample entry}}

\begin{document}

A \gls{sample} entry

Plurals: \glspl{sample}.

\printglossaries

\end{document}
2
  • Welcome to TeX.SX! While the glossaries package states to be compatible with doc (provided it's loaded before glossaries, as you do), it seems that \RecordChanges confuses \@wrglossary.
    – egreg
    Oct 3, 2013 at 21:36
  • It seems that moving also \RecordChanges before loading glossaries fixes the problem.
    – egreg
    Oct 3, 2013 at 21:54

1 Answer 1

3

The command \RecordChanges is simply \makeglossary. But issuing it after loading glossaries puts the system into an unstable state.

So the correct method for making the two package go along together is not only loading doc before glossaries as stated in the documentation of the latter package, but also issue \RecordChanges before loading glossaries.

I'd also load hyperref after doc. So here's a working combination:

\documentclass{article}

\usepackage{doc}
\RecordChanges

\usepackage[colorlinks]{hyperref}

\usepackage{glossaries}

\makeglossaries
\newglossaryentry{sample}{name={sample}, description={a sample entry}}

\begin{document}

A \gls{sample} entry

Plurals: \glspl{sample}.

\printglossaries

\end{document}

Maybe glossaries could some other tricks to allow issuing \RecordChanges before or after loading it, but I'll leave this as an exercise for Nicola Talbot. ;-)

2
  • 1
    ooh an exercise for the reader, I mean, for the package writer. :) Oct 4, 2013 at 0:54
  • glossaries does a check for doc near the start of the package, so I could add in some code there to fix this. Oct 4, 2013 at 7:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .