Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Has anyone had this issue? I can't sort out why this would occur but I didn't change anything in the setup. If I call it manually and turn on reftex-mode it works fine.

share|improve this question
add comment

3 Answers 3

Unless you include the relevant parts of your .emacs it's hard to help you.

Here's what I got in my .emacs which seems to do what you're after (and I'm also using TeX Live 2011):

; Turn on RefTeX for AUCTeX, http://www.gnu.org/s/auctex/manual/reftex/reftex_5.html
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
; Make RefTeX interact with AUCTeX, http://www.gnu.org/s/auctex/manual/reftex/AUCTeX_002dRefTeX-Interface.html
(setq reftex-plug-into-AUCTeX t)

I got the lines from http://www.emacswiki.org/emacs/AUCTeX#toc2

share|improve this answer
    
Had that but wasn't working for some reason but I added a LaTeX-mode-hook to the require for reftex and seems to be fine now. I also have those two lines already set in the .emacs. –  J Spen Dec 4 '11 at 9:12
    
@JSpen Maybe you should write your solution as a separate solution so others may benefit from it? –  N.N. Dec 4 '11 at 9:49
    
No worries. Just answered my own below with my solution but still not sure why it worked over the other way. I guess something getting loaded later but what getting loaded that overrides the turning on off reftex is weird or if 'turn-on-reftex gets messed up. –  J Spen Dec 6 '11 at 12:25
add comment
up vote 2 down vote accepted
; Turn on RefTeX for AUCTeX, http://www.gnu.org/s/auctex/manual/reftex/reftex_5.html
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
; Make RefTeX interact with AUCTeX,    http://www.gnu.org/s/auctex/manual/reftex/AUCTeX_002dRefTeX-Interface.html
(setq reftex-plug-into-AUCTeX t)  

I had the above already in my latex file but changed from just having:

(require 'reftex)

to:

(add-hook 'LaTeX-mode-hook
          (lambda ()
            (require 'beamer)
            (require 'reftex)
))

Note above beamer isn't required but added it to the hook as well. Not sure why it worked after but this did the trick because should have been fine either way.

share|improve this answer
    
that will only work if beamer is installed. I could not find beamer on elpa nor melpa. What is that? –  Jonas Stein Nov 14 '12 at 22:06
    
@Jonas - Just remove it and and it should work I reckon without beamer. It is for making pdf presentations in latex so search latex beamer and should be able to find beamer.el in the beamer source. Beamer.el is to help with creating beamer latex presentations. –  J Spen Nov 14 '12 at 23:31
add comment

With all due regard to the fact that this is an old post, but the above solutions did not work for me. As this is still quickly found from a Google search, I thought it best to add here.

I kept the line

(setq reftex-plug-into-AUCTeX t)

and I had to modify J Spen's lambda function (also got flyspell to autoload by adding that mode here).

(add-hook 'LaTeX-mode-hook
      (lambda ()
        (reftex-mode t)
        (flyspell-mode t)
 ))
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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