我的 BibLaTeX 书目无法正确显示章节编号,出现了两个问题,首先,章节编号没有像所有其他章节一样显示在目录中,而我希望情况确实如此,其次,显示的章节编号是章节标题,比应有的少一,例如第 6 章是“6. 结论”,而书目显示为“6. 参考文献”,如果这是愚蠢的,我深表歉意,我大约花了两天时间使用 LaTeX,我的代码发布如下:
\documentclass[12pt]{report}
\newcommand{\subscript}[1]{\ensuremath{_{\textrm{#1}}}}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{enumerate}
\usepackage{setspace}
\usepackage{titlesec}
\usepackage[top=1cm]{geometry}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage[style=authoryear]{biblatex}
\addbibresource{Bibliography.bib}
\author{Bob}
\title{Hey}
\date{Monday 1\textsuperscript{st} January 2018}
\hyphenpenalty=100000
\begin{document}
\pagenumbering{gobble}
\maketitle
\onehalfspacing
\addcontentsline{toc}{chapter}{Table of Contents}
\tableofcontents
\newpage
\titleformat{\chapter}[display]
{\normalfont\bfseries}{}{0pt}{\Large\arabic{chapter}. }
%abstract goes here
\pagenumbering{arabic}
\chapter{Introduction}\label{chapInt}
\chapter{Aims and Objectives}\label{chapAim}
\chapter{Meathodology}\label{chapMeath}
\chapter{Results}\label{chapRes}
\chapter{Discussion}\label{chapDis}
\chapter{Conclusion}\label{chapCon}
\printbibliography[heading=bibintoc, title={Works Cited}]
\end{document}
先感谢您。
答案1
您应该使用heading=bibnumbered
,而不是heading=bibintoc
:
\documentclass[12pt]{report}
\newcommand{\subscript}[1]{\ensuremath{_{\textrm{#1}}}}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{enumerate}
\usepackage{setspace}
\usepackage{titlesec}
\usepackage[top=1cm]{geometry}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage[style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}
\author{Bob}
\title{Hey}
\date{Monday 1\textsuperscript{st} January 2018}
\hyphenpenalty=100000
\begin{document}
\pagenumbering{gobble}
\maketitle
\onehalfspacing
\addcontentsline{toc}{chapter}{Table of Contents}
\tableofcontents
\newpage
\titleformat{\chapter}[display]
{\normalfont\bfseries}{}{0pt}{\Large\arabic{chapter}. }
%abstract goes here
\pagenumbering{arabic}
\chapter{Introduction}\label{chapInt}
\chapter{Aims and Objectives}\label{chapAim}
\chapter{Meathodology}\label{chapMeath}
\chapter{Results}\label{chapRes}
\chapter{Discussion}\label{chapDis}
\chapter{Conclusion}\label{chapCon}
\nocite{*}
\printbibliography[heading=bibnumbered, title={Works Cited}]
\end{document}