正如标题所说,我只想删除页码,而不是删除词汇表的缩写链接。
使用包选项 nonnumberlist,数字被删除,链接也被删除。
以下代码显示“CT 计算机断层扫描”。1,术语表:缩写词下的“CT 和断层扫描”
\documentclass[british]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[a4paper]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{amsmath}
\usepackage[authoryear]{natbib}
\usepackage[hidelinks]{hyperref}
\usepackage{babel}
\usepackage[toc,acronym,style=long]{glossaries}
\makeglossaries
%%%%%%%%%%%Glossary%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newglossaryentry{ctg}{name={CT},
description={A medical imaging technique to investigate the anatomy using x-rays}}
%%% define the acronym and use the see= option
\newglossaryentry{ct}{type=\acronymtype, name={CT}, description={Computed Tomography},first={Computed Tomography (CT)\glsadd{ctg}}, see=[Glossary:]{ctg,tomo}}
\newglossaryentry{tomo}{name={Tomography},
description={Imaging by sections through an object}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
blah blah \gls{ct} blah
\glsadd{tomo}
\printglossary[type=\acronymtype]
\printglossary[type=main]
\end{document}
我想要的是“CT 计算机断层扫描。词汇表:CT 和断层扫描”,只是缺少页码。
有什么想法吗?谢谢 James
答案1
键see
将交叉引用放入位置列表中(这是makeindex
和 的xindy
行为方式),因此如果您隐藏位置列表(使用 选项nonumberlist
),这也会隐藏交叉引用。您可以使用seeautonumberlist
包选项(带nonumberlist
)仅显示具有键的条目的位置列表see
,但您仍将获得这些条目的位置列表以及交叉引用。
相反,我建议您只将交叉引用放在描述中,并使用以下命令抑制位置列表nonumberlist
:
\documentclass{scrreprt}
\usepackage[hidelinks]{hyperref}
\usepackage[toc,acronym,style=long]{glossaries}
\makeglossaries
%%%%%%%%%%%Glossary%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newglossaryentry{ctg}{name={CT},
description={A medical imaging technique to investigate the
anatomy using x-rays}}
%%% define the acronym
\newglossaryentry{ct}{type=\acronymtype,
name={CT},
description={Computed Tomography. \emph{Glossary:} \gls{ctg}},
first={Computed Tomography (CT)\glsadd{ctg}}}
\newglossaryentry{tomo}{name={Tomography},
description={Imaging by sections through an object}}
\begin{document}
blah blah \gls{ct} blah
\glsadd{tomo}
\printglossary[type=\acronymtype,nonumberlist]
\printglossary[type=main]
\end{document}