Paginate the HTML Output of R Markdown with CSS for Print

Use the paged media properties in CSS and the JavaScript library 'paged.js' to split the content of an HTML document into discrete pages. Each page can have its page size, page numbers, margin boxes, and running headers, etc. Applications of this package include books, letters, reports, papers, business cards, resumes, and posters.


pagedown

R-CMD-check Downloads from the RStudio CRAN mirror

Paginate the HTML Output of R Markdown with CSS for Print. You only need a modern web browser (e.g., Google Chrome or Microsoft Edge) to generate PDF. No need to install LaTeX to get beautiful PDFs.

This R package stands on the shoulders of two giants to support typesetting with CSS for R Markdown documents: Paged.js and ReLaXed (we only borrowed some CSS from the ReLaXed repo and didn't really use the Node package).

You may install this package from Github:

# install.packages("pak")
pak::pak('rstudio/pagedown')

This package requires a recent version of Pandoc (>= 2.2.3). If you use RStudio, you are recommended to install the latest version (>= 1.2.1335), which has bundled Pandoc 2.x, otherwise you need to install Pandoc separately.

Below are some existing R Markdown output formats and examples.

Paged HTML documents (pagedown::html_paged)

A paged HTML document

Thesis (pagedown::thesis_paged)

A paged HTML thesis

Journal of Statistical Software article (pagedown::jss_paged)

A JSS article

Resume (pagedown::html_resume)

An HTML resume

You may want to check out the datadrivencv package, which allows you to build a CV using data from a spreadsheet and pagedown::html_resume.

Posters

pagedown::poster_relaxed

A poster of the ReLaXed style

pagedown::poster_jacobs

A poster of the Jacobs University style

Want more poster styles? You may take a look at Brent Thorne's posterdown package.

Business cards (pagedown::business_card)

A business card

Letters (pagedown::html_letter)

A letter in HTML

Other examples

Authors and contributors

The main authors of this package are Yihui Xie (RStudio) and Romain Lesur. Romain has received a grant from the Shuttleworth Foundation for his work on both Paged.js and pagedown.

Shuttleworth Funded

You can find the full list of contributors of pagedown here. We always welcome new contributions. In particular, if you are familiar with CSS, we'd love to include your contributions of more creative and beautiful CSS stylesheets in this package. It is also very helpful if you don't know CSS but just tell us the creative and beautiful web pages you have seen, since other CSS experts may be able to port them into pagedown.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("pagedown")

0.25 by Yihui Xie, a month ago


https://github.com/rstudio/pagedown


Report a bug at https://github.com/rstudio/pagedown/issues


Browse source code at https://github.com/cran/pagedown


Authors: Yihui Xie [aut, cre] , Romain Lesur [aut, cph] (ORCID: , Christophe Dervieux [ctb] (ORCID: , Brent Thorne [aut] , Xianying Tan [aut] , Atsushi Yasumoto [ctb] , Posit Software , PBC [cph, fnd] , Adam Hyde [ctb] (paged.js in resources/js/) , Min-Zhong Lu [ctb] (resume.css in resources/css/) , Zulko [ctb] (poster-relaxed.css in resources/css/)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports rmarkdown, bookdown, htmltools, jsonlite, later, processx, servr, httpuv, xfun, websocket

Suggests promises, testit, xaringan, pdftools, revealjs, covr, xml2

System requirements: Pandoc (>= 2.2.3)


Imported by Spectran, dlookr, iheiddown, tall, unhcrdown, valdrViz.

Suggested by DOEpro, R4VN, accessr, chronicle, mlr3fairness, pcutils, roughnet, roughsf, surveyframe, trackdown, ukbflow.


See at CRAN