Chapter 1 Prerequisites

This is a sample book written in Markdown. You can use anything that Pandoc’s Markdown supports, e.g., a math equation \(a^2 + b^2 = c^2\).

The bookdown package can be installed from CRAN or Github:

install.packages("bookdown")
# or the development version
# devtools::install_github("rstudio/bookdown")

Remember each Rmd file contains one and only one chapter, and a chapter is defined by the first-level heading #.

To compile this example to PDF, you need XeLaTeX. You are recommended to install TinyTeX (which includes XeLaTeX): https://yihui.org/tinytex/.

remotes::install_github('yihui/tinytex')
## Skipping install of 'tinytex' from a github remote, the SHA1 (825222de) has not changed since last install.
##   Use `force = TRUE` to force installation
tinytex::install_tinytex()
## Warning: Detected an existing tlmgr at /Users/jr/Library/TinyTeX/bin/x86_64-darwin/tlmgr.
## It seems TeX Live has been installed (check tinytex::tinytex_root()). You are recommended to
## uninstall it, although TinyTeX should work well alongside another LaTeX distribution if a LaTeX
## document is compiled through tinytex::latexmk().
## The directory /usr/local/bin is not writable. I recommend that you make it writable. See https://github.com/yihui/tinytex/issues/24 for more info.
## TinyTeX installed to /Users/jr/Library/TinyTeX