Trying to implement theorem environment to R distill::article. Followed the instructions from the books on Rmarkdown and Bookdown, and the R Markdown Cookbook
I found that theorem environments were processed well for
bookdown::html_document2:
base_format: rmarkdown::html_document
and
bookdown::html_document2:
base_format: pagedown::html_paged
However, it doesn't work for distill_article
. Anyone knows why it doesn't work?
The following is a minimal reproducible example.
---
title: "Port the bookdown features to Rmarkdown"
author: "Bookdown Rmarkdown"
output:
bookdown::html_document2:
base_format: distill::distill_article
---
# Theorems
```{theorem, name="Pythagorean theorem"}
For a right triangle, if $c$ denotes the length of the hypotenuse
and $a$ and $b$ denote the lengths of the other two sides, we have
$$a^2 + b^2 = c^2.$$
```