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 have installed emacs 24.2, okular 0.14(with KDE 4.8) and Texlive 2011 in windows7.

I want to use okular to view pdf file generated by latex in emacs.

Hence I have configured okular in my .emacs as following:

(setq TeX-command-list
         '(("TeX" "tex --src \"\\nonstopmode\\input %t\""
            TeX-run-TeX nil t)
           ("LaTeX" "%l --src \"\\nonstopmode\\input{%t}\""
            TeX-run-LaTeX nil t)
           ("View" "yap -1  -s %n%b %d"
            TeX-run-discard nil nil)
           ("SView" "F:/KDE/bin/okular.exe --unique %o" TeX-run-command t t)
           ("PLaTex" "pdflatex -synctex=-1 \\nonstopmode\\input{%t}"
            TeX-run-LaTeX nil t)
           ("PView" "start \"\" %s.pdf" TeX-run-command nil t)
           ("BibTeX" "bibtex %s" TeX-run-BibTeX nil nil)
           ("Index" "makeindex %s" TeX-run-command nil t)
           ))

As you can see, I want to view pdf file via okular when I using SView command. However, there have some problems with okular:

I opened a tex file named answer.tex emacs. Firstly, I use c-c c-c and PLatex to compile the file to pdf. Then I use c-c c-c and SView to open it via okular. Everything works fine until now.

And then, after I changed some content of answer.tex, I want to re-compile the file. Hence I press c-c c-c in emacs and choose PLatex to compile the file. But the emacs show a message in the minbuffer: Process SView' for documentanswer' running, kill it? (yes or no)

If I input no and Enter, then I get a error message in the minbuf: Cannot have two processes for the same document

My questions is: how to avoid this error message as I view dvi file via yap?

Any help would be appreciated!

share|improve this question

put on hold as unclear what you're asking by Keks Dose, Svend Tveskæg, Papiro, Paul Gaborit, Andrew Jul 27 at 14:50

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

    
The preferred way to set your viewer program is by customizing TeX-view-program-selection. –  Tyler Feb 11 '13 at 18:33

Browse other questions tagged or ask your own question.