I have hard time to get my table printed with diacritics via knitr
package and pandoc. I believe the Name.md
file is produced correctly, but gives me error at the pandoc
level. What I'm doing wrong? Without diacritics it works perfectly.
Here is example and steps I follow:
Replicate table in R
SampleTable <- data.frame(Nazov=c("Kratkodobé záväzky (TA)","Dlhodobé záväzky
(LA)","Záväzky celkovo (TA)"))
I run *.Rmd file to create Name.md file
```{r, echo=FALSE, dpi=600, fig.width=12, fig.height=15, fig.cap="Finančná štruktúra"}
print(xtable(SampleTable))
```
Convert .md into .pdf
knit("Name.rmd")
system(paste("pandoc -V geometry:margin=1in -o", "Report", ".pdf ", "Name", ".md",
sep=""))
EDIT: The error:
pandoc.exe: Cannot decode byte '\x20': Data.Text.Encoding.decodeUtf8: Invalid UTF-8
stream
Warning message:
running command 'pandoc -V geometry:margin=1in -oReport7.pdf ReportNew.md' had status 1