0

The problem is that I cite some book and the cite number starts with 12 but I want the order how I cite ( first cite = 1, second = 2, etc.).

\documentclass[oneside]{ausarbeitung}
\usepackage[backend=biber,style=numeric,sorting = none]{biblatex}
\bibliography{latexlit.bib}
\newtheorem{Bsp}{Beispiel}[chapter]

\begin{document}

...
\cite{1}
\cite{2}
....

\printbibliography
\end{document}

I get this error:

The package biblatex has already been loaded with options:
[toc=bib,style=numeric,backend=biber]
There has now been an attempt to load it with options
[toc=bib,style=numeric,backend=biber,sorting = none]

Adding the global options: toc=bib,style=numeric,backend=biber,toc=bib,style=numeric,backend=biber,sorting = none but when I'm adding this, the problem is still there.

10
  • 3
    Does this answer your question? Biblatex citation order
    – Marijn
    Feb 19, 2020 at 21:19
  • From the proposed duplicate: \usepackage[backend = biber, style = numeric, sorting = none]{biblatex} should work.
    – Marijn
    Feb 19, 2020 at 21:20
  • sorting=none should do what you want.
    – moewe
    Feb 19, 2020 at 21:20
  • no guys it doesnt work, i get an error (see edit)
    – akameme
    Feb 19, 2020 at 21:33
  • 2
    There is github.com/r4gus/Wahlprojekt/blob/master/ausarbeitung.cls from Hochschule Aalen, is that it? That class indeed loads biblatex with toc=bib,style=numeric,backend=biber. You can try putting \PassOptionsToPackage{sorting=none}{biblatex} on the top of your document (even before \documentclass{ausarbeitung}) and then remove the \usepackage statement from your code.
    – Marijn
    Feb 19, 2020 at 21:41

1 Answer 1

1

To number the citations in the order that they appear in the document you can use the sorting=none option for biblatex.

However, the class ausarbeitung (from https://github.com/r4gus/Wahlprojekt/blob/master/ausarbeitung.cls) loads biblatex itself. If you try to load it again in the preamble of the document then the compilation will fail with the error ! LaTeX Error: Option clash for package biblatex.. In this case you can use the command \PassOptionsToPackage in your preamble before the package is loaded. In this case the package is loaded by the class, so the command should be placed before \documentclass.

MWE:

\PassOptionsToPackage{sorting=none}{biblatex}
\documentclass[oneside]{ausarbeitung}
\addbibresource{biblatex-examples.bib}

\begin{document}

\cite{aksin}
\cite{yoon}
\cite{bertram}

\printbibliography
\end{document}

Result:

enter image description here

Note that I used \addbibresource instead of \bibliography, which is deprecated in biblatex (see the manual on page 88). For the citations I used biblatex-examples.bib, which is an example file that is pre-installed with each biblatex installation, so it is convenient for asking and answering questions because it is available for everybody.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .