[Tex/LaTex] Sort bibliography in order of appearance

biblatexbibliographiesbibtexsorting

I'm trying to use \bibliographystyle{unsrt} to sort my bibliography in order of appearance. From here I know that I can't mix the biblatex package with \bibliographystyle. However, when I remove biblatex another compile error arises on a different line.

Here's what I have tried…

% BEGIN -- SETUP DOCUMENT (OVERLEAF) --
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage{csquotes}
\bibliographystyle{unsrt}
\DeclareLanguageMapping{british}{british-apa}
\usepackage[pdftex]{graphicx}
\addbibresource{ref.bib}

\let\cite\parencite
\begin{document}
% END -- SETUP DOCUMENT (OVERLEAF) --


\title{ Machine Learning for 3D Segmentation }
\author{Kendall Weihe}
\date{October 27, 2016}
\maketitle

\printbibliography[title=References]
\nocite{*}

\end{document}

It throws an error at the line \DeclareLanguageMapping{british}{british-apa}

Best Answer

You cannot mix BibTeX and biblatex.

In your code remove \bibliographystyle{unsrt} (which is BibTeX language) and load biblatex with sorting=none

\usepackage[backend=biber,style=numeric,sorting=none]{biblat‌​ex}

You will probably not need \DeclareLanguageMapping{british}{british-apa}, which is only necessary if you use the biblatex-apa style.