[Tex/LaTex] Math symbol in Rmarkdown list

markdownr

I am trying to get the following code to render correctly in rmarkdown, but unfortunately math mode does not seem to work in a list setting? Can anyone help with this?

---
title: "Trial"
author: "Jon"
date: "June 5, 2019"
output:
  html_document: default
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```


    1. work $\beta$
    2. hia

In the resulting file of the code above, instead of getting the greek letter beta, I get the text as is.

Best Answer

You have indented a first level list with 4 spaces, so it is not an enumerated environment but a verbatim monospaced text. Remove the indentation and it will work as expected.