1 Maujas

## Elsarticle Cls Bibliography Creator

This question is unclear; but I don't think it is simply asking to change "&" to "and".

As I understand it, APA style uses "&" to link author names in the bibliography and parenthetical citations [(Lagos & Wright, 2011)], but "and" in text citations [Lagos and Wright (2011)]. I believe that is a (rather old) file designed to work with , so I'd expect you to be using a to get the citation you are bothered with. (I'm puzzled by your reference to using the package, which just doesn't seem appropriate to APA style at all.)

If I understand the rather unclear question correctly, I don't think that changing all the instances of "&" in (a copy of) will therefore do what you want, because it will change them in both text citations (where you want a change) and in parentheticals (where you don't). If that is what you want to do then others have shown how to do it.

But if what you want is full APA compliance, I'd take a different approach.

Although it's not my field, if what you want is APA-compliance, why not use a more up-to-date package. apacite seems to be actively maintained, and is compatible with commands if you load it with the option, so you shouldn't need to alter your document. I think it will take care of the immediate problem you are having, and avoid others.

## Problem

I like BibLaTeX and StackOverflow presents some ways reasons to switch to BibLaTeX. I like it, if nothing else, I can have multiple bibliographies easily. I can also use citation style and also limit which fields are displayed in my bibliography. One problem with BibLaTeX is that it does not work well with Elsevier articles (class ), since is loaded by default. There are some other options to induce compatibility are presented here and here.

## Solution

So I edited the file to make it work. See the between the 2 files here:

diff elsarticle.cls elsarticle_nonatbib.cls 27c27 < \def\RCSfile{elsarticle}% --- > \def\RCSfile{elsarticle_nonatbib}% 33c33 < \def\@shortjid{elsarticle} --- > \def\@shortjid{elsarticle_nonatbib} 192,193c192,193 < \newcounter{author} < \def\author{\@ifnextchar[{\@@author}{\@author}} --- > \newcounter{auth} > \def\auth{\@ifnextchar[{\@@auth}{\@auth}} 196c196 < \def\@@author[#1]#2{\g@addto@macro\elsauthors{% --- > \def\@@auth[#1]#2{\g@addto@macro\elsauthors{% 211c211 < \def\@author#1{\g@addto@macro\elsauthors{\normalsize% --- > \def\@auth#1{\g@addto@macro\elsauthors{\normalsize% 642c642 < \RequirePackage[\@biboptions]{natbib} --- > %\RequirePackage[\@biboptions]{natbib}

If you've never read a output, the means what's written in the first file () and means the second file (). The numbers correspond to the line in each file, e.g means line 192 in file 1 and 193 in file 2.
Overall, I changed the type of article, commented out the requirement, and changed the field to (see below for why). The edited is located here.

## Things you need to change

The field conflicts with biblatex and elsarticle, so you must chagne the definitions to instead. This is a minor change, but important one. You can change that field to anything you want in the file (such as ).

### Minimal Working Example (MWE)

I tried it with Elsevier's sample manuscript, changing the fields to , and adding a biblatex-type heading:

\usepackage[ natbib = true, backend=bibtex, isbn=false, url=false, doi=false, eprint=false, style=numeric, sorting=nyt, sortcites = true ]{biblatex} \bibliography{mybibfile}

and

\printbibliography

at the end, and the manuscript came out as if using . The MWE is located here and output PDF is located here.

## Conclusion

You can use with , with some minor changes. You may have to include this with the rest of your LaTeX files for them to compile on the editors machine. Maybe Elsevier will change the LaTeX for more flexibility, but the StackOverflow question was asked 3 years ago and not much seems to have changed, so I like my solution.