1

Usually, I define some glossary entries fields (as name, text, symbol fields) by another glossary entry like below (the compressor_motor entry is define with the compressor entry):

\newglossaryentry{compressor_motor}
{
    name={\glsname{compressor} Motor},
    sort={compressor motor},
    text={\gls{compressor} motor},
    description={Motor of the \glsname{compressor}},
    symbol={\glssymbol{compressor}m},
    parent=compressor
}

I do that because I have a lot of entries depending to another entries and I don't want to change a lot of things if I just decide to change the word "compressor" by "compresseur" (in french for exemple). One of the reasons why I use LaTeX is precisely because I don't have to do this type of modification manually...

However, this way of "cross-defining" entries makes unsable the capitilized \gls like commands (as \Gls, \GLS, etc.) (I already ask a question for that here).

This problem made me wonder if my way of defining the entries was correct or acceptable with regard to the way the glossaries package is designed...

So, is my way of "cross-referencing" between glossary entries correct?

If not, then what is the correct way to do it, should I use another format to declare the entries (e.g. .bib and bib2gls engine) or something else?

In order to avoid misunderstandings, the capitalization problem is already addressed in the question cited above, I don't want to create a duplicate here. My question here is about "correct practice" or at least a better practice regarding defining glossary entries if one wants certain entries to be dependent on other glossary entries. I don't want a opinion based answer but I would simply like to know if I am missing a technique that would be unknown to me but obvious to others...

Here a MWE if needed:

\documentclass{article}
\usepackage[style=tree]{glossaries-extra}

\usepackage{verbatim}

\makenoidxglossaries

\newglossaryentry{subsytem}{name={Subssytems},description={\glspar},sort={1}}
\newglossaryentry{compressor} { name={Compressor}, text={compressor}, sort={compressor}, description={Air Compressor}, symbol={cp}, parent=subsytem } \newglossaryentry{ejector} { name={Ejector}, text={ejector}, sort={Ejector}, description={Air Ejector}, symbol={ej}, parent=subsytem }

\newglossaryentry{compressor_motor} { name={\glsname{compressor} Motor}, sort={compressor motor}, text={\gls{compressor} motor}, description={Motor of the \glsname{compressor}}, symbol={\glssymbol{compressor}m}, parent=compressor }

\newglossaryentry{compressor_ejector} { name={\glsname{compressor}~and \glsname{ejector}}, sort={compressor and ejector}, text={\gls{compressor}~and \gls{ejector}}, description={Air \glsname{compressor} and \glsname{ejector}}, symbol={\glssymbol{compressor}\glssymbol{ejector}}, parent=subsytem }

\begin{document}

\gls{compressor};
\gls{compressor_motor};
\gls{compressor_ejector};

\bigskip

\printnoidxglossary

\end{document}

zetyty
  • 779
  • 1
    Did you have a look at chapter 11 of the glossaries manual (and the resources referenced there)? – schtandard Jun 22 '22 at 13:09
  • @schtandard If I well understand the manual, the answer to my question is yes: my way of "cross-referencing" between glossary entries is correct, there is no more appropriate way of doing. Thank you very much for your comment, I discovered the see key which I will try a little I think. – zetyty Jun 24 '22 at 14:27
  • @schtandard Since this question has no real answer other than your comment, you could turn your comment into an answer if you want. – zetyty Dec 21 '22 at 21:57

0 Answers0