我在笔记本中内联显示乳胶数学符号时遇到了麻烦:
---
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
```
如何在第二个最后一个条目中显示内嵌'小于或等于'的符号?
请注意,出于这个问题的目的,我想在块中使用results =“asis”。