3

Is that possible to have FrontPage Image a) BEFORE first chapter title, b) BEFORE book title?

Currently the only way to include any frontpage image seems to be AFTER the first-level (non-empty) heading, like below:

---
knit: "bookdown::render_book" 
site: bookdown::bookdown_site
documentclass: book
author: "Me Mine"
title: "«My Book»"  
---

# Frontpage

```{r, echo=FALSE, out.width="60%", fig.align = "center"}
knitr::include_graphics( "nice-frontpage-image.jpg" )
)

# Introduction
...

It would have been so much better if I can do this (without having to have unneeded #Frontpage chapter):

---
knit: "bookdown::render_book" 
site: bookdown::bookdown_site
documentclass: book
author: "Me Mine"
title: "«My Book»"  
---

```{r, echo=FALSE, out.width="60%", fig.align = "center"}
knitr::include_graphics( "nice-frontpage-image.jpg" )
)

# Introduction
...

And this (i.e. image goes before the title):

---
knit: "bookdown::render_book" 
site: bookdown::bookdown_site
documentclass: book
author: "Me Mine"
title: `r knitr::include_graphics( "nice-frontpage-image.jpg" )`
)"\n «My Book»"  
---


# Introduction
...

Is that possible?

PS I found a related still unaswered question here: Index.Rmd without first-level heading

IVIM
  • 2,167
  • 1
  • 15
  • 41
  • Intersting question, I voted up and want to know an answer too... – manro Nov 06 '21 at 17:06
  • 1
    I found the answer for B) here: https://stackoverflow.com/questions/62074546/add-image-before-bookdown-title, which links to here: https://community.rstudio.com/t/add-image-before-bookdown-title/67825/5 – IVIM Nov 08 '21 at 15:07
  • 1
    Also an easier solution for B) is posted here: https://stackoverflow.com/questions/62074546/add-image-before-bookdown-title/69932877#69932877. Still searching for solution to A) – IVIM Nov 11 '21 at 18:03

0 Answers0