AMA
April 10, 2021, 11:28am
1
I have tiny_tex and I did tinytex::install something...
It works when I knit to HTML.
I can Knit to PDF every time when I use Jupyter notebook.
! Package inputenc Error: Unicode character ^^V (U+0016)
(inputenc) not set up for use with LaTeX.
Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. See https://bookdown.org/yihui/rmarkdown-cookbook/latex-unicode.html
Error: LaTeX failed to compile a4.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See a4.log for more info.
Execution halted
Those error msgs are not immediately actionable for someone who just wanted a pdf and doesn't care about how it works under the hood.
I cannot release the Rmd file yet because it's the solution to a course project.
cderv
April 13, 2021, 8:01am
2
It seems you have a character that is not supported in LaTeX. What is the content of your file ?
Knitting to PDF require LaTeX and Unicode char can require to use another engine as said in the error message
Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex.
This is a matter of content inside your file and maybe with Jupyter Notebook you don't have the same content.
Do you have an example I could look into ?
Could it be related to this type of issue where you are trying to use ANSI escape characters ?
opened 02:45PM - 14 Nov 20 UTC
closed 03:26PM - 06 Jan 22 UTC
question
The example below fails when outputting to `pdf_document`.
I encountered this p… roblem because one of my packages uses the code below
to render colorized status messages.
All such functions cause `pdf_document`s to fail with the following error:
> ! Package inputenc Error: Unicode character ^^[ (U+001B)
(inputenc) not set up for use with LaTeX.
Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. See https://bookdown.org/yihui/rmarkdown-cookbook/latex-unicode.html
Error: LaTeX failed to compile repdoducible.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See repdoducible.log for more info.
Execution halted
Reproducible example:
````
---
output: pdf_document
---
```{r}
cat("\033[0;32mTEST\033[0m\n")
```
````
Sessioninfo:
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 15063), RStudio 1.2.5042
Locale:
LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
LC_MONETARY=English_United States.1252 LC_NUMERIC=C
LC_TIME=English_United States.1252
Package version:
base64enc_0.1.3 digest_0.6.25 evaluate_0.14 glue_1.4.2 graphics_4.0.2 grDevices_4.0.2
highr_0.8 htmltools_0.5.0 jsonlite_1.7.1 knitr_1.30 magrittr_1.5 markdown_1.1
methods_4.0.2 mime_0.9 rlang_0.4.8 rmarkdown_2.3 stats_4.0.2 stringi_1.5.3
stringr_1.4.0 tinytex_0.26 tools_4.0.2 utils_4.0.2 xfun_0.17 yaml_2.2.1
Pandoc version: 2.7.2
---
By filing an issue to this repo, I promise that
- [x] I have fully read the issue guide at https://yihui.org/issue/.
- [x] I have provided the necessary information about my issue.
- If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
- If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included `xfun::session_info('rmarkdown')`. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: `remotes::install_github('rstudio/rmarkdown')`.
- If I have posted the same issue elsewhere, I have also mentioned it in this issue.
- [x] I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
system
Closed
May 4, 2021, 8:01am
3
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.