I have a big LaTeX project divided in many files; the \documentclass
statement and the preamble are in the main file, that in turn includes many (~20) other files, one for every chapter. One of the statements in the main file is \usepackage{paralist}
, in order to use the environment compactdesc
.
Visiting the main file, in the AucTeX LaTeX -> Insert Environment
menu, compactdesc
is listed; and M-Enter
inside the environment inserts an \item
and asks for the label of that item.
Visiting one of the included file, the lack of a \usepackage
causes no inclusion of the compactdesc
environment in the LaTeX -> Insert Environment
menu list; and I don't like that.
Giving the command M-x LaTeX-environment
followed by compactdesc
, inserts in the file a \begin{compactdesc}
-\end{compactdesc}
couple, but M-Enter
does not ask for the item label - and I would like to be able to enter the labels for every \item added.
I have tried with the local variables at the end of the file, inserting the lines
% Local Variables:
% mode: latex
% TeX-master: master.tex
% ispell-local-dictionary: "italian"
% End:
(where master is the main TeX file); but still LaTeX -> Insert Environment
does not know about compactdesc
.
How can I do, to have both 1) the environment compactdesc
available and 2) AucTeX knowing about items of that environment having a label?
Thank you in advance for any help.
TeX-master-file
must be a string, this is exactly the same problem as the one reported here: emacs.stackexchange.com/q/20007/620 A good practice is to add this line to the init file:(setq-default TeX-master nil)
TeX-master-file
).;-)
TeX-master
in the manual, not ofTeX-master-file
; I tried with both version, with the same result.