I am trying to knit a document to pdf. I can knit to HTML just fine, but the pdf never works. Things I have tried:
- Update all packages
- install.packages("tinytex")
- installs perfectly and shows in in the packages pane
- tinytex::install_prebuilt()
tlmgr conf auxtrees add "C:/PROGRA~1/R/R-4.0.3/share/texmf"
Error in system2("tlmgr", args, ...) :
'CreateProcess' failed to run 'C:\Users\XXX XXX\AppData\Roaming\TinyTeX\bin\win32\tlmgr.bat info --list --only-installed --data name'
- tinytex:::install_tinytex()
Error in system2("tlmgr", args, ...) :
'CreateProcess' failed to run 'C:\Users\XXX XXX\AppData\Roaming\TinyTeX\bin\win32\tlmgr.bat info --list --only-installed --data name'
- knit button
Error in system2("tlmgr", args, ...) :
'CreateProcess' failed to run 'C:\Users\XXX XXX\AppData\Roaming\TinyTeX\bin\win32\tlmgr.bat update --all --self'
Calls: <Anonymous> ... latexmk_emu -> run_engine -> system2_quiet -> tlmgr_update
In addition: Warning message:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'CreateProcess' failed to run 'C:\Users\XXX XXX\AppData\Roaming\TinyTeX\bin\win32\pdflatex.exe -halt-on-error -interaction=batchmode "Document.tex"'
Execution halted
- Complete uninstall and reinstall of R and RStudio
I'm at a loss at this point and nothing I have found online has worked. It is clear that I am completely unable to install tinytex but I am unsure why. Possibly it is because I have a space in my username on my laptop, however I do not know how to bypass that.
Metadata sections:
Without xelatex
---
title: "A Document"
output: pdf_document
---
Error in system2("tlmgr", args, ...) :
'CreateProcess' failed to run 'C:\Users\XXX XXX\AppData\Roaming\TinyTeX\bin\win32\tlmgr.bat update --all --self'
Calls: <Anonymous> ... latexmk_emu -> run_engine -> system2_quiet -> tlmgr_update
In addition: Warning message:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'CreateProcess' failed to run 'C:\Users\XXX XXX\AppData\Roaming\TinyTeX\bin\win32\pdflatex.exe -halt-on-error -interaction=batchmode "Document.tex"'
Execution halted
With xelatex
---
title: "A Document"
output:
pdf_document:
latex_engine: xelatex
---
Error in system2("tlmgr", args, ...) :
'CreateProcess' failed to run 'C:\Users\XXX XXX\AppData\Roaming\TinyTeX\bin\win32\tlmgr.bat update --all --self'
Calls: <Anonymous> ... latexmk_emu -> run_engine -> system2_quiet -> tlmgr_update
In addition: Warning message:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'CreateProcess' failed to run 'C:\Users\XXX XXX\AppData\Roaming\TinyTeX\bin\win32\xelatex.exe -halt-on-error -interaction=batchmode "xelatex.tex"'
Execution halted