我有一个简单的 .tex 文件,我想在其中使用glossaries
和natbib
包来制作词汇表和参考书目。最小工作示例 (MWE) 和文档构建如下所示。
平均能量损失
% pdflatex
% makeglossaries
% pdflatex
% bibtex
% pdflatex
% pdflatex
\documentclass{article}
% Palatino font
\usepackage[sc,osf]{mathpazo}
\usepackage{color}
\usepackage{hyperref}
\hypersetup{
pdffitwindow=false,
colorlinks=true,
linkcolor=blue,
citecolor=blue,
urlcolor=blue,
breaklinks=true,
hypertexnames=false,
bookmarksnumbered=true
}
\usepackage[all]{hypcap}
% Bibliography
\usepackage[numbers, sort&compress]{natbib}
\bibliographystyle{unsrtnat}
% Glossary
\usepackage[nopostdot,nonumberlist]{glossaries}
\glsdisablehyper
\makeglossaries
\newglossaryentry{ex}{name={sample},description={an example}}
\setacronymstyle{long-sc-short}
\newacronym{svm}{svm}{support vector machine}
\renewcommand*{\glsnamefont}[1]{\textmd{#1}}
\begin{document}
First use: \gls{svm}. Second use: \gls{svm}.
Here's my \gls{ex} term.
Soliton is an entity~\cite{Soliton}.
% Bibliography
\bibliography{references}
\printglossaries
\end{document}
.bib 如下所示。
@article{Soliton,
title = {Observation and analysis of multiple dark-antidark solitons in two-component {B}ose-{E}instein condensates},
author = {Katsimiga, G. C. and Mistakidis, S. I. and Bersano, T. M. and Ome, M. K. H. and Mossman, S. M. and Mukherjee, K. and Schmelcher, P. and Engels, P. and Kevrekidis, P. G.},
journal = {Phys. Rev. A},
volume = {102},
issue = {2},
pages = {023301},
numpages = {11},
year = {2020},
month = {Aug},
publisher = {American Physical Society},
doi = {10.1103/PhysRevA.102.023301},
url = {https://link.aps.org/doi/10.1103/PhysRevA.102.023301}
}
问题
问题是,一旦我编译,就会显示以下错误消息。但是,文档已正确构建。我想知道为什么会发生这种情况,我该如何避免错误?
错误消息
Process started: biber "print_glossary_bib"
Use of uninitialized value in quotemeta at /usr/share/perl5/Biber/Config.pm line 228.
Use of uninitialized value $tool in concatenation (.) or string at
/usr/share/perl5/Biber/Config.pm line 307.
INFO - This is Biber 2.17
INFO - Logfile is 'print_glossary_bib.blg'
ERROR - Cannot find 'print_glossary_bib.bcf'!
INFO - ERRORS: 1
Process exited with error(s)
Process started: pdflatex -synctex=1 -interaction=nonstopmode "print_glossary_bib".tex
Process exited normally
Process started: makeglossaries "print_glossary_bib"
Process exited normally
Process started: pdflatex -synctex=1 -interaction=nonstopmode "print_glossary_bib".tex
Process exited normally
Process started: bibtex "print_glossary_bib".aux
This is BibTeX, Version 0.99d (TeX Live 2022/dev/Debian)
The top-level auxiliary file: print_glossary_bib.aux
The style file: unsrtnat.bst
Database file #1: references.bib
Process exited normally
Process started: pdflatex -synctex=1 -interaction=nonstopmode "print_glossary_bib".tex
Process exited normally
Process started: pdflatex -synctex=1 -interaction=nonstopmode "print_glossary_bib".tex
Process exited normally
但是,如果我重新编译(使用整个构建序列),那么第二次就不会显示任何错误消息!