Latest news 2024-12-13: Ebook sale (12th December 2024 – 1st January 2025): cybercrime fiction short stories Unsocial Media and Smile for the Camera free; crime fiction short story The Briefcase free; short story noir crime fiction I’ve Heard the Mermaid Sing free; crime fiction novel The Private Enemy US$1.99; illustrated children’s story The Foolish Hedgehog US$0.99.

Bug Tracker RSS feed

I’m currently working on a major new version of the datatool package. This may take a while. Please be patient. (Experimental version available for testing.)

ID 120🔗
Submitted by: Nicola Talbot 🦜
Date: 2017-02-08 11:31:38
Status Closed (Fixed)
Category glossaries-extra
Version 1.13
Summary incorrect alias target name when using \glshyperlink (and therefore also \glsseeformat)

Sign in to subscribe to notifications about this report.

Description

When the alias key is used, the target name used in the hyperlink is incorrect.

This will be fixed in version 1.14.

Patch until then:

\makeatletter
\renewcommand*{\glshyperlink}[2][\glsentrytext{\@glo@label}]{%
 {\def\@glo@label{#2}%
 \edef\glslabel{\glsdetoklabel{#2}}%
 \@glslink{\glolinkprefix\glslabel}{#1}}%
}
\makeatother

MWE

Download (853B)

% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex
\documentclass{article}

\usepackage[colorlinks]{hyperref}
\usepackage{glossaries-extra}

\makeglossaries

\newglossaryentry{numberlist}{name={number list},
 description={\nopostdesc},
 alias={locationlist}}

\newglossaryentry{locationlist}{name={location list},
 description={list of locations}
}

\renewcommand{\glsxtrsetaliasnoindex}{%
 \ifglshasfield{alias}{\glslabel}%
 {%
   \setkeys{glslink}{noindex}%
   \glsxtrindexaliased
 }%
 {}%
}

\newglossaryentry{sample}{name={sample},
description={an example}}

\newglossaryentry{sample-alias}{name={sample-alias},
description={\nopostdesc},
alias={sample}
}

\begin{document}

\gls{numberlist} or \gls{locationlist}.

\gls{sample} or \gls{sample-alias}.

\newpage
\gls{numberlist}

\gls{sample-alias}
\newpage
\printglossaries
\end{document}

Evaluation

Fixed in v1.14.

Comments

0 comments.


Add Comment

Name (optional):

Are you human? Please confirm the bug report ID (which can be found at the top of this page) or login if you have an account.

Comment:


You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

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

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

You can use the Preview button to review your message formatting before submitting.

Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=120