Bug Tracker

ID:56 🔗
Status:Closed (Not a Bug)
Category:glossaries
Version:4.03
OS:Win7
Submitted by:Fabian Schink
Date:2014-03-14 10:27:03
Summary:.glsdefs file and babel shorthands

Report

Hi,
I came across the problem that changing acronym-entries didn't led to a change in my document. I found that this is related to this FAQ: I changed the definition of an entry, but it's still using the old definition actually, I define the glossary-entries in separate files and include them via
\AtBeginDocument{
	\input{Glossar/GlossarFiles}
}
because of problems with babel-shorthands (for example "= for a hyphen that allows other breaks) otherwise (see babel: adding language shorthands to work inside glossaries) so to use this babel-shorthands, i have to pull glossaries entries at least to the beginning of the document. making glossary entries compatible with babel in header would be a great solution, for example.

MWE

\documentclass{scrartcl}

\usepackage[ngerman]{babel}

\usepackage{glossaries}
\makeglossaries

\newglossaryentry{Foo}{name={Foo},description={Long"=Foo}}
\AtBeginDocument{
	\newglossaryentry{Bar}{name={Bar},description={Long"=Bar}}
}



\begin{document}

This works:

\gls{Foo}


changes in gls"=definition of "`Bar"' after a run that created .glsdefs won't have any effect. But the babel-break works:

\gls{Bar}


\printglossaries


\end{document}

Evaluation

If you move the \AtBeginDocument before you load glossaries, you won't get a .glsdefs file as then the entries will be defined before the definition of \newglossaryentry is changed.
\documentclass{scrartcl}

\usepackage[ngerman]{babel}

\AtBeginDocument{
        \newglossaryentry{Bar}{name={Bar},description={Long"=Bar}}
}
\usepackage{glossaries}
\makeglossaries

\newglossaryentry{Foo}{name={Foo},description={Long"=Foo}}

\begin{document}

Comments

Comment from anonymous
Date: 2014-03-14 10:53:29 CDT

Wow, that's great, thank you! (Didn't expect this order to be working...)
:-)

Add comment or return to search results.

Watch This Report

If you would like to be notified whenever updates are made to this report, please fill in your email address in the box below and click on "Notify Me of Changes" button. (Please ensure the address is valid.) Your details won't be passed on to third parties in line with this site's Privacy Policy.

If you supply your name, it will be used in the email greeting, which provides a more personal message, otherwise you'll just get a generic greeting. If you have previously supplied your name when signing up for notifications, you don't need to resupply it unless you want to change it.

If you have previously subscribed to notifications for this report, you can unsubscribe by clicking on the "Stop Notification" button.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional.)
E mail:
Confirm E mail:
Confirm Bug ID:

To unsubscribe from all notifications use the notifications page.

Comment

You can append a comment to the report using the form below. Comments are checked first before being added. Any spam or offensive content will be removed first according to this site's Terms of Website Use. Please bear in mind that I develop and maintain free software in my spare time. If you want commerical level support then you can hire a TeX consultant.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional. If provided, it will be shown with the comment.)
Confirm Bug ID:

You can use the following markup:

[pre]Displayed verbatim[/pre]
[tt]monospace text[/tt]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

Click on the Preview button to preview the message.

Return to search results.