Biblatex printbibliography 未定义控制序列错误

Biblatex printbibliography 未定义控制序列错误

我正在用 latex 写报告,但\printbibliography出现Undefined control sequence错误。以下是从我的 .tex 文件中摘录的:

\documentclass[]{article}
\usepackage[backend=biber, sorting=none, maxnames=35]{biblatex}
\addbibresource{report.bib}

\title{Title}
\begin{document}
\maketitle

Report content \cite{hkust}\cite{hkust_cat}\cite{geom}\cite{dreiding}\cite{cp2k}\cite{charmm}\cite{Smit}\cite{csd1}\cite{csd2}.

\printbibliography
\end{document}

这是我的.bib 文件:

    @article{Smit,
    author = {Boyd, Peter G. and Moosavi, Seyed Mohamad and Witman, Matthew and Smit, Berend},
    title = {Force-Field Prediction of Materials Properties in Metal-Organic Frameworks},
    journal = {The Journal of Physical Chemistry Letters},
    volume = {8},
    number = {2},
    pages = {357-363},
    year = {2017},
    doi = {10.1021/acs.jpclett.6b02532}
}

@article{dreiding,
    author = {Mayo, Stephen L. and Olafson, Barry D. and Goddard, William A.},
    title = {DREIDING:  a generic force field for molecular simulations},
    journal = {The Journal of Physical Chemistry},
    volume = {94},
    number = {26},
    pages = {8897-8909},
    year = {1990},
    doi = {10.1021/j100389a010}
}

@article {hkust,
    author = {Chui, Stephen S.-Y. and Lo, Samuel M.-F. and Charmant, Jonathan P. H. and Orpen, A. Guy and Williams, Ian D.},
    title = {A Chemically Functionalizable Nanoporous Material [Cu$_3$(TMA)$_2$(H$_2$O)$_3$]$_n$},
    journal = {Science},
    volume = {283},
    number = {5405},
    pages = {1148--1150},
    year = {1999},
    doi = {10.1126/science.283.5405.1148}
}

