Bug Tracker RSS feed

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)

Return to Search Results

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. All guest comments have to be manually checked before they appear on the page. There are too many bots trying to spam the site to allow unauthenticated users to post without verification.

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

Return to Search Results