emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kodi Arfer <kodi@arfer.net>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Standalone hyperlinked images in HTML export
Date: Mon, 01 Jul 2013 17:26:05 -0400	[thread overview]
Message-ID: <51D1F3ED.6080606@arfer.net> (raw)
In-Reply-To: <87hageq9j9.fsf@gmail.com>

On 2013 Jul 01 Mon 5:01:46 PM -0400, Nicolas Goaziou 
<n.goaziou@gmail.com> wrote:
> Hello,
>
> Kodi Arfer <kodi@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	other threads:[~2013-07-01 21:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-30 20:07 Standalone hyperlinked images in HTML export Kodi Arfer
2013-06-30 22:08 ` Bastien
2013-07-01 11:50   ` Nicolas Goaziou
2013-07-01 21:01 ` Nicolas Goaziou
2013-07-01 21:26   ` Kodi Arfer [this message]
2013-07-02 19:13     ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51D1F3ED.6080606@arfer.net \
    --to=kodi@arfer.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).