打印词汇表时出现问题

打印词汇表时出现问题

我在打印词汇表时遇到问题。这些条目可以在文本中解析(\gls{API} -> 应用程序编程接口)。此外,编辑器还会提示可能出现的情况(我的词汇表条目列表)

但是 \printglossaries 不会打印使用过的条目。

\usepackage[xindy]{glossaries} 
\loadglsentries{frontbackmatter/GlossaryEntries}
\makeglossaries

已加载配置

\newglossaryentry{API}{%
    name={Application Programming Interface},%
    description={(API) random description text}}

词汇表条目

\include{chapters/basics/api}

此处文中引用

\cleardoublepage\include{frontbackmatter/Glossary}

在这里我加载词汇表章节

%*******************************************************
% Glossary
%*******************************************************
\automark[section]{chapter}
\renewcommand{\chaptermark}[1]{\markboth{\spacedlowsmallcaps{#1}}    
{\spacedlowsmallcaps{#1}}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\enspace          
\spacedlowsmallcaps{#1}}}
\refstepcounter{dummy}
\pdfbookmark[1]{Glossary}{Glossary}
\markboth{\spacedlowsmallcaps{Glossary}}{\spacedlowsmallcaps{Glossary}}
\chapter*{Glossary}
%\gls{API}  %<-- Wont work either to use an entry in the same document
\printglossaries

最后是我想要打印词汇表的章节。

你知道为什么它没有被打印出来而是在引用的文本中吗?

在这里编辑我生成的 .gls 文件

\glossarysection[\glossarytoctitle]{\glossarytitle}\glossarypreamble
\providecommand*\glsXpageXglsnumberformat[2]{\setentrycounter[#1]{page}\glsnumberformat{#2}}
\providecommand*\glsXpageXtextrm[2]{\setentrycounter[#1]{page}\textrm{#2}}
\providecommand*\glsXpageXtextsf[2]{\setentrycounter[#1]{page}\textsf{#2}}
\providecommand*\glsXpageXtexttt[2]{\setentrycounter[#1]{page}\texttt{#2}}
\providecommand*\glsXpageXtextbf[2]{\setentrycounter[#1]{page}\textbf{#2}}
\providecommand*\glsXpageXtextmd[2]{\setentrycounter[#1]{page}\textmd{#2}}
\providecommand*\glsXpageXtextit[2]{\setentrycounter[#1]{page}\textit{#2}}
\providecommand*\glsXpageXtextup[2]{\setentrycounter[#1]{page}\textup{#2}}
\providecommand*\glsXpageXtextsl[2]{\setentrycounter[#1]{page}\textsl{#2}}
\providecommand*\glsXpageXtextsc[2]{\setentrycounter[#1]{page}\textsc{#2}}
\providecommand*\glsXpageXemph[2]{\setentrycounter[#1]{page}\emph{#2}}
\providecommand*\glsXpageXglshypernumber[2]{\setentrycounter[#1]{page}\glshypernumber{#2}}
\providecommand*\glsXpageXhyperrm[2]{\setentrycounter[#1]{page}\hyperrm{#2}}
\providecommand*\glsXpageXhypersf[2]{\setentrycounter[#1]{page}\hypersf{#2}}
\providecommand*\glsXpageXhypertt[2]{\setentrycounter[#1]{page}\hypertt{#2}}
\providecommand*\glsXpageXhyperbf[2]{\setentrycounter[#1]{page}\hyperbf{#2}}
\providecommand*\glsXpageXhypermd[2]{\setentrycounter[#1]{page}\hypermd{#2}}
\providecommand*\glsXpageXhyperit[2]{\setentrycounter[#1]{page}\hyperit{#2}}
\providecommand*\glsXpageXhyperup[2]{\setentrycounter[#1]{page}\hyperup{#2}}
\providecommand*\glsXpageXhypersl[2]{\setentrycounter[#1]{page}\hypersl{#2}}
\providecommand*\glsXpageXhypersc[2]{\setentrycounter[#1]{page}\hypersc{#2}}
\providecommand*\glsXpageXhyperemph[2]{\setentrycounter[#1]{page}\hyperemph{#2}}
\providecommand*\glsXpageXglsignore[2]{\setentrycounter[#1]{page}\glsignore{#2}}
\begin{theglossary}\glossaryheader
\glsgroupheading{A}\relax\glsresetentrylist
\glossentry{API-Gateway}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{2}\delimR 
\glsXpageXglsnumberformat{}{4}\delimN 
\glsXpageXglsnumberformat{}{11}\delimN 
\glsXpageXglsnumberformat{}{13}\delimR 
\glsXpageXglsnumberformat{}{15}\delimN 
\glsXpageXglsnumberformat{}{17}\delimR 
\glsXpageXglsnumberformat{}{20}\delimN 
\glsXpageXglsnumberformat{}{22}\delimR 
\glsXpageXglsnumberformat{}{27}}}\relax\glsresetentrylist
\glossentry{API-Portal}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{3}\delimN 
\glsXpageXglsnumberformat{}{27}}}\relax\glsresetentrylist
\glossentry{API}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{ix}, 
\glsXpageXglsnumberformat{}{6}}}\glsgroupskip
\glsgroupheading{B}\relax\glsresetentrylist
\glossentry{B2B}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{ix}, 
\glsXpageXglsnumberformat{}{6}}}\relax\glsresetentrylist
\glossentry{B2C}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{ix}, 
\glsXpageXglsnumberformat{}{6}}}\relax\glsresetentrylist
\glossentry{B2E}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{ix}, 
\glsXpageXglsnumberformat{}{6}}}\glsgroupskip
\glsgroupheading{C}\relax\glsresetentrylist
\glossentry{Client}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{6}\delimR 
\glsXpageXglsnumberformat{}{8}\delimN 
\glsXpageXglsnumberformat{}{10}\delimN 
\glsXpageXglsnumberformat{}{13}\delimN 
\glsXpageXglsnumberformat{}{15}\delimN 
\glsXpageXglsnumberformat{}{18}\delimN 
\glsXpageXglsnumberformat{}{22}\delimR 
\glsXpageXglsnumberformat{}{24}\delimN 
\glsXpageXglsnumberformat{}{26}\delimN 
\glsXpageXglsnumberformat{}{27}}}\relax\glsresetentrylist
\glossentry{Cloud}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{3}\delimN 
\glsXpageXglsnumberformat{}{6}}}\relax\glsresetentrylist
\glossentry{Cluster}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{24}\delimN 
\glsXpageXglsnumberformat{}{25}}}\glsgroupskip
\glsgroupheading{E}\relax\glsresetentrylist
\glossentry{XML}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{ix}, 
\glsXpageXglsnumberformat{}{8}}}\glsgroupskip
\glsgroupheading{G}\relax\glsresetentrylist
\glossentry{Getter_und_Setter}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{9}}}\glsgroupskip
\glsgroupheading{J}\relax\glsresetentrylist
\glossentry{JSON}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{ix}, 
\glsXpageXglsnumberformat{}{8}}}\glsgroupskip
\glsgroupheading{L}\relax\glsresetentrylist
\glossentry{LDAP}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{ix}, 
\glsXpageXglsnumberformat{}{14}}}\relax\glsresetentrylist
\glossentry{LB}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{24}\delimN 
\glsXpageXglsnumberformat{}{25}}}\glsgroupskip
\glsgroupheading{O}\relax\glsresetentrylist
\glossentry{OAuth}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{ix}, 
\glsXpageXglsnumberformat{}{11}}}\glsgroupskip
\glsgroupheading{P}\relax\glsresetentrylist
\glossentry{Pattern}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{13}}}\glsgroupskip
\glsgroupheading{R}\relax\glsresetentrylist
\glossentry{REST}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{ix}, 
\glsXpageXglsnumberformat{}{6}}}\glsgroupskip
\glsgroupheading{S}\relax\glsresetentrylist
\glossentry{Service}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{6}\delimR 
\glsXpageXglsnumberformat{}{8}\delimN 
\glsXpageXglsnumberformat{}{10}\delimN 
\glsXpageXglsnumberformat{}{11}\delimN 
\glsXpageXglsnumberformat{}{13}\delimR 
\glsXpageXglsnumberformat{}{15}\delimN 
\glsXpageXglsnumberformat{}{17}\delimR 
\glsXpageXglsnumberformat{}{20}\delimN 
\glsXpageXglsnumberformat{}{22}\delimR 
\glsXpageXglsnumberformat{}{24}\delimN 
\glsXpageXglsnumberformat{}{26}}}\relax\glsresetentrylist
\glossentry{SOAP}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{2}\delimN 
\glsXpageXglsnumberformat{}{8}\delimN 
\glsXpageXglsnumberformat{}{9}\delimN 
\glsXpageXglsnumberformat{}{11}}}\relax\glsresetentrylist
\glossentry{Software-as-a-service}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{vi}\delimN 
\glsXpageXglsnumberformat{}{ix}}}\relax\glsresetentrylist
\glossentry{Swagger}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{18}\delimR 
\glsXpageXglsnumberformat{}{20}\delimN 
\glsXpageXglsnumberformat{}{24}}}\glsgroupskip
\glsgroupheading{U}\relax\glsresetentrylist
\glossentry{URI}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{ix}, 
\glsXpageXglsnumberformat{}{6}}}%
\end{theglossary}\glossarypostamble

答案1

在尝试制作 MWE 时,我意识到这是因为我必须在学士论文中使用 classicthesis 模板,并且因为我使用了 TexStudio,所以没有收到任何错误消息。

因此,我首先必须修复 texstudios 偏好设置才能在那里使用 xindy:Xindy 在 TeXStudio 中不可见

然后我收到错误消息并在这里找到了解决方案:词汇表:编译时出错

\printglossary[style=index]

相关内容