|
14 | 14 | #' Markdown files specified by the book are rendered.
|
15 | 15 | #' @param output_format,...,clean,envir Arguments to be passed to
|
16 | 16 | #' \code{rmarkdown::\link{render}()}. For \code{preview_chapter()}, \code{...}
|
17 |
| -#' is passed to \code{render_book()}. |
18 |
| -#' |
19 |
| -#' See \code{rmarkdown::\link{render}} and |
20 |
| -#' \href{https://bookdown.org/yihui/bookdown/build-the-book.html}{the bookdown |
21 |
| -#' reference book} for details on how output formatting options are set from |
22 |
| -#' YAML or parameters supplied by the user when calling \code{render_book()}. |
| 17 | +#' is passed to \code{render_book()}. See \code{rmarkdown::\link{render}()} |
| 18 | +#' and \href{https://bookdown.org/yihui/bookdown/build-the-book.html}{the |
| 19 | +#' bookdown reference book} for details on how output formatting options are |
| 20 | +#' set from YAML or parameters supplied by the user when calling |
| 21 | +#' \code{render_book()}. |
23 | 22 | #' @param clean_envir This argument has been deprecated and will be removed in
|
24 | 23 | #' future versions of \pkg{bookdown}.
|
25 | 24 | #' @param output_dir The output directory. If \code{NULL}, a field named
|
|
40 | 39 | #' # see https://bookdown.org/yihui/bookdown for the full documentation
|
41 | 40 | #' if (file.exists('index.Rmd')) bookdown::render_book('index.Rmd')
|
42 | 41 | #' \dontrun{
|
43 |
| -#' # will use the default format defined in _output.yml |
44 |
| -#' bookdown::render_book("index.Rmd") |
45 |
| -#' # will use the options for format defined in yaml |
46 |
| -#' bookdown::render_book("index.Rmd", "pdf_book") |
47 |
| -#' # If you pass an output format, it must have all the options set |
48 |
| -#' bookdown::render_book("index.Rmd", bookdown::pdf_book(toc = FALSE)) |
| 42 | +#' # will use the default format defined in index.Rmd or _output.yml |
| 43 | +#' bookdown::render_book("index.Rmd") |
| 44 | +#' # will use the options for format defined in YAML metadata |
| 45 | +#' bookdown::render_book("index.Rmd", "pdf_book") |
| 46 | +#' # If you pass an output format object, it must have all the options set |
| 47 | +#' bookdown::render_book("index.Rmd", bookdown::pdf_book(toc = FALSE)) |
49 | 48 | #' }
|
50 | 49 | render_book = function(
|
51 | 50 | input, output_format = NULL, ..., clean = TRUE, envir = parent.frame(),
|
|
0 commit comments