17

Based on the following answer, How shall I define plural form of glossaries?

Two separate acronym list using package glossaries

For example,

\newglossaryentry{LED}
{
  name={LED},
  description={light emitting diode},
  first={\glsentrydesc{LED} (\glsentrytext{LED})},
}

The first instance in plural form should print

light emitting diodes (LEDs).

Second instance of plural form should print

LEDs

3rd instance of singular form should print

LED

and so on ...

.

  • 1
    What about plural={LEDs}, in your newglossaryentry to be used as \glsp{LED}? Not tested but that is the normal way. Maybe you should have a look on acronym lists in the package: ctan.org/pkg/glossaries – LaRiFaRi Aug 15 '13 at 16:48
24

The only way I know is to define the \newglossaryentry as:

\newglossaryentry{LED}
{
  name={LED},
  description={light emitting diode},
  first={\glsentrydesc{LED} (\glsentrytext{LED})},
  plural={LEDs},
  firstplural={\glsentrydesc{LED}s (\glsentryplural{LED})}
}

and then use \glspl{LED} when you want the plural form, \gls{LED} when you want the singular form.

EDIT

I've discovered the command \glsentrydescplural, which prints the contents of the descriptionplural field.

So the above can also be rewritten in a more consistent form as:

\newglossaryentry{LED}
{
  name={LED},
  description={light emitting diode},
  first={\glsentrydesc{LED} (\glsentrytext{LED})},
  plural={LEDs},
  descriptionplural={light emitting diodes},
  firstplural={\glsentrydescplural{LED} (\glsentryplural{LED})}
} 
  • Perfect. It takes care of description too. – cosmicraga Aug 15 '13 at 19:54

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.