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"
  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.

  • This should work (works for me). – Alan Munn Jun 5 '19 at 16:26

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.

  • 1
    I missed that. :) – Alan Munn Jun 5 '19 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.