XeLaTeX 无法与 \printbibliography 配合使用

XeLaTeX 无法与 \printbibliography 配合使用

我尝试了网上找到的许多不同的补救措施,以便使用 进行XeLaTeX编译BibTeX,但由于我并不是一个经验丰富的用户,所以我一无所获。我使用 是XeLaTeX因为我想使用不同的颜色、字体等。我使用 编译BibTeX一次,然后用 编译XeLaTeX两次,但我仍然无法使我的引用起作用。我包含了我的整个文件(除了实际文本),希望这里更有经验的人可以找到问题所在。如果这很重要,我也TeXMaker使用OSX

\documentclass[a4paper, 11pt]{article}
\usepackage[left=20mm, right=20mm, top=15mm, bottom=8mm, headheight=20pt, includehead, includefoot, heightrounded]{geometry}
\usepackage[version=3]{mhchem} % Package for chemical equation typesetting
\usepackage{comment}
\usepackage{fontspec}
\usepackage{enumitem}
\usepackage[dvipsnames]{xcolor}
\usepackage{xfrac}
\usepackage{upgreek}
\definecolor{blue(pigment)}{rgb}{0.2, 0.2, 0.6}
\definecolor{bluegray}{rgb}{0.4, 0.6, 0.8}
\usepackage{scrlayer}
\DeclareNewLayer[
foreground,
contents={%
  \parbox[b][\layerheight][c]{\layerwidth}
    {\centering This page is intentionally left blank.}%
  }
 ]{blankpage.fg}
\DeclarePageStyleByLayers{blank}{blankpage.fg}
\setlength\parindent{0pt} % Removes all indentation from paragraphs
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[C]{--~\thepage~--}\rhead{DOCUMENT CODE}
\renewcommand*{\headrulewidth}{0pt}
\renewcommand*{\footrulewidth}{0pt}
\setlength{\headheight}{5pt}
\makeatletter
\let\ps@plain\ps@fancy
\makeatother
\renewcommand{\labelenumi}{\alph{enumi}.}
\usepackage{yfonts}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage[rm=oldstyle]{cfr-lm}
\usepackage{titling}
\usepackage{pdfpages}
\usepackage{afterpage}
\newcommand\blankpage{%
    \null
    \thispagestyle{empty}%
    \addtocounter{page}{0}%
    \newpage}
\newfontfamily\otherfont{remagg_cz}
\color{blue(pigment)}
\fancypagestyle{nofooter}{%
  \fancyfoot{}%
}
\usepackage[backend=biber,style=numeric-comp]{biblatex}
\DeclareCiteCommand{\supercite}[\mkbibsuperscript]
  {\usebibmacro{cite:init}%
   \let\multicitedelim=\supercitedelim
   \iffieldundef{prenote}
     {}
     {\BibliographyWarning{Ignoring prenote argument}}%
   \iffieldundef{postnote}
     {}
     {\BibliographyWarning{Ignoring postnote argument}}%
  \bibopenbracket}%
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}\bibclosebracket}
\usepackage{filecontents}
\begin{filecontents}{test.bib}
@book{A1,
  author = {Author1, Name1., Author2, Name2.},
  year = {1992},
  title = {Title A1},
}
@article{B2,
  author = {Author, A. B.},
  year = {2020},
  title = {Title B2},
}
\end{filecontents}
\addbibresource{test.bib}
\let\cite=\supercite
%
\begin{document}
\includepdf{first.eps} % Front page
\newpage\null\thispagestyle{blank}\newpage
\includepdf{second.eps} % Second page
\newpage\null\thispagestyle{blank}\newpage
\includepdf{third.eps} % Third page
\newpage\null\thispagestyle{blank}\newpage
\setlength{\droptitle}{-6em}
\title{Document Title}
\author{Author name}
\date{}
\maketitle
\thispagestyle{empty}
\vspace{-1.5cm}
\frenchspacing
%
\section*{Section 1}
This project is based on previous work\cite{A1,B1} done under the auspices of the university.
\printbibliography
\end{document}

在这种情况下可能出了什么问题?序言中是否有与我用于参考书目的代码相冲突的内容?我用于参考书目的代码可在此处找到Biblatex supercite 带方括号和分组

当我完成时BibTeX我得到的结果是

Process started

This is BibTeX, Version 0.99d (TeX Live 2018) The top-level auxiliary file: report.aux I found no \citation commands---while reading file report.aux I found no \bibdata command---while reading file report.aux I found no \bibstyle command---while reading file report.aux (There were 3 error messages)

Process exited with error(s)

虽然我编译两次后XeLaTeX没有关于参考书目的错误消息,只有以下警告

警告 1

 LaTeX Warning: Overwriting file `./test.bib'.
 \openout15 = `test.bib'.
 Package biblatex Info: Trying to load language 'english'...
 Package biblatex Info: ... file 'english.lbx' found.
 (/usr/local/texlive/2018/texmf-dist/tex/latex/biblatex/lbx/english.lbx
 File: english.lbx 2018/03/04 v3.11 biblatex localization (PK/MW))

警告 2

LaTeX Warning: Citation 'A1' on page 7 undefined on input line 115.

警告 3

LaTeX Warning: Empty bibliography on input line 122.

最后警告 4

LaTeX Warning: There were undefined references.
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex) report
(biblatex) and rerun LaTeX afterwards.
Package logreq Info: Writing requests to 'report.run.xml'.
\openout1 = `report.run.xml'.

先感谢您!

相关内容