是否有类似于 nocite(*) 的 gls(词汇表)命令,是否有类似于 Tobias Oetiker 的词汇表包?

是否有类似于 nocite(*) 的 gls(词汇表)命令,是否有类似于 Tobias Oetiker 的词汇表包?

我使用该类memoir并在 XeLaTeX 中进行编译。

我想将词汇表打印在单独的文件中并忽略所有gls。我没有gls在任何地方写任何 。类似于\nocite{*}。也类似于 Tobias Oetiker 的首字母缩略词

想象一下:

\documentclass{memoir}
\usepackage{glossaries}

\begin{document}

  \nogls(*)
  \include{gloassries.tex}
\end{document}

分离的文件glossaries.tex

\newglossaryentry{Cloud}
{
    name=Cloud,
    description={shared pools of configurable computer system resources and higher-level services that can be rapidly provisioned with minimal management effort, often over the Internet.}
}

\newglossaryentry{Docker}
{
    name=Docker,
    description={a computer program that performs operating-system-level virtualization, also known as "containerization".}
}

源自 Tobias 的 acronym.sty,想象一下:

\documentclass{memoir}
\usepackage{glossaries}

\begin{document}
  \include{gloassries.tex}
\end{document}

分离的文件glossaries.tex

\chapter*{Glossaries}
\addcontentsline{toc}{chapter}{Glossaries}
\markboth{GLOSSARIES}{GLOSSARIES}

\begin{glossary}
{\small
\glo{Cloud}{shared pools of configurable computer system resources and higher-level services that can be rapidly provisioned with minimal management effort, often over the Internet.}
\glo{Docker}{a computer program that performs operating-system-level virtualization, also known as "containerization".}
}
\end{glossary}

是否可以?

更新

因为我搜索了问题,尝试了所有代码,但都没有用。这是 MWE:

\documentclass[12pt, a4paper, oneside, oldfontcommands, dvipsnames]{memoir}
\usepackage{acronym}
\usepackage{glossaries}
\makeglossaries

\begin{document}
    \tableofcontents

    \include{acronimos}

    \clearpage

    \glsaddall
    \input{capitulos/glossario.tex}
    \printglossaries

    \backmatter
    \nocite{*}
    \begin{raggedright}
    \printbibliography
    \end{raggedright}

\end{document}

更新 2

我也已经转到序言,但是没有作用:

\documentclass[12pt, a4paper, oneside, oldfontcommands, dvipsnames]{memoir}
\usepackage{acronym}
\usepackage{glossaries}
\makeglossaries
\input{capitulos/glossario.tex}

\begin{document}
    \tableofcontents

    \include{acronimos}

    \clearpage

    \glsaddall
    \printglossaries

    \backmatter
    \nocite{*}
    \begin{raggedright}
    \printbibliography
    \end{raggedright}

\end{document}

答案1

如果您想按定义顺序列出所有定义的术语,这是最简单的方法:

\documentclass{memoir}
\usepackage[sort=none]{glossaries-extra}

\newglossaryentry{Cloud}
{
    name=Cloud,
    description={shared pools of configurable computer system resources and higher-level services that can be rapidly provisioned with minimal management effort, often over the Internet.}
}

\newglossaryentry{Docker}
{
    name=Docker,
    description={a computer program that performs
    operating-system-level virtualization, also known as 
   ``containerization''.}
}

\begin{document}

\printunsrtglossaries
\end{document}

image of glossary

如果您还想要一个缩写列表:

\documentclass{memoir}
\usepackage[sort=none,abbreviations]{glossaries-extra}

\newglossaryentry{Cloud}
{
    name=Cloud,
    description={shared pools of configurable computer system resources and higher-level services that can be rapidly provisioned with minimal management effort, often over the Internet.}
}

\newglossaryentry{Docker}
{
    name=Docker,
    description={a computer program that performs
    operating-system-level virtualization, also known as
   ``containerization''.}
}

\newabbreviation{html}{HTML}{hypertext markup language}
\newabbreviation{xml}{XML}{extensible markup language}

\begin{document}

\printunsrtglossaries
\end{document}

如果您想要改变列表的显示样式或顺序,您需要\printunsrtglossary对每个列表使用:

\documentclass{memoir}
\usepackage[sort=none,abbreviations]{glossaries-extra}

\newglossaryentry{Cloud}
{
    name=Cloud,
    description={shared pools of configurable computer system resources and higher-level services that can be rapidly provisioned with minimal management effort, often over the Internet.}
}

\newglossaryentry{Docker}
{
    name=Docker,
    description={a computer program that performs
    operating-system-level virtualization, also known as
   ``containerization''.}
}

\newabbreviation{html}{HTML}{hypertext markup language}
\newabbreviation{xml}{XML}{extensible markup language}

\begin{document}

\printunsrtglossary % default: style=list, type=main
\printunsrtglossary[type=abbreviations,style=long]
\end{document}

许多预定义的样式

如果你的定义在外部文件中,\input不使用\include在序言中。

上述示例不执行任何排序。如果您希望列表自动排序,则需要使用以下方法之一手册中描述的索引方法将适当的外部工具纳入您的文档构建中,正如评论中所提到的。

相关内容