On 2013 Jul 01 Mon 5:01:46 PM -0400, Nicolas Goaziou <n.goaz...@gmail.com> wrote:
Hello,

Kodi Arfer <k...@arfer.net> 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