R cmd check Latex error: FATAL pdflatex - GUI framework cannot be initialized

☆樱花仙子☆ 提交于 2020-08-24 07:06:13

问题


I am checking my package and this is actually the last remaining problem. The pdf file cannot be compiled and the logfile tells me

2015-10-15 14:17:47,430+0200 INFO  pdflatex - running 'initexmf --quiet --update-fndb' to refresh the file name database
2015-10-15 14:17:50,276+0200 FATAL pdflatex - GUI framework cannot be initialized.
2015-10-15 14:17:50,276+0200 FATAL pdflatex - Info: 
2015-10-15 14:17:50,276+0200 FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2015-10-15 14:17:50,276+0200 FATAL pdflatex - Line: 50

Any idea where the problem could be?


回答1:


This is known problem wit MikTex 2.9 when pdflatex encounters error

GUI framework cannot be initialized.

(found on my Windows 7 system in the file ~\AppData\Local\MiKTeX\2.9\miktex\log)

So far, I can offer following sequence of actions to remedy this:

  1. In Windows Command prompt go to MiKTeX bin folder (e.g. C:\Program Files (x86)\MiKTeX 2.9\miktex\bin) and run utility mo.exe;

  2. In General tab change 'Install missing packages on-the-fly:' option to No (this will disable GUI and error above won't be happening again);

  3. Run R CMD that calls latex converter again (in my case

    R CMD Rd2pdf man/
    

again to see new errors;

  1. This time miktex won't complaint about GUI - instead it will be missing packages with error like this

    ! LaTeX Error: File `inconsolata.sty' not found.
    
  2. Start MiKTeX package manager (again from mo.exe Packages tab) and install missing package one at the time by repeating steps 3.-5.

This might be not most effective way of fixing this so I appreciate corrections or alternative solutions.



来源:https://stackoverflow.com/questions/33148587/r-cmd-check-latex-error-fatal-pdflatex-gui-framework-cannot-be-initialized

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!