Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I write a degree symbol in RMarkdown 2?

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:

  • Latex package: siunitx's \ang
  • Latex package: textcomp's \textdegree
  • Latex: \circ

And many possible RMarkdown symbols, such as:

  • $$ \textdegree $$ or $\textdegree$

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.

enter image description here

like image 947
Jot eN Avatar asked Jan 10 '23 00:01

Jot eN


1 Answers

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$ 

enter image description here

like image 95
Jot eN Avatar answered Jan 17 '23 23:01

Jot eN