emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to use an image as an anchor in HTML export?
@ 2014-03-18 15:46 William Denton
  2014-03-18 16:26 ` Rick Frankel
  0 siblings, 1 reply; 3+ messages in thread
From: William Denton @ 2014-03-18 15:46 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: TEXT/PLAIN, Size: 497 bytes --]

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>

Thanks,

Bill
-- 
▮ William Denton ▮ Toronto, Canada ▮ http://www.miskatonic.org/^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to use an image as an anchor in HTML export?
  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
  2014-03-18 16:57   ` William Denton
  0 siblings, 1 reply; 3+ messages in thread
From: Rick Frankel @ 2014-03-18 16:26 UTC (permalink / raw)
  To: William Denton; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to use an image as an anchor in HTML  export?
  2014-03-18 16:26 ` Rick Frankel
@ 2014-03-18 16:57   ` William Denton
  0 siblings, 0 replies; 3+ messages in thread
From: William Denton @ 2014-03-18 16:57 UTC (permalink / raw)
  To: Rick Frankel; +Cc: emacs-orgmode

[-- Attachment #1: Type: TEXT/PLAIN, Size: 493 bytes --]

On 18 March 2014, Rick Frankel wrote:

>> 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

Cripes, I was sure I'd tried that, but I guess I didn't.  And of course it's the 
easiest and obvious way to do it---the usual Org approach.

Thanks.

Bill
-- 
▮ William Denton ▮ Toronto, Canada ▮ http://www.miskatonic.org/^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-18 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-03-18 16:57   ` William Denton

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).