1

I don't know why this is happening:

enter image description here

This is my setup:

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

\glsxtrnewsymbol[description={Calificación promedio de todos los usuarios y películas}]{r}{\ensuremath{\bar r}} \glsxtrnewsymbol[description={Sesgo del usuario $u$ en comparación con el promedio $\bar{r}$ }]{b_{u}}{\ensuremath{b_{u}}} \glsxtrnewsymbol[description={Sesgo de la película $i$ en comparación con el promedio $\bar{r}$}]{B_{i}}{\ensuremath{b_{i}}} \glsxtrnewsymbol[description={Calificación del usuario $u$ para la película $i$}]{r_{ui}}{\ensuremath{r_{ui}}} \glsxtrnewsymbol[description={Calificaci'on predicha del usuario $u$ para la película $i$ }]{r{ui}}{\ensuremath{\hat{r}_{ui}}}

On the thesis.tex main file I've got like this:

\printunsrtglossary[type=symbols, title = Lista de S\'imbolos]
\printunsrtglossary[type=abbreviations,title = Lista de Abreviaciones]

Could you tell me what is going on with my example?

MWE from Leandris

\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}

MAYBE style=alttreegroup is causing the problem?

enter image description here

NaveganTeX
  • 2,630
  • Did you also use \glsfindwidesttoplevelname in your actual document, just as I did in my example? This should solve your issue. – leandriis Nov 15 '20 at 14:02
  • It says unrecognized command – NaveganTeX Nov 15 '20 at 14:04
  • From your comments under my previous answer, I assume, the code in the end did compile for you. Is that correct? There I already used \glsfindwidesttoplevelnameas well. Could you please prepare a minimal working example (MWE) that shows exactly what you currently do? If I try to make such an example with the information you provided so far, I end up with a compiling document and the following output: https://i.stack.imgur.com/V0oxz.png – leandriis Nov 15 '20 at 14:08
  • Check mu updated post – NaveganTeX Nov 15 '20 at 14:09
  • The image you show does not show an error message from latex itself but a message from your IDE (presumably TeXStudio?) that for some reason does not know this particular command. What happens if you nevertheless compile your document? This message should not influence the output. See also: TeXStudio doesn't recognize some commands and How does TXS know about valid commands? – leandriis Nov 15 '20 at 14:11
  • When I compile it, it does not throws any error, but the symbols clash with their description. On the other hand, If I remove style=alttreegroup, everything works fine but the group names dissapear. – NaveganTeX Nov 15 '20 at 14:14
  • Now it worked. I just added \glsfindwidesttoplevelname in the thesis.tex file instead of the packages file :) – NaveganTeX Nov 15 '20 at 14:18
  • Publish your MWE and I'l mark it as solved! – NaveganTeX Nov 15 '20 at 14:19
  • Good to hear that you were able to solve the issue. Since I just had another look at the screenshot you included, I wanted to let you know that you can chose whatever text you want to identify the individual groups. So you don't have to use first, second,... in \glsxtrsetgrouptitle{first}. Probably I should have chosen a better placeholder initially. – leandriis Nov 15 '20 at 14:21

1 Answers1

2

Too long for a comment: The following MWE works perfectly fine for me:

\documentclass{report}

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

\glsxtrnewsymbol[description={Calificación promedio de todos los usuarios y películas}]{r}{\ensuremath{\bar r}} \glsxtrnewsymbol[description={Sesgo del usuario $u$ en comparación con el promedio $\bar{r}$ }]{b_{u}}{\ensuremath{b_{u}}} \glsxtrnewsymbol[description={Sesgo de la película $i$ en comparación con el promedio $\bar{r}$}]{B_{i}}{\ensuremath{b_{i}}} \glsxtrnewsymbol[description={Calificación del usuario $u$ para la película $i$}]{r_{ui}}{\ensuremath{r_{ui}}} \glsxtrnewsymbol[description={Calificaci'on predicha del usuario $u$ para la película $i$ }]{r{ui}}{\ensuremath{\hat{r}_{ui}}}

\glsfindwidesttoplevelname \renewcommand\glstreegroupheaderfmt[1]{\begingroup\centering \textbf{#1}\par\endgroup}

\begin{document}

\printunsrtglossary[type=symbols, title = Lista de S'imbolos] \printunsrtglossary[type=abbreviations,title = Lista de Abreviaciones]

\end{document}

leandriis
  • 62,593