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

Interface for bibliography_entries #28

Closed
jmcascalheira opened this issue Jan 10, 2019 · 9 comments
Closed

Interface for bibliography_entries #28

jmcascalheira opened this issue Jan 10, 2019 · 9 comments

Comments

@jmcascalheira
Copy link

It would be great to be able to reorder dates of publications when using bibliography_entries(). It automatically sets an ascending order, when the most common way for CVs is using more recent dates first.

@mitchelloharawild
Copy link
Owner

How are you trying to order the publications?
bibliography_entries are processed differently to brief_entries and detailed_entries, as it uses biblatex. You can specify the biblatex sorting scheme using the sorting argument.

---
name: Mitchell O'Hara-Wild
date: "`r format(Sys.time(), '%B, %Y')`"
github: mitchelloharawild
headcolor: 414141
output: vitae::awesomecv
---

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

# Publications

```{r}
knitr::write_bib(c("forecast", "vitae", "ggquiver", "naniar", "taipan"), "packages.bib")
bibliography_entries("packages.bib", sorting = "ydnt")
```

Possible sorting schemes can be found in the answer in this thread: https://tex.stackexchange.com/questions/51434/biblatex-citation-order

@mitchelloharawild
Copy link
Owner

@robjhyndman
Do you think it is possible to provide the entries in a custom order? This would allow us to display the entries in the order shown in the table, which could then be modified with arrange().

@jmcascalheira
Copy link
Author

jmcascalheira commented Jan 10, 2019

@mitchelloharawild
Sorry my bad! I didn't know the "ydnt" option for sorting. Many thanks!

@robjhyndman
Copy link
Collaborator

sorting='none' will retain the order the bibentries are already in. So then you can use tidyverse tools to arrange as you wish.

@mitchelloharawild
Copy link
Owner

Good to know. In that case, is there any other reason why the sorting option is needed?
I think sorting should be deprecated and require it to be sorting="none", so that the output order matches the displayed table order in R.
If bibliography entries don't require a title, it would also be neater to have the title added via markdown and remove this argument too.

@mitchelloharawild mitchelloharawild changed the title Reorder biblio entries Interface for bibliography_entries Jan 10, 2019
@robjhyndman
Copy link
Collaborator

Yes, let's do that. As well as removing the arguments from bibliography_entries(), the following changes need to be made to knit_print.vitae_bibliography()

    \\newrefcontext[sorting="none"]\\setcounter{papers}{0}\\pagebreak[3]
    \\printbibliography[category=<<bibname>>,heading=none]<<endlabel>>\\setcounter{papers}{0}

@robjhyndman
Copy link
Collaborator

I'd forgotten that the title was also being used to create unique bib categories within bibliography_header(). Now all categories are called "bibRefereed journal papers" which causes conflicts. We still need to create unique bib category names each time bibliographic_entries() is called.

@mitchelloharawild
Copy link
Owner

@robjhyndman
Copy link
Collaborator

Sorry. Forgot to rebuild after pulling.

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

3 participants