0

Normally, glossaries-extra is supposed to emphasize the first occurrence of a glossary entry in text. In my case it does not and I do not understand why.

The project is too large to share in its entirety, but I will try to post relevant lines of code.

%main.tex
\documentclass[fleqn,titlepage]{article}
\usepackage[a4paper, left=30mm,right=20mm,top=20mm,bottom=20mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{siunitx}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[style=numeric-comp,citestyle=numeric-comp,sorting=none]{biblatex}
\usepackage{csquotes}
\usepackage{graphicx}
\usepackage[acronym,symbols,nogroupskip,nonumberlist]{glossaries-extra}
\usepackage[]{hyperref}
\usepackage[nameinlink,noabbrev]{cleveref}
\usepackage{makecell}
\usepackage{array}

\RestoreAcronyms
% \glssetcategoryattribute{general}{textformat}{textit}
\loadglsentries[main]{glossaries/glo.tex}
\makenoidxglossaries




\begin{document}
    
    % BODY
    \include{content/theory}
    
    %GLOSSARIES
    \pagebreak
    \printnoidxglossary[sort=word,style=super]
    
    \pagebreak
    \printbibliography[heading=bibintoc,title={References}]

\end{document}
    
%glo.tex
%\newglossaryentry{linear inverse problem}{name=linear inverse problem,first={\emph{linear inverse problem}},
    description={}}
\newglossaryentry{linear inverse problem}{name=linear inverse problem,
    description={}}
%theory.tex
\section{Theoretical Framework}
    In this section the theoretical framework shall be laid out starting with the information theoretical fundamentals. First, the central \gls{linear inverse problem} is outlined, followed by the algorithm intended to solve it including the employed principles of machine learning. Finally the underlying physical model is introduced.

Uncommenting the \glssetcategoryattribute{general}{textformat}{textit} yields what you would expect: All occurances are emphasized. Without it the first one is not emphasized. \glsresetall{} does not do anything either. However, specifying any entry like this \newglossaryentry{linear inverse problem}{name=linear inverse problem,first={\emph{linear inverse problem}}, description={}} does emphasize the first occurrence.

Is this a bug?

2
  • That is correct, I have edited the question accordingly.
    – knods
    Aug 10, 2021 at 19:56
  • thanks......... Aug 10, 2021 at 19:56

1 Answer 1

1

I have fixed the issue using

\defglsentryfmt{%
  \ifglsused{\glslabel}{%
    \glsgenentryfmt%
  }{%
    % Typeset first use
    \emph{\glsgenentryfmt}%
  }%
}

in the preamble. I still do not know what caused it in the first place.

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.