emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: Generated images in buffer


From: Dan Davison
Subject: [Orgmode] Re: Generated images in buffer
Date: Sun, 28 Nov 2010 17:27:27 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

"Eric Schulte" <address@hidden> writes:

> You can place the ditaa code into a code block and then evaluate the
> code block with C-c C-c.  This will insert a link to the generated image
> into your Org-mode file.  If you then turn on inline images with M-x
> org-toggle-inline-images you can preview the generated image from within
> your Org-mode buffer.

Hi Dov,

Following on from the above, you can make the images in the emacs buffer
automatically refresh[1] after execution with

(add-hook 'org-babel-after-execute-hook 'org-display-inline-images)

Dan


Footnotes:

[1] On reading the docstring, one might think that this would be the
right code, but it doesn't seem to refresh the image:

  (add-hook 'org-babel-after-execute-hook
            (lambda () (org-display-inline-images nil t)))




>
> For more information on code blocks see
> http://orgmode.org/manual/Working-With-Source-Code.html#Working-With-Source-Code
>
> Best -- Eric
>
> Dov Grobgeld <address@hidden> writes:
>
>> Thanks! So it possible for LaTeX, but not for other image generators. That's
>> a bit unfair. How difficult would it be to generalize this so that it would
>> support any image generator?
>>
>> Regards,
>> Dov
>>
>> On Sun, Nov 28, 2010 at 09:34, Jeff Horn <address@hidden> wrote:
>>
>>> On Sun, Nov 28, 2010 at 2:04 AM, Dov Grobgeld <address@hidden>
>>> wrote:
>>> > The same idea could be used for any system generating images, e.g. LaTeX
>>> > formulas, asymptote, a python script using cairo, etc.
>>>
>>> I think evaluating Babel code blocks can insert output into your org-file.
>>>
>>> Also, I regularly use =C-c C-x C-l= to display rendered LaTeX
>>> equations in-buffer. That keystroke only displays the current
>>> subtree's equations. With a prefix, it will generate previews for the
>>> entire document.
>>>
>>> Best,
>>> Jeff
>>>
>>> --
>>> Jeffrey Horn
>>> Graduate Lecturer and PhD Student in Economics
>>> George Mason University
>>>
>>> (704) 271-4797
>>> address@hidden
>>> address@hidden
>>>
>>> http://www.failuretorefrain.com/jeff/
>>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode




reply via email to

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