Hi guys, I'm using R Markdown to generate a report of my graphs. However, I can only generate in HTML or Word format, for the PDF format it gives an error. The error is below:
output file: teste.knit.md
Erro: LaTeX failed to compile teste.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
Além disso: Warning messages:
1: In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'CreateProcess' failed to run 'C:\Users\Jovani Souza\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode "teste.tex"'
2: In system2("tlmgr", args, ...) :
'CreateProcess' failed to run 'C:\Users\Jovani Souza\AppData\Roaming\TinyTeX\bin\win32\tlmgr.bat update --all --self'
Execução interrompida
Could someone help me solve this problem? I reinstalled MiKTeX and tinytex too, but without effectiveness.
Hello Friend. I uninstalled MikTex. I reinstalled TinyTex. But it is giving error again.
output file: teste.knit.md
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS teste.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output teste.tex --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --lua-filter "C:/Users/Jovani Souza/Documents/R/win-library/3.5/rmarkdown/rmd/lua/pagebreak.lua" --lua-filter "C:/Users/Jovani Souza/Documents/R/win-library/3.5/rmarkdown/rmd/lua/latex-div.lua" --variable "geometry:margin=1in" --include-in-header "C:\Users\Jovani Souza\AppData\Local\Temp\RtmpSkf2Cz\rmarkdown-str355c49d634f1.html"
Erro: LaTeX failed to compile teste.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
Além disso: Warning messages:
1: In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'CreateProcess' failed to run 'C:\Users\Jovani Souza\AppData\Roaming\TinyTeX\bin\win32\pdflatex.exe -halt-on-error -interaction=batchmode "teste.tex"'
2: In system2(...) :
'CreateProcess' failed to run 'C:\Users\Jovani Souza\AppData\Roaming\TinyTeX\bin\win32\pdflatex.exe -halt-on-error -interaction=batchmode "teste.tex"'
3: In system2("tlmgr", args, ...) :
'CreateProcess' failed to run 'C:\Users\Jovani Souza\AppData\Roaming\TinyTeX\bin\win32\tlmgr.bat update --all --self'
Execução interrompida
No LaTeX installation detected (LaTeX is required to create PDF output). You should install a LaTeX distribution for your platform: https://www.latex-project.org/get/
If you are not sure, you may install TinyTeX in R: tinytex::install_tinytex()
I is possible this is an issue because you have a space in your username, CreateProcess does not seems to like that. There is some mention on this on the web, but I am not sure...
Thanks for the answer. I created another user on the computer with only a name "Test", I installed the package again, however it gave the same error.
If I uninstall TinyTex and install only MikText, can it work?
Just in case I installed the package like this:
install.packages ('tinytex')
tinytex :: install_tinytex ()
But when it is installing it gives a small error, but later it continues to install. The error is attached.
The information you asked for. I entered in the console and it appears:
No. Yours is looking different. Is it not installing Tinytex properly? But see the image that I attached. I can open the library and it appears as an installed package.
Just for clarifying based on yourlast comment, tinytex is different than TinyTex distribution. (note the T) You can use tinytext without TinyTex distribution for example.
See the documentations
TinyTeX is a custom LaTeX distribution based on TeX Live that is small in size (150Mb on macOS/Linux and 220Mb on Windows) but functions well in most cases, especially for R users.
The package mainly provides two sets of functions: functions to manage TinyTeX, and those that help compile LaTeX documents to PDF.
In your last example,did you install the latex distribution TinyTex or did you use MikTex ? From what I said above, you can have the installed but not the distribution.
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: