0
votes

The bookdown book illustrates a number of useful custom blocks such as notes and warning symbols. The cookbook talks about them again.

When you download the demo book to get started, there is no way to use these custom blocks, why is that? Whenever, I try to use them as illustrated in the books, they do not compile. Why aren't they just part of the basic implementation of the demo book?

Since they are not part of the basic demo book, can someone outline a step by step process for getting them to work if you are just using the demo book as a starting point for a rmarkdown book?

1
Did you try this?bttomio
Yes. I could not get the custom blocks that are shown on that page to work. My question is about how to get them to work.Manuel Rossetti
Could you please show us the code you are trying to use, which is not working? Thanksbttomio

1 Answers

0
votes
  1. You need to add the classes to your css file:
.rmdcaution, .rmdimportant, .rmdnote, .rmdtip, .rmdwarning {
  padding: 1em 1em 1em 4em;
  margin-bottom: 10px;
  background: #f5f5f5 5px center/3em no-repeat;
}
.rmdcaution {
  background-image: url("../images/caution.png");
}
.rmdimportant {
  background-image: url("../images/important.png");
}
.rmdnote {
  background-image: url("../images/note.png");
}
.rmdtip {
  background-image: url("../images/tip.png");
}
.rmdwarning {
  background-image: url("../images/warning.png");
}
  1. Put the images in the specified folder.