diff --git a/NAMESPACE b/NAMESPACE index 94629e0..aa0c07d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,6 @@ # Generated by roxygen2: do not edit by hand +export(build_current_book_part) export(find_stics_names) export(gen_bibtex_file) export(generate_book) diff --git a/R/generate_book.R b/R/generate_book.R index 198da02..ca98498 100644 --- a/R/generate_book.R +++ b/R/generate_book.R @@ -2,8 +2,9 @@ #' #' @param input_rmd Chapter Rmd file name (optional) #' @param book_pkg_dir Book package directory path (optional, default: current directory) -#' @param output_format String defining the type of document to build -#' (optional, default: "bookdown::html_document2") +#' @param output_format String defining the type of document to build (optional); +#' among "bookdown::pdf_document2", "bookdown::pdf_document2", +#' "bookdown::gitbook" (default) #' @param params A list containing parameters to pass to the Rmd #' document to parameterize the output or overload existing params in the #' document @@ -16,6 +17,8 @@ #' @return A success status of the document generation #' @export #' +#' @seealso \code{\link{build_current_book_part}} +#' #' @examples #' \dontrun{ #' generate_book() @@ -123,6 +126,26 @@ build_book_part <- function( file_name = NULL, other_names = c("index", "Appendi } +#' Generating a 'bookdown::gitbook' document from the current +#' edited bookdown chapter (Rmd) +#' +#' @description Generating an output document from the open Rmd file +#' in the RStudio editor without specifying neither the file name nor +#' the output format ('bookdown::gitbook') +#' +#' @seealso \code{\link{generate_book}} for specifying Rmd files list, and output +#' format +#' +# @return +#' @export +#' +#' @examples +#' \dontrun{ +#' +#' build_current_book_part() +#' +#' } +#' build_current_book_part <- function() { build_book_part() } diff --git a/man/build_current_book_part.Rd b/man/build_current_book_part.Rd new file mode 100644 index 0000000..424da02 --- /dev/null +++ b/man/build_current_book_part.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/generate_book.R +\name{build_current_book_part} +\alias{build_current_book_part} +\title{Generating a 'bookdown::gitbook' document from the current +edited bookdown chapter (Rmd)} +\usage{ +build_current_book_part() +} +\description{ +Generating an output document from the open Rmd file +in the RStudio editor without specifying neither the file name nor +the output format ('bookdown::gitbook') +} +\examples{ +\dontrun{ + +build_current_book_part() + +} + +} +\seealso{ +\code{\link{generate_book}} for specifying Rmd files list, and output +format +} diff --git a/man/generate_book.Rd b/man/generate_book.Rd index bbe8d81..12d6356 100644 --- a/man/generate_book.Rd +++ b/man/generate_book.Rd @@ -16,8 +16,9 @@ generate_book( \item{book_pkg_dir}{Book package directory path (optional, default: current directory)} -\item{output_format}{String defining the type of document to build -(optional, default: "bookdown::html_document2")} +\item{output_format}{String defining the type of document to build (optional); +among "bookdown::pdf_document2", "bookdown::pdf_document2", +"bookdown::gitbook" (default)} \item{params}{A list containing parameters to pass to the Rmd document to parameterize the output or overload existing params in the @@ -44,4 +45,7 @@ generate_book(input_rmd = "07-chap.Rmd", output_format = 'bookdown::pdf_document +} +\seealso{ +\code{\link{build_current_book_part}} }