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: Andreas Politz
Subject: Re: opening images in auctex
Date: Mon, 23 Nov 2009 00:59:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

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.

-ap





reply via email to

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