Custom blocks are often used in technical books to create salient boxes of code and/or narrative that call the reader’s attention. For example, custom blocks may be used to highlight a note or a warning. These can be included in multiple bookdown output formats using Pandoc’s syntax for fenced
Div blocks (https://pandoc.org/MANUAL.html#divs-and-spans). Section 9.6 in the R Markdown Cookbook (Xie, Dervieux, and Riederer 2020) for instructions.
bs4_book() HTML output format includes styling for selected custom blocks; see Section 3.1.2.