目录中的参考书目不起作用

目录中的参考书目不起作用

我试图在目录中显示参考书目,但它没有出现,尽管我为它添加了书签。

在此处输入图片描述

这是我的.tex 的序言:

% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
  12pt,
  oneside]{report}

% Set line spacing
\usepackage{setspace}
\setstretch{1.5}


\title{PhD Methodology}
\author{Frs Lry}
\date{2021-04-03}





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Start of the documents
\begin{document}
\maketitle

% Roman numbering for content before toc and toc itself
\cleardoublepage 
\pagenumbering{roman}

{
\setcounter{tocdepth}{1}
\tableofcontents
}


% Start the arabic numbering at the 1st chapter
\cleardoublepage 
\pagenumbering{arabic}

这是最后的参考书目部分

\singlespacing % reset the spacing of the bibliography style
\printbibliography[heading=bibnumbered, title=References]

编辑:此外,在 Rstudio 中运行 bookdown 脚本时,我总是收到以下错误消息:

Warning message:
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please rerun LaTeX.
(biblatex)                Page breaks have changed.

答案1

找到了解决方案:

我正在使用 R 中的 bookdown 包,我发现了一个非常不优雅的解决方案,并将其添加到我的 LaTeX 模板中:


%%%%%%%%%%%%%% Here is the part that I am using for the bibliography to be displayed in the toc

% First step: I define the name and label of the biblio part
\chapter{References}\label{references}
{
% I temporarily redefine the clearpage in order for the bib to not be printed on a new page
\renewcommand{\clearpage}{}
\printbibliography[heading=none] % I print the biblio and delete the default name 
}

相关内容