I've been a relatively long-time user of TeXnicCenter, and whenever I recompiled a tex file to PDF and viewed the output in that program, I would get an updated version of the PDF that was already open.

I started using Kile and realized that whenever I tried doing the same thing, Kile would open a new PDF file, even if an older version of the PDF was already open. I was wondering if there is some way to change this, so that the old PDF file becomes updated, and so that I wouldn't end up with multiple versions of the same PDF open.

  • Under "ViewPDF" there is a configuration "Okular unique", which seems to do what you want; unfortunately, it is not very convenient, since it reloads the file in the same okular window, but at the first page each time. On the other hand, letting okular just refresh the file, as suggested by @DJP, retains your view. – nplatis May 9 '13 at 7:26

The standard viewer for Kile is Okular. Under Settings >> configure Kile >> Tools >> Build >> viewPDF you need to add --unique to the options. This will make Okular only open a single window.

| improve this answer | |

I've been annoyed by that problem, too. Unfortunately, I don't see any way to prevent the behavior through configuring Kile or the PDF viewer (Okular for me).

But if you want to avoid having multiple PDFs being created, don't compile with QuickBuild. Compile with PDFLaTeX and click on the old PDF file and you will find it has been updated. Do not press ViewPDF or another PDF viewer instance is created.

| improve this answer | |

I had the same problem too, and it drove me crazy. Here is a fix that might work. I use evince as the default pdf/ps viewer in Kile, the default in my installation was Okular. You can go to Tools> Configure Kile> Buid > ViewPdf and change command to evince. Of course you must have evince in installed.

| improve this answer | |

This is not a direct answer, rather a workaround (taken from here). Have a script that checks if okular is open already, in which case doesn't invoke okular again.

open=`ps -fe | grep "okular $1.pdf" | grep -vc grep`
if [ $open -eq 0 ]; then
  okular $1.pdf &

Then in okular's settings (Settings->Okular Settings->General), select Reload document on file change.

| improve this answer | |

You could configure Quickbuild to only use PDFLaTeX (without ViewPDF) and save it from Settings->tools->Build menu.

| improve this answer | |

In my case the answer from StrongBad didn't work. But then I saw, that KILE has the option to directly select "Okular Unique" as configuration. With this setup all things work as expected.Configuration KILE unique PDF

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.