Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Porting bookdown to distill::distill_article doesn't support theorem environment

$
0
0

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.$$
```


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>