0

我无法在笔记本中内联显示乳胶数学符号:

---
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输出: 在此处输入图像描述

如何在倒数第二个条目中显示内联“小于或等于”符号?

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

4

0 回答 0