软件包 inputenc 错误:Unicode 字符 (U+2005)(inputenc) 未设置为用于 LaTeX

软件包 inputenc 错误:Unicode 字符 (U+2005)(inputenc) 未设置为用于 LaTeX

我在文档中插入引文时收到一条错误消息,内容为软件包 inputenc 错误:Unicode 字符 (U+2005)(inputenc) 未设置为用于 LaTeX。...Paul, J.~C. Conesa, S.~Shleev, A.~L. De,在.bbl文件中。就像截图一样。

TeXStudio报错截图

单击错误消息后,我可以获得以下代码,并且问题报告在第 31 行。

\providecommand*{\mcitethebibliography}{\thebibliography}
\csname @ifundefined\endcsname{endmcitethebibliography}
{\let\endmcitethebibliography\endthebibliography}{}
\begin{mcitethebibliography}{2}
\providecommand*{\natexlab}[1]{#1}
\providecommand*{\mciteSetBstSublistMode}[1]{}
\providecommand*{\mciteSetBstMaxWidthForm}[2]{}
\providecommand*{\mciteBstWouldAddEndPuncttrue}
  {\def\EndOfBibitem{\unskip.}}
\providecommand*{\mciteBstWouldAddEndPunctfalse}
  {\let\EndOfBibitem\relax}
\providecommand*{\mciteSetBstMidEndSepPunct}[3]{}
\providecommand*{\mciteSetBstSublistLabelBeginEnd}[3]{}
\providecommand*{\EndOfBibitem}{}
\mciteSetBstSublistMode{f}
\mciteSetBstMaxWidthForm{subitem}
{(\emph{\alph{mcitesubitemcount}})}
\mciteSetBstSublistLabelBeginEnd{\mcitemaxwidthsubitemform\space}
{\relax}{\relax}

\bibitem[Honda \emph{et~al.}(2017)Honda, Watanabe, Hagiwara, Ida, and
  Ishihara]{HONDA2017400}
Y.~Honda, M.~Watanabe, H.~Hagiwara, S.~Ida and T.~Ishihara, \emph{Applied
  Catalysis B: Environmental}, 2017, \textbf{210}, 400 -- 406\relax
\mciteBstWouldAddEndPuncttrue
\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}
{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax
\EndOfBibitem
\bibitem[Jarne \emph{et~al.}(2019)Jarne, Paul, Conesa, Shleev, De Lacey, and
  Pita]{doi:10.1002/celc.201900360}
C.~Jarne, L.~Paul, J.~C. Conesa, S.~Shleev, A.~L. De Lacey and M.~Pita,
  \emph{ChemElectroChem}, 2019, \textbf{6}, 2755--2761\relax
\mciteBstWouldAddEndPuncttrue
\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}
{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax
\EndOfBibitem
\end{mcitethebibliography}

引用的 BibTeX 代码如下:

@article{doi:10.1002/celc.201900360,
author = {Jarne, Carmen and Paul, Logan and Conesa, Jose Carlos and Shleev, Sergey and De Lacey, Antonio L. and Pita, Marcos},
title = {Underpotential Photoelectrooxidation of Water by SnS2−Laccase Co-catalysts on Nanostructured Electrodes with Only Visible-Light Irradiation},
journal = {ChemElectroChem},
volume = {6},
number = {10},
pages = {2755-2761},
doi = {10.1002/celc.201900360},
url = {https://chemistry-europe.onlinelibrary.wiley.com/doi/abs/10.1002/celc.201900360},
eprint = {https://chemistry-europe.onlinelibrary.wiley.com/doi/pdf/10.1002/celc.201900360},
year = {2019}
}

我的序言如下:

\documentclass[12pt, a4paper]{article}
\usepackage[left=1.5cm, right=1.5cm, top=1.5cm, bottom=1.5cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{times,mathptmx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{chemformula}
\usepackage{graphicx}
\usepackage[numbers, super, sort & compress, comma]{natbib}
\usepackage[colorlinks, citecolor=blue, linkcolor=blue, urlcolor=blue]{hyperref}
\usepackage[font=normal, labelfont=bf]{caption}
\usepackage{float}
\usepackage{url}
\usepackage{booktabs}
\usepackage{titlesec}
\titleformat*{\section}{\normalsize\bfseries}
\titleformat*{\subsection}{\normalsize\bfseries}
\titleformat*{\subsubsection}{\normalsize\bfseries}
\titlespacing*{\section}{0pt}{0pt}{0pt}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}
\titlespacing*{\subsubsection}{0pt}{0pt}{0pt}
\def\UrlBreaks{\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J
    \do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V
    \do\W\do\X\do\Y\do\Z\do\[\do\\\do\]\do\^\do\_\do\`\do\a\do\b
    \do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n
    \do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z
    \do\.\do\@\do\\\do\/\do\!\do\_\do\|\do\;\do\>\do\]\do\)\do\,
    \do\?\do\'\do+\do\=\do\#}

我对这个问题完全不熟悉,所以我真诚地请求社区的帮助。

答案1

U+2005 是 1/4 em 空格字符。最好删除它们并替换为普通空格,但你可以这样做

\DeclareUnicodeCharacter{2005}{\hspace{0.25em}}

但不要这么做,角色介于 De Lacy 之间:

  U+0020 SPACE     \space
  U+0044 LATIN CAPITAL LETTER D     D
  U+0065 LATIN SMALL LETTER E     e
  U+2005 FOUR-PER-EM SPACE     &emsp14; \hspace{0.25em}<<<<<<<<<<<<
  U+004c LATIN CAPITAL LETTER L     L
  U+0061 LATIN SMALL LETTER A     a
  U+0063 LATIN SMALL LETTER C     c
  U+0065 LATIN SMALL LETTER E     e
  U+0079 LATIN SMALL LETTER Y     y
  U+002c COMMA     &comma; \mathcomma ,
  U+0020 SPACE     \space

用普通空格替换它。

答案2

如果有人想知道你是如何找到这个角色的(毕竟它是看不见的),你可以粘贴你认为有问题的代码部分这里并使用正则表达式

/[^\x00-\x7F]

突出显示非 ASCII 字符(尝试使用 OP 的 bibtex 代码片段)。更好的是,由于我们收到了有关不支持哪个字符的警告,因此您可以执行vim 搜索

/<ctr-v>u2005

相关内容