C Technical Memo

This note is created by bookdown package on RStudio.

For bookdown See (Xie 2015), (Xie 2017), (Yihui Xie 2018).

The following is a memo.

A. Install R and R Studio with necessary packages if needed

B. Create and setup ssh key by ssh-keygen

C. Setup Git-GitHub connection

  1. Create a GitHub account if needed
  2. Set ssh key by copying the value of the public SSH key to the clipboard using pbcopy and paste it into SSH Keys in the GitHub account

D. Remote Repository

  1. Log-in to the GitHub account
  2. Go to RStudio/bookdown-demo repository: https://github.com/rstudio/bookdown-demo
  3. Use This Template
  4. Input Repository Name
  5. Select Public - default
  6. Create a repository from the template
  7. Set Pages: Branch main, docs

E. Local Repository

  1. Copy: Code > Clone > SSH from the GitHub repository
  2. Create a new project by Version Control Git
  3. Change directory name _book to docs
  4. Edit YAMLs

All source files are in the GitHub Repository.

C.1 To Do List

  • Environment align in ePub_book.

    • It may be better to give up ePub book mode.
  • https://github.com/rstudio/bookdown/issues/530

  • See also bookdown ePub version page 33. I could not retrieve the same. (See page 32 as well.)

  • Environment of align

    1. align \[\begin{align} A & = B\\ & = C \end{align}\]

    2. eqnarray* \[\begin{eqnarray*} A &=& B\\ & = & C \end{eqnarray*}\]

    3. array in equation with minus spacing \[ \begin{array}{lcl} A & \!\!=\!\! & B\\ & \!\!=\!\! & C \end{array} \]

    4. split in equation

\[\begin{equation} \begin{split} A & = B\\ & = C \end{split} \tag{C.1} \end{equation}\]

  • Shaded Box using frame with environment hs in PDF
  • Controlling top icons
  • My template of bookdown

Minor

  • Difference in numbering; HTML and PDF
  • bs4_book format
  • bookdown template and doc directory
  • Style of citation in PDF

References

Xie, Yihui. 2015. Dynamic Documents with R and Knitr. 2nd ed. Boca Raton, Florida: Chapman; Hall/CRC. https://duhi23.github.io/Analisis-de-datos/Yihue.pdf.
———. 2017. Bookdown: Authoring Books and Technical Documents with r Markdown. 1st ed. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/bookdown/.
Yihui Xie, Garret Grolemund, J. J Allaire. 2018. R Markdown: The Definitive Guide. 1st ed. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown/.