1 ;;; preview.el --- AUCTeX style for `preview.sty' (v2010/02/14)
3 ;; Copyright (C) 2017 Free Software Foundation, Inc.
5 ;; Author: Arash Esbati <arash@gnu.org>
6 ;; Maintainer: auctex-devel@gnu.org
10 ;; This file is part of AUCTeX.
12 ;; AUCTeX is free software; you can redistribute it and/or modify it
13 ;; under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 3, or (at your option)
17 ;; AUCTeX is distributed in the hope that it will be useful, but
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ;; General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with AUCTeX; see the file COPYING. If not, write to the Free
24 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
29 ;; This file adds support for `preview.sty' v2010/02/14.
30 ;; `preview.sty' is part of TeXLive.
34 (defun LaTeX-preview-arg-ifpreview (_optional)
35 "Insert \\else and \\fi part of \\ifPreview command from preview.sty.
37 (indent-according-to-mode)
39 (indent-according-to-mode)
42 (indent-according-to-mode)
43 (insert TeX-esc "else")
46 (indent-according-to-mode)
47 (insert TeX-esc "fi")))
53 (LaTeX-add-environments
58 '("PreviewMacro" (TeX-arg-conditional (y-or-n-p "With optional arguments? ")
63 '("PreviewMacro*" (TeX-arg-conditional (y-or-n-p "With optional arguments? ")
68 '("PreviewEnvironment" (TeX-arg-conditional (y-or-n-p "With optional arguments? ")
73 '("PreviewEnvironment*" (TeX-arg-conditional (y-or-n-p "With optional arguments? ")
78 '("PreviewSnarfEnvironment" TeX-arg-environment)
83 '("ifPreview" LaTeX-preview-arg-ifpreview))
86 (when (and (featurep 'font-latex)
87 (eq TeX-install-font-lock 'font-latex-setup))
88 (font-latex-add-keywords '(("PreviewMacro" "*[[{")
89 ("PreviewEnvironment" "*[[{")
90 ("PreviewSnarfEnvironment" "{"))
94 (defvar LaTeX-preview-package-options
95 '("active" "noconfig" "psfixbb"
96 "dvips" "pdftex" "xetex"
97 "displaymath" "floats" "textmath"
98 "graphics" "sections" "delayed"
99 "auctex" "showlabels" "tightpage"
100 "lyx" "counters" "footnotes"
101 "tracingall" "showbox")
102 "Package options for the preview package.")
104 ;;; preview.el ends here