1. 程式人生 > >一個近期頻繁出現的錯誤PDFLaTeX failed to create a pdf file.--你的檔名有空格嗎?

一個近期頻繁出現的錯誤PDFLaTeX failed to create a pdf file.--你的檔名有空格嗎?

期很多人問及這樣的錯誤:
(C:\CTEX\MiKTeX\tex\latex\base\article.clspdflatex.exe: Invalid argument: new*name.synctex(busy)
pdflatex.exe: Data: new*name.synctex(busy)

PDFLaTeX failed to create a pdf file.
For possible explanations start the command from the Command Prompt...
或者
(C:\CTEX\MiKTeX\tex\latex\base\article.clslatex.exe: Invalid argument: new*name.synctex(busy)
latex.exe: Data: new*name.synctex(busy)

LaTeX failed to create a dvi file.
For possible explanations start the command from the Command Prompt...
【問題解析】
這不是TeX自身的問題,而是MIKTeX的.synctex問題,Synctex好像非常討厭檔名裡的空格。可以關注其
官網
是否會修復這個問題。
參考:http://comments.gmane.org/gmane.editors.winedt/4966
http://sourceforge.net/tracker/index.php?func=detail&aid=2101871&group_id=10783&atid=110783
【解決方案】
第一,命名原始檔不要帶空格即可。這個容易做到。
第二,若是覺得上面解決不好,那就取消Synctex,這樣的話pdf檔案雙向搜尋的功能就沒有了,但是執行沒有問題。操作步驟如下: