0

I want to define several glossaries under one heading that should like the one of table of contents. I already switched of the heading generation of glossaries package. How can I manually set a heading in the style of table of contents? Desired output: Heading like "Tabellenverzeichnis" over glossary with symbols.

My (not so) minimal working example:

\documentclass{scrreprt}
\usepackage[utf8]{inputenc}

\title{example}
\author{hlorenz734 }
\date{August 2019}

\usepackage{natbib}
\usepackage{graphicx}
\usepackage{siunitx}

\usepackage[acronym,nomain,toc,automake]{glossaries-extra}
\setlength{\glsdescwidth}{0.9\textwidth}
\newglossary[slg]{symbolslistFU}{syi}{syg}{Verwendete Symbole für Furuta-Pendel} % create add. symbolslist
\renewcommand{\glossarysection}[2][]{} % no hjedaing sfor glossary
\glsaddkey{unit}{\glsentrytext{\glslabel}}{\glsentryunit}{\GLsentryunit}{\glsunit}{\Glsunit}{\GLSunit}
\makeglossaries                                   % activate glossaries-package

\newglossarystyle{symbunitlong}{%
    \setglossarystyle{long3col}% base this style on the list style
    \renewenvironment{theglossary}{% Change the table type --> 3 columns
        \begin{longtable}{lp{0.6\glsdescwidth}>{\centering\arraybackslash}p{2cm}}}%
        {\end{longtable}}%
    %
    \renewcommand*{\glossaryheader}{%  Change the table header
        \bfseries Symbol & \bfseries Beschreibung & \bfseries Einheit \\
        \hline
        \endhead}
    \renewcommand*{\glossentry}[2]{%  Change the displayed items
        \glstarget{##1}{\glossentryname{##1}} %
        & \glossentrydesc{##1}% Description
        & \glsunit{##1}  \tabularnewline
    }
}

\newglossaryentry{symbFU:thetai}{
name=$\theta_{\mathrm{i}}$,
description={Drehwinkel Arm i},
unit={\si{\radian}},
sort=thetai,
type=symbolslistFU
}

\newglossaryentry{symbFU:tau1}{
name=$\tau_{\mathrm{1}}$,
description={Drehmoment übertragen auf Arm 1},
unit={\si{\newton\meter}},
sort=tau1,
type=symbolslistFU
}

\begin{document}

\maketitle
\cleardoublepage
\tableofcontents %Table of contents

\cleardoublepage
\addcontentsline{toc}{chapter}{Tabellenverzeichnis} % Tabellenverzeichnis ins Inhaltsverzeichnis schreiben
\listoftables

%% Abkürzungs- und Symbolverzeichnis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cleardoublepage
\addcontentsline{toc}{chapter}{Notation und verwendete Symbole}
\glssetnoexpandfield{unit} % https://tex.stackexchange.com/questions/269565/glossaries-how-to-customize-list-of-symbols-with-additional-column-for-units



\glsaddall
\printglossary[type=\acronymtype,style=long]  % list of acronyms
\printglossary[type=symbolslistFU,style=symbunitlong]   % list of symbols
\cleardoublepage

\section{Introduction}
There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.
There is another theory which states that this has already happened.



\section{Conclusion}
``I always thought something was fundamentally wrong with the universe'' \citep{adams1995hitchhiker}

\bibliographystyle{plain}
\bibliography{references}
\end{document}
  • I don't understand your question. You want a heading for the glossary, yet you explicitly disable that heading in your example? Also, please make your example minimal! This helps you, because you may find the problem yourself, it helps us, because it is way easier to help you (which again helps you; it is no coincidence that no one looked at this until now), and it helps others with a similar problem who find this question, because they can quickly see if it is the same. – schtandard Aug 8 at 18:43
  • I disable the default heading for the glossary, because I want several glossaries but under one common heading. – hcl734 Aug 8 at 19:01
  • Well, then your example really should have illustrated that (there is only one glossary with entries there). Why not just add it yourself with \chapter*? Again, all of this would be much easier with an actual MWE. – schtandard Aug 8 at 19:11
  • Because I want it too look like the heading of e.g. list of figures. – hcl734 Aug 8 at 19:14
  • Well, did you try it? By default, those lists use \chapter* (at least in scrreprt). – schtandard Aug 8 at 19:16
0

In report-like classes like scrreprt elements like the table of contents, the list of figures or the glossary use \chapter* to typeset their respective titles. If you want to imitate that, just explicitly use \chapter*.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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