Since you're looking to create numeric-style citation call-outs, you shouldn't be specifying the option authoryear
at the \documentclass
stage.
The authoryear
option gets passed to the natbib
citation management package. Because the elsarticle-num
bibliography style (unsurprisingly...) is designed to create numeric-style rather than authoryear-style citation call-outs, an error message is generated.
A full MWE:
\RequirePackage{filecontents}
\begin{filecontents}{refs.bib}
@BOOK{Brodatz1966,
title = {Textures: a photographic album for artists and designers},
publisher = {Dover Publications},
year = {1966},
author = {Brodatz, P.},
series = {Dover pictorial archives},
lccn = {66024124}
}
\end{filecontents}
\documentclass[times,twocolumn]{elsarticle}
\bibliographystyle{elsarticle-num}
%%%\usepackage{prletters} % I don't seem to have this package
\usepackage{amssymb}
%%%\usepackage{latexsym} % <-- don't load latexsym if you load amssymb
\journal{Pattern Recognition Letters}
\begin{document}
\cite{Brodatz1966}
\bibliography{refs}
\end{document}
I suggest you proceed in two steps. First, create a new bst (bibliography style) file using the interactive makebst
utility. (Open a command window and type latex makebst
to get started.) Second, it will be necessary to make a minor edit, by hand, in the newly created bst file.
While answering the interactive, multiple-choice questions posed by makebst
, choosing the default answer is correct in most instances. (That's why they're the defaults, right?) In same cases, though, you'll need to choose a non-default answer. The most important such cases are as follows:
...
...
...
...
...
...
...
Let's assume you've named the new file ii-experimental.bst
. Open this file in a text editor -- the program you use to edit your tex files will do fine -- and locate the function format.authors
. It should look like this:
FUNCTION {format.authors}
{ author "author" format.names }
Change the code block to
FUNCTION {format.authors}
{ author "author" format.names
"." *
}
I.e., add a new line that contains "." *
. As you can probably guess, this additional instruction serves to add a dot ("period", "full stop") immediately after the final name in the author block.
In your main tex file, be sure to change the argument of \bibliographystyle
to ii-experimental.bst
(or whatever you chose to name the file). Save the new bst file either in the directory where your main tex file is located or in a directory that's searched by BibTeX. If you choose the latter option, be sure to also update the filename database of your TeX distribution suitably.
Last but not least, assuming you're using the natbib
citation management package (with the option longnamesfirst
), you should (a) use \citep
exclusively to create citation call-outs, as all citation call-outs are supposed to be in "parenthetic" style, and (b) run the instruction
\setcitestyle{aysep={}}
after loading natbib
, to suppress the comma between the author(s)'s surname(s) and the year(s). Finally, perform a full recompile cycle -- latex, bibtex, and latex twice more -- to fully propagate all changes.
Happy BibTeXing!
Best Answer
elsarticle-num.bst is deprecated now. So you may use elsarticle-num-names.bst instead. You may download it from the following site:
http://support.river-valley.com/wiki/index.php?title=Model-wise_bibliographic_style_files