2

The following exemplary document compiles as intended in example 1.

Example 1:

\documentclass{article}

\usepackage[record,acronym,toc,shortcuts=ac]{glossaries-extra}

\usepackage{relsize} % required for new abbreviation Style long-short-sm
\setabbreviationstyle[\acronymtype]{long-short-sm}

\GlsXtrLoadResources[
    src={entries},
    sort={en-GB}
]

\begin{document}
    Test 1: \ac{se}. % or \cgls{se} % WORKS
    Test 2: \acl{se}. % or \glsxtrlong{se} % WORKS ONLY IF \ac{se} (Test 1) UNCOMMENTED
    \printunsrtglossary[type=\acronymtype,title={List of~acronyms},style=index]
\end{document}

Proper result.

However, when \ac{se} (or \cgls{se}) command is commented out, the result throws a warning – probably caused by command \acl{se} (\glsxtrlong{se}) being overlooked by bib2gls or pdfLaTeX – in example 2.

Example 2:

\documentclass{article}

\usepackage[record,acronym,toc,shortcuts=ac]{glossaries-extra}

\usepackage{relsize} % required for new abbreviation Style long-short-sm
\setabbreviationstyle[\acronymtype]{long-short-sm}

\GlsXtrLoadResources[
    src={entries},
    sort={en-GB}
]

\begin{document}
    Test 1: %\ac{se}. % or \cgls{se} % WORKS
    Test 2: \acl{se}. % or \glsxtrlong{se} % WORKS ONLY IF \ac{se} (Test 1) UNCOMMENTED
    \printunsrtglossary[type=\acronymtype,title={List of~acronyms},style=index]
\end{document}

Package glossaries-extra Warning: Glossary entry `se' has not been defined on input line 15.

Improper result.

The content of entries.bib file used by the bib2gls application is attached below.

entries.bib:

% Encoding: UTF-8

@acronym{se,
  long      = {some example},
  short     = {SE},
  timestamp = {31.03.2018}
}

Can example 2 be modified or fixed to work while still using only the \acl{se} (\glsxtrlong{se}) command – without prior usage of, e.g., \ac{se} (\cgls{se})?


EDIT #2: A complete reinstallation of MikTeX solved the problem.

EDIT: Despite updating to version 1.32 of glossaries-extra the error persists.

Not working with bib2gls:

\documentclass{article}

\usepackage[record,acronym]{glossaries-extra}

\usepackage{filecontents}
\begin{filecontents}{entries.bib}
    @acronym{se,
        long  = {some example},
        short = {SE}
    }
\end{filecontents}

\GlsXtrLoadResources[src={entries}]

\begin{document}
    %Test 1: \gls{se}.\\
    Test 2: \glsxtrlong{se}.
    \printunsrtglossary[type=\acronymtype]
\end{document}

Acronym `se' undefined

Package glossaries-extra Warning: Glossary entry `se' has not been defined on input line 17.
Package glossaries-extra Warning: No entries defined in glossary `acronym' on input line 18.

Uncommenting %Test 1: … line or adding \glsadd{se} to preamble is a workaround, but still does not fix the core problem.

Working without bib2gls:

\documentclass{article}

\usepackage[record,acronym]{glossaries-extra}

\newacronym{se}{SE}{some example}

\begin{document}
    %Test 1: \gls{se}.\\
    Test 2: \glsxtrlong{se}.
    \printunsrtglossary[type=\acronymtype]
\end{document}

Acronym `se' defined

1
  • 2
    You can use \glsadd{se} in your preamble. Mar 31, 2018 at 10:25

1 Answer 1

1

There was a bug in earlier versions of glossaries-extra that meant that commands like \glsxtrlong weren't writing the record to the .aux file correctly. This was fixed in version 1.30, so make sure you have the latest version.

0

You must log in to answer this question.

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