Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
2  
If you have the PDF open and then compile by pressing PDFLaTex the old PDF gets updated. There is no need to press ViewPDF. Pressing ViewPDF (or compiling with QuickBuild) creates another PDF. I don't see any way to change that through configuring Kile or Okular. –  DJP Jul 27 '11 at 6:25
    
Oh, I see. I guess that was just a habit that carried over from before. Thanks for the help! –  user3129 Jul 28 '11 at 5:54
2  
@DJP Could you make you make your comment into an answer? –  Torbjørn T. Oct 1 '11 at 21:06
    
Done. Should these comments to the original post be removed as well? –  DJP Oct 1 '11 at 23:19
    
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
add comment

5 Answers

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.

share|improve this answer
add comment

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 &
fi

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

share|improve this answer
add comment

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

share|improve this answer
1  
Welcome to TeX.sx! –  Kurt Apr 16 '13 at 9:32
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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