@article{charmm,
    author = {MacKerell, A. D. and Bashford, D. and Bellott, M. and Dunbrack, R. L. and Evanseck, J. D. and Field, M. J. and Fischer, S. and Gao, J. and Guo, H. and Ha, S. and Joseph-McCarthy, D. and Kuchnir, L. and Kuczera, K. and Lau, F. T. K. and Mattos, C. and Michnick, S. and Ngo, T. and Nguyen, D. T. and Prodhom, B. and Reiher, W. E. and Roux, B. and Schlenkrich, M. and Smith, J. C. and Stote, R. and Straub, J. and Watanabe, M. and Wi{\'o}rkiewicz-Kuczera, J. and Yin, D. and Karplus, M.},
    title = {All-Atom Empirical Potential for Molecular Modeling and Dynamics Studies of Proteins},
    journal = {The Journal of Physical Chemistry B},
    volume = {102},
    number = {18},
    pages = {3586-3616},
    year = {1998},
    doi = {10.1021/jp973084f}
}

@article{cp2k,
    title={cp2k: atomistic simulations of condensed matter systems},
    author={Hutter, J{\"u}rg and Iannuzzi, Marcella and Schiffmann, Florian and VandeVondele, Joost},
    journal={Wiley Interdisciplinary Reviews: Computational Molecular Science},
    volume={4},
    number={1},
    pages={15--25},
    year={2014}
}

@article{lammps,
    title={Fast Parallel Algorithms for Short-Range Molecular Dynamics},
    author={Steve Plimpton},
    journal={The Journal of Computational Physics},
    volume={117},
    number={1},
    pages={1-19},
    year={1995}
}

@article{lbfgs,
    title={On the Limited Memory BFGS Method for Large Scale Optimization},
    author={Dong C., Liu and Jorge, Nocedal},
    journal={The Journal Mathematical Programming},
    volume={45},
    number={},
    pages={503-528},
    year={1989},
    doi={10.1007/BF01589116}
}

@article{fire,
    title = {Structural Relaxation Made Simple},
    author = {Bitzek, Erik and Koskinen, Pekka and G{\"a}hler, Franz and Moseler, Michael and Gumbsch, Peter},
    journal = {Physical Review Letters},
    volume = {97},
    issue = {17},
    pages = {170201-170205},
    numpages = {},
    year = {2006},
    month = {},
    publisher = {},
    doi = {10.1103/PhysRevLett.97.170201}
}

@article{hkust_cat,
    author = {Alaerts, Luc and S{\'e}guin, Etienne and Poelman, Hilde and Thibault-Starzyk, Fr{\'e}d{\'e}ric and Jacobs, Pierre A. and De Vos, Dirk E.},
    title = {Probing the Lewis Acidity and Catalytic Activity of the Metal-Organic Framework [Cu$_3$(btc)$_2$]},
    journal = {Chemistry: A European Journal},
    volume = {12},
    number = {28},
    year = {2006},
    pages = {7353-7363},
    doi = {10.1002/chem.200600220}
}

@article {Murnaghan,
    author = {Murnaghan, Francis D.},
    title = {The Compressibility of Media under Extreme Pressures},
    volume = {30},
    number = {9},
    pages = {244--247},
    year = {1944},
    doi = {10.1073/pnas.30.9.244},
    journal = {Proceedings of the National Academy of Sciences}
}

@article{geom,
    author = {Prestipino, C. and Regli, L. and Vitillo, J. G. and Bonino, F. and Damin, A. and Lamberti, C. and Zecchina, A. and Solari, P. L. and Kongshaug, K. O. and Bordiga, S.},
    title = {Local Structure of Framework Cu(II) in HKUST-1 Metallorganic Framework: Spectroscopic Characterization upon Activation and Interaction with Adsorbates},
    journal = {Chemistry of Materials},
    volume = {18},
    number = {5},
    pages = {1337-1346},
    year = {2006},
    doi = {10.1021/cm052191g},
}

@article{csd1,
    author = {Allen, Frank H.},
    title = "{The Cambridge Structural Database: a quarter of a million crystal structures and rising}",
    journal = {Acta Crystallographica Section B},
    year = {2002},
    volume = {58},
    pages = {380--388},
    doi = {10.1107/S0108768102003890},
}

@article{csd2,
    author = {Groom, Colin R. and Allen, Frank H.},
    title = {The Cambridge Structural Database in Retrospect and Prospect},
    journal = {Angewandte Chemie International Edition},
    volume = {53},
    number = {3},
    pages = {662-671},
    doi = {10.1002/anie.201306438},
    year = {2014},
}

当我运行 .bib 文件时,它显示:

警告 - 条目“charmm”包含无法以“ascii”编码的字符。将有问题的字符重新编码为宏。

但我认为我通过将非英文字符写在花括号中解决了这个问题。

另一个问题是,当我编译报告时,它会打印一些奇怪的内容供参考\geom。这是参考页面。检查参考 3。

参考

我不知道如何解决这个问题。我查看了这里的其他问题,但都没有帮助。任何帮助我都会很感激。

答案1

当我在现代 LaTeX 系统(2018 年 4 月以后)上运行 MWE 时,LaTeX 会抱怨

! Package inputenc Error: Unicode character   (U+2009)
(inputenc)                not set up for use with LaTeX.

确实将文件复制粘贴.bibhttps://w3c.github.io/xml-entities/unicode-names.html并在输出中搜索 U+2009 显示条目的标题geom

title = {Local Structure of Framework Cu(II) in HKUST-1 Metallorganic Framework: Spectroscopic Characterization upon Activation and Interaction with Adsorbates},

冒号后面有一个细空格(U+2009),而不是正常空格。

可以通过添加来告诉 LaTeX 如何处理 U+2009

\DeclareUnicodeCharacter{2009}{\thinspace}

回到序言部分。但我认为在这种情况下,留出这么少的空间并不合适。

我建议您将狭窄的空间替换为正常空间。


讯息

WARN - The entry 'charmm' has characters which cannot be encoded in 'ascii'. 
       Recoding problematic characters into macros.

这表明您可能使用的是较旧的 LaTeX 系统(早于 2018 年 4 月),其中 ASCII 仍然是标准编码,而不是 UTF-8。在这种情况下,Biber 会尝试将非 ASCII 字符转换为其对应的 LaTeX 字符,但显然无法对 U+2009 做出明智的处理。

在这种情况下,让事情再次快速运转的唯一方法是用正常空间替换狭窄空间。


至于您收到的其他非 ASCII 字符警告,它们并不能通过添加更多括号来解决。

我建议您使用UTF-8 对.tex文档和.bib文件进行编码,并通过加载告知 LaTeX \usepackage[utf8]{inputenc}(在较新的 LaTeX 版本中,最后一点不再是必要的,因为 UTF-8 是默认设置)。

总体而言不是只要您告诉 Biber 您要使用哪种编码,Biber 最好将其输入Wiórkiewicz-KuczeraWi{\'o}rkiewicz-Kuczera( )。如果可能的话,我强烈建议使用 Unicode 字符,因为这样可以避免不必要的括号(这可能会破坏字距调整)。/ ( )和( ) 也是如此。charmmJ{\"u}rgJürgcp2kS{\'e}guin/Séguinhkust_cat

您可能还想看看hkust

title = {A Chemically Functionalizable Nanoporous Material [Cu$_3$(TMA)$_2$(H$_2$O)$_3$]$_n$},

似乎是对数学模式的轻微滥用。有专门的软件包,如mhchemchemmacros允许您排版化学公式,而无需在文本和数学模式之间来回切换。

相关内容