diff options
author | Grégoire Jadi <gregoire.jadi@gmail.com> | 2013-02-14 09:15:38 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-02-14 09:15:38 +0100 |
commit | 7ddeb6fdf5a6690f45759207532a519199c91727 (patch) | |
tree | 2067a56808e4be0ba24febcc7083279986f122b3 | |
parent | b0b3fcf49b7c7456fc48e6077ca60ee259fd3373 (diff) | |
download | org-mode-7ddeb6fdf5a6690f45759207532a519199c91727.tar.gz |
org.el (org-startup-with-latex-preview): New option
* org.el (org-startup-with-latex-preview): New option.
(org-startup-options): New startup keywords for the new
option.
(org-mode): Turn on/off LaTeX preview depending on the new
option.
-rw-r--r-- | lisp/org.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/org.el b/lisp/org.el index a619857..fcf394d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -670,6 +670,17 @@ the following lines anywhere in the buffer: :version "24.1" :type 'boolean) +(defcustom org-startup-with-latex-preview nil + "Non-nil means preview LaTeX fragments when loading a new Org file. + +This can also be configured on a per-file basis by adding one of +the followinglines anywhere in the buffer: + #+STARTUP: latexpreview + #+STARTUP: nolatexpreview" + :group 'org-startup + :version "24.3" + :type 'boolean) + (defcustom org-insert-mode-line-in-empty-file nil "Non-nil means insert the first line setting Org-mode in empty files. When the function `org-mode' is called interactively in an empty file, this @@ -4618,6 +4629,8 @@ After a match, the following groups carry important information: ("noalign" org-startup-align-all-tables nil) ("inlineimages" org-startup-with-inline-images t) ("noinlineimages" org-startup-with-inline-images nil) + ("latexpreview" org-startup-with-latex-preview t) + ("nolatexpreview" org-startup-with-latex-preview nil) ("customtime" org-display-custom-times t) ("logdone" org-log-done time) ("lognotedone" org-log-done note) @@ -5260,6 +5273,8 @@ The following commands are available: (set-buffer-modified-p bmp))) (when org-startup-with-inline-images (org-display-inline-images)) + (when org-startup-with-latex-preview + (org-preview-latex-fragment)) (unless org-inhibit-startup-visibility-stuff (org-set-startup-visibility))) ;; Try to set org-hide correctly |