pagedown: Creating beautiful PDFs with R Markdown and CSS - Yihui Xie - rstudio::conf(2019L) Videos

Watch pagedown: Creating beautiful PDFs with R Markdown and CSS with Yihui Xie on RStudio Resources.

The traditional way to beautiful PDFs is often through LaTeX or Word, but have you ever thought of printing a web page to PDF? Web technologies (HTML/CSS/JavaScript) are becoming more and more amazing. It is entirely possible to create high-quality PDFs through Google Chrome or Chromium now. Web pages are usually single-page documents, but they can be paginated thanks to the JavaScript library Paged.js, so that you can have elements like headers, footers, and page margins for the printing purpose. In this talk, we introduce a new R package, pagedown (GitHub - rstudio/pagedown: Paginate the HTML Output of R Markdown with CSS for Print), to create PDF documents based on R Markdown and Paged.js. Applications of pagedown includes, but not limited to, books, articles, posters, resumes, letters, and business cards. With the power of CSS and JavaScript, you can typeset your documents with amazing elegance (e.g., a single line of CSS, "tr:nth-child(even) { background: #eee; }", will give you a striped table, and "border-radius: 50%;" gives you a circular element) and power (e.g., HTML Widgets).

VIEW MATERIALS

2 Likes

This topic was automatically closed after 21 days. New replies are no longer allowed.


If you have a query related to it or one of the replies, start a new topic and refer back with a link.