\printglossary 中不显示首字母缩略词和新词汇表

\printglossary 中不显示首字母缩略词和新词汇表

我使用以下示例来设置回忆录文件。示例取自:http://www.latex-community.org/forum/viewtopic.php?f=4&t=9423

虽然这似乎对线程中的人来说有效,但我的 .glo 文件仅包含来自这些命令的定义的条目。

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

不知为何,符号和缩写不属于我的词汇表文件。如何解决此问题?

此外,不使用词汇表包是否可以创建词汇表?

我在 Mac OS X 系统上使用 texMaker。如能得到帮助,我将不胜感激。

提前致谢。

\documentclass[10pt]{memoir}


\usepackage[acronym,toc]{glossaries}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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

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

\newacronym{eeprom}{EEPROM}{electrically erasable 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}

\glsaddall

\printglossary 

\end{document}

答案1

为了将词汇表放入文档中,此设置需要外部工具makeglossaries和首字母缩略词\printacronyms命令:

\documentclass[10pt]{memoir}


\usepackage[acronym,toc]{glossaries}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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

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

\newacronym{eeprom}{EEPROM}{electrically erasable 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}

\glsaddall

\printacronyms
\printglossary 

\end{document}

照常编译

  • pdflatex foo.tex
  • 制作词汇表 foo
  • pdflatex foo

在此处输入图片描述

我省略了词汇表的屏幕截图,因为 OP 已经能够在文档中创建词汇表。

相关内容