[Top][All Lists]

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

Re: Can't get auctex to recognize my macros in included files

From: Andreas Röhler
Subject: Re: Can't get auctex to recognize my macros in included files
Date: Thu, 05 Aug 2010 18:22:56 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv: Gecko/20100711 Thunderbird/3.0.6

Am 05.08.2010 13:04, schrieb George Nurser:
On 4 August 2010 19:49, Andrea Crotti<>  wrote:
George Nurser<>  writes:

C-h v TeX-macro-private =>
TeX-macro-private is a variable defined in `tex.el'.
Its value is
("/Users/agn/Library/texmf/bibtex/bst/" "/Users/agn/Library/texmf/tex/")

C-h TeX-auto-private =>

TeX-auto-private is a variable defined in `tex.el'.
Its value is
("/Users/agn/Library/Application Support/Aquamacs Emacs/auctex/auto")

Check what M-TAB really is bound to with C-h c (C-M i is also
equivalent), maybe something else "hides" it...

M-TAB is bound to TeX-complete-symbol.

Some light is beginning to dawn...

Actually, completion *does* know about macros in
/Users/agn/Library/texmf/tex/latex/my styles/mystyle.sty for any file
random.tex that explicitly does a \usepackage{mystyle}, so long as M-x
TeX-auto-generate is called *after*  \usepackage{mystyle} is inserted
into random.tex.
So macro completion is working fine for such self-sufficient files
(and incidentally, the AMSmath environments like align are available
from C-c C-e for files that do \usepackage{amsmath})

My problem is that the files I want to use the macros in are chapters,
and are included in a file master.tex. It is master.tex that does
\usepackage{mystyle}, so there is no explicit mention of mystyle in
the chapter file chaptern.tex.

From my reading of the AucTeX manual, I have now added
% Local Variables:
% TeX-master: "../../master.tex"
% End:

in my file chaptern.tex

This seems to have worked so far as
(i) C-h v TeX-master in chaptern.tex gives
TeX-master is a variable defined in `tex.el'.
Its value is
Local in buffer Chap_NEU.tex; global value is t

(ii) C-c C-c in chaptern.tex now applies commands to ../../master.tex
Very useful!

However, macro completion in chaptern.tex still does not know about
the commands defined in /Users/agn/Library/texmf/tex/latex/my
Nor are the AMSmath environments like align, usepackaged in
../../NEMO_book.tex, available in chaptern.tex....

Clearly I'm still missing something.

Exists a specialised list for auctex issues:

Many thanks for your help, George Nurser.

reply via email to

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