I have a csv I'm importing into markdown (ultimately rendering to pdf), and in one of the cells we have the appropriate latex terminology for creating a symbol when rendered. It works just fine when it's in the normal markdown text, but it will not create the same symbol when inside the table.
---
title: "Test"
output: pdf_document
---
``` {r}
dat <- data.frame(variable = c(rep("turgor loss point", 10), rep("volume", 10)),
unit = c(rep("$\\pi_{tlp}$", 10), rep("cm^3", 10)),
value = c(round(runif(10), 2), round(runif(10,20,30),2)))
kableExtra::kable(dat, booktabs = TRUE, format = 'latex')
Printing in the table leaves the raw symbology, but if I want to discuss the use of the volume (cm^3) and the turgor loss point (\pi_{tlp}) in the text itself, the symbols render without a problem.
```
I believe the issue lies with Latex directly reading the text alone, but not when it's within a separate format like the data frame. Thus, does anyone have an idea for how to get the symbols to appear within the table itself when rendered?
Here is a snip of the output pdf