[Tex/LaTex] TexStudio, MiKTeX and Sumatra; Compilation Issue


All is in place: latest version of TexStudio, latest version of MiKTeX (I chose the installation for my 64x windows 8.1), and latest version of SumatraPDF. I installed every package by hand which TexStudio told me to, using the package manager of MiKTeX, the updater of MiKTeX and refreshed using the Setting option of MiKTeX.
My problem: I press F6 to compile my document, TexStudio writes "Process exited normally" but SumatraPDF doesn't automatically open. The new document is created but I would like SumatraPDF to open automatically like it usually did.
I also looked through Google, replaced MiKTeX by TeXLive, and reinstalled over and over again. Nothing helped so far.

Best Answer

The shortcut F6 in TeXstudio is 'Compile', and F5 is 'Compile and view', or F1 prior to version 2.12.2. That is, if you press F5, TeXstudio will compile the TeX source file and then (if no error occurs) open the PDF viewer. If you want to open the generated PDF file automatically, use F5 rather than F6.

In order to use SumatraPDF as the default PDF viewer, you have to use the external PDF viewer and set it to SumutraPDF. Here is a step-by-step guidance.

  1. Options (in the menu bar) -> Configure TeXstudio ... -> The Commands Label
  2. Modify the value of External PDF Viewer to "path\to\SumatraPDF.exe" -reuse-instance -forward-search "?am.tex" @ -fwdsearch-permanent 1 "?am.pdf"
  3. The Build Label
  4. Select External PDF Viewer for PDF Viewer in Meta Command area.
  5. Click OK at the bottom of the window

That's it.

Enjoy TeX and TeX.SX. : )