[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to add a new pdf viewer?
From: |
Uwe Brauer |
Subject: |
how to add a new pdf viewer? |
Date: |
Mon, 28 Aug 2023 16:33:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Hi
Currently I am running Ubuntu 16.04.
In the past, I added some no standard pdf viewer to auctex, like the
FoxitReader, but then the syntax changed some time ago and anyway I was
happy with evince and okular.
However I want now to add a new pdfviewer
The new viewer is
/usr/local/bin/evince
While the old one is still
/usr/bin/evince
Below I explain the reason for this setting.
If I run from my command line (tcsh shell)
which evince
It shows me
/usr/local/bin/evince
And indeed running evince, starts up the new one.
Now I have
(defun TeX-viewer-set-to-evince44 ()
(interactive)
"Small hack to set the PDF viewer to Evince"
(setq TeX-view-program-selection
'(((output-dvi style-pstricks)
"dvips and gv")
(output-dvi "xdvi")
(output-html "xdg-open")
(output-pdf "Evince44")))
(message "Output PDF is set now to Evince44"))
And
TeX-view-program-list is a variable defined in ‘tex.el’.
Its value is
(("Evince44"
("TeX-evince-sync-view")
"/usr/local/bin/evince"))
Original value was nil
So when I fire up TeX-viewer-set-to-evince44
And then run C-c C-v (TeX-view)
Auctex starts the *old* evince viewer not the new one
What do I miss here??
Any help is strongly appreciated.
*Rationale* I just found out that more recent versions of evince display
links as pop-up menus which is very very useful (Skim has this for Mac,
but the new evince version seems even better)
Since my Ubuntu is quite old, I could only install the new evince-44 via
snap
So the old (Original Ubuntu version) evince version is in
/usr/bin/evince
And the new one on
/snap/bin/evince
So I decided to set a symbolic link from
/snap/bin/evince to /usr/local/bin/evince.
And as I said above it works.
BTW there seems no possibility to configure evince that it uses
emacsclient, to jump from the pdf to the source file. I have to use
okular for this and this is why I have also
(defun my-toggle-evince-or-okular ()
"This function allows to switch between the PDF viewers `Evince'
and `Okular'."
(interactive)
(with-output-to-temp-buffer "TeX-viewer-list-buffer"
(princ "List of functions\n")
(princ "1: TeX-viewer-set-to-evince\n")
(princ "2: TeX-viewer-set-to-okular\n")
(princ "3: TeX-viewer-set-to-evince44\n"))
(let ((ch (string-to-char (read-string "Which choice: 1: 2: 3: "))))
(call-interactively (cond
((eql ch ?1) #'TeX-viewer-set-to-evince)
((eql ch ?2) #'TeX-viewer-set-to-okular)
((eql ch ?3) #'TeX-viewer-set-to-evince44)
(t (error 'args-out-of-range '(1 2 3 ch))))))
(kill-buffer "TeX-viewer-list-buffer"))
Regards
Uwe Brauer
--
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the NATO membership of the Ukraine.
I support the EU membership of the Ukraine.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
smime.p7s
Description: S/MIME cryptographic signature
- how to add a new pdf viewer?,
Uwe Brauer <=
- Re: how to add a new pdf viewer?, Tassilo Horn, 2023/08/29
- Re: how to add a new pdf viewer?, Uwe Brauer, 2023/08/30
- Re: how to add a new pdf viewer?, Uwe Brauer, 2023/08/30
- Re: how to add a new pdf viewer?, Tassilo Horn, 2023/08/30
- Re: how to add a new pdf viewer?, Uwe Brauer, 2023/08/30
- Re: how to add a new pdf viewer?, Tassilo Horn, 2023/08/30
- Re: how to add a new pdf viewer?, Uwe Brauer, 2023/08/30
- Re: how to add a new pdf viewer?, Tassilo Horn, 2023/08/30
- Re: how to add a new pdf viewer?, David Kastrup, 2023/08/30
- Re: how to add a new pdf viewer?, Uwe Brauer, 2023/08/30