我正在尝试生成一个表格,其中“*”作为单元格中的值:
---
title: "Untitled"
author: "James Durant"
date: "November 7, 2017"
output: pdf_document
---
```{r arthmatic, echo=FALSE}
library(knitr)
dfx <- data.frame(
Operator = c("+", "-", "*", "/", "^", "**", "%%", "%/%"),
Operation = c("addition", "subtraction", "multiplication",
"division", "exponentiation", "exponentiation",
"modulus", "integer division")
)
kable(dfx, escape = FALSE)
```
有什么想法吗?
答案 0 :(得分:3)
将每个*
替换为\\text{*}
或\\textasteriskcentered