LaTeX/Glossary suggets the following command for combining a glossary entry and an acryonym:

\DeclareDocumentCommand{\newdualentry}{ O{} O{} m m m m } {

How can I add the plural to this command, so I can use \glspl{LED} showing LEDs? I know that appending a 's' is the default plural form, but I need a way to customize the plural. I tried the following with no luck

 \DeclareDocumentCommand{\newdualentry}{ O{} O{} m m m m m } {


  • Welcome to TeX.SX! Can you provide a compilable document instead of some fragments only?
    – user31729
    Sep 10, 2015 at 19:48
  • Sorry, my document is just too big and there are so many configurations in it that I can't figure out how to shorten it. Sep 10, 2015 at 19:59
  • Please add some more details. I am not sure what you really want to achieve here. I am not sure about the two optional arguments in a row at the beginning.
    – user31729
    Sep 10, 2015 at 20:00

3 Answers 3


This works for me (However, a 7-arg command is difficult to remember!):




\DeclareDocumentCommand{\newdualentry}{O{}D<>{}m m m m m } {


\newdualentry{LED}{LED}{LED}{Light emitting diode}{LEDiodes}

\newdualentry{Ox}{Ox}{Ox}{male cow}{Oxen}


Here is an entry: \gls{gls-LED} \glspl{gls-LED}

An some biology here: \gls{gls-Ox} \glspl{gls-Ox}



enter image description here

Edit Some notes on the design of the command about the optional arguments:

Say,you've got a small document like this



Optional 1: #1

Optional 2: #2

mandatory: #3





  1. The first call will assign A, B and C correctly to the relevant slots
  2. The second call will use A for the 1st, C for the 3rd one --> the 2nd one is empty --> Is this correct? Yes and no, since it's not clear that A is meant for the 1st or the 2nd optional argument.
  3. This call will explicitly leave the 1st one empty, the others are 'correct'

It's better to replace the 2nd optional argument style with D<>{} or similar tokens to make some difference. Or append the 2nd optional argument to the end of the list, being the 3rd argument here.

  • Hi Christian, thanks for your reply. This works regarding the printing of the plural form. The problem now is, that I combine the acronym and glossary list: If I add the LED entry as you suggested, I would expect an acronym entry "LED Light emitting diode" AND a glossary entry with a description: "Light emitting diode - A small bulb that emits light." With your suggestion, the description is lost in my glossary, only the long form of the abbreviation is shown. I hope you understand what I mean. Sep 11, 2015 at 8:03
  • Got it! \newdualentry{LED}{LED}{Light emitting diode}{Description}{LEDiodes} works as expected; I just had to clean the TexStudio cache (help files etc.) Thanks! Sep 11, 2015 at 8:12

Thats an MWE of how I use it. (mostly in german)

\usepackage{hyperref} % optional


% #1 = optional newglossaryentry value
% #2 = optional newacronym parameter
% #3 = label
% #4 = short form
% #5 = short form plural
% #6 = long form
% #7 = long form plural
% #8 = description
\DeclareDocumentCommand{\newdualentry}{ O{} D<>{} m m m m m m } {

\newdualentry{abb} % label
{\textbf{abbreviation}} % abbreviation
{\textbf{abbreviation plural}} % abbreviation plural
{\textbf{long form}} % long form
{\textbf{long form plural}} % long form plural
{\textbf{The description is a very long text.
It explains everything you need to know}} % description


\printnoidxglossary[title=List of Abbreviations, type=\acronymtype, style=altlist]

\section{Chapter One}

This is what the first use of a glossary entry looks like: \glsfirst{abb} by default.\\
This is what the first use of a glossary entry plural looks like: \glsfirstplural{abb} by default.\\

First gls call in my text: \gls{abb}.\\
Next gls call: \gls{abb}.\\
First glspl call in my text: \glspl{abb}.\\
Next glspl call: \glspl{abb}.\\


  • Raphael's code above (with 8 parameters) works perfectly for me as a standalone MWE. However, when I incorporate Raphael's \newdualentry code within my larger LaTeX project, I'm seeing the following error: ! LaTeX cmd Error: Bad argument specification ' O{} D' for command (cmd) '\newdualentry'. Before I attempt to understand what is happening (apologies for not providing a MWE) I'm curious if anyone else has experienced the same error, and possibly what I need to look for in my own code to correct the error. Thanks. Jan 22 at 19:40

Without any modifications, use the optional parameters:

[    plural={Light Emitting Diodes}]  % Glossary
[longplural={Light Emitting Diodes}   % Acronym
{led}{LED}{Light Emitting Diode}{...}

You must log in to answer this question.

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