r - Expressions in markdown using knitr -
i'm trying use inline expression in .rmd markdown file. i'm converting .rmd file pdf using pandoc. contents of file this:
report ======================================================== text , expression 100km^2 ```{r} summary(cars) ```
i expected 100km^s render normally, renders literally '100km^2'. how can expression render?
you can use latex math mode this,
knit(text="$100 km^2$",output="test.md") pandoc("test.md", format="latex")
gives me:
Comments
Post a Comment