未找到 ext-authoryear 样式且 DeclareInnerCiteDelims 不起作用

未找到 ext-authoryear 样式且 DeclareInnerCiteDelims 不起作用

我对 LaTeX 还很陌生,到目前为止,整个环境对我来说相当令人困惑,所以如果我做了一些愚蠢的事情,请容忍我!

希望下面的 MWE 是一个很好的起点:

\documentclass[fontsize=12pt,english]{report}
% package loading
% encoding
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} % new

% page and text layout setup
\usepackage[a4paper,top=20mm,bottom=10mm,left=20mm,right=50mm]{geometry}

% language and spelling check
\usepackage{babel}

% miscellaneous document formatting
\usepackage{setspace}
\usepackage{titlesec}
\usepackage{fontspec}

% document structuring
% table of content formatting
\usepackage{tocloft}
% appendix
\usepackage{appendix}

% tables and lists
\usepackage{enumitem}
\usepackage{longtable}

% graphics and images display
\usepackage{graphicx}
\graphicspath{ {images/} }

% table and list formatting and referencing
\usepackage{caption}
\usepackage{subcaption} 

% math symbols and formula display
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{csquotes}

% including hyperlinks in the ToC for easier navigation
\usepackage{hyperref}
\hypersetup{pdfborder={0 0 0}}

% bibliography management and back-end
% setting referencing + citation styles
\usepackage[backend=biber, style=ext-authoryear, autocite=footnote, maxnames=1, sorting=nyt, sortcites=true, giveninits=true, uniquename=init]{biblatex}

\DeclareInnerCiteDelims{footcite}{\bibopenparen}{\bibcloseparen}

% customize bibliography formatting
\renewcommand{\multinamedelim}{\slash\space}
\renewbibmacro{in:}{ %eliminates the 'in' in the bibliography
\ifentrytype{article}{}{%
\printtext{\bibstring{in}\intitlepunct}}}

% reference your '.bib' file that stores all your sources
\addbibresource{references.bib}

% advanced document formatting
% line spacing, paragraph indention and paragraph spacing
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt}
\onehalfspacing % \renewcommand{\baselinestretch}{1.5} 
\pagestyle{plain}

% redefining title layouts
\titleformat{\chapter} {\normalfont\bfseries}{\thechapter.}{8pt}{} 
\titleformat{\section} {\normalfont\bfseries}{\thesection.}{8pt}{}
\titleformat{\subsection} {\normalfont\bfseries}{\thesubsection.}{8pt}{}
\titleformat{\subsubsection} {\normalfont\bfseries}{\thesubsubsection.}{8pt}{}
\titleformat{\subsubsubsection} {\normalfont\bfseries}{\thesubsubsubsection.}{8pt}{}

% title spacing for chapters and lower-level sections
\titlespacing*{\chapter}{0pt}{0pt}{0pt}
\titlespacing*{\section}{0pt}{0pt}{0pt}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}
\titlespacing*{\subsubsection}{0pt}{0pt}{0pt}
\titlespacing*{\subsubsubsection}{0pt}{0pt}{0pt}

% set font
\setmainfont{Times New Roman}

% define any style difference to main document before begin document
\pagenumbering{roman}
\renewcommand*\contentsname{Table of Contents}

% main document creation
\begin{document}
   
\input{titlepage}

\addcontentsline{toc}{section}{Abstract}
\input{chapters/Abstract}

\tableofcontents

\newpage

\addcontentsline{toc}{section}{List of Figures}
\listoffigures
\newpage

\addcontentsline{toc}{section}{List of Tables}
\listoftables
\newpage

\addcontentsline{toc}{section}{Table of Attachments}
\chapter*{Table of attachments}
\input{chapters/Table_of_attachments}

\addcontentsline{toc}{section}{List of Abbreviations}
\chapter*{List of abbreviations}
\input{chapters/List_of_abbreviations}

\addcontentsline{toc}{section}{List of Symbols}
\chapter*{List of symbols}
\input{chapters/List_of_symbols}

% Introduction title
\chapter{Introduction}
\pagenumbering{arabic}
\input{chapters/Introduction}

% Chapter One Title
\chapter{Literature review}
\input{chapters/Chapter01}

% Chapter Two Title
\chapter{Empirical analysis}
\input{chapters/Chapter02}

% Chapter Three Title
\chapter{Discussion of results}
\input{chapters/Chapter03}

% Conclusion Title
\chapter{Conclusion}
\input{chapters/Conclusion}

\addcontentsline{toc}{section}{Appendix}
\appendix
\input{chapters/Appendix}

\addcontentsline{toc}{section}{References}
\printbibliography[title={References}]
\newpage

\addcontentsline{toc}{section}{Acknowledgements}
\chapter*{Acknowledgements}
\input{chapters/Acknowledgements}
\newpage

\addcontentsline{toc}{section}{Declaration of Academic Integrity}
\chapter*{Declaration of academic integrity}
\input{chapters/Statement_integrity}

\end{document}

目前,我看到三个错误。

  1. /usr/local/texlive/2017/texmf-dist/tex/latex/biblatex/biblatex.sty,第 13046 行包 biblatex 错误:未找到样式‘ext-authoryear’。l.13046 \RequireBibliographyStyle{\blx@bbxfile}。无法找到参考书目样式“ext-authoryear”。
  2. /usr/local/texlive/2017/texmf-dist/tex/latex/biblatex/biblatex,第 13047 行包 biblatex 错误:未找到样式‘ext-authoryear’。请参阅 biblatex 包文档以了解解释 l.13047 \RequireCitationStyle{\blx@cbxfile}。无法找到引用样式“ext-authoryear.sty”。
  3. l.61\DeclareInnerCiteDelims{footcite}{\bibopenparen}{\bibcloseparen}错误消息顶行末尾的控制序列从未被 \def'ed。

请注意,每当我将样式改回基本 biblatexauthor year样式时,引用和脚注都可以正常工作,只是命令DeclareInnerCiteDelime似乎没有执行任何操作,而且year我的脚注中仍然缺少括号。

非常感谢任何指点和/或评论!谢谢

答案1

这里的技巧已经隐藏在有用的错误消息中,但多亏了 Ivan,我才终于意识到我必须去哪里寻找。

本质上的ext-biblatex风格是2018-03-08仅 TeX Live 版本及以上支持这是软件包的公开发布日期biblatex-ext。由于我在在线 LaTeX 编辑器 shareLaTeX 中使用 TeX Live 2017,因此ext找不到定义的样式。快速更改设置以使用更高版本的 TeX Live(在我的情况下是 2020.1),一切都按预期进行!

相关内容