Spacemacs 和 reftex

Spacemacs 和 reftex

我正在嘗試配置我的 spacemacs 安裝以將其與 reftex 一起使用。實際上,我想更改方程式等的自動標籤,以便它們在標籤中包含檔案名稱。我的 .spacemacs 的結尾如下

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
[snip]
 '(reftex-extra-bindings t)
 '(reftex-use-external-file-finders t)
 '(reftex-label-alist
   (quote
    (("multline" 109 "eq_%f:" "~\\ref{%s}" t ("Equation"))
     ("equation" 122 "eq_%f:" "~\\eqref{%s}" t ("Equation")))))
 '(reftex-plug-into-AUCTeX t)
 '(ring-bell-function (quote ignore)))

相同的程式碼在 emacs 下運作起來就像一個魅力。在spacemacs中,我無法取得自動編號,甚至無法取得檔案名稱的前綴。

任何想法 ?

答案1

./.emacs.d/layers/+lang/latex/packages.el正如 Arah 所提到的,只需更改from的第 158 行即可

(setq reftex-plug-into-AUCTeX '(nil nil t t t))

(setq reftex-plug-into-AUCTeX t)

相關內容