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 added a heading for my glossary with \addcontentsline.

However the \printglossary command still creates an additional section heading.

How can this be removed?

Screenshot:

enter image description here

Code:

% Glossary
\addcontentsline{toc}{chapter}{Glossar}
\newpage
\printglossary[style=altlist]

% Acronyms
\addcontentsline{toc}{chapter}{Abkürzungsverzeichnis}
\deftranslation[to=German]{Acronyms}{Abkürzungsverzeichnis}
\newpage
\printglossary[type=\acronymtype,style=dontgroup]
share|improve this question
1  
It is possible to redefine \printglossary to make a chapter heading instead of \section. See, for example, the \setglossarysection{<name>} function or section=... key-value (p 33 of the glossaries documentation). Could you provide a minimal working example (MWE) rather than a code snippet? –  Werner Feb 13 '13 at 0:34
1  
\addcontentsline followed by \newpage is clearly wrong. Say \setglossarysection{chapter} and remove the \addcontentsline declarations. –  egreg Feb 13 '13 at 0:40
    
This has helped me! Thanks to egreg. Thanks also to the other proposals! \setglossarysection{chapter} \printglossary –  Benny Neugebauer Feb 13 '13 at 0:59
add comment

2 Answers

Your code example is far from being a MWE, but I guess you are using the glossaries package with the options toc and section within a book class. When loading this package with the toc option the entries in the ToC are generated, while the section option makes the glossaries as sections. Therefore, change the package loading to

\usepackage[acronym,toc]{glossaries}  % no section option

and print the glossaries without the \addcontentsline with

\cleardoublepage
\printglossary[style=altlist]
\deftranslation[to=German]{Acronyms}{Abkürzungsverzeichnis}
\cleardoublepage
\printglossary[type=\acronymtype,style=dontgroup]
share|improve this answer
1  
I think you missed a comma in the package option list. (acronym,toc) –  Nicola Talbot Jan 6 at 18:41
add comment

the previous answer is incorrect, at least in the glossaries version supplied with Ubuntu 13 there is no such option "acronymtoc" neitherstyle=dontgroup. This is also not documented in http://en.wikibooks.org/wiki/LaTeX/Glossary#Using_glossaries. You simply need to add "nonumberlist" option to usepackage.

\usepackage[nonumberlist]{glossaries}
share|improve this answer
add comment

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.