Automatically update your publication list using R scholar II – get a PDF

[This article was first published on Thomas Hackl | Coding Biologist, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Alessio apparently read my blog post on how to automatically update your publication list using R and google scholar. He contacted me wondering if there is also a solution to get a PDF. Good question, thanks!

There are probably a few ways to get a PDF. Fancy ones might include the use of knitr or the great pandoc converter, likely involving a intermediate TEX file or so. Here, however, I tried to aim for a fast and straight-forward workaround.

Let us assume we already have a HTML version of our publication list, for example, obtained as described in the post mentioned above. Converting HTML to PDF can be a bit of a nightmare, particularly if you want to maintain the CSS style of your website. What works for me is to use the Google Chrome API function chrome_print of the R package pagedown. It is not very flexible, but you pretty much get what you already have on the HTML page in your PDF – with a single command. The only requirement, you need to have Google Chrome installed.

Here is my publication list as PDF.

library(pagedown)

chrome_print(
  # link to my publication list w/o header/footer in html
  "https://thackl.github.io/publications-clean",
  # the pdf to generate
  "publications.pdf"
)

To leave a comment for the author, please follow the link and comment on their blog: Thomas Hackl | Coding Biologist.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)