0
% bibliography
\RequirePackage[backend=bibtex,bibencoding=utf8]{biblatex}
%\ExecuteBibliographyOptions{backref=false,backrefstyle=three+,url=true,urldate=comp,abbreviate=false,maxnames=20}
\DeclareBibliographyCategory{cited}
\let\defaultcite\cite\renewcommand*\cite[2][]{\addtocategory{cited}{#2}\defaultcite[#1]{#2}}
\let\defaulttextcite\textcite\renewcommand*\textcite[2][]{\addtocategory{cited}{#2}\defaulttextcite[#1]{#2}}
\setcounter{biburllcpenalty}{7000}
\setcounter{biburlucpenalty}{8000}
\AfterPackage{biblatex}{
\PreventPackageFromLoading[\errmessage{You tried to load the cite package that is not compatible with biblatex.}]{cite}
}`here

\documentclass{scrbook} 
\usepackage[hidelinks]{hyperref}
\newcommand\bcor{12mm} % <= Bindungskorrektur für Druckversion
\usepackage{osm-thesis}
\usepackage{longtable}
\usepackage{pgfplots}

\begin{document}
\selectlanguage{english}
\pagenumbering{roman}
\include{content/titlepage}
\ifisbook\pagestyle{plain}\cleardoubleemptypage   \include{content/disclaimer}\fi
\ifisbook\cleardoubleemptypage\fi\include{content/abstract}

\tableofcontents

\pagenumbering{arabic}
\listoftables
\listoffigures
\pagestyle{headings}
\include{content/chapter1}
\appendix\include{content/appendix} % example

\onecolumn{
\ifisbook\cleardoubleemptypage\fi
\phantomsection\addcontentsline{toc}{chapter}{\refname}
\printbibliography[category=cited, title={References}]}

\end{document}

I am using the document class scrbook and I found that my references are randomly called in the final compiled pdf even I add them and called them in order in the text. How to make show them incrementally from [1] to [150]?

My text: e.g, (....bring societies closer~\cite{fb})

My .bib file:

    @misc{fb,
  author = {Facebook Inc.},
  title = {{Facebook Company Info}},
  howpublished = "\url{https://about.fb.com/company-info/}",
  year = {2021}, 
  note = "[Online; accessed 21-Jan-2021]"
}
marquinho
  • 1,721
Krebto
  • 923
  • 1
    they will not be in a random order, they will be in the order specified by the bibliography style that you have chosen, but you have not shown here. Usually they are either in order of reference in the file (unsorted) or in alphabetic order of authors. – David Carlisle Mar 01 '22 at 11:32
  • @DavidCarlisle I have add the code now, how can I force my .bib list? – Krebto Mar 01 '22 at 11:38
  • 2
    Please note that (1) your code is incomplete, there is no document class or preamble, (2) it depends on files we do not have access to. Please make your example as small as possible without any irrelevant items. – daleif Mar 01 '22 at 12:03
  • @daleif I have updated the tpe of the document class its \documentclass{scrbook} – Krebto Mar 01 '22 at 12:06
  • 1
    Again since the included files are not something we have access to, they are irrelevant. And where does osm-thesis come from? I'm assuming osm-thesis is loading biblatex. I'm quite sure biblatex has options to number the bibliography. – daleif Mar 01 '22 at 12:14
  • 1
    the posted code is no use to anyone trying to help you as we can not run it to see the issue. but \printbibliography[ implies that you are using biblatex (despite the fact that you tagged this bibtex) so you will have specified the bibliography style using boblatex not \bibliographystyle (which is for bibtex) but we have still not seen any relevant code. – David Carlisle Mar 01 '22 at 12:23
  • @DavidCarlisle I wish now its updated – Krebto Mar 01 '22 at 12:47
  • @daleif I wish now its updated – Krebto Mar 01 '22 at 12:47
  • Just imagine you are not you and you copied that file and tried to run it. We do not have \usepackage{osm-thesis} (which presumably is where teh biblatex settings are that you want to change) this will not include anything \include{content/chapter1} and neither will \include{content/titlepage} so there is no \cite command in the document so nothing to test. – David Carlisle Mar 01 '22 at 12:54
  • @DavidCarlisle thank you for your time, I have added the command \cite already... so I am really confused now – Krebto Mar 01 '22 at 13:07
  • 1
    Try to change \RequirePackage[backend=bibtex,bibencoding=utf8]{biblatex} into \RequirePackage[backend=bibtex,bibencoding=utf8,sorting=none]{biblatex} – Ulrike Fischer Mar 01 '22 at 13:35
  • @UlrikeFischer THANK YOU!!! It worked. You can post it as an answer to accept it – Krebto Mar 01 '22 at 13:40

1 Answers1

2

You get a numeric bibliography sorted by order of citation with the option sorting=none, so add this to the option of your biblatex call.

\RequirePackage[backend=bibtex,bibencoding=utf8,sorting=none]{biblatex}

Side remark: bibencoding=utf8 should not be needed, and normally it is better to use biber as backend, as various functions are not provided with the bibtex backend.

Ulrike Fischer
  • 327,261
  • can you help in this issue: https://tex.stackexchange.com/questions/635643/why-references-showed-in-different-way-even-same-way-of-importing – Krebto Mar 01 '22 at 13:53
  • 2
    sorry I can sometimes guess, but I won't debug all your bibliography problems if you provide only snippets and screenshots. Learn at first how to make a proper minimal example. Look at some other question about biblatex, e.g. https://tex.stackexchange.com/q/635133/2388 – Ulrike Fischer Mar 01 '22 at 13:59