$ bib2gls file
bib2gls version 1.5 (2018-05-09)
Reading file.aux
Reading greek-symbols.bib
Encoding: UTF-8
Exception in thread "main" java.lang.NoSuchMethodError: java.util.Vector.sort(Ljava/util/Comparator;)V
at com.dickimawbooks.bib2gls.SortComparator.sortEntries(SortComparator.java:744)
at com.dickimawbooks.bib2gls.Bib2GlsEntryComparator.sortEntries(Bib2GlsEntryComparator.java:444)
at com.dickimawbooks.bib2gls.GlsResource.sortData(GlsResource.java:5203)
at com.dickimawbooks.bib2gls.GlsResource.sortData(GlsResource.java:5146)
at com.dickimawbooks.bib2gls.GlsResource.sortDataIfRequired(GlsResource.java:5134)
at com.dickimawbooks.bib2gls.GlsResource.processBibData(GlsResource.java:5309)
at com.dickimawbooks.bib2gls.GlsResource.processData(GlsResource.java:4417)
at com.dickimawbooks.bib2gls.Bib2Gls.process(Bib2Gls.java:1827)
at com.dickimawbooks.bib2gls.Bib2Gls.main(Bib2Gls.java:4292)
bib 文件
% Encoding: UTF-8
@entry{alpha,
name={\ensuremath{\alpha}},
description={angular acceleration}
}
@entry{delta,
name={\ensuremath{\delta}},
description={Kronecker delta}
}
@entry{lambda,
name={\ensuremath{\lambda}},
description={Lagrange multiplier}
}
@entry{chi,
name={\ensuremath{\chi}},
description={chromatic number}
}
@entry{zeta,
name={\ensuremath{\zeta}},
description={Riemann zeta function}
}
文件.tex
\documentclass{report}
\usepackage[colorlinks]{hyperref}
\usepackage[symbols,nogroupskip,
record % using 'bib2gls'
]{glossaries-extra}
\GlsXtrLoadResources[
src={greek-symbols},% entries in 'greek-symbols.bib'
type=symbols,% put these entries in the 'symbols' glossary
save-locations=false% don't save locations
]
\begin{document}
\tableofcontents
\printunsrtglossary[type=symbols,style=long,title={List of Symbols}]
\chapter{Sample}
Reference symbols: $\gls{delta}$, $\gls{chi}$, $\gls{alpha}$,
$\gls{zeta}$, $\gls{lambda}$.
\end{document}
答案1
线程“main”中的异常 java.lang.NoSuchMethodError: java.util.Vector.sort(Ljava/util/Comparator;)V
这表明 Java 库java.util.Vector
没有sort(Comparator)
方法。该方法显然是在 Java 8 中引入到Vector
类中的,因此在旧版本中不可用。因此您需要更新 Java 版本。