File: bookdown.Rmd

package info (click to toggle)
r-cran-bookdown 0.42%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,752 kB
  • sloc: javascript: 11,343; makefile: 21; sh: 20
file content (66 lines) | stat: -rw-r--r-- 4,177 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
---
title: "Learn bookdown"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Learn bookdown}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

# Overview

<a href="https://bookdown.org/yihui/rmarkdown/books.html"><img src="https://bookdown.org/yihui/rmarkdown/images/cover.png" alt="R Markdown: The Definitive Guide" width="250" style="padding: 0 15px; float: right;"/></a>

If you are new to **R Markdown**, we recommend you start with [R Markdown: The Definitive Guide](https://bookdown.org/yihui/rmarkdown/books.html) to get an overview. [Part I](https://bookdown.org/yihui/rmarkdown/installation.html) introduces how to install the relevant packages, and provides an overview of R Markdown, including the possible output formats, the Markdown syntax, the R code chunk syntax, and how to use other languages in R Markdown.

Next, the chapter on [_Books_](https://bookdown.org/yihui/rmarkdown/books.html) will help orient you to how the **bookdown** package allows you to use R Markdown to author books, using single or multiple `.Rmd` files to build your content.


# User Guide

<a href="https://bookdown.org/yihui/bookdown/"><img src="https://bookdown.org/yihui/bookdown/images/cover.jpg" alt="bookdown: Authoring Books and Technical Documents with R Markdown" width="250" style="padding: 0 15px; float: right;"/></a>


Written by Yihui Xie, the package author, [bookdown: Authoring Books and Technical Documents with R Markdown](https://bookdown.org/yihui/bookdown/) introduces the R package and how to use it. The book is published by Chapman & Hall/CRC, and you can read it online for free.

The book is structured into several chapters to guide the reader into the use of the R package **bookdown** to write books: 

```{r, results='asis', echo = FALSE, eval = FALSE}
# run this to update the content below
xfun::pkg_attach2("xml2")
html <- read_html("https://bookdown.org/yihui/bookdown/")
chapters <- xml_find_all(html, "//li[@class='chapter']")
first_level <- chapters[which(purrr::map_lgl(xml_attr(chapters, 'data-level'), ~ grepl('^\\d+$', .x)))]
titles <- xml_text(xml_find_all(first_level, "a"))
titles <- gsub("^(\\d+)", "\\1.", titles)
titles <- gsub("^(.*) \\([*])$", "\\1", titles)
url <- file.path("https://bookdown.org/yihui/bookdown", xml_attr(first_level, "data-path"))
formatted <- sprintf("* [%s](%s)", titles, url)
cat(formatted, sep = "\n")
```

* [1. Introduction](https://bookdown.org/yihui/bookdown/introduction.html) introduces the package and how to get started using it.
* [2. Components](https://bookdown.org/yihui/bookdown/components.html) introduces elements than can be used while writing a book like Markdown syntax, custom blocks, Theorem and Proof environments, and numbered references.
* [3. Output Formats](https://bookdown.org/yihui/bookdown/output-formats.html) documents the formats to produce HTML, PDF, and EPUB books. 
* [4. Customization](https://bookdown.org/yihui/bookdown/customization.html) documents the configuration options available for authors.
* [5. Editing](https://bookdown.org/yihui/bookdown/editing.html) explains how to edit, build, preview, and serve the book locally.
* [6. Publishing](https://bookdown.org/yihui/bookdown/publishing.html) explains how to publish your book early online for feedback, and how to formally publish as either printed copies or e-books.

# Going further with examples

<https://bookdown.org> is the place to find examples of books created with **bookdown**.

* The [Home](https://bookdown.org/home/) section showcases featured books available online, with links to each book's source code.
* The [Books](https://bookdown.org/home/archive/) section lists books written using **bookdown**.
* The [Contest](https://bookdown.org/home/contest/) section showcases the award recipients and their bookdown applications from the [2018 bookdown contest](https://posit.co/blog/first-bookdown-contest/).

See more about how to publish a book or get your book listed on the [About bookdown.org](https://bookdown.org/home/about/). 

Look also at the "Examples" page.