Reputation: 6396
I'm writing some code with descriptions using Rmarkdown 2 and knit PDF.
I've been trying many method to write a degree symbol inline:
And many possible RMarkdown symbols, such as:
But nothing is working. Is there a way to write a degree symbol in RMarkdown 2 and convert it do PDF?
EDIT (18 AUGUST 2014):
Ok, I found out where is the problem. If you use \circ in normal sentence or first-level list it is ok. But when I try to use \circ in second-level list - it's not working.
Upvotes: 6
Views: 10456
Reputation: 6396
The problem was with RMarkdown converting nested lists. On this page http://rmarkdown.rstudio.com/authoring_pandoc_markdown.html you can find sentence:
The nested list must be indented four spaces or one tab
Although, using the tab could be a problem. When using four spaces - it works:
* Let's turn this round 360$^\circ$
+ Let's turn this round 360$^\circ$
Upvotes: 10
Reputation: 94182
Using \circ works for me, RStudio, knit to pdf:
Let's turn this round 360$^\circ$
Upvotes: 1
Reputation: 955
You can use plotmath
's degree
, e.g.
plot(1, xlab=expression(4*degree))
Upvotes: 0