2

I just updated MiKTeX and compiled some article with below header.

\documentclass[preprint,review,12pt]{elsarticle}

It does not show any error before updating but it failed shown below.

2015-09-05 21:15:38,280+0900 FATAL latex - GUI framework cannot be initialized.
2015-09-05 21:15:38,280+0900 FATAL latex - Info: 
2015-09-05 21:15:38,280+0900 FATAL latex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2015-09-05 21:15:38,280+0900 FATAL latex - Line: 50

I wish somebody give answer for the error.

Heiko Oberdiek
  • 271,626
kuphy
  • 21
  • 1
  • 2
  • 1
  • 1
    Can you still start the package manager (admin if you have)? If yes synchronize (menu repositories ->synchronize) and then install all new packages starting with "miktex-". See the explanation about "critical" updates here: http://tex.stackexchange.com/questions/108447/how-should-one-maintain-and-update-a-miktex-installation/108490#108490. – Ulrike Fischer Sep 05 '15 at 13:07
  • @Ulrike, I get this error (see :[http://tex.stackexchange.com/questions/271312/pdflatex-failed-for-some-reason-but-which-and-how-can-this-be-repaired] ) too but my MikTeX is updated in particular with the latest miktex- related patches using update in admin mode. – Xavier_B Oct 07 '15 at 13:03
  • I have now tried using LuaLaTeX on the TeX example of the "basics of fontspec package" and got the same error report but this time in the lualatex.log. – Xavier_B Oct 07 '15 at 13:35
  • @Xavier_B: Did you synchronized and check with the package manager (admin) if there are new miktex packages? Did you try to compile on the command line? – Ulrike Fischer Oct 07 '15 at 17:23
  • Yes, in fact the machines on which I get these errors are the ones on which miktex-x64-bin is updated to the release dated 30-Sep-15. The machine running on Win7 and miktex2.9 with the miktex-x64-bin from earlier (I forget the date) does compile the MWE correctly. I just ran update in admin mode and I suddenly get a whole bunch of miktex programs to update all with the date 29-AUG-15. Is this correct? The message to the right states: "release state change". Should I do the update? – Xavier_B Oct 07 '15 at 18:54
  • @Ulrike I have now updated the miktex installation with the updates dated Ocotober 6th (all miktex related). I have tried to compile the MWE presented in [http://tex.stackexchange.com/questions/271312/pdflatex-failed-for-some-reason-but-which-and-how-can-this-be-repaired] . Again pdflatex failed with message: "This application failed because it could not find or load the Qt platform plugin" – Xavier_B Oct 08 '15 at 07:58

2 Answers2

5

Here's what worked for me:

Find the .tex file that is generated by RStudio. Open it with TeXworks and compile it. You should get prompted if you want to install some packages. Check the box that says that you don't want to be prompted for installing packages. (This will install packages on-the-fly)

The .tex file should then compile and you'll have your pdf.

Now RStudio should be able to knit to pdf.

0

Go to MikTex Console (Admin), click on Setting and select "Always" under whether missing packages are to be installed automatically (on-the-fly). When you have done that, go back to your Rstudio and knit again. It should prompt installation. Make sure you have the internet on; after installing, it will give you the output.