EAF的pdf view能不能像pdf-tool那样开启synctex功能?

我仔细看了eaf的wiki里关于latex的那一段。似乎是开启了synctex。

(add-to-list 'load-path "~/emacs/emacs-application-framework/")
(require 'eaf)
(eaf-setq eaf-browser-dark-mode "true")
(eaf-setq eaf-terminal-dark-mode "false")
(eaf-setq eaf-mindmap-dark-mode "follow") ; default option
(eaf-setq eaf-pdf-dark-mode "ignore")
(eaf-setq eaf-browser-enable-adblocker "true")
(eaf-bind-key scroll_up "C-n" eaf-pdf-viewer-keybinding)
(eaf-bind-key scroll_down "C-p" eaf-pdf-viewer-keybinding)

;; from TeX-pdf-tools-sync-view
;;;###autoload
(defun TeX-eaf-sync-view()
  (unless (fboundp 'eaf-open)
    (error "EAF is not available!"))
  (let* ((pdf (TeX-active-master (TeX-output-extension)))
         (url (expand-file-name pdf))
         (app-name "pdf-viewer")
         (exists-eaf-buffer)
         (eaf-buffer-window))
    (catch 'found-match-buffer
      (dolist (buffer (buffer-list))
        (set-buffer buffer)
        (when (equal major-mode 'eaf-mode)
          (when (and (string= buffer-url url)
                     (string= buffer-app-name app-name))
            (setq exists-eaf-buffer buffer)
            (setq eaf-buffer-window (get-buffer-window exists-eaf-buffer))
            (throw 'found-match-buffer t)))))
    (if (and exists-eaf-buffer eaf-buffer-window)
        (pop-to-buffer exists-eaf-buffer)
      (eaf-open url app-name "--synctex_on=True"))))

(eval-after-load "tex"
  '(progn
	(add-to-list 'TeX-view-program-list '("eaf" TeX-eaf-sync-view))
(add-to-list 'TeX-view-program-selection '(output-pdf "eaf"))
))

但恕我愚钝,实在找不到synctex相关的function和keybind在哪里(其实就需要两个,forward search和backward search)。在自己的emacs运行之后也是完全找不到这个功能。

可否指教?

原来 pdf-tool 支持 synctex 啊(从没用过x

eaf 没有这个功能

暂不支持,欢迎贡献

在pdf-tool里按住ctrl然后左键单击。从LaTeX文件的话默认C-c C-v。

是的呀。不过pdf-tool翻页用起来实在不顺手,权衡之下我还是用eaf了。synctex没有就没有吧。