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.

I am looking for a way I could make glossary to put a full name of acronym in the beginning of each chapter.

Here is my code sample:

\documentclass{book}

\usepackage{glossaries}
\makeglossaries

\newacronym{cd}{CD}{compact disk}

\begin{document}

\chapter{A}
\gls{cd} is a...
\chapter{B}
\gls{cd} is a...

\end{document}

It is compiled into:

Chapter 1

A

compact disk (CD) is a ...

Chapter 2

B

CD is a... //<- should be compact disk (CD)

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Use either \glsreset{cd} before the second \gls{cd} to reset it (there is also \glsresetall) or use \glsfirst{cd} to typeset it like it would be the first use. See the glossaries manual for all the details.

share|improve this answer
    
(+1) Nicely said. –  chl Jun 1 '11 at 15:59

Resetting all glossary entries at chapter starts may be automated by using the titlesec package and appending \glsresetall to the definition of \chapter.

EDIT: See section 9.2 of the titlesec manual on how to emulate the sectioning command definitions of the standard classes.

\documentclass{book}

\usepackage{glossaries}
\makeglossaries

\newacronym{cd}{CD}{compact disk}

\usepackage{titlesec}
\titleformat{\chapter}[display]
    {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}[\glsresetall]

\begin{document}

\chapter{A}
\gls{cd} is a...
\chapter{B}
\gls{cd} is a...

\end{document}
share|improve this answer

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.