I'm trying to edit multifile beamer presentation documents in AUCTeX. I use Emacs 24.3.1 / AucTeX-11.87 / TeX 3.1415926 (TeX Live 2012/Debian) in Ubuntu 12.04.

The most simple code that explains my issue is attached below

MasterFile (mainFile.tex)

\documentclass[compress, 9pt, t,xcolor={usenames,dvipsnames,svgnames,table}]{beamer}
\mode<presentation> {

% include packages

\title[ShortTitle]{Beamer in AUCTeX}
\subtitle{Beamer in AUCTeX}
\author[WM]{\small WanderingMind}
Department \\
Organization \\ % Your institution for the title page
\textit{[email protected]} % Your email address



SlaveFile (sec1_Intro.tex)


   \item Beamer with AUCTeX trial.
   \item Issue with MultiFile.
   \item Schrodinger Eq. $i\hbar\frac{d\left|\psi(t)\right>}{dt}=H\left|\psi(t)\right>$.

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: mainFile
%%% End: 

However I'm having two important issues.

(1) I'm unable to compile the beamer from one of the section files buffer (in this case sec1_Intro.tex).

The AUCTeX throws me an error stating ERROR: Undefined control sequence.

  • I do include the local variables definition at the end of the section files (see sec1_Intro.tex).
  • Further in order to avoid automatic master file, I also perform (setq-default TeX-master nil) in the Init File in addition to other AUCTeX options described here.

(2) The eps figures (figure1.eps) does not show up in the xdvi while performing View (C-c C-v) command

  • The eps figure is visible from other viewers such as evince. But this is not helpful since I cannot perform inverse search from evince to emacs.
  • And where can the figures be downloaded? If I replace \input with the contents of the second file and ask graphicx to go into demo mode, then it compiles just fine (TL13)
    – daleif
    Jul 29, 2013 at 13:15
  • Unfortunately I can't upload a file here. You can add any random eps figure and it must still have the same problem. Yes the code compiles in single file mode, the issue is in multifile mode Jul 29, 2013 at 13:54

1 Answer 1


The variable TeX-master should be a string, so in sec1_Intro.tex you have to add the local variable

%%% TeX-master: "mainFile"

Usually one doesn't need to add the variable manually, when creating a new TeX file AUCTeX prompts for the master file with completion and the variable is automatically add as a string.

With your %%% TeX-master: mainFile, when opening the file I get a warning about a non safe local variable, I don't know why you didn't get it.

  • Oh yes. I do get the same unsafe local variable warning. I was not careful enough to observe it. If I fix that TeX-master error, it does compile correctly. As you told me when creating a new file AUCTeX automatically asks for the master file name. I took my old tex files and modified it and that had caused the problem. Thank you for the answer. I'm accepting it. Jul 29, 2013 at 18:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .