词汇表-额外删除第一次出现后的文本超链接

词汇表-额外删除第一次出现后的文本超链接

大家好,在使用过程中glossaries-extra,我可以从额外的功能中受益,即每次出现新的定义/缩写时,都有相应的链接词汇表或者缩略词部分。这将自动构建两个部分,以便指向包含其中任何一个部分的页面的超链接能够指向文档中的正确位置。

但是,出于某种原因,我只能将此推广到章节级别。换句话说,如果一个定义(或我的情况中的首字母缩略词)第一次出现在另一章中,则规则被打破,超链接会再次出现,但仅限于第一次出现。我遵循了这一点邮政来完成我刚才解释的过程。

现在,我的问题是,有没有一种方法可以在整个文档的全局级别上抑制第一个之后的其他超链接?如果是这样,我会非常乐意学习如何做到这一点;我的文档变得非常大,我正在使用多个包。
出于这个原因,我暂时在序言中发布了应该这样做的部分的代码块,但如果有人知道如何解决这个问题,我可以提供更完整的 MWE。

\documentclass[12pt]{report}


\usepackage[letterpaper,margin=1in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{subcaption}
\usepackage{caption}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{float}

\usepackage{hyperref}
\usepackage[postdot,acronym,toc]{glossaries-extra}

%GLOSSARY TERMS AND ACRONYMS
\makeglossaries
\GlsXtrEnablePreLocationTag{Page: }{Pages: }
\GlsXtrEnableLinkCounting[chapter]{general,acronym}
\renewcommand{\glsnamefont}[1]{\makefirstuc{#1}} % capitalize the entry in the glossary
\renewcommand*{\acrshort}[1][]{\glsxtrshort[#1]} % required for glossaries-extra functionalities
\renewcommand*{\acrshortpl}[1][]{\glsxtrshortpl[#1]} % required for glossaries-extra functionalities
\renewcommand*{\glstextformat}[1]{\color{black}{#1}} % required for glossaries-extra black in-text links
% disable hyperlink if link count is greater than 1:
\renewcommand*{\glslinkpresetkeys}{%
 \ifnum\GlsXtrLinkCounterValue{\glslabel}>1
  \setkeys{glslink}{hyper=false}%
 \fi
}

%EXAMPLE TERMS
\newglossaryentry{graph-topology}
{
    name=topology,
    description={collection of features and properties describing a graph data structure}
}

\newacronym{hifi}{HiFi}{High Fidelity, same as CCS}

\begin{document}

\chapter{Introduction}

The assemblies for these individuals were generated from \acrshort{hifi} long reads in combination with long-range contact information from parental data through trio binning <citation> of short reads. Beyond the purpose of the text above, I'm using here the \gls{graph-topology} terms which since it has been used only once, it appears in the Terminology section.

\chapter{Results}

I computed the following assembly statistics for individuals: HG002, HG00514, HG00733, HG03492 and NA19240 with \texttt{gfastats v1.3.0} <citation> as per \dots. Aside from individual HG002 with a \acrshort{hifi} coverage in folds of $\sim$130× and sequenced with a 20Kbp \acrshort{hifi} chemistry, other individuals show values in line with those of assemblies, produced from long reads \acrshort{hifi} data and long-range Hi-C contact information, which did not underwent ulterior polishing and curation. The average coverage for the \acrshort{hifi} datasets varied from a maximum of $\sim$76× to a minimum of $\sim$34×.

As in the previous chapter, I'm here using the \gls{graph-topology} terms which appears to have the same issue despite the settings used in the preamble.

\printglossary[title=Terminology, toctitle=Terminology]

\printglossary[type=\acronymtype, title=List of Abbreviations, toctitle=List of Abbreviations]

\end{document}

编辑

快速更新,经过更深入的检查,它似乎只发生在首字母缩略词上。

新的

我错误地研究了 MWE,并强调了词汇表条目的问题......

相关内容