I've been requested to change the bibliographic reference style of one of my papars to APA style, but when using the apacite command the document is not compiling. A MWE is shown below.
My problems are:
1) when using \usepackage{apacite} and \bibliographystyle{apacite} with a \citep reference, I obtain an error:
! "Argument of \citeauthoryear has an extra }."
2) If I change the reference style to \cite or \citeA, styles corresponding to apacite package, I obtain another error:
! Extra \endgroup.
3) When trying to use the option \usepackage[natbibapa]{apacite}, it doesn´t recognise the option
! LaTeX Error: Unknown option `natbibapa' for package `apacite'.
although the package apacite is actualized from 2013.
I would thank any help since I have a short due date to present it and after a long search for a similar problem in forums I couldn't find any working answer.
Thanks in advance
\documentclass[english]{elsarticle}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{array}
\usepackage{units}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{esint}
\usepackage{babel}
\usepackage{apacite}
%\usepackage[natbibapa]{apacite}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}
\usepackage{endfloat}
\usepackage{array}
\makeatother
\begin{document}
\title{Title of my paper}
\author[rvt]{M.~Surname\corref{cor1}}
\ead{aaaaa@aaaa.com}
\author[focal]{A.B.~Doe}
\author[rvt]{C.D.~Smith}
\cortext[cor1]{Corresponding author}
\address[rvt]{Department of Physics, University of Aaaaa, Aaaaa St,
1234 City, Country }
\address[focal]{Institute of Technology, University of Bbbb,
Bbbb St, 4321 City, Country}
\begin{abstract}
The analysis of data from measurements is analyzed.
\end{abstract}
\begin{keyword}
key1\sep key2\sep key3\sep key4\sep key5.
\end{keyword}
\maketitle
\section{Section 1 of my paper}
Lorem ipsum ad his scripta blandit partiendo, eum fastidii accumsan euripidis in, eum liber hendrerit an. Qui ut wisi vocibus suscipiantur, quo dicit ridens inciderint id. Quo mundi lobortis reformidans eu, legimus senserit definiebas an eos \citep{author99,author05}. Eu sit tincidunt incorrupte definitionem, vis mutat affert percipit cu, eirmod consectetuer signiferumque eu per. In usu latine equidem dolores. Quo no falli viris intellegam, ut fugit veritus placerat per.
Ius id vidit volumus mandamus, vide veritus democritum te nec, ei eos debet libris consulatu. No mei ferri graeco dicunt, ad cum veri accommodare. Sed at malis omnesque delicata, usu et iusto zzril meliore.
\begin{equation}
A_{b}=\frac{B_{c}}{2\pi\mu}.\label{eq:Eq-classic}
\end{equation}
Dicunt maiorum eloquentiam cum cu, sit summo dolor essent te. Ne quodsi nusquam legendos has, ea dicit voluptua eloquentiam pro, ad sit quas qualisque. Eos vocibus deserunt quaestio ei.
\section*{References}
\bibliographystyle{apacite}
\bibliography{bibliotest}
\end{document}
And the bibliotest.bib file:
@article{author99,
title = {A fine title},
year = {1899},
volume = {40},
number = {12},
pages = {1052-1057},
author = {A.B. Cdefg and W. Z. John},
journal = {Madness}
}
@article{author05,
title = {The best title},
year = {1905},
volume = {40},
number = {12},
pages = {1052-1057},
author = {Doe, J. and Kirk, J.P.},
journal = {Insanity}
}
apacitealong withelsarticle? – egreg Aug 01 '14 at 10:32apacitepackage to work alongside theelsarticledocument class, I find it's necessary to load it before the\documentclassinstruction is executed, via the statement\RequirePackage{apacite}. Even so, I get error messages about\thebibliographyalready being defined, etc. In short, echoing @egreg's comment, you may want to use a different bibliography and citation management package.natbibalong withelsarticle-harv.bst, would be such a candidate. – Mico Aug 01 '14 at 13:47