我正在尝试将文档编织为pdf。我可以编织成HTML,但是pdf永远行不通。我尝试过的事情:
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'
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'
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
目前我很茫然,网上找不到任何东西。
元数据部分:
没有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
使用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
答案 0 :(得分:1)
问题出在我的文件路径中有空格。我去了我的计算机上没有空格的另一个用户,文件转换成PDF很好。