1 Introduction

1.1 What is ‘bookdown’

A book titled R bookdownplus Textbook is surely talking about ‘bookdownplus’ (Zhao 2017b), but let’s start with ‘bookdown’ (Xie 2016).

‘bookdown’ is a software package for writing books or documents based on R language (R Core Team 2016) and Markdown syntax. It is something like Microsoft Word, but more elegant, more powerful, and easier. If you know LaTeX, it would be much helpful to get into ‘bookdown’. If not, don’t worry, it is the reason why I wrote this book. With ‘bookdown’, users can

  • easily insert table of contents, figures and tables with cross-reference, footnotes, and index;

  • easily embed equations, citations, R scripts;

  • obtain multiple formats of outputs such as pdf, word and html files;

  • have the best experience of writing reproducible documents.

If my description is insufficient for you to know what is ‘bookdown’, you could have a brief look at the official website of ‘bookdown’1, where some of numerous books written with ‘bookdown’ are listed. Three of them on its home page are authored by me .

1.2 What is ‘bookdownplus’

Thus, ‘bookdownplus’ sounds like something related to ‘bookdown’ ?

Yes, you R right. Many people know that ‘bookdown’ is an excellent package for authoring books on programming languages especially R books. Few people know that it can do more than expected. ‘bookdown’ looks like a delicious cake. People are wondering how it tastes, but people don’t know how to cut it and or how to grab a piece onto their own plates.

A cake of 'bookdown'. How should I cut it in a right way?

Figure 1.1: A cake of ‘bookdown’. How should I cut it in a right way?

I expected someone to cut it for me. I was too hungry to wait and I was helping myself. Therefore I developed ‘bookdownplus’.

‘bookdownplus’ is an extension of ‘bookdown’. It is a collection of multiple templates, which I have been collecting since years ago on the basis of LaTeX, and have been tailoring them so that I can work happily under the umbrella of ‘bookdown’. ‘bookdownplus’ helps you (and me) write varied types of books and documents. This book you are reading at the moment was exactly produced by ‘bookdownplus’.

‘bookdownplus’ was developed on Windows OS. It has not fully been tested on MacOS or Linux yet. Therefore the examples given in this book should be reproduced on Windows. I am not sure how bookdownplus performs on other OS. Please let me know if there is any problem.

I believe some official ‘bookdown’ templates will be available in the near future, but I cannot wait. Can you? If so, I am afraid that the cake will not be fresh any more.

‘bookdownplus’ is a knife for cutting the ‘bookdown’ cake. Frankly speaking, I am not an expert to cut this cake. Feel free to join me in sharpening it if you would like to.

1.3 Why ‘bookdownplus’

A tasty cake is not necessarily easy to cut. ‘bookdown’ is not easy for beginners. Try reading the official manual of ‘bookdown’2. If you are able to build your own book in one hour, I am sure you are a genius and please send me a postcard with your signature. An R beginner might be confused or depressed in struggling in the flood of LaTeX, YAML, Markdown, Pandoc, etc. It would be a pity if users stop their steps at the door and give up the courage of entering the wonderful world of ‘bookdown’.

‘bookdownplus’ is the easiest shortcut to the world of ‘bookdown’. With just one single command users can get a demo book (or multiple demo books) in .pdf or .doc, or even more formats (see Chapter 2 ). ‘bookdownplus’ extends the features of ‘bookdown’, and simplifies the procedure. Users only have to choose a template, clarify the book title and author name, and then focus on writing the text. No need to struggle in YAML and LaTeX.

With ‘bookdownplus’ you can easily:

  • write a mail in an elegant layout,

  • write a laboratory journal, or a personal diary,

  • draw a monthly or weekly or conference calendar,

  • and, of course, write academic articles in your favourite way,

  • with chemical molecular formulae and equations,

  • even in Chinese,

  • write guitar chords,

  • and more wonders are coming soon.

1.4 Shoulders of Giants

‘bookdownplus’ is developed on the basis of the following outstanding work:

  • R (R Core Team 2016), of course;

  • R ‘bookdown’ package (Xie 2016);

  • book examples by Yihui Xie;34

  • gchords, a LaTeX package for typesetting guitar chord diagrams by Kasper Peeters;5

  • Copernicus Publications LaTeX Package;6

  • MDPI LaTeX template;7

  • mhchem package by Martin Hensel;8

  • kuleuven-templates;9

  • classicthesis package by Andre Miede.10

As some codes in ‘bookdownplus’ were collected long time ago, and some might be re-used and re-re-used many time before apprearing in ‘bookdownplus’, I might miss some citations. It would be appreciated if you find them and let me know.

1.5 About this book

This book is a tutorial or a documentation of ‘bookdownplus’. Beginners could read Chapter 2 to get a general idea of how bookdownplus works. Chapter 3 could be skipped for the first time but could be referred later. From Chapter 4 to 7, the templates in bookdownplus are introduced one by one in detail in four groups. Finally Chapter 8 provides some information for Chinese users, mind map fans, and those who would like to contribute to bookdownplus.

You do not have to read this book if you can play well with bookdown or bookdownplus. However, Chapter 3 could always be useful as a cheat sheet of bookdown or markdown syntax.

Bibliography

Zhao, Peng. 2017b. Bookdownplus: Generate Varied Types of Books and Documents with R ’Bookdown’ Package. https://CRAN.R-project.org/package=bookdownplus.

Xie, Yihui. 2016. Bookdown: Authoring Books and Technical Documents with R Markdown. Boca Raton, Florida: Chapman; Hall/CRC. https://github.com/rstudio/bookdown.

R Core Team. 2016. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.