I am trying to get some greek characters into the rownames of a table in rmarkdown knitting to pdf. I am using knitr, pander and MacTex. It seems like pander accepts some unicode characters but not others. When i use \u2013
(emdash) it works.
---
title: "Untitled"
author: "Llew Mills"
date: "24 June 2016"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(fig.width=12, fig.height=8, fig.path='Figs/',
echo=FALSE, warning=FALSE, message=FALSE, dev = 'pdf')
```
``` {r stuff}
library(pander)
m1 <- rnorm(12,8,3)
m2 <- rnorm(12,4,5)
m3 <- rnorm(12,5,1)
mR <- rep("gene \u2013", 12)
df <- data.frame(mR,m1,m2,m3)
pander(df, justify = "right", style = "simple")
```
However if instead of that unicode character I use the unicode for gamma \u03B3
i get the error message ! Package inputenc Error: Unicode char \u8:γ not set up for use with LaTeX
.
Does anyone know if there is a list of unicode characters that are compatible with LaTex, or alternatively a way to get latex to accept all unicode characters?