2

I am writing a article for Elsevier, and I would like that the bibliography appear in the section of "references" according the citations are appearing in the text.

For example

introduction of my paper

I would like that the reference 29 appear like the reference number 1 instead of 29.

I am working with the following preamble

\documentclass[preprint,12pt]{elsarticle}
% !TeX spellcheck = en_US 
\usepackage{siunitx}
\sisetup{detect-weight, detect-display-math}
\sisetup{detect-inline-weight=math}
\sisetup{mode=text,per-mode=symbol}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{pgfplots}
\usepackage{pdflscape}
\pgfplotsset{compat=newest}
\usetikzlibrary{plotmarks}
\usetikzlibrary{arrows.meta}
\usepgfplotslibrary{patchplots}
\newlength\fwidth
\setlength{\fwidth}{0.8\textwidth}
\pgfplotsset{plot coordinates/math parser=false}
\usepackage{overpic}
\pgfplotsset{compat=1.15}
\usepackage{float}
\usepackage{etoolbox}
\bibliographystyle{abbrvnat}
\usepackage{bicaption}
\usepackage{makecell}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{}
\usepackage[skip=1ex, labelfont=bf]{caption}
\usepackage[skip=0.333\baselineskip]{caption}
\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\def\UrlFont{\normalfont}
\sisetup{per-mode=symbol}
\usepackage[margin=2.5cm]{geometry} 
\usepackage[skip=0.333\baselineskip]{caption}
\usepackage{amssymb,amsmath}
\usepackage{url}
\usepackage{hyperref}
\journal{Fuel}
\begin{document}

\section{Introduction}
Oil shales (OS) are fine grain sedimentary rocks that contain organic material of high molecular weight, called kerogen, disseminated in its inorganic matrix [\cite{scouten1990fuel}, \cite{allred1982oil}].

\section*{References}
\bibliography{bilbiography}

%% else use the following coding to input the bibitems directly in the
%% TeX file.

\end{document}

\endinput

The bibliography has 37 references, and I would that each reference appear in the bibliography according it appear in the text.

Could anyone help me?

1

You need to

  • change the argument of \bibliographystyle from abbrvnat (which performs alphabetical sorting by authors' surnames) to unsrtnat (which performs no sorting); then,

  • perform a full recompile cycle: LaTeX, BibTeX, and LaTeX twice more.

Here's a screenshot of a simplified version of your MWE (minimum working example); observe that the Scouten entry, which is cited first, is numbered 1, whereas the Allred entry is numbered 2. Correspondingly, the Scouten entry is listed before the Allred bibliography in the references.

enter image description here

In the following, I've also tried to clean up, simplify, and organize the preamble code.

\RequirePackage{filecontents}
%% create a dummy bib file
\begin{filecontents}{bilbiography.bib} 
@misc{allred1982oil,
  author = "Allred",
  title  = "Oil",
  year   = 1982,
}
@misc{scouten1990fuel,
  author = "Scouten",
  title  = "Fuel",
  year   = 1990,
}
\end{filecontents}

\documentclass[preprint,12pt]{elsarticle}
\journal{Fuel}
\bibliographystyle{unsrtnat} % not 'abbrvnat'

\usepackage[margin=2.5cm]{geometry} 
\usepackage{amssymb,amsmath,booktabs,
            graphicx,pdflscape,float}
\usepackage{etoolbox} % do you need this package?
\usepackage{bicaption}% ditto

\usepackage{siunitx}
\sisetup{detect-weight, 
         detect-display-math,
         detect-inline-weight=math,
         mode=text,
         per-mode=symbol}

\usepackage{pgfplots,overpic}
\pgfplotsset{compat=newest}
\usetikzlibrary{plotmarks}
\usetikzlibrary{arrows.meta}
\usepgfplotslibrary{patchplots}
\newlength\fwidth
\setlength{\fwidth}{0.8\textwidth}
\pgfplotsset{plot coordinates/math parser=false}
\pgfplotsset{compat=1.15} % conflict with 'compat=newest' (see above)!

\usepackage{makecell}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{}

\usepackage{caption}
\captionsetup{labelfont=bf,skip=0.333\baselineskip}

\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}

\usepackage[hyphens,spaces,obeyspaces]{url}
\def\UrlFont{\normalfont}
\usepackage[colorlinks,allcolors=blue]{hyperref}

\begin{document}
Oil shales (OS) are \dots\ inorganic matrix \cite{scouten1990fuel,allred1982oil}.

\section*{References}
\bibliography{bilbiography} % sic [!]
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.