Ciao Giacomo,

2018-02-28 23:53 GMT+01:00  <giacomo.bo...@gmail.com>:
> I have two files, test1.tex
>
> \documentclass{beamer}
> \begin{document}
> \begin{frame}
>   \[ a = \begin{bmatrix} 2 & 4 \\ 7 & 3 \end{bmatrix} \]
> \end{frame}
> \end{document}
>
> and test2.tex (* note that here I load preview.sty and use one of the
> commands here defined *)
>
> \documentclass{beamer}
> \usepackage{preview}
> \PreviewEnvironment*{frame}
> \begin{document}
> \begin{frame}
>   \[ a = \begin{bmatrix} 2 & 4 \\ 7 & 3 \end{bmatrix} \]
> \end{frame}
> \end{document}
>
> When I hit C-c C-p C-d (preview-document) in the buffer of test1 I have
> that the image representing the displayed equation is produced, but it
> is not correctly placed --- it is placed instead at the end of the frame
> source

Using the test1 file, try adding the following snippet to your Emacs init file:

(with-eval-after-load "preview"
  (add-to-list 'preview-default-preamble
           "\\PreviewEnvironment*{frame}" t))

In the attached image you can see how it's rendered for me with this code.

Bye,
Mosè
_______________________________________________
auctex mailing list
auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to