Uwe Brauer | 30 Jan 2012 11:49
Picon
Favicon

org-preview-latex-fragment and preview-copy-region-as-mml

Hello

I am starting to use org-preview-latex-fragment also in non
org buffers, including message buffers.

What would be extremely helpful is to actually send the
images generates in the message buffers as images.

Preview-latex provides such a functionality
preview-copy-region-as-mml, from  a LaTeX buffer.

Of course the 2 preview functions org-preview and the
latex-preview function work differently. I had a look 
preview-copy-region-as-mml  and it is not clear to me how to
make if work for png generated by org-preview-latex-fragment
in a message buffer. 

Maybe some of the maintainers of org mode or auctex are
interested in having a look?

Uwe Brauer 
Antoine Levitt | 30 Jan 2012 12:25
Picon

Re: org-preview-latex-fragment and preview-copy-region-as-mml

30/01/12 11:49, Uwe Brauer
> Hello
>
> I am starting to use org-preview-latex-fragment also in non
> org buffers, including message buffers.
>
> What would be extremely helpful is to actually send the
> images generates in the message buffers as images.
>
> Preview-latex provides such a functionality
> preview-copy-region-as-mml, from  a LaTeX buffer.
>
> Of course the 2 preview functions org-preview and the
> latex-preview function work differently. I had a look 
> preview-copy-region-as-mml  and it is not clear to me how to
> make if work for png generated by org-preview-latex-fragment
> in a message buffer. 
>
> Maybe some of the maintainers of org mode or auctex are
> interested in having a look?
>
> 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.

(Continue reading)

Rasmus | 30 Jan 2012 14:52
Face
Picon

Re: org-preview-latex-fragment and preview-copy-region-as-mml

Antoine Levitt <antoine.levitt <at> gmail.com> writes:

> 30/01/12 11:49, Uwe Brauer
>> Hello
>>
>> I am starting to use org-preview-latex-fragment also in non
>> org buffers, including message buffers.
>>
>> What would be extremely helpful is to actually send the
>> images generates in the message buffers as images.
>>
>> Preview-latex provides such a functionality
>> preview-copy-region-as-mml, from  a LaTeX buffer.
>>
>> Of course the 2 preview functions org-preview and the
>> latex-preview function work differently. I had a look 
>> preview-copy-region-as-mml  and it is not clear to me how to
>> make if work for png generated by org-preview-latex-fragment
>> in a message buffer. 
>>
>> Maybe some of the maintainers of org mode or auctex are
>> interested in having a look?
>>
>> 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
(Continue reading)

Uwe Brauer | 30 Jan 2012 19:23
Picon
Favicon

a kludge (was: org-preview-latex-fragment and preview-copy-region-as-mml)

>> On Mon, 30 Jan 2012 12:25:13 +0100, Antoine Levitt <antoine.levitt <at> gmail.com> 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:
message-attach-all-png-from-ltxpngfolder.

I attach it if you want to test it.
(Continue reading)


Gmane