This book aims to train students in statistics and data science on academic writing with professional tools such as LaTeX, BibTeX, R, and Git. It is based on our own writing experience of over 100 scholarly papers. Many of the tips have been taught to our Ph.D. students again and again. We hope this book saves us from that repetitive efforts.

The source of the book is at

The notes are prepared with the bookdown R package (Xie 2016), which can be installed from CRAN or Github:

# 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):


Xie, Yihui. 2016. Bookdown: Authoring Books and Technical Documents with R Markdown. Chapman; Hall/CRC.