-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add new function to create .bib bibliography file for later processing #110
Comments
In the meanwhile, here is a workaround and function that give decent results. Reproducible rmarkdown example:
However, this workaround won't work if you are indenting your publications in
Despite the indenting problem, would you consider adding this function to |
Amazing! One reflection I had was whether we should include within the function output the following bit for proper rmarkdown formatting: cat(unlist(pubs), sep = "\\\n \\\n") If not included the full rmarkdown workflow would need to be something like: scholar::format_publications("NrfwEncAAAAJ", "R Thériault") |>
unlist() |>
cat(sep = "\\\n \\\n") Or should we let the user do that? I think adding it would be one fewer step for the user using rmarkdown. However, it would not be in a proper format for further manipulation outside of rmarkdown (and not consistent with other functions). Yet, I don't know how people would use this outside of rmarkdown. Perhaps only to make some manual edits if the function fails in some aspects. Second, be aware that there is a minor issue that my function does not deal with yet, which is the situation of having multiple initials. For example, it formats the initials SA as "SA.", whereas technically according to APA style it should be "S. A.". But that's probably the lowest possible priority. If I find a fix eventually I'll come back to post it here. |
try this:
|
Awesome, the first one looks good for APA style, and the last one I think could be useful for other styles that use numbering. I think it would be neat to eventually have a vignette (or blog post) for this. |
You are welcome to create a PR for the vignette. |
updated vignette and readme with format_publications function issue jkeirstead#110
I am making my CV in R with the
vitae
package and I would like to import my publications from Google Scholar with thescholar
package and format them in rmarkdown (primary author in bold, journals in italics, etc.). The problem is turning R code to rmarkdown and making it look good.In my code chunk I use
results = "asis"
and create the dataframe, but the result is a single squeezed paragraph instead of several lines with spaces between them.Unless you would be aware of a trick to turn R code to good-looking rmarkdown code when knitted (is there one?), one solution would be to add a function to create a .bib bibliography file that could then be used with
vitae::bibliography_entries
.The text was updated successfully, but these errors were encountered: