[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX] preview-latex: problems with beamer and TikZ
From: |
Frederik |
Subject: |
[AUCTeX] preview-latex: problems with beamer and TikZ |
Date: |
Thu, 03 Nov 2011 15:38:08 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.0; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 |
Hello there!
1. I experience problems when I want to preview equations in a beamer
presentation. Imagine the following LaTeX document:
---------8<-----------8<------------------------------------------
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usepackage[displaymath,textmath,graphics]{preview}
\PreviewEnvironment*{frame}
\begin{document}
\begin{frame}
\frametitle{Lambacher Schweizer -- Das Integral (2)}
\begin{align*}
A_n &= \left(\frac{1}{n}\right)^3\cdot [0^2 + 1^2 + \ldots{} +
(n-1)^2] \\
\intertext{\scl{Summenformel: $\sum_{k=1}^{n-1}k^2 =
\frac{1}{6}(n-1)n(n-2)$}}
&= \frac{1}{n^3}\cdot \frac{1}{6}(n-1)n(2n-1) = \frac{1}{6}\cdot
\left( 1-\frac{1}{n} \right)\cdot 1\cdot \left( 2-\frac{1}{n}
\right) \\
\lim_{n\to \infty}A_n &= \frac{1}{6}\cdot 1\cdot 1\cdot 2 =
\frac{1}{3}
\end{align*}
\end{frame}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
---------8<-----------8<------------------------------------------
After invoking preview via C-c C-p C-b the short equation in
\intertext{...} is shown just behind \end{align*}.
However, changing the documentclass from beamer to scrartcl, removing
the preview images and reapplying style hooks results in a correct
behaviour after regenerating the previews.
So the problem seems to lie in the different treatments of the different
document classes. What do I have to do, in order to make preview-latex
treat beamer just like scrartcl?
2. I've found a rather odd behaviour of preview-latex when using TikZ.
I've got a dark background colour for emacs buffers. Normally this is no
problem at all for preview images; the background colour of the images
is just the same as the background colour of the buffer. But when I use
TikZ to draw a picture and use the "opacity=VALUE" option for e.g. a
\fill command, the preview images get a white background and become
absolutely unreadable.
Imagine the following LaTeX document:
---------8<-----------8<------------------------------------------
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage[displaymath,textmath,graphics]{preview}
\begin{document}
\begin{tikzpicture}
\fill[green,opacity=0.5] (0,0) circle (1cm);
\end{tikzpicture}
Eine Gleichung:
\[ A = B \]
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
---------8<-----------8<------------------------------------------
Removing the option "opacity=0.5" next to the fill command makes the
preview images display as usual.
How to avoid preview-latex misinterpreting this option?
Thanks and regards
--
Frederik
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX] preview-latex: problems with beamer and TikZ,
Frederik <=