auctex
[Top][All Lists]
Advanced

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

[AUCTeX] Problem customizing engine for preview-latex


From: Mirko Vukovic
Subject: [AUCTeX] Problem customizing engine for preview-latex
Date: Tue, 5 Oct 2010 14:50:22 -0400

Hi,
I am trying to use a custom format (includes preloaded beamer and
tikz) for preview latex.  But the _report_.tex does not compile when
doing an environment preview (C-c C-p C-e).  I suspect the problem is
in my customization.


For that I have modified the preview-LaTeX command.

I am including contents of three files:
 - I am including the tex file with its local definitions.  This file
compiles cleanly.
 - prevew-latex's log
 - the _region_.tex file that compiles cleanly

Here is the tex file.  At the file bottom are customizations for
TeX-command-default and preview-LaTeX-command

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iffalse %% to alert auctex to the document class
\documentclass{beamer}
\fi


\begin{document}

\begin{frame}
  \frametitle{foo}

  \begin{equation}
    \label{eq:1}
    a=\frac{1}{2}  %%%%%%%% C-c C-p C-e executed here
  \end{equation}
\end{frame}

\end{document}

%%% Local variables:
%%% TeX-command-default: "BmrTkzTeX"
%%% preview-LaTeX-command: ("bmrtkztex
\"\\nonstopmode\\nofiles\\PassOptionsToPackage{" ("," .
preview-required-option-list)
"}{preview}\\AtBeginDocument{\\ifx\\ifPreview\\undefined"
preview-default-preamble "\\fi}\"%' %t")
%%% End:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


And here is the log file:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Running `Preview-LaTeX' on `_region_' with ``bmrtkztex
"\nonstopmode\nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview}\AtBeginDocument{\ifx\ifPreview\undefined\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\fi}"
"_region_.tex"''
This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8)
entering extended mode
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, lo
aded.

No auxiliary output files.

! Missing $ inserted.
<inserted text>
                $
<*> ...tions,footnotes]{preview}[2004/11/05]\fi} _
                                                  region_.tex

! LaTeX Error: Missing \begin{document}.

etc ...
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>



Finally, the file _region_.tex

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\message{ !name(foo.tex)}\iffalse
\documentclass{beamer}
\fi


\begin{document}

\message{ !name(foo.tex) !offset(2) }
\begin{equation}
    \label{eq:1}
    a=\frac{1}{2}
  \end{equation}
\message{ !name(foo.tex) !offset(2) }

\end{document}

%%% Local variables:
%%% TeX-command-default: "BmrTkzTeX"
%%% preview-LaTeX-command: ("bmrtkztex
\"\\nonstopmode\\nofiles\\PassOptionsToPackage{" ("," .
preview-required-option-list)
"}{preview}\\AtBeginDocument{\\ifx\\ifPreview\\undefined"
preview-default-preamble "\\fi}\"%' %t")
%%% End:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

So to summarize:

- I have modified the preview-LaTeX-command
- preview file does not compile when called by preview-LaTeX
- preview file compiles when called by the custom format by itself.

Therefore, please help with customizing the preview-LaTeX-command.

Mirko



reply via email to

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