File: html_document2.Rd

package info (click to toggle)
r-cran-bookdown 0.32%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,664 kB
  • sloc: javascript: 11,322; makefile: 21; sh: 20
file content (120 lines) | stat: -rw-r--r-- 3,654 bytes parent folder | download
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/html.R, R/latex.R, R/word.R
\name{html_document2}
\alias{html_document2}
\alias{html_fragment2}
\alias{html_notebook2}
\alias{html_vignette2}
\alias{ioslides_presentation2}
\alias{slidy_presentation2}
\alias{tufte_html2}
\alias{pdf_document2}
\alias{beamer_presentation2}
\alias{tufte_handout2}
\alias{tufte_book2}
\alias{markdown_document2}
\alias{context_document2}
\alias{github_document2}
\alias{odt_document2}
\alias{powerpoint_presentation2}
\alias{rtf_document2}
\alias{word_document2}
\title{Output formats that allow numbering and cross-referencing
figures/tables/equations}
\usage{
html_document2(
  ...,
  number_sections = TRUE,
  global_numbering = !number_sections,
  pandoc_args = NULL,
  base_format = rmarkdown::html_document
)

html_fragment2(..., number_sections = FALSE)

html_notebook2(..., number_sections = FALSE)

html_vignette2(..., number_sections = FALSE)

ioslides_presentation2(..., number_sections = FALSE)

slidy_presentation2(..., number_sections = FALSE)

tufte_html2(..., number_sections = FALSE)

pdf_document2(...)

beamer_presentation2(..., number_sections = FALSE)

tufte_handout2(...)

tufte_book2(...)

markdown_document2(
  number_sections = TRUE,
  fig_caption = TRUE,
  md_extensions = NULL,
  global_numbering = !number_sections,
  pandoc_args = NULL,
  ...,
  base_format = rmarkdown::md_document
)

context_document2(...)

github_document2(...)

odt_document2(...)

powerpoint_presentation2(...)

rtf_document2(...)

word_document2(...)
}
\arguments{
\item{..., fig_caption, md_extensions, pandoc_args}{Arguments to be passed to a
specific output format function. For a function \code{foo2()}, its
arguments are passed to \code{foo()}, e.g. \code{...} of
\code{html_document2()} are passed to \code{rmarkdown::html_document()}.}

\item{number_sections}{Whether to number section headers: if \code{TRUE},
figure/table numbers will be of the form \code{X.i}, where \code{X} is the
current first-level section number, and \code{i} is an incremental number
(the i-th figure/table); if \code{FALSE}, figures/tables will be numbered
sequentially in the document from 1, 2, ..., and you cannot cross-reference
section headers in this case.}

\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{base_format}{An output format function to be used as the base format.}
}
\value{
An R Markdown output format object to be passed to
  \code{rmarkdown::\link{render}()}.
}
\description{
These are simple wrappers of the output format functions like
\code{rmarkdown::\link{html_document}()}, and they added the capability of
numbering figures/tables/equations/theorems and cross-referencing them. See
\sQuote{References} for the syntax. Note you can also cross-reference
sections by their ID's using the same syntax when sections are numbered. In
case you want to enable cross reference in other formats, use
\code{markdown_document2} with \code{base_format} argument.
}
\note{
These output formats are used to generate single output files, such as
  a single HTML output file (unlike \code{gitbook}, which generates multiple
  HTML output files by default).

  The functions \samp{tufte_*()} are wrappers of functions in the \pkg{tufte}
  package.
}
\references{
\url{https://bookdown.org/yihui/bookdown/}
}