biblatex 没有对参考书目进行排序

biblatex 没有对参考书目进行排序

我正在用 LaTeX 撰写论文,无法让参考书目按引用顺序出现。

我正在使用biblatex,并且已经使用过,sorting=none但不起作用。起初它工作正常,但在尝试将引用样式更改为哈佛样式后,它停止工作。我删除了我所做的所有更改,但它不再起作用了。我不知道这是 mendeley(我用它来管理我的参考文献)、我的代码还是其他什么的问题。

这是我的代码:

\documentclass[12pt,a4paper,oneside]{report}
\usepackage{subfiles} %For join each section
\usepackage{graphicx} %For images and tables
\usepackage{subfig} %For sub images
\usepackage{float} %For the tables and images?
\usepackage{amssymb} %Math symbols
\usepackage{setspace} %Spacing
\usepackage{sectsty} %Italic subsection
\usepackage[table,xcdraw]{xcolor} %Table colours.
\usepackage{multirow} %Multirows
\usepackage{hhline} %For lines in the columns with colours
\usepackage{longtable} %Long tables
\usepackage{framed} %For Boxes
\usepackage{float} %Floats environment for caption in boxes.
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{capt-of}% Captions outse Float For use the larger `caption` package
\usepackage[width=16.5cm, left=2.5cm, height=25.7cm]{geometry} %Margins
\usepackage{titlesec}

\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{10pt}{\LARGE}
\titlespacing*{\chapter}{0pt}{0pt}{10pt}
\titlespacing*{\section}{0pt}{5pt}{5pt}
\titlespacing*{\subsubsection}{0pt}{5pt}{5pt}
\titlespacing*{\paragraph}{0pt}{0pt}{0pt}

\sectionfont{\large\bfseries}
\subsubsectionfont{\normalfont\bfseries} 
\paragraphfont{\normalfont\bfseries\itshape}
\newfloat{Box}{tpbh}{Box} %Creates float "environment" Box

\usepackage[style=numeric-comp,backend=biber,sorting=nty]{biblatex}%For the References

\addbibresource{Project.bib} %The references

\newcommand\frontmatter{%
    \clearpage
    %\@mainmatterfalse
    \pagenumbering{roman}}

\newcommand\mainmatter{%
    \clearpage
    % \@mainmattertrue
    \pagenumbering{arabic}}

\newcommand\backmatter{%
    \if@openright
    \cleardoublepage
    \else
    \clearpage
    \fi
    % \@mainmatterfalse
}

\begin{document}

    \begin{titlepage}
        ...
    \end{titlepage}

    \newgeometry{width=16.5cm, left=2.5cm, height=25.7cm}

    \frontmatter
    \onehalfspacing
    \tableofcontents
    \listoffigures
    \listoftables
    \listof{Box}{List of Boxes}
    \clearpage
    \clearpage
    \addcontentsline{toc}{chapter}{Introduction}

    \mainmatter

    \subfile{Introduction.tex}
    \subfile{background.tex}
    \subfile{Ch1.tex}
    \subfile{Ch2.tex}
    \subfile{Ch3.tex}
    \clearpage
    \addcontentsline{toc}{chapter}{Bibliography}

    \backmatter
    \printbibliography

\end{document}

相关内容