4

I would like to bind j to reftex-toc-next and k to reftex-toc-previous whilst in a reftex-toc buffer. According to the documentation, the keymap active in *toc* buffers is reftex-toc-map. I'm using use-package to load reftex, so I've tried

(use-package reftex
  :ensure t
  :after (latex)
  :bind (:map reftex-toc-map
              ("j" . reftex-toc-next)
              ("k" . reftex-toc-previous))
  :config
  (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
  (setq reftex-plug-into-AUCTeX t))

Which produces the following error

Error (use-package): reftex/:catch: Symbol's value as variable is void: reftex-toc-map

Any suggestions as to why this doesn't work and how I can resolve it?

1 Answer 1

3

I faced this exact problem and solved it by using evil-collection just on refTeX. Installed it as an additional package in my dotspacemacs/layers()

(setq-default
  ...
  dotspacemacs-addtional-packages
  '(...
    evil-collection
    ...)
 ...
 )

And initialised it only for refTeX in my user-config() through

(evil-collection-init 'reftex)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.