RNotebook html中的乳胶内联

时间:2017-10-25 07:09:56

标签: latex r-markdown rnotebook

我在笔记本中内联显示乳胶数学符号时遇到了麻烦:

---
title: "R Notebook"
output:
  html_document:
    df_print: paged
---

```{r, echo=F, message=F, warning=F, results="asis"}
cat("Latex attempt 1: $x = 5$ \n\n") # Works
cat("Latex attempt 2: $x > 5$ \n\n") # Works
cat("Latex attempt 3: $x \\leq 5 $ \n\n") # \leq doesn't render and whole equation fails
cat("Latex attempt 4: $$x \\leq 5 $$ \n\n") # Works with equation on next line
```

html输出: enter image description here

如何在第二个最后一个条目中显示内嵌'小于或等于'的符号?

请注意,出于这个问题的目的,我想在块中使用results =“asis”。

0 个答案:

没有答案