Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R bookdown - cover page and appendix

Tags:

r

bookdown

I have written a draft book in R Markdown.

Two questions:

  1. Is it possible to include a 'cover page' with graphic and text in the index.rmd file so that the rendering in bookdown- shows a cover page prior to the title page?

  2. I have an appendix in the book which cover some miscellaneous thoughts and comments. Is there a way of telling bookdown not to label it as 'Chapter 11 -Appendix' but rather just Appendix?

thanks

like image 266
Lyndon Sundmark Avatar asked Mar 27 '17 21:03

Lyndon Sundmark


Video Answer


1 Answers

Yes, both is possible:

(assuming you want PDF/Latex output)

The 1. thing you can do as follows:

Include an _output.yml file in your root directory. It could look as follows:

bookdown::pdf_book:
  includes:
    in_header: preamble.tex
    before_body: frontpage.tex

Where you load your additional packages in preamble.tex and the frontpage is frontpage.tex.

To do the 2. thing:

Just add {-} behind your Chapter heading, so

# Appendix {-}

See https://bookdown.org/yihui/bookdown/markdown-extensions-by-bookdown.html#equations Section 2.2.3

For a working example have a look at: https://github.com/rstudio/bookdown-demo

like image 143
Rentrop Avatar answered Oct 22 '22 10:10

Rentrop