-
Notifications
You must be signed in to change notification settings - Fork 520
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
Biobliography not formatted correctly in rticles::elsevier_article #545
Comments
It seems the template was done using rticles/inst/rmarkdown/templates/elsevier/resources/template.tex Lines 57 to 60 in fcbcf83
The LaTeX package guideline (https://www.elsevier.com/authors/policies-and-guidelines/documents/elsdoc-1.pdf)
I am fine by using one of this as the default if that is better |
Or perhaps include all options in the template and comment out all but one. Than it is visible to the user what the options are. |
In fact re-reading the guidelines, I am seeing this about class option
And we use it in the template in Not sure how it effect and which bibliostyle should be set with it 🤔 |
This is what my yaml-header looks like at the moment. I do have the title: "TODO"
author:
- name: TODO
email: TODO
affiliation: TODO
correspondingauthor: true
address:
- code: WUR
organization: TODO
addressline: TODO
city: TODO
postcode: TODO
country: The Netherlands
abstract: |
TODO
keywords:
- TODO
- TODO
journal: "TODO"
date: "`r Sys.Date()`"
classoption: preprint, 3p, authoryear
bibliography: library.bib
biblio-style: elsarticle-harv
linenumbers: true
numbersections: true
# Use a CSL with `citation_package = "default"`
# csl: https://www.zotero.org/styles/elsevier-harvard
output:
rticles::elsevier_article:
keep_tex: true
citation_package: natbib |
I did the update in the skeleton following this advice. Thank you ! |
Hi @cderv. Great package! I have the same problem reported here: The Reference list shows first names instead of last names. Adding |
Hi @eugenividal, For me the solution above did work. Maybe you could add the complete yaml header that you are using. Otherwise it is impossible to reproduce or solve your problem. Cheers, Pepijn |
Hi @pepijn-devries, thanks for your quick reply. My complete yaml header is below. Now, if I use |
Hi @eugenividal, I've installed the latest version of Cheers, Pepijn |
Hi @pepijn-devries, thanks for your answer. I've installed the latest version of |
So check that you have this package installed, and latest version. If you are using TinyTeX, it should be installed automatically when missing. You can also install and update manually |
@cderv Good point. That is probably it. I'm also working with TinyTex as it generally plays nicely with RMarkdown and knitr. |
Thanks @cderv. It is working properly now! What do you mean by checking that the package is installed? I just had to save the |
Placing the file locally works too though. |
Hi @cderv. Thanks for the clarification. This is what I thought. I just do not know how to install the CTAN package. Is this an R package? Can I install it using my ubuntu terminal? Thanks! |
CTAN is https://ctan.org/ - this is the package repository for LaTeX package. Like CRAN for R or CPAN for perl. Installing a package for LaTeX can be done using TeX Live Though as I said, it should be done automatically when a missing package is detected. So if it does not do it for you, it means either you don't use TeX Live, or something else prevent installation. Anyhow, if you start managing TeX Live yourself, or at least do some stuff with LaTeX distribution, you should understand how it works. |
Thanks for the information, @cderv. I've just run |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
Thanks for your work on rticles. It really helped me to streamline my publication process.
When using
rticles::elsevier_article
I noticed that the bibliography was formatted incorrectly (e.g., first names showing first instead of last names). For me addingbiblio-style: elsarticle-harv
to the yaml header fixed the issue. Maybe this can be included in the default template, or it can be noted in the documentation?This is my session info:
Created on 2023-10-12 with reprex v2.0.2
@cboettig @robjhyndman
The text was updated successfully, but these errors were encountered: