forked from rstudio/bookdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitbook.Rd
73 lines (67 loc) · 3.21 KB
/
gitbook.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gitbook.R
\name{gitbook}
\alias{gitbook}
\title{The GitBook output format}
\usage{
gitbook(
fig_caption = TRUE,
number_sections = TRUE,
self_contained = FALSE,
anchor_sections = TRUE,
lib_dir = "libs",
global_numbering = !number_sections,
pandoc_args = NULL,
extra_dependencies = list(),
...,
template = "default",
split_by = c(outer(c("chapter", "section", 1:6), c("", "+number"), paste0), "rmd",
"none"),
split_bib = TRUE,
config = list(),
table_css = TRUE,
code_folding = c("none", "show", "hide")
)
}
\arguments{
\item{fig_caption, number_sections, self_contained, anchor_sections, lib_dir, pandoc_args, code_folding, extra_dependencies, ...}{Arguments to be passed to \code{rmarkdown::\link[rmarkdown]{html_document}()}
(\code{...} not including \code{toc}, and \code{theme}).}
\item{global_numbering}{If \code{TRUE}, number figures and tables globally
throughout a document (e.g., Figure 1, Figure 2, ...). If \code{FALSE},
number them sequentially within sections (e.g., Figure 1.1, Figure 1.2,
..., Figure 5.1, Figure 5.2, ...). Note that \code{global_numbering =
FALSE} will not work with \code{number_sections = FALSE} because sections
are not numbered.}
\item{template}{Pandoc template to use for rendering. Pass \code{"default"}
to use the bookdown default template; pass a path to use a custom template.
The default template should be sufficient for most use cases. In case you
want to develop a custom template, we highly recommend to start from the
default template:
\url{https://github.com/rstudio/bookdown/blob/master/inst/templates/gitbook.html}.}
\item{split_by}{How to name the HTML output files from the book: \code{rmd}
uses the base filenames of the input Rmd files to create the HTML
filenames, e.g. generate \file{chapter1.html} for \file{chapter1.Rmd};
\code{none} means do not split the HTML file (the book will be a single
HTML file); \code{chapter} means split the file by the first-level headers;
\code{section} means the second-level headers, \code{1}-\code{6} means split the file by the [1-7]-level headers (1: chapter).
For \code{chapter}, \code{section} and \code{1}-\code{6}, the HTML filenames will be determined by the header ID's,
e.g. the filename for the first chapter with a chapter title \code{#
Introduction} will be \file{introduction.html}; for \code{chapter+number},
\code{section+number} and \code{[1-6]+number} the chapter/section
(and higher level section) numbers will be prepended to
the HTML filenames, e.g. \file{1-introduction.html} and
\file{2-1-literature.html}.}
\item{split_bib}{Whether to split the bibliography onto separate pages where
the citations are actually used.}
\item{config}{A list of configuration options for the gitbook style, such as
the font/theme settings.}
\item{table_css}{\code{TRUE} to load gitbook's default CSS for tables. Choose
\code{FALSE} to unload and use customized CSS (for example, bootstrap) via
the \code{css} option. Default is \code{TRUE}.}
}
\description{
This output format function ported a style provided by GitBook
(\url{https://www.gitbook.com}) for R Markdown. To read more about this
format, see:
\url{https://bookdown.org/yihui/bookdown/html.html#gitbook-style}
}