-
Has anyone figured out the configuration to get Sioyek working as a PDF viewer in Emacs? I'm (very) slowly learning Emacs and have only managed to get the following code working (setq TeX-view-program-list '(("Sioyek" "sioyek %o")))
(setq TeX-view-program-selection '((output-pdf "Sioyek")))
(setq +latex-viewers '(sioyek)) However, I haven't figured out how to get forward and inverse synctex search working. NB: I'm using the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
In order to setup Sioyek for SyncTeX with Emacs, you'll need to modify a few customization options. First, you will need to add Sioyek to the (custom-set-variables
'(TeX-view-program-list
'(("Sioyek"
("sioyek %o --reuse-instance"
(mode-io-correlate " --forward-search-file %b --forward-search-line %n --inverse-search \"emacsclient --no-wait +%2:%3 %1\""))
"sioyek")))
'(TeX-view-program-selection
'(((output-dvi has-no-display-manager)
"dvi2tty")
((output-dvi style-pstricks)
"dvips and gv")
(output-dvi "xdvi")
(output-pdf "Sioyek") ;; Here. By default this was "Evince" on my machine.
(output-html "xdg-open"))) This allows you to refer to the "Sioyek" viewer like you would the built-in viewers. Just for reference, the full command would read
What each of the substitutions and subcommands are:
To enable SyncTeX you'll need to turn on (add-hook 'LaTeX-mode-hook #'TeX-source-correlate-mode)
(with-eval-after-load 'latex
(define-key TeX-source-correlate-map [C-down-mouse-1] #'TeX-view-mouse)) |
Beta Was this translation helpful? Give feedback.
In order to setup Sioyek for SyncTeX with Emacs, you'll need to modify a few customization options.
First, you will need to add Sioyek to the
TeX-view-program-list
like you have, but there are a few more things that need to go there to get SyncTeX working. You also have to replace the default PDF viewer inTeX-view-program-selection
which determines which program to use based on a series of predicates. For PDFs, you'll want to change the one listed underoutput-pdf
.