15

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

Lyndon Sundmark
  • 577
  • 7
  • 20

1 Answers1

17

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#special-headers (Section 2.2.3)

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

rocarvaj
  • 546
  • 4
  • 19
Rentrop
  • 20,979
  • 10
  • 72
  • 100
  • For HTML output from bookdown, it is not straightforward to have an image before the document starts. For example, the **bookdown** book puts a cover image in the preface. For reference, there are some options [here](https://stackoverflow.com/a/60537857) – Mark Neal Mar 06 '20 at 19:38
  • This does not work for the cover page. It inserts a blank page before the cover page. Also, the cover page does not take the full height and width of the page. It leaves out the margins. – Vikalp Jain Mar 30 '23 at 16:50