XeLaTeX 不適用於 \printbibliography

XeLaTeX 不適用於 \printbibliography

我已經嘗試了在網上找到的許多不同的補救措施來進行XeLaTeX編譯BibTeX,但是,由於我不是一個非常有經驗的用戶,所以我空手而歸。我使用它是因為我想XeLaTeX使用不同的顏色、字體等。我包含了我的整個文件(除了實際文本),希望這裡更有經驗的人能夠找到問題。如果重要的話,我也會使用on 。BibTeXXeLaTeXTeXMakerOSX

\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'.

先感謝您!

相關內容