emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rick Frankel <rick@rickster.com>
To: William Denton <wtd@pobox.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: How to use an image as an anchor in HTML export?
Date: Tue, 18 Mar 2014 12:26:46 -0400	[thread overview]
Message-ID: <8daf1be76e57dd8e7e8f546276741cfa@mail.rickster.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1403181135360.2205@shell.miskatonic.org>

On 2014-03-18 11:46, William Denton wrote:
> I would like to use an image as an anchor in an HTML export
> (specifically in a reveal.js export---I really like this). I can't
> figure out how to make it work, and just end up with either a link
> with a missing image or an image with no link. I don't see this
> documented.  Is it possible?
> 
> What I want to end up with in the output is something like:
> 
> <a href="foo.html"><img src="./images/foo.jpg"></a>


#+BEGIN_SRC org
,* Test image link
[[http://example.com][file:image1.png]]
#+END_SRC

which generates (with subtree export):

#+BEGIN_SRC html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Test image link</title>
<meta  charset="utf-8" />
<meta  name="generator" content="Org-mode" />
<meta  name="author" content="Rick Frankel" />
<link rel="stylesheet" href="org.css" />
</head>
<body>
<div id="content">
<h1 class="title">Test image link</h1>

<div class="figure">
<p><a href="http://example.com"><img src="image1.png" alt="image1.png" 
/></a>
</p>
</div>
</div>
</body>
</html>
#+END_SRC

  reply	other threads:[~2014-03-18 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 15:46 How to use an image as an anchor in HTML export? William Denton
2014-03-18 16:26 ` Rick Frankel [this message]
2014-03-18 16:57   ` William Denton

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=8daf1be76e57dd8e7e8f546276741cfa@mail.rickster.com \
    --to=rick@rickster.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=wtd@pobox.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).