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

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

Re: Key binding? in Auctex (LaTex-mode)


From: Morten Leander Petersen
Subject: Re: Key binding? in Auctex (LaTex-mode)
Date: Tue, 23 Aug 2011 14:41:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

spinner <michaelcrain@hotmail.com> writes:

> Morten Leander Petersen wrote:
>> 
>> I'm not sure I understand the question, but as long as you specify a
>> particular master file in each of your child files you should be
>> alright.
>> 
>
> Thanks for your message. I see the source of confusion. I must have
> misunderstood the documentation:
> http://www.gnu.org/software/auctex/manual/auctex/Multifile.html
>
> I thought that if, first, I inserted the following code at the end of
> my parent-master file and, secondly, I pressed C-c _ while in my child
> file that Auctex would automatically find this master file without me
> typing its path.
>
>   %%% Local Variables:
>   %%% TeX-master: "master"
>   %%% End:
>
>
> If I still must type the path to the master in each child, do you know if
> there is a practical difference between these two Tex file settings:
>
>   %%% TeX-master: t
>
>   %%% TeX-master: "master"
>
> If these settings are functionally the same, the following code from the
> documentation
> doesn't seem to be very useful (i.e., why bother with it):
>
>   (setq-default TeX-master "master") ; All master files called "master"
>
>
> Why call parent files "master" in --%%% TeX-master: "master"-- if I need
> to specify the path in the child files? Am I missing something?

Imagine the following scenario. Say you have 3 files,

something.tex
b.tex
c.tex

Where something.tex is your main file, i.e. you have statements like

\include{b.tex}
\include{c.tex}

inside something.tex. Now say you are working on b.tex and you want to
compile your code. What you really want is to compile something.tex
since this is your main file. So by inserting

%%% Local Variables:
%%% TeX-master: "something"
%%% End:

into b.tex, you tell the system to compile something.tex, even though
you are currently working on b.tex. Insert the same 3 lines into c.tex
(using C-c _) and you can now compile your code no matter what file you
are currently working on.

With regards to

%%% TeX-master: t

versus

%%% TeX-master: "master"

the first line says that when you hit "compile" (C-c C-c) then it should
compile the current file whereas the second one says that it should
compile the file named "master.tex".

Hope this clarifies things a little bit :)

Regards
-- 
/Morten




reply via email to

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