Hi I can knit PDF files in my mac under tidyverse version 1.1.1. When I updated to tidyverse 1.2.1 the following error is generated and the rendering stops. If I reinstall version 1.1.1 the rendering works again and PDF files are generated. Is there a fix for this? The exact error is below:
! Package inputenc Error: Unicode char √ (U+221A)
(inputenc) not set up for use with LaTeX.
See the inputenc package documentation for explanation.
Type H for immediate help.
...
l.570 \end{verbatim}
Try running pandoc with --latex-engine=xelatex.
pandoc: Error producing PDF
Error: pandoc document conversion failed with error 43
Execution halted
This is independent of the code in the script and it happens with multiple scripts.
I changed the rendereing to Xelatex in RStudio and redering does not work. What is interesting is that the same code works with tidyverse 1.1.1 in LaTex. In other words, the same code renders correctly to PDF if I install tidyverse 1.1.1.
The other thread on this issue (Can't render tidyverse 1.2 startup message in LaTex) makes it more clear that the error is due to library(tidyverse) printing out messages that include characters that the default latex_engine can't support.
This stung me this morning and I don't want to switch latex_engines, if you don't need the messages to appear here are two solutions:
suppressMessages on the library call
suppressMessages(library("tidyverse"))
@hadley, any plans to alter the tidyverse package to remove the Unicode or change the RStudio default PDF template to use the xelatex engine? I'd personally lean towards the latter (under the assumption that making the default handle Unicode documents is the Right Thing), but I don't use PDF output enough for my opinion to mean anything. It seems like inserting library(tidyverse) should "just work" with the default templates, even if suppressing the messages makes sense in most cases.