There are a lot of examples of how to change first letters to upper case using glossaries (Capitalize first letter of each word when printing list of acronyms, capitalisation and list of acronyms, Glossaries Capitalize Every First Letter)

In my case, have to use some acronyms with both a lower case and an upper case version in the text, while at the same time having an upper case first letter in the list of acronyms in the long form. On the other hand, I have some entries that do not have an upper case version, so I can't simply use \Glsentrylong, when redefining the style.

So far, changing the appearance in the text is no problem, if the long form is given in lower case. Changing the appearance in the list, however, proved to be too difficult for me. I tried checking for a user entry, using \ifglshasfield, without success (not even with long-short-user and and long-short-user-desc styles). My attempts to increase the number of categories and checks (that are already done for the description) utterly failed.

In the original version (commented part) I was not able to change the appearance of the long form in the list of acronyms when the long form was lower case. If the long form was upper case, I was not able to use a lower case long form in text. Using text={lowcaseupcase} with {Lowcaseupcase} as the long form also gave the long form in the text.

In the current version I get the following outputs in the list:

  • long form given: long form printed (ok, see WOD, xyz) user entry and
  • long form given: user entry printed (ok, see HAHA)
  • description and long form given: just the description is printed (long form missing, see ANY, MAKRO, tbd)
  • desription, long form and user entry given: the long form and the description are given (user entry missing, see HOHO, LCUC)

Is there a way to use lower case long forms in text while having the upper case form in the list without capitalizing every entry?

A possible solution might be to explicitly convert the first letter in text to lower case (as opposed to \acl{label} vs \Acl{label}) but I fear that would mean to define a lot of new commands. Maybe I missed a simple solution to this...




% discriminate between entries with and without descriptions: based on https://tex.stackexchange.com/questions/355455/style-acronyms-long-forms-and-avoid-description-fields-for-those-that-dont-have

            \unskip\leaders\hbox to 2.9mm{\hss. }\hfill\strut}%
