I try to produce one PDF report split on sections based on a grouping variable, using brew
and knitr
. My grouping variable may contain special char
Since you are using UTF-8
, which is not the native encoding of your OS, you need to explicitly tell knitr
the encoding of your input document. For example, you have to call
knit2pdf(brew_out, encoding = "UTF-8")
But I'm not sure if brew
can handle non-native character encodings. If not, I suggest you use your system default encoding (should be ISO8859-1
in this case), and
\usepackage[latin9]{inputenc}
Or do everything in knitr
if you have to use UTF-8
(this also enables you to click the button to compile the document); see 075-knit-expand.Rnw for an example.