Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update instructions for using CSL files? #34

Open
frederic-santos opened this issue Oct 31, 2024 · 2 comments
Open

Update instructions for using CSL files? #34

frederic-santos opened this issue Oct 31, 2024 · 2 comments

Comments

@frederic-santos
Copy link

frederic-santos commented Oct 31, 2024

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!

@raffaem
Copy link

raffaem commented Jan 9, 2025

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
Copy link

raffaem commented Jan 13, 2025

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants