TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

When I am writing slides, I usually use one master file and several dependent files; as a macro package I use beamer. I would like to access the environments defined by the beamer package also in the dependent files (which I include through \input) through C-c C-e. I can access them in the master file. By the same token, I would like to access the macros in my macro packages, which I also include through \input. My .emacs file contains the lines

(setq-default TeX-master nil)
(setq TeX-parse-self t)
(setq TeX-auto-save t)

Any suggestions?

share|improve this question

marked as duplicate by Kurt, ChrisS, cmhughes, Peter Jansson, Martin Schröder Feb 27 '14 at 21:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Welcome to TeX.sx! You don't have to sign with your name since it automatically appears in the lower right corner of your post. – lockstep Dec 11 '12 at 19:49
Does setting the variable LaTeX-default-style to beamer help, e.g. putting (setq LaTeX-default-style beamer)` in your emacs or by putting -*- mode: LaTeX; LaTeX-default-style: beamer; -*- in the first line of the dependent files? – N.N. Dec 12 '12 at 9:51

This answer might point you in the right direction.

The summary of it is that the \input files can be configured to find their master file by appending the following lines at the end:

%%% Local Variables:
%%% TeX-master: "your-main-filename"
%%% End:

By doing this, and with AUCTeX's ability to parse the files for macros, it should be able to recognize that the input files belong to a master beamer file, and use the beamer environments.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.