-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use the pagebreak feature provided by rmarkdown 1.16 (rstudio/rmarkdo…
- Loading branch information
Showing
9 changed files
with
73 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
# run tests on Travis (these tests depend on Chrome) | ||
|
||
print_pdf = function(input) { | ||
chrome_print( | ||
input, tempfile(), | ||
# use --no-sandbox with travis | ||
# https://docs.travis-ci.com/user/chrome#sandboxing | ||
extra_args = c('--disable-gpu', '--no-sandbox') | ||
) | ||
} | ||
|
||
if (!is.na(Sys.getenv('CI', NA))) testit::test_pkg('pagedown', 'test-travis') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
library(testit) | ||
|
||
assert('Page breaks work', { | ||
f = print_pdf('test-page-breaks.Rmd') | ||
(identical(pdftools::pdf_info(f)$pages, 5L)) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: "Test page breaks" | ||
output: | ||
pagedown::html_paged: | ||
self_contained: false | ||
css: null | ||
--- | ||
|
||
# First page | ||
|
||
\newpage | ||
|
||
# Second page | ||
|
||
\pagebreak | ||
|
||
# Third page {.page-break-after} | ||
|
||
# Fourth page | ||
|
||
# Fifth page {.page-break-before} |