词汇表缩写未显示问题

词汇表缩写未显示问题

我疯狂地试图为我的论文创建一个简单的首字母缩略词列表,想知道是否有人可以解释一下我的问题。我使用的是 MiKTeX 2.9 和 texworks。我按照以下指南创建了一个包含首字母缩略词的词汇表,如下所示

\documentclass{article}

% Load hyperref before glossaries
\usepackage[colorlinks]{hyperref}
\usepackage[acronym,toc]{glossaries}

% Define a new glossary type
\newglossary[slg]{symbols}{sym}{sbl}{List of Symbols}

\makeglossaries

% The following definitions will go in the main glossary

\newglossaryentry{culdesac}{name=cul-de-sac,description={passage
or street closed at one end},plural=culs-de-sac}

\newglossaryentry{elite}{name={\'e}lite,description={select
group or class},sort=elite}

\newglossaryentry{elitism}{name={\'e}litism,description={advocacy
of dominance by an \gls{elite}},sort=elitism}

\newglossaryentry{attache}{name=attach\'e,
description={person with special diplomatic responsibilities}}

% The following definitions will go in the list of acronyms
% Acronym definitions
\newacronym{uri}{URI}{Unique Resonance Identifier}

\newacronym{led}{LED}{light-emitting diode}

\newacronym{eeprom}{EEPROM}{electrically TESTICLE programmable
read-only memory}

% The following definitions will go in the list of symbols

\newglossaryentry{ohm}{type=symbols,name=ohm,
symbol={\ensuremath{\Omega}},
description=unit of electrical resistance}

\newglossaryentry{angstrom}{type=symbols,name={\aa}ngstr\"om,
symbol={\AA},sort=angstrom,
description={non-SI unit of length}}

\begin{document}
\tableofcontents

\section{Diplomatic Memoirs}

When I was an \gls{attache}, I lived in a \gls{culdesac}, but
I didn't much care for it as I found there was a fair amount
of \gls{elitism} amongst my neighbours.

\section{Student Memoirs}

When I was a student I often left bits of electronic circuitry
in my pockets, such as \glspl{led} and \glspl{eeprom}, which
often ended up in the washing machine. The \glspl{led} didn't
fair too badly, but the \glspl{eeprom} frequently broke.

\section{Symbols}

The \gls{angstrom} is commonly used in structural biology,
whereas the \gls{ohm} is used in electronics.

\printglossaries

\end{document}

我已经安装了 perl,并进入首选项并为 makeglossaries 添加了排版。如果我运行代码,我将得到如下所示的文档: 输出

但是我无法使用以下行添加任何我自己的缩写:

\newacronym{URI}{URI}{Unique Resonance Identifier}

出于某种原因,即使重新运行 makeglossaries 后,我也只能编辑 EEPROM 和 LED 缩写。

我知道这肯定是一件愚蠢的事情,任何帮助都会非常感激,理想情况下我只想要一页简单的首字母缩略词列表:(

答案1

默认行为是仅将文本中实际使用的缩写词添加到缩写词列表中。如果要将所有定义的缩写词添加到缩写词列表中,请使用\glsaddall[types=\acronymtype]

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

\usepackage[acronym,toc]{glossaries}
\makeglossaries

\newacronym{uri}{URI}{Unique Resonance Identifier}
\newacronym{led}{LED}{light-emitting diode}
\newacronym{eeprom}{EEPROM}{electrically TESTICLE programmable
read-only memory}

\glsaddall[types=\acronymtype]
\begin{document}
No acronyms here.

\printglossaries

\end{document}

在此处输入图片描述

相关内容