Currently when I choose an entry from RefTex's table of contents (opened using the
C-c = keybinding), if I only have a single window open, the chosen file is opened in a new window to the right of the current document.
I read the documentation for
reftex-toc but couldn't find a way how to replace the file of the current window when pressing the
ret key instead of opening a new window.
Is this possible? If yes, can anyone be so kind to share the code how to do it?
Edit: The document I am using is a multi-file. The new section I choose is in another file than the one I am currently in. For example, if I am in
main.tex and I choose the Introduction section, the file
Sections/introduction.tex is opened in a new window.
The below is the settings I have in my init.el in relation to LaTeX
(use-package auctex :defer t :ensure t :config (setq TeX-auto-save t) (setq TeX-parse-self t) (setq-default TeX-master nil) (setq reftex-plug-into-AUCTeX t) ;; Set default reference format to \ref (setq reftex-refstyle "\\ref")) ; Set default reference format to \ref (add-hook 'LaTeX-mode-hook 'turn-on-reftex)