help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: opening images in auctex


From: Lennart Borgman
Subject: Re: opening images in auctex
Date: Mon, 23 Nov 2009 01:04:23 +0100

On Mon, Nov 23, 2009 at 12:59 AM, Andreas Politz <address@hidden> wrote:
> andrea abelli <address@hidden> writes:
>
>> Hi,
>>
>>   is there a way to open an image, in an external viewer/editor, that
>> is being previewed by preview-latex?
>>
>> thx in advance,
>> aa
>
>
> The preview-images are displayed as overlays containing a link to
> the image-files in there properties.
> Here is a rough sketch :
>
> (defun tex-open-preview-at-point ()
>  (interactive)
>  (let ((ov (car (overlays-at (point))))
>        (file (plist-get (cdr (overlay-get ov 'display))
>                         :file)))
>    (unless file
>      (error "No preview here"))
>    (start-process "display" nil "display" file)))
>
>
> It is some more work, to display the actual image, provided there is one
> (like in \includegraphics etc.).  AFAICS preview-latex does not
> determine this.
>
> But using the overlay region and ffap-file-at-point and expecting the
> filename inside '{}' would be a good starting point.


Something like that is used in the general library inlimg.el in nXhtml
that I mentioned before. Please try to add to that if possible so we
can get a general mechanism for this in Emacs.




reply via email to

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