背頁:產生參考書目時發生錯誤 未定義控制序列 \printbibliography

背頁:產生參考書目時發生錯誤 未定義控制序列 \printbibliography

\printbibliography我在我的 Overleaf 文件上工作得很好,直到在使用生成參考列表後出現以下錯誤時插入引文:

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)之後您可以乾淨地重新編譯,但是您應該獲得所需的輸出。

相關內容