
2.10 Stylized boxes
Occasionally, you might find it useful to emphasize a particular piece of information. To help you do so, we have provided css code and images (no need for you to worry about that!) to create the following stylized boxes.
You can use these boxes in your course with either of two options: using HTML code or Pandoc syntax.
2.10.1 Using rmarkdown
container syntax
The rmarkdown
package allows for a different syntax to be converted to the HTML that you just saw and also allows for conversion to LaTeX. See the Bookdown documentation for more information (Xie, Dervieux, and Riederer 2020). Note that Bookdown uses Pandoc.
::: {.notice}
Note using rmarkdown syntax.
:::
Note using rmarkdown syntax.
As an example you might do something like this:
Please click on the subsection headers in the left hand
navigation bar (e.g., 2.1, 4.3) a second time to expand the
table of contents and enable the scroll_highlight
feature
(see more)
2.10.2 Using HTML
To add a warning box like the following use:
<div class = "notice">
Followed by the text you want inside
</div>
This will create the following:
Followed by the text you want inside
Here is a <div class = "warning">
box:
Note text
Here is a <div class = "github">
box:
GitHub text
Here is a <div class = "dictionary">
box:
dictionary text
Here is a <div class = "reflection">
box:
reflection text
Here is a <div class = "wip">
box:
This section is a Work in Progress.