任何想法如何将其转换为“跳转到 PDF”的全局设置键?
(defun aquamacs-latex-viewer-support ()
"Support for Skim as LaTeX viewer if present."
(add-to-list 'TeX-command-list
'("Jump to PDF"
"%V" TeX-run-discard-or-function nil t :help "Run Viewer") 'append)
右键单击上下文菜单有几个有用的选项,我想我已经追踪到这个文件: /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/auctex-config.el
. 但是,我可能是错的吗?
我认为这将比简单地生成 pdf 更复杂——即:
(global-set-key (kbd "<f7>") 'TeX-command-master)
我现在更近了一步——这个 init.el 配置适用于在 OSX Mountain Lion 上运行的最新版本的 Emacs(通用二进制)——所以现在将它转换为键盘快捷键应该会容易得多。这将重新配置视图选项以跳转到 pdf。这是我得到它的线程的链接(由 Ricardo 编写): https ://tex.stackexchange.com/questions/11613/launching-an-external-pdf-viewer-from-emacs-auctex-on-a -mac-osx-失败
(setq TeX-view-program-selection '((output-pdf "Skim")))
(add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)
(setq TeX-source-correlate-method 'synctex)
(add-hook 'LaTeX-mode-hook
(lambda()
(add-to-list 'TeX-expand-list
'("%q" skim-make-url))))
(defun skim-make-url () (concat
(TeX-current-line)
" "
(expand-file-name (funcall file (TeX-output-extension) t)
(file-name-directory (TeX-master-file)))
" "
(buffer-file-name)
))
(setq TeX-view-program-list
'(("Skim" "/Applications/Skim.app/Contents/SharedSupport/displayline %q")))