elsevier icon indicating copy to clipboard operation
elsevier copied to clipboard

Update instructions for using CSL files?

Open frederic-santos opened this issue 1 year ago • 2 comments

Hello,

This is maybe more a question than a proper issue, but the template says:

Using CSL

If cite-method is set to citeproc in elsevier_article(), ...

What is exactly elsevier_article() -- especially since the way it is formatted suggests that it's an R function?

I could not figure out exactly how to specify an external CSL file. For instance, if I need the two following parameters:

cite-method: citeproc
csl: global-ecology-and-conservation.csl

where am I supposed to insert them in the YAML header? Whichever place I tried (e.g., as subparameters of elsevier-pdf), I got the following error message:

ERROR: 
compilation failed- error
Package natbib Error: Bibliography not compatible with author-year citations.

(natbib)                Press <return> to continue in numerical citation style.


See the natbib package documentation for explanation.
Type  H <return>  for immediate help.

Conversely, if I remove cite-style: authoryear in the YAML and add the two previous parameters instead, the document can now be compiled with no error... but the journal style is not taken into account.

Are these CSL instructions still up to date?

Thanks!

frederic-santos avatar Oct 31 '24 08:10 frederic-santos

What is not up-to-date is the use of the bibtex/natbib workflow.

The elsarticle LaTeX package should be updated to use modern biber/biblatex workflow

raffaem avatar Jan 09 '25 12:01 raffaem

The new version of the elsarticle Latex class should allow you to do this (you need to substitute the elsarticle.cls file provided by this template with the new version)

raffaem avatar Jan 13 '25 06:01 raffaem