mitchelloharawild / vitae

R Markdown Résumés and CVs
https://pkg.mitchelloharawild.com/vitae/
1.23k stars 239 forks source link

publication from bibtex with more than 3 authors #159

Closed oggioniale closed 3 years ago

oggioniale commented 3 years ago

Dear, I try to import bibtex in my CV but return this error:

Error reading bibliography /var/folders/p1/110rx8q101z0wn0bwh4njrcw0000gn/T//RtmpSyyH95/file32d2dcbb20f.yaml Could not read boolean
pandoc: PandocFilterError "/usr/local/bin/pandoc-citeproc" "Filter returned error status 1"
Error: pandoc document conversion failed with error 1
Execution halted

I realised that the error occurs when into the bibtex are more then 3 authors: @article{CNRPRODOTTI416539, author={Acri, F. and Bastianini, M. and Bernardi Aubry, F. and Camatti, E. and Boldrin, A. and Bergami, C. and Cassin, D. and De Lazzeri, A. and Finotto, S. and Minelli, A. and Oggioni, A. and Pansera, M. and Sarretta, A. and Socal, G. and Pugnetti, A.}, title={A long-term (1965--2015) ecological marine database from the LTER-Italy Northern Adriatic Sea site: plankton and oceanographic observations}, year={2020}, journal={Earth system science data (Internet)}, publisher={Copernicus Publications}, address={Göttingen}, volume={12}, pages={215--230}, url={https://www.earth-syst-sci-data.net/12/215/2020/}, issn={1866-3516}, doi={10.5194/essd-12-215-2020}, abstract={The present paper describes a database containing observations for 21 parameters of abiotic, phytoplankton, and zooplankton data collected in the northern Adriatic Sea region (Italy) from 1965 to 2015. Due to the long temporal coverage, the majority of parameters changed collection and analysis method over time. These variations are reported in the database and detailed in the paper.} }

I use this code to embed the pubblications into the Rmd file:

rmarkdown::pandoc_citeproc_convert("cnrPeople2019.bib", type = "list")
vitae::bibliography_entries("cnrPeople2019.bib") %>%
  arrange(desc(author$family), issued)

Is there a solution to this?

mitchelloharawild commented 3 years ago

Could you let me know which package version you are using? packageVersion("vitae")

mitchelloharawild commented 3 years ago

With the latest version {0.4.2} of the package, this seems to work:

---
name: Marie
surname: Curie
position: "Professor"
address: "School of Physics & Chemistry, École Normale Supérieure"
phone: +1 22 3333 4444
www: mariecurie.com
email: "Marie.Curie@ens.fr"
twitter: mariecurie
github: mariecurie
linkedin: mariecurie
date: "`r format(Sys.time(), '%B %Y')`"
output: vitae::hyndman
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
library(vitae)
library(dplyr)

writeLines(
  "@article{CNRPRODOTTI416539, author={Acri, F. and Bastianini, M. and Bernardi Aubry, F. and Camatti, E. and Boldrin, A. and Bergami, C. and Cassin, D. and De Lazzeri, A. and Finotto, S. and Minelli, A. and Oggioni, A. and Pansera, M. and Sarretta, A. and Socal, G. and Pugnetti, A.}, title={A long-term (1965--2015) ecological marine database from the LTER-Italy Northern Adriatic Sea site: plankton and oceanographic observations}, year={2020}, journal={Earth system science data (Internet)}, publisher={Copernicus Publications}, address={Göttingen}, volume={12}, pages={215--230}, url={https://www.earth-syst-sci-data.net/12/215/2020/}, issn={1866-3516}, doi={10.5194/essd-12-215-2020}, abstract={The present paper describes a database containing observations for 21 parameters of abiotic, phytoplankton, and zooplankton data collected in the northern Adriatic Sea region (Italy) from 1965 to 2015. Due to the long temporal coverage, the majority of parameters changed collection and analysis method over time. These variations are reported in the database and detailed in the paper.} }",
  bib_path <- tempfile(fileext = ".bib")
)

bibliography_entries(bib_path) %>%
  arrange(desc(author$family), issued)

![image](https://user-images.githubusercontent.com/16127127/109233065-5592c980-781d-11eb-84bb-f42d1cbf2434.png)
oggioniale commented 3 years ago

Could you let me know which package version you are using? packageVersion("vitae")

Thanks!!

I installed the last version ‘0.4.2’

---
name: Alessandro
surname: Oggioni
position: "Researcher"
address: "CNR - Institute for Electromagnetic Sensing of the Environment (IREA) Via Bassini 15 - I-20133 Milano - Italy"
phone: +39 02 23699289
www: www.cnr.it/people/alessandro.oggioni
email: "oggioni.a@irea.cnr.it"
twitter: oggioniale
github: oggioniale
aboutme: "-...- \\break Google Scholar H-Index: 17 - Scopus H-Index: 15 - ISI-WoS H-Index: 13"
date: "`r format(Sys.time(), '%B %Y')`"
headcolor: "000000"
output: vitae::awesomecv
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
library(vitae)
library(dplyr)
rmarkdown::pandoc_citeproc_convert("cnrPeople2020.bib", type = "list")
vitae::bibliography_entries("cnrPeople2020.bib") %>%
  arrange(desc(author$family), issued)


cnrPeople2020.bib conteins the citation of Acri et al. 2020
mitchelloharawild commented 3 years ago

Is it working for you now?

oggioniale commented 3 years ago

Yes now it is working but I need to change the field about authors from different form to: Surname, Name and Surname, N. and ...

Do you some suggestion? Si possono usare altre forme e.g. Surname Name; Surname Name

Otherwise thanks so mutch for me this issue colud be closed. If you like, I will share my example on GitHub as soon as possible.

mitchelloharawild commented 3 years ago

You can change the order of bibliography entries by providing a different CSL, much like any other R Markdown document. https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html#Citation_Styles