I set the references as the following in my document in Overleaf (\documentclass[review]{elsarticle}).
Now, I want to change it and indicate references by number(s) in square brackets in the text and also in the section of references, as shown in the figure. I could change it in the text but not in the section of references. I have also seen link1 and link2.
How to do it?
\documentclass[review]{elsarticle}
\graphicspath{ {./figures/} }
\usepackage{hyperref}
\usepackage{verbatim}
\usepackage{apalike}
\usepackage{lipsum,capt-of,graphicx}
\usepackage{geometry}% Just for this example
%\usepackage[authoryear,longnamesfirst]{natbib}
%\usepackage[authoryear]{natbib}
%\usepackage[numbers]{natbib}
\usepackage{natbib}
\let\printorcid\relax
\usepackage[wby]{callouts}
%\usepackage{cite}
\usepackage{ragged2e}
\usepackage{setspace}
\usepackage[labelfont=bf,justification=raggedright,singlelinecheck=false, font={footnotesize}]{caption}
\captionsetup[figure]{name=Fig. ,labelsep=period, justification=justified, singlelinecheck=off}
\captionsetup[table]{labelsep=newline,font=footnotesize, justification=justified, singlelinecheck=off}%,skip=0pt,belowskip=0pt}
\usepackage{subcaption}
\usepackage{setspace}
\usepackage{etoolbox}
\AtBeginEnvironment{table}{\sffamily}
\usepackage{booktabs,siunitx, multirow}
\sisetup{table-format=1.4, tight-spacing=true, separate-uncertainty}
\sisetup{
output-exponent-marker = \text{e},
exponent-product={},
retain-explicit-plus,
input-open-uncertainty = ,
input-close-uncertainty = ,
table-align-text-pre = false,
table-align-text-post = false,
round-mode=places,
round-precision=2,
table-space-text-pre = (,
table-space-text-post = ),
}
\usepackage{amsmath}
\usepackage{adjustbox}
\usepackage{floatrow}
\floatsetup[table]{capposition=top}
\floatsetup[table]{captionskip=0.1pt}
\usepackage{array, cellspace}
\setlength\cellspacetoplimit{3pt}
\setlength\cellspacebottomlimit{3pt}
\usepackage{placeins}
\journal{J}
\bibliographystyle{model5-names}\biboptions{authoryear}
%\bibliographystyle{unsrt}\biboptions{numbers}
\begin{document}
For more information read \cite{AmericanL} and ...
\bibliography{sample}
\end{document}
And here is a sample of my .bib file
@misc{AmericanL,
HOWPUBLISHED = {\url{https://www.lung.org}},
AUTHOR = {Association, American Lung},
TITLE = {Lung Cancer Fact Sheet},
MONTH = {Dec},
YEAR = {2020},
NOTE = {Accessed on 2020-12-1}
}


AUTHOR = {Association, American Lung},is completely wrong, at it tells BibTeX it's dealing with an author with surnameAssociationand given namesAmericanandLung. The field really has to beAUTHOR = {{American Lung Association}},. Note the use of double braces, which serve to inform BibTeX that the entry has a so-called "corporate" author. – Mico Sep 15 '21 at 07:06\biboptions{authoryear}, all lines in your preamble that loadnatbiband the\biboptions{authoryear}. Then pass the optionnumberto the class to get numeric citations (\documentclass[review,number]{elsarticle}). – moewe Sep 15 '21 at 07:14\usepackage{apalike}, (2) remove all lines loadingnatbib(currently only\usepackage{natbib}is active, but you should probably remove the commented lines as well to avoid confusion), (3) remove\biboptions{authoryear}. Then rerun the compilation. – moewe Sep 15 '21 at 08:15setspace,geometryas well ascaptionand your\captionsetuplines). – moewe Sep 15 '21 at 08:16