Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
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 '13 at 21:36
    
It seems that moving also \RecordChanges before loading glossaries fixes the problem. –  egreg Oct 3 '13 at 21:54

1 Answer 1

up vote 3 down vote accepted

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. ;-)

share|improve this answer
1  
ooh an exercise for the reader, I mean, for the package writer. :) –  Paulo Cereda Oct 4 '13 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. –  Nicola Talbot Oct 4 '13 at 7:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.