auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with RefTeX and the amsmath + mathtools styles


From: Florent Rougon
Subject: Re: Problem with RefTeX and the amsmath + mathtools styles
Date: Mon, 30 Dec 2019 13:06:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Arash,

Arash Esbati <address@hidden> wrote:

> Regarding the issue you describe, I think it has nothing to do with
> RefTeX, my guess is that your AUCTeX installation goes wrong somehow.
> For the start, do you really need the latest AUCTeX for git?  If not, I
> suggest you skip the hassle with the manual installation and install
> AUCTeX via ELPA.  Just delete your manual installation, uncomment
> (package-initialize), delete (require 'tex-site) and (require 'tex) from
> your init.el (important!), restart Emacs and do `M-x list-packages RET'
> and go from there.
>
> If you need the latest version from git, then please follow the
> description from the manual here[1].  This is what I will comment from
> here on.

I'm quite fine using the Git repository. I have no problem checking out
a particular commit or tag if I want, I can see commit logs and diffs,
etc.

>> ;; No error with only "~/src-pastouche/auctex.git" added to `load-path'.
>> ;(add-to-list 'load-path "~/src-pastouche/auctex.git")
>> (add-to-list 'load-path "~/lisp/manual-installs")
>> (add-to-list 'load-path "~/lisp/manual-installs/auctex")
>
> Actually all three lines shouldn't be necessary.

As indicated by the ';', the first add-to-list neither is, nor was used
in my setup. I was merely saying that “**if** I use the first and not
the others...”. The second add-to-list added the path to tex-site.el as
installed by AUCTeX's 'make install' command. Doing (require 'tex-site)
used to be the recommended way to enable AUCTeX. I take note that this
has changed. I have removed the third add-to-list and am now loading
auctex.el and preview-latex.el directly with `load', as per the link you
provided:

  
https://www.gnu.org/software/auctex/manual/auctex.html#Advice-for-non_002dprivileged-users

>> (require 'tex-site)
>> (require 'reftex)
>> (require 'tex)

The (require 'tex-site) was from old installation instructions
(pre-2005). These were still working without triggering any warning,
AFAICS. The (require 'tex) was justified by the fact that I was calling
`TeX-add-style-hook' in the provided init file, and `TeX-add-style-hook'
is defined in tex.el.

Since you said that the two RefTeX config bits from the end of the
init.el file I sent were unnecessary with current RefTeX, I have removed
them, which made the error disappear. Thanks for pointing out the error
in the one I had left commented out, too.

> Delete (require 'tex-site) and (require 'tex).  Replace them with this
> line and you should be fine:
>
>     (load "~/lisp/manual-installs/auctex.el" nil t t)

Actually, that is:

      (load "~/lisp/manual-installs/site-start.d/auctex.el" nil t t)

But as seen above, since I removed the RefTeX config bits that you said
were unnecessary, it is working fine now. Thanks for your advice!

Regards

-- 
Florent



reply via email to

[Prev in Thread] Current Thread [Next in Thread]