help-gnu-emacs
[Top][All Lists]
Advanced

[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: George Nurser
Subject: Re: Can't get auctex to recognize my macros in included files
Date: Thu, 5 Aug 2010 12:04:57 +0100

On 4 August 2010 19:49, Andrea Crotti <andrea.crotti.0@gmail.com> wrote:
> George Nurser <gnurser@gmail.com> writes:
>
>>
>> NB
>> 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
"../../master.tex"
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
styles/mystyle.sty.
Nor are the AMSmath environments like align, usepackaged in
../../NEMO_book.tex, available in chaptern.tex....

Clearly I'm still missing something.

Many thanks for your help, George Nurser.



reply via email to

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