Biblatex printbibliography 未定義的控制序列錯誤

Biblatex printbibliography 未定義的控制序列錯誤

我正在用乳膠寫一份報告,但\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 最好輸入Wiórkiewicz-Kuczera( ) Wi{\'o}rkiewicz-Kuczeracharmm只要您告訴 Biber 您要使用哪種編碼即可。如果可能的話,我強烈喜歡在這裡使用 Unicode 字符,因為這樣可以避免不必要的大括號對(這可能會破壞字距調整)。J{\"u}rg/ Jürg( cp2k) 和S{\'e}guin/Séguin( ) 也同樣如此hkust_cat

您可能還想看看標題hkust

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

似乎是對數學模式的輕微濫用。有專門的包,例如mhchemchemmacros允許您排版化學公式,而無需在文字和數學模式之間來回切換。

相關內容