[Tex/LaTex] Preview TikZ figure in AUCTeX


I am using AUCTeX on Emacs. When invoking preview.el with e.g. C-c C-p C-p I obtain previews of external figures (figure environment with .ps files), but not of TikZ pictures.

Is it possible to obtain previews of figures drawn with TikZ?

Best Answer


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

in your .emacs file, you can include the tikzpicture environments in the preview building process.

Related Question