0

How can I solve this? I have a duplicated definition on both lists:

enter image description here

enter image description here

This is what I've got in my packages.tex:

\usepackage[abbreviations,style=alttreegroup,record,nomain,symbols]{glossaries-extra}
\renewcommand\glstreegroupheaderfmt[1]{\begingroup\centering \textbf{#1}\par\endgroup}

\glsxtrsetgrouptitle{segundo}{Conjuntos} \glsxtrsetgrouptitle{tercero}{Indexación} \glsxtrsetgrouptitle{cuarto}{C'alculo} \glsxtrsetgrouptitle{quinto}{Probabilidad} \glsxtrsetgrouptitle{sexto}{Funciones} \glsxtrsetgrouptitle{sep}{Conjuntos de datos y distrubuciones}

\renewcommand{\glossarypreamble}{The following list describes various notations and symbols that will later be used within the body of the document, unless we redefine the notations based on context.}

And this is what I have in the main.tex file:

\glsfindwidesttoplevelname
\printunsrtglossary[type=symbols, title = List of Symbols   ]
\printunsrtglossary[type=abbreviations,title = List of Abbreviations]

MWE (credits to Leandriss)

\documentclass{report}

\usepackage[colorlinks]{hyperref} \usepackage[record,style=alttreegroup,nomain,symbols]{glossaries-extra}

\glsxtrnewsymbol[description={position}, group={first}]{x}{\ensuremath{x}} \glsxtrnewsymbol[description={velocity}, group={first}]{v}{\ensuremath{v}} \glsxtrnewsymbol[description={acceleration}, group={second}]{a}{\ensuremath{a}} \glsxtrnewsymbol[description={time}, group={second}]{t}{\ensuremath{t}} \glsxtrnewsymbol[description={force}, group={second}]{F}{\ensuremath{F}}

\renewcommand\glstreegroupheaderfmt[1]{\begingroup\centering \textbf{#1}\par\endgroup} \glsfindwidesttoplevelname \glsxtrsetgrouptitle{first}{Numbers and Arrays} \glsxtrsetgrouptitle{second}{Sets} \begin{document} \tableofcontents

\printunsrtglossaries

\chapter{Sample} Reference symbols: $\gls{x}$, $\gls{v}$, $\gls{a}$, $\gls{t}$, $\gls{F}$.

\end{document}

NaveganTeX
  • 2,630
  • How exactly did you create the screenhot you show and what kind of output do you expect instead? – leandriis Nov 15 '20 at 14:30
  • if doesn't make much sense to add a MWE which doesn't demonstrate your problem. – Ulrike Fischer Nov 15 '20 at 14:31
  • I have updated the OP! – NaveganTeX Nov 15 '20 at 14:37
  • Which of the two lists should contain the text you defined via \glossarypreamble? – leandriis Nov 15 '20 at 15:03
  • Probably you could use something like the following in your preamble: \setglossarypreamble[symbols]{The following list describes various notations and symbols that will later be used within the body of the document, unless we redefine the notations based on context.}. This should only show the glossarypreamble text in the list of symbols, but not in the list of abbreviations. – leandriis Nov 15 '20 at 15:04

1 Answers1

2

From the glossaries user manual:

Blockquote

Thus, if you only want your preamble text to be shown in the list of symbols only, you can use

\setglossarypreamble[symbols]{The following list describes various notations and symbols that will later be used within the body of the document, unless we redefine the notations based on context.}

instead of \renewcommand{\glossarypreamble}{The...}.

If you want a different, non-empty text for your list of abbreviations as well, add \setglossarypreamble[abbreviations]{...}.

leandriis
  • 62,593