ENH use cleveref

This commit is contained in:
Nathan Dwarshuis 2021-07-24 11:20:58 -04:00
parent 78ae2be4aa
commit b4cc0991b8
1 changed files with 24 additions and 3 deletions

View File

@ -1206,11 +1206,32 @@ Install auctex through emacs as this is OS independent and more automatic. Note
((LaTeX-mode . flycheck-mode) ((LaTeX-mode . flycheck-mode)
(LaTeX-mode . flyspell-mode) (LaTeX-mode . flyspell-mode)
(LaTeX-mode . fci-mode) (LaTeX-mode . fci-mode)
(LaTeX-mode . reftex-mode)
;; sync tex buffer positions to output pdf ;; sync tex buffer positions to output pdf
(LaTeX-mode . TeX-source-correlate-mode)) (LaTeX-mode . TeX-source-correlate-mode))
:config :config
(setq TeX-after-compilation-finished-functions (turn-on-reftex)
'(TeX-revert-document-buffer))) (setq TeX-after-compilation-finished-functions '(TeX-revert-document-buffer)
reftex-plug-into-AUCTeX t
reftex-ref-style-default-list '("Cleveref" "Default")))
;; add cleveref support
(with-eval-after-load 'latex
(TeX-add-style-hook
"cleveref"
(lambda ()
(when (boundp 'reftex-ref-style-alist)
(add-to-list 'reftex-ref-style-alist
'("Cleveref" "cleveref" (("\\cref" ?c)
("\\Cref" ?C)
("\\cpageref" ?d)
("\\Cpageref" ?D)))))
(reftex-ref-style-activate "Cleveref")
(TeX-add-symbols
'("cref" TeX-arg-ref)
'("Cref" TeX-arg-ref)
'("cpageref" TeX-arg-ref)
'("Cpageref" TeX-arg-ref)))))
#+END_SRC #+END_SRC
**** external viewers **** external viewers
:PROPERTIES: :PROPERTIES:
@ -3765,7 +3786,7 @@ Most packages that don't have an evil version are in this one. Some don't behave
(setq evil-collection-mode-list (setq evil-collection-mode-list
'(anaconda-mode arc-mode cider company comint custom debug edebug dired '(anaconda-mode arc-mode cider company comint custom debug edebug dired
doc-view ebib ediff elfeed flycheck ivy help magit doc-view ebib ediff elfeed flycheck ivy help magit
minibuffer mu4e profiler term which-key xref) minibuffer mu4e profiler reftex term which-key xref)
evil-collection-setup-minibuffer t evil-collection-setup-minibuffer t
evil-collection-want-unimpaired-p nil) evil-collection-want-unimpaired-p nil)
:config :config