emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Standalone hyperlinked images in HTML export


From: Kodi Arfer
Subject: Re: [O] Standalone hyperlinked images in HTML export
Date: Mon, 01 Jul 2013 17:26:05 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

On 2013 Jul 01 Mon 5:01:46 PM -0400, Nicolas Goaziou <address@hidden> wrote:
Hello,

Kodi Arfer <address@hidden> writes:

The manual explains in "Images in HTML export" that you can make an
image a hyperlink like this:

[[file:highres.jpg][file:thumb.jpg]]

where thumb.jpg becomes the <img> 'src' and highres.jpg becomes the <a>
'href'. One might infer it should also be possible to link to something
other than an image, like this:

[[http://gnu.org][http://example.com/gnu-head.jpg]]

For example, try exporting this file:

#+begin_src org
Some initial text.

[[http://example.com/a.png]]

Some text between images 1 and 2.

[[http://eeyup.com][http://example.com/b.png]]

Some text between images 2 and 3.

http://example.com/c.png

Some trailing text.
#+end_src

You do indeed get

<a href="http://eeyup.com";><img  src="http://example.com/b.png";
alt="b.png" /></a>

in the output, but the exporter doesn't regard the image as standalone,
so it doesn't get put in a <div> (or, in HTML5 mode, <figure>) like the
others, and if you add a #+CAPTION, no caption will be included.

Indeed. Would you mind testing the following patch against master? It
should fix the issues.

I tried it with captions, :html5-fancy, and paths to images as well as path to non-images. All looks good. You're awesome.

I see your patch also affects math export somehow, but I haven't tested that.



reply via email to

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