I know I can use $$ to write \LaTeX
in Rmarkdown documents like $\beta$. My goal is if this is possible inside inline code.
I would do `$\beta$`
or `$\\beta$`
, but both do not work.
In case it is not possible, is there some way to generate a greek letter inside inline code in Rmarkdown?
Following https://stackoverflow.com/questions/26821326/how-can-i-write-special-characters-in-rmarkdown-latex-documents, I tried `β`
.
But it also does not work. What can I do?
Thanks!
Best Answer
Here I found that it depends on the type of area you are working in and potentially easier if your target is to show it in html rather than pdf so within a code chunk I got best success with
<code><mathml><mi>β</mi></mathml></code>
Whereas outside a code chunk I found I had to simply use
β
Note the highlighted
β