unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: Can't get auctex to recognize my macros in included files
@ 2010-08-05 11:04 George Nurser
  2010-08-05 16:22 ` Andreas Röhler
  0 siblings, 1 reply; 3+ messages in thread
From: George Nurser @ 2010-08-05 11:04 UTC (permalink / raw)
  To: Andrea Crotti, help-gnu-emacs

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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Can't get auctex to recognize my macros in included files
  2010-08-05 11:04 Can't get auctex to recognize my macros in included files George Nurser
@ 2010-08-05 16:22 ` Andreas Röhler
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Röhler @ 2010-08-05 16:22 UTC (permalink / raw)
  To: help-gnu-emacs

Am 05.08.2010 13:04, schrieb George Nurser:
> 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.

Exists a specialised list for auctex issues: auctex@gnu.org

>
> Many thanks for your help, George Nurser.
>
>




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Can't get auctex to recognize my macros in included files
       [not found] <mailman.0.1281020358.12221.help-gnu-emacs@gnu.org>
@ 2010-08-05 17:04 ` Ralf Angeli
  0 siblings, 0 replies; 3+ messages in thread
From: Ralf Angeli @ 2010-08-05 17:04 UTC (permalink / raw)
  To: help-gnu-emacs

* George Nurser (2010-08-05) writes:

> Clearly I'm still missing something.

Did you apply the settings mentioned on the first page of the AUCTeX
manual?

-- 
Ralf


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-05 17:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05 11:04 Can't get auctex to recognize my macros in included files George Nurser
2010-08-05 16:22 ` Andreas Röhler
     [not found] <mailman.0.1281020358.12221.help-gnu-emacs@gnu.org>
2010-08-05 17:04 ` Ralf Angeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).