Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

opening images in auctex

4 views
Skip to first unread message

andrea abelli

unread,
Nov 22, 2009, 11:32:49 AM11/22/09
to
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

Peter Dyballa

unread,
Nov 22, 2009, 3:30:08 PM11/22/09
to andrea abelli, help-gn...@gnu.org

Am 22.11.2009 um 17:32 schrieb andrea abelli:

> is there a way to open an image, in an external viewer/editor, that
> is being previewed by preview-latex?


Of course. Any PNG viewer will do. For example GNU Emacs.

--
Greetings

Pete

These are my principles and if you don't like them... well, I have
others.
- Groucho Marx

andrea abelli

unread,
Nov 22, 2009, 3:40:04 PM11/22/09
to
On Nov 22, 9:30 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 22.11.2009 um 17:32 schrieb andrea abelli:
>
> >   is there a way to open an image, in an external viewer/editor, that
> > is being previewed by preview-latex?
>
> Of course. Any PNG viewer will do. For example GNU Emacs.
Hi,

I was looking for some command that would have launched, say, gimp
to edit the image.

Lennart Borgman

unread,
Nov 22, 2009, 4:00:52 PM11/22/09
to andrea abelli, help-gn...@gnu.org


There is some support for that in nXhtml. It has two kinds of supports
for images:

- Open an image link in GIMP (gimpedit.el)
- Showing images inline (inlimg.el)

That support is not tailored for .tex files yet however. If you add
that I would be glad to include it.


andrea abelli

unread,
Nov 22, 2009, 4:22:39 PM11/22/09
to
On Nov 22, 10:00 pm, Lennart Borgman <lennart.borg...@gmail.com>
wrote:

> There is some support for that in nXhtml. It has two kinds of supports
> for images:
>
> - Open an image link in GIMP (gimpedit.el)
> - Showing images inline (inlimg.el)
>
> That support is not tailored for .tex files yet however. If you add
> that I would be glad to include it.

Thanks a lot. Asa I've got something, if ever, I'll let you know.
Thanks again,
aa

Peter Dyballa

unread,
Nov 22, 2009, 4:43:40 PM11/22/09
to andrea abelli, help-gn...@gnu.org

Am 22.11.2009 um 21:40 schrieb andrea abelli:

> I was looking for some command that would have launched, say, gimp
> to edit the image.


Open the sub-directory with the PNG images in dired-mode and type v
on the image entries (dired allows more, I think, for example !, but
I use this so seldom...)

--
Greetings

Pete

What is this talk of 'release?' Klingons do not make software
'releases.' Our software 'escapes,' leaving a bloody trail of
designers and quality assurance people in its wake.

Andreas Politz

unread,
Nov 22, 2009, 6:59:22 PM11/22/09
to help-gn...@gnu.org
andrea abelli <and...@abelli.org> writes:


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

Lennart Borgman

unread,
Nov 22, 2009, 7:04:23 PM11/22/09
to Andreas Politz, help-gn...@gnu.org
> 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.


0 new messages