Sorting of the bibliography requires that you have an external database of entries rather than a hand built list. In your case your external file mybib.bib
could be:
@Article{art,
author = {Art, John},
title = {John's Article},
journal = {J. Jour.},
year = 2006,
volume = 7,
pages = {12-45}
}
@Book{fart,
author = {Fart, Peter},
title = {Travelling at speed},
publisher = {P. Press},
year = 2009,
address = {Sometown}
}
To use this in your document there are two approaches: (1) traditional bibtex
; (2) modern biblatex
.
Bibtex approach
Choose a style for the bibliography via \bibliographystyle
. Choose the database file and print the bibliography via \bibliography{mybib}
. As you seem to want your authors listed as Lastname, Firstname
then one choice is the apa
style, which requires the natbib
package; pass the option numbers
to this package to get numerical citations.
\documentclass{article}
\usepackage[numbers]{natbib}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat~\cite{fart}. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum~\cite{art}.
\bibliographystyle{apa}
\bibliography{mybib}
\end{document}
Compile as
pdflatex myfile
bibtex myfile
pdflatex myfile
to get
Read more at bibtex on CTAN
Biblatex approach
Load the package biblatex
, with style=numeric
for numerical citations. To get Lastname, Firstname in the bibilography use the command \DeclareNameAlias{default}{last-first}
. Point to your database via \addbibresource{mybib.bib}
. Put \printbibliography
at the place in you file you want the bibliography to appear.
\documentclass{article}
\usepackage[style=numeric]{biblatex}
\addbibresource{mybib.bib}
\DeclareNameAlias{default}{last-first}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat~\cite{fart}. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum~\cite{art}.
\printbibliography
\end{document}
Compile with
pdflatex myfile
biber myfile
pdflatex myfile
to get
Read more at Guidelines for customizing biblatex styles and in the biblatex
manual combined with the bitex reference above.
I can think of only two things that may have happened to your document:
you are not using the genuine elsarticle-harv
bibliography style; or
after changing the argument of \bibliographystyle
to elsarticle-harv
, you did not re-run LaTeX, BibTeX, and LaTeX twice more to fully propagate all changes stemming from the change in the argument of \bibliographystyle
.
For sure, the genuine elsarticle-harv
bibliographystyle (a) abbreviates the first and middle names of authors and places the initials after the surname and (b) sorts the entries alphabetically.
\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@misc{bloggs:2010,
author = "Joe Bloggs",
title = "Thoughts",
year = 2010,
}
@misc{author:2016,
author = "Annie Aardvark and Zebulon Zwicky",
title = "Deep Thoughts",
year = 2016,
}
\end{filecontents}
\documentclass[authoryear]{elsarticle}
\bibliographystyle{elsarticle-harv}
\begin{document}
\citet{bloggs:2010}, \citet{author:2016}
\section*{References}
\bibliography{mybib}
\end{document}
Best Answer
The bibliography style depends solely in the conference's template, as this varies from each one. It usually is
\bibliographystyle{IEEEtran}
, but could also take the form of\bibliographystyle{IEEEbib}
or any other like the ones you mentioned (such asIEEEtranS
).You should really pay attention to your conference's specs, or if you are unsure then contact any of the organizers.
Regarding the keywords, I would keep my recommendation: stick to the template.