我正在尝试配置我的 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
正如 Arah 所提到的,只需将第 158 行./.emacs.d/layers/+lang/latex/packages.el
从
(setq reftex-plug-into-AUCTeX '(nil nil t t t))
到
(setq reftex-plug-into-AUCTeX t)