Search code examples
emacslatextexviewer

How to set the command of View by default with a real filename?


I have this line in my .emacs:

(setq TeX-view-program-list '(("Okular" "okular --unique %u"))) 

When I type C-c C-c, then View, then the command turns out to be okular --unique %u, however, I would like it to be okular-unique filename.pdf

Could anyone help? Thank you very much


Solution

  • I think you should have something like this for your config:

    (setq TeX-view-program-selection
          '((output-pdf "PDF Viewer")))
    (setq TeX-view-program-list
          '(("PDF Viewer" "okular %o")))
    

    I'm not sure if this okular-unique is a program name - it that case just replace okular with okular-unique.