6

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

Philipp
  • 48,066
  • 12
  • 84
  • 109
SoftTimur
  • 5,630
  • 38
  • 140
  • 292

1 Answers1

6

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.

Bozhidar Batsov
  • 55,802
  • 13
  • 100
  • 117
  • Perhaps `okular-unique` is an alias on the OP's system. For me `"okular --unique %o"` works fine. – AstroFloyd Feb 21 '21 at 10:28
  • I have to retract that. While `"okular %o"` opens a new okular window every time, `"okular --unique %o"` does not but jumps to page 1 of the opened document on every compilation. I ended up using `(setq TeX-view-program-list '(("Okular" "true")))` (calling the `true` program, which doesn't do anything) so that I can open the document manually once and then compile using `C-c C-a` without leafing through the PDF every time. – AstroFloyd Dec 21 '21 at 15:02