TeX - LaTeX Asked by elch on July 2, 2021
I’ve established a list of abbreviations and a glossary using the glossaries-extra
package. I noticed that the abbreviations and glossary are always part of the table of contents, no matter whether I set toc=true
or toc=false
. I dont’t want them there, or at least not the abbreviations section. The glossaries-extra documentation was no help here, and I haven’t found this problem through googling yet (though my google skills aren’t the best so I might have missed something). I’ve tried this with different latex programs (tex maker and overleaf), same result. Can anyone tell me what I’m doing wrong and how to fix this?
Here’s a MWE:
documentclass{article}
usepackage{biblatex}
usepackage[
toc=false,%aparently same result as toc=true
sort=none,
section,
numberedsection=autolabel,
abbreviations,
nogroupskip
]{glossaries-extra}
%%Abbreviations
setabbreviationstyle{long-short}%
newabbreviation{apa}{APA}{American Psychological Association}
newabbreviation{ex}{EX}{An Example}
%%
%%Glossary entries
newglossaryentry{glossary}
{
name=Glossary,
description={A collection of words with explanations}
}
newglossaryentry{psych}
{
name=Psychology,
description={The scientific study of mind and behavior}
}
%%
title{A title}
begin{document}
maketitle
tableofcontents
clearpage
printunsrtglossary[type=abbreviations]%List of Abbreviations
clearpage
section{Heading 1}
blabla
section{Heading 2}
blibli
appendix
printunsrtglossary[title=A Glossary]%Main Glossary
end{document}
It is an interaction with the numberedsection
option. When this selects a numbered section, it uses the section
command directly and bypasses the code that checks for the toc
option. And section
always adds to the table of contents. So removing numberedsection
or setting it to false solves it, and then it uses section*
plus the check for the toc
option. This gives the same output as Ulrikes renewcommand
.
Correct answer by Pieter van Oostrum on July 2, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP