How can I forced the Symbol to be printed in capitalized form or full uppercase in the glossary print only (with non capitalized form declared in the field symbol
)?
The best solution for me would be to have like a new field symbolname
when declaring a new glossary entry, this field will be used by LaTeX for printing the symbol in the glossary print only. The symbol declared in the field symbol
will be used in the document text only. In other words, I would like to have – for symbol
field -, the same result given when I use the name
field and the text
field, which permits to dissociate the use in glossary print from the use in text…
Here a MWE,
\documentclass{article}
\usepackage[style=tree]{glossaries-extra}
\makenoidxglossaries
\newglossaryentry{subsytem}{name={Subssytems},description={\glspar},sort={4}}
\newglossaryentry{compressor}
{
name={Compressor},
text={compressor},
sort={compressor},
description={Air Compressor},
symbol={cp},
parent=subsytem
}
\newglossaryentry{compressor_motor}
{
name={Compressor Motor},
sort={compressor motor},
text={compressor motor},
description={Motor of the \Gls{compressor}},
symbol={cm},
parent=subsytem
}
\begin{document}
\gls{compressor_motor}
\gls{compressor}
\printnoidxglossary
\end{document}
Instead of this result :
I would like something like that ("Compressor (Cp)" instead of "Compressor (cp)" and "Compressor Motor (CM)" instead of "Compressor Motor (cm)") :
But again, I would like the symbol to be declared in lowercase in the symbol field (cp or cm) as shown in the non-working exemple below :
\newglossaryentry{subsytem}{name={Subssytems},description={\glspar},sort={4}}
\newglossaryentry{compressor}
{
name={Compressor},
text={compressor},
sort={compressor},
description={Air Compressor},
symbolname={Cp},%!!!!!!!!!!!!!!!!!!!!!!!!!
symbol={cp},
parent=subsytem
}
\newglossaryentry{compressor_motor}
{
name={Compressor Motor},
sort={compressor motor},
text={compressor motor},
description={Motor of the \Gls{compressor}},
symbolname={CM},%!!!!!!!!!!!!!!!!!!!!!!!!!!!!
symbol={cm},
parent=subsytem
}
\begin{document}
\gls{compressor_motor}
\gls{compressor}
\printnoidxglossary
\end{document}
Why I want lowercase in symbol
field?
Because I use the lowercase symbol form to declare other "math entries" like below the use of \glssymbol{compressor}
in the name
field:
\usepackage{amsmath,bm,times}
\newglossaryentry{PQ}{name={Physical Quantities},description={\glspar},sort={5}}
\newglossaryentry{Qcp}
{
name={$\mathbf{\bm{Q}}_{\glssymbol{compressor},out}$},
sort={Qcpout},
text={\Glssymbol{compressor} Air Outlet Mass Flow Rate},
description={Compressor Air Outlet Mass Flow Rate},
parent=PQ
}
With these "math entries" I want the symbol \glssymbol{compressor}
in lowercase. But when I use the symbol in the text document, sometimes I will use the \GLSsymbol
form or \Glssymbol
or \glssymbol
. But currently in my MWE the symbol is printed in lowercase in the glossary (off course) but I would prefer a Capitalized or uppercase form and it depends on me (it's a case by case choice). This is why I would prefer a solution with a new field (like symbolname
) in order to manually choose if I want to print the symbol in capitalisez form (Cp) or uppercase form (CM)…
Best Answer
UPDATE (2) after follow-up question.
There is now a new key-defined symbol name (
symbolname
) that will be used to print the glossary. You can use any other "symbol" you want, not just uppercase, as shown in this example.If
symbolname
is not defined it will be use thesymbol
value to print the glossary. (new) <<A new entry
compressor_valve
was added to show this default behavior.Check using beamer class
....