[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-devel] a kludge (was: org-preview-latex-fragment and preview-cop

From: Uwe Brauer
Subject: [AUCTeX-devel] a kludge (was: org-preview-latex-fragment and preview-copy-region-as-mml)
Date: Mon, 30 Jan 2012 19:23:42 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) XEmacs/21.5-b31 (linux)

>> On Mon, 30 Jan 2012 12:25:13 +0100, Antoine Levitt <address@hidden> wrote:

   >> Uwe Brauer 

   > (ccing gnus mailing list, in case someone is interested)

   > I ran into that the other day.

   > I think it would be very useful to have preview-buffer work
   > on non-latex buffers.

Concerning org-preview-latex-fragment: I have some code
which indeed attaches the png generated by this
function. However it is very primitive. 

org-preview-latex-fragment generates pngs in a subdirectory
called ltxpng. These pngs are then inserted  in
the buffer where org-preview-latex-fragment was executed. Since
one cannot be sure that the ltxpng  directory is non-empty, IMHO it
should be deleted before generating the png.

This is done by function 
my-delete-ltxpngdir, which needs the trashcan pkg.

Then a very simple modification of an already existing
function does the rest:

I attach it if you want to test it.

Uwe Brauer 

Attachment: my-preview-mml-send-png.el
Description: application/emacs-lisp

reply via email to

[Prev in Thread] Current Thread [Next in Thread]