% previous output that worked except for capitalizing the first letters of defined  entries
%       \glsifcategory{##1}{withoutdesc}%
%       {\glsentrylong{##1}}%   \Glsentrylong{##1} gives the entry with the first letter capitalized
%       {%
%           \parbox[t]{\textwidth-\glslistdottedwidth}{\glsentrylong{##1}\space (\glossentrydesc{##1})}%    \Glsentrylong{##1} gives the entry with the first letter capitalized
%       }%
    % my check for user1 -- prints user1 does not print \glsentrylong when user1 is not given and the entry has a description
                {\glsentrylong{##1}}%   \Glsentrylong{##1} gives the entry with the first letter capitalized
                {\parbox[t]{\textwidth-\glslistdottedwidth}{\glsentrylong{##1}\space (\glossentrydesc{##1})}}%  \Glsentrylong{##1} gives the entry with the first letter capitalized
                {\parbox[t]{\textwidth-\glslistdottedwidth}{\glsentryuseri{##1}\space (\glossentrydesc{##1})}}%

    \renewcommand*{\glsxtrlongshortdescsort}{\the\glsshorttok}  % sort by short form


% some stupid examples
\newacronym[]{WOD}{WOD}{Without Description}


\newacronym[description={long form missing}]{ANY}{ANY}{Anything}
\newacronym[description={long form missing}]{macro}{MAKRO}{\mymacro}
\newacronym[description={long form missing -- here I need the lower case in the list of acronyms even for the first letter of the long form, so I can't seem to use \emph{Glsentrylong} in the definition of \emph{finallistdotted} -- that would be too easy!}]{tbd}{tbd}{to be done}

\newacronym[user1={Hoho},description={long form instead of user entry given -- similar to HAHA but with description}]{HOHO}{HOHO}{hoho}
\newacronym[user1={Lowcaseupcase},description={long form instead of user entry given -- \textbf{this should allow lower case (lowcaseupcase) and upper case (Lowcaseupcase) versions in text but print "Lowcaseupcase" in the list of acronyms}}]{LCUC}{LCUC}{lowcaseupcase}




    \ac{ANY} -- \ac{ANY}

    \ac{WOD} -- \ac{WOD}

    Pre\acl{LCUC} -- \Acl{LCUC} -- \Ac{LCUC} -- \Acf{LCUC} -- Pre\acl{LCUC} -- Pre-\acs{LCUC}

    Pre\acl{HAHA} -- \Acl{HAHA} -- \Ac{HAHA} -- \Acf{HAHA} -- Pre\acl{HAHA} -- Pre-\acs{HAHA}


    \ac{tbd} -- \acs{tbd} -- \Acl{tbd}. -- \ACS{tbd}! -- \ACL{tbd}!!!




  • If i understand you right, you are looking for an easy(?) way to print only/exactly what YOU want in the glossary and also have the different options within the main text ... correct? If so, did you try to declare an extra key (or e.g. use user1) for every entry, which you will use for the glossarystyle?
    – Venez
    Commented Apr 24, 2020 at 13:00
  • In short, I want to print the long form as given in \newacronym. An entry "lower case" should be printed "lower case", an entry "Upper case" should be printed "Upper case" in the list of acronyms. In the text I also have to use "upper case" in some context, where I have some kind of prefix, like "noupper case". Trying to use the user1 key is exactly what I was trying in my example. However, it did not work with the styles in the example or if I used styles with "user".
    – Echo
    Commented Apr 24, 2020 at 13:25

1 Answer 1


I will concentrate my answer on the essential part of your question (at least i think so ^^#). The code below should help you to specify the text you want to show for every entry in the glossary - without consideration if there is a UpperCase form or whatever. Is that any help to you?

PS: You could also use user1, but then you must switch \glsglostext{##1} with \glsuseri{##1} in the style definition.


{glostext}              % new key
{\glsentrytext{TODO}}   % default value
{\glsentryglostext}     % analogous to \glsentrytext
{\Glsentryglostext}     % analogous to \Glsentrytext
{\glsglostext}          % analogous to \glstext
{\Glsglostext}          % analogous to \Glstext
{\GLSglostext}          % analogous to \GLStext

% Define the glossary entries
description={long form instead of user entry},

% Set the new glossary style
        \glsglostext{##1}\glspostdescription\space ##2}%

  • Thank you, this is very helpful but I still can't figure out what to do, when I have a " normal" entry where I don't need glostext (e.g. \newacronym[description={just Haha}]{HAHA}{HAHA}{Haha}). Is there a way to fall back to use \glsentrylong for this entry?
    – Echo
    Commented Apr 24, 2020 at 15:05
  • Replacing \glsentrytext{TODO} by \glsentrylong{##1} does not produce an error but does not print a long form for HAHA, either.
    – Echo
    Commented Apr 24, 2020 at 15:13
  • Even if you have a "normal" entry there is nothing wrong with a definition of a glostext field nonetheless. You are right, it is a double entry but its easy to maintain. Or do you want the algorithm to check for it by all means?
    – Venez
    Commented Apr 24, 2020 at 15:27
  • For a few entries it might be ok to add a definition of glostext but consider a case with many "normal" entries and just a few where glostext is needed. In this case, a check is definetly needed.
    – Echo
    Commented Apr 24, 2020 at 15:45
  • A small man's solution that works for me is to keep the upper case entry in the long field and put the lower case version in glostext. In this case there is no need for a redefinition of the glossary style and redundancy is kept to a minimum. One can use Pre\glslink{HOHO}{\glsglostext{HOHO}} or Pre-\glslink{HOHO}{\glsentryshort{HOHO}} and even Pre-\glslink{HOHO}{\glsentryshort{HOHO}} (Pre\glslink{HOHO}{\glsglostext{HOHO}}). These can be called by a user-defined macro, as needed. I would not have found this solution without Venez' answer, though.
    – Echo
    Commented Apr 27, 2020 at 7:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .