[Top][All Lists]

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

[O] Add attributes to figure in html5

From: L. Larrabee Strow
Subject: [O] Add attributes to figure in html5
Date: Sat, 09 Sep 2017 11:25:29 -0400
User-agent: mu4e 0.9.19; emacs 25.1.1

I am using

(setq org-html-html5-fancy t
      org-html-doctype "html5")

for html exporting, as I would like to use the figure environment for
image exports.

Is there any way to pass an attribute to the html?  (I am afraid I might
not be using all the correct terms here for html5.)  Here is what I
would like to get in the html export:

<a data-fancybox="gallery"  
   data-caption="My caption" 
   <img width=700px src="https://site.com/desert_rtp.png";>

Getting the width is no problem.  My question is how to get the first
two lines w/o using #+BEGIN_EXPORT HTML.

If I could get this to work, then I can use the fancybox image routines
with org and retain compabtitility with latex exporting.

I tried

#+ATTR_HTML:  :data-fancybox gallery

but that puts the attributes in the href, not before href.

Thanks, Larrabee

L. Larrabee Strow
UMBC Physics Department
Email: address@hidden
Cell: 724-288-6933

reply via email to

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