I've reposted this from the help gnu-emacs list.

Hi,
I'm running Aquamacs 2.1. I have a directory
/Users/agn/Library/texmf/tex/latex that contains my personal style files.

In particular /Users/agn/Library/texmf/tex/latex/my
styles/math_abbrev.sty contains some macros to simplify inputting
maths

I was hoping to get AucTeX to recognize these macros so command
completion with M-TAB and C-c RET works on them.

Section 11.2 of the AucTeX manual (v11.86) seems to explain how to do
this, but I must be missing something.
It suggests I do
M-x TeX-auto-generate

When I do this, it suggests various directories; first
~/Library/texmf/bibtex/bst/ then (after uparrow) it offers individual
style files
~/Library/texmf/tex/latex/my styles/head_bolus.sty
I truncated this to
~/Library/texmf/tex/latex/
and then Emacs created a whole load of .el files (one for each .sty
files) in the directory
/Users/agn/Library/Application Support/Aquamacs Emacs/auctex/auto

Autocompletion now works perfectly for self-sufficient files…:)

However, my problem is that the files I want to use macros in are
chapters, [chapter1.tex ..2,tex etc..]
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 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
I hadn't previously realized that this was possible:)

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
../../master.tex, available from AucTeX in chaptern.tex....

Clearly I'm still missing something. Or is there something I can do to
debug the problem?

Many thanks for your help, George Nurser.

_______________________________________________
auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex

Reply via email to