From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daimrod Subject: Re: LaTeX preview Date: Fri, 11 Jan 2013 14:46:48 +0100 Message-ID: <87obgvvnlj.fsf@casa.home> References: <87a9sg9fd6.fsf@casa.home> <87sj67hpxm.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtezS-0005ph-HU for emacs-orgmode@gnu.org; Fri, 11 Jan 2013 08:49:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtezQ-0005R0-RO for emacs-orgmode@gnu.org; Fri, 11 Jan 2013 08:49:46 -0500 Received: from mail-bk0-f50.google.com ([209.85.214.50]:45581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tteuy-0004Z1-Hj for emacs-orgmode@gnu.org; Fri, 11 Jan 2013 08:45:08 -0500 Received: by mail-bk0-f50.google.com with SMTP id jf3so929339bkc.9 for ; Fri, 11 Jan 2013 05:45:07 -0800 (PST) In-Reply-To: <87sj67hpxm.fsf@bzg.ath.cx> (Bastien's message of "Fri, 11 Jan 2013 13:20:05 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Bastien writes: > Hi Daimrod, > > Daimrod writes: > >> Is there an #+STARTUP parameter to automatically display LaTeX >> fragments? > > Nope, sorry. Here is a patch to add `org-startup-with-latex-preview'. It should work like `org-startup-with-inline-images'. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=org-startup-with-latex-preview.patch Content-Transfer-Encoding: quoted-printable diff --git a/doc/org.texi b/doc/org.texi index 030eaf8..a13d565 100644 =2D-- a/doc/org.texi +++ b/doc/org.texi @@ -9752,6 +9752,19 @@ some aspects of the preview. In particular, the @co= de{:scale} (and for HTML export, @code{:html-scale}) property can be used to adjust the size of the preview images. =20 +@vindex org-startup-with-latex-preview +You can turn on the previewing of all @LaTeX{} fragments of a file with + +@example +#+STARTUP: latexpreview +@end example + +To disable it, simply use + +@example +#+STARTUP: nolatexpreview +@end example + @node CDLaTeX mode, , Previewing @LaTeX{} fragments, Embedded @LaTeX{} @subsection Using CD@LaTeX{} to enter math @cindex CD@LaTeX{} diff --git a/lisp/org.el b/lisp/org.el index effb231..2e7f3a4 100644 =2D-- a/lisp/org.el +++ b/lisp/org.el @@ -580,6 +580,16 @@ the following lines anywhere in the buffer: :version "24.1" :type 'boolean) =20 +(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 + :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 @@ -4509,6 +4519,8 @@ After a match, the following groups carry important i= nformation: ("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) @@ -5154,6 +5166,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)) (when org-startup-indented (require 'org-indent) (org-indent-mode 1)) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Daimrod/Greg --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJQ8BfJAAoJEBNzVHcrZRiUQQcP/RWv8zzu1J01NViRW9Lhh2bT Y3UUUAtvWJUwkTvuHmntoilaJ1BfgMNROEAA3DR9GuNtKLrBjBv3wqMOXN9fN7Rw ngWSdP3RklV3VQvf0415syZ6MxexS6fxr4eR8lHtbcoDqu0zasdpAremsWmMOlxL oQDk22Vripr2mlArUcpHLTP+cTVfJKMK39IDO6PSrP3JsKGI9v3bWBSUVYNhwFgC dYvog+LNdz2lioYrKzkdN8kz6VUSx9B2uxI5jM3CiTMf/CSeChNO3tT/F12bD9UY 2vKGv35I6CXsUyTvygTSR2GrKYe2TJsbJWs9RFlca2kWxZeNDXc3rj9UTeRhsZnm NjlKZgjGeEWUMGTcXIkBgs/AewA4XR4cDfM3H3uHcw42tgdnP2OspF7dXl2MmpQ9 0a5s0fFzI0Iwh0xmpBfh5mKjhcs4ky9PjIizR272n+S7Vp5U5IzhDzFQTxmSXIaa 5StWoCRPYLoQcYEOJ0xekZBAWo4HsteaYWfYiRw3hoDcdM1UXN8YgA/Cvu3CYLQH s8bcvQ4ssQU1dOeBlGcehnLSxn4rimfqogqbTmRhw7z9qCgrWrHUk3qLF1n3DYn8 w1RQ2eP2icGPp4qdgk4uJU5C0D2cYS3IEqyCUwakTFfyOpc7DFAf2Qnu1Ci8SQnN Eu/SNZCb3L3Qu2pN6NfX =2LW4 -----END PGP SIGNATURE----- --==-=-=--