1

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> {
\usetheme{Madrid}
}

% include packages
\usepackage{graphicx}


\title[ShortTitle]{Beamer in AUCTeX}
\subtitle{Beamer in AUCTeX}
\author[WM]{\small WanderingMind}
\institute[World]
{
\begin{center}
   \includegraphics[scale=0.3]{figure1}
\end{center}
Department \\
Organization \\ % Your institution for the title page
\medskip
\textit{email@email.com} % Your email address
}
\date{\today}

\begin{document}
\frame{
\titlepage
}
\section{Introduction}
\label{sec:Intro}
\input{sec1_Intro}

\end{document}

SlaveFile (sec1_Intro.tex)

\section{Introduction}          
  \begin{frame}{Introduction}
  \begin{block}{}   
  \begin{figure}                    
  \begin{center} 
  \includegraphics[width=0.35\textwidth,keepaspectratio]{figure1}
  \end{center}
  \end{figure}

  \begin{itemize}
   \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>$.
  \end{itemize}
  \end{block}
  \end{frame}           

%%% 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 '13 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 – WanderingMind Jul 29 '13 at 13:54
2

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. – WanderingMind Jul 29 '13 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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