Overleaf:生成参考书目时出错,\printbibliography 的控制序列未定义

Overleaf:生成参考书目时出错,\printbibliography 的控制序列未定义

我在 Overleaf 文档上工作正常,直到我插入引文后,用来\printbibliography生成参考列表时出现以下错误:

Undefined control sequence.                      main.tex line 60
The compiler is having trouble understanding a command you have used. Check that the command is spelled correctly. If the command is part of a package, make sure you have included the package in your preamble using \usepackage{...}.
namepartfamily ->Zim\x 
                        {fffd}\x {fffd}nyi
l.60 \end
         {document}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

注释掉后此错误消失\printbibliography,但未生成参考列表。我可以确认我添加了所有必需的包。请参阅以下文档:

\documentclass[a4paper,10pt]{report}
\usepackage{biblatex}
\addbibresource{references.bib}
\usepackage{graphicx}
\usepackage[top=25mm, bottom=25mm, left=25mm, right=25mm]{geometry}

\begin{document}

\input{titlepage}
    %Table of content
    \tableofcontents



%Abasract page
\newpage
    \Large
     \begin{center}
     \addcontentsline{toc}{section}{Abstract}
    \textbf{\textit Abstract} 
    \end{center}
    \hspace{10pt}

    %\normalsize
    This is a simple one-page abstract template. Please keep your abstract length at one page. The abstract should be in English.
    \newpage

%begin main document
\chapter{Introduction}

    \section{Statement of Problem}
    This is the beginning of the introduction section.
    %\subsection{Research Questions}
    \section{Motivation}

    \section{Research Objectives}

    \section{Pre-Thesis Structure}

%===CHAPTER TWO ===
\chapter{Fundamental Concepts}


%=== CHAPTER THREE ===
\chapter{State of the Art}
   \section{Transport}


%=== CHAPTER FOUR ===
\chapter{Material and Methods}


%=== CHAPTER FIVE ===
\chapter{Pilot Study}


%=== Reference Lists ====

\printbibliography
\end{document}

答案1

你的.bib文件可能包含类似这样的行

author  = {József Zimányi},

(侦查人员查明姓名的所有功劳都归于林连子评论)。您的文件很可能.bib采用 UTF-8 或其他非 ASCII 编码进行编码。

但是由于你的前言(以及 Overleaf 上过时的 TeX 系统),LaTeX 仅接受 US-ASCII 输入(较新的 LaTeX 将使用 UTF-8 作为默认编码)。让事情恢复正常最简单的方法是告诉 LaTeX 你想使用 UTF-8

\usepackage[utf8]{inputenc}

您可能需要清除缓存(请参阅https://www.overleaf.com/learn/how-to/Clearing_the_cache) 然后才能干净地重新编译,但随后您应该会得到所需的输出。

相关内容