diff --git a/org-tufte.el b/org-tufte.el index 06ee4db..376b510 100644 --- a/org-tufte.el +++ b/org-tufte.el @@ -244,16 +244,16 @@ is nil. INFO is a plist used as a communication channel." (org-html-close-tag "img" (org-html--make-attribute-string attributes) info))) -(defun org-tufte-html-wrap-image (contents info &optional caption label) +(defun org-tufte-html-wrap-image (contents info &optional attributes caption label) "Wrap CONTENTS string within an appropriate environment for images. -INFO is a plist used as a communication channel. When optional +INFO is a plist used as a communication channel. When optional arguments CAPTION and LABEL are given, use them for caption and -\"id\" attribute." +\"id\" attribute. When html_doctype is html5, then put ATTRIBUTES in
element" (let ((html5-fancy (org-html--html5-fancy-p info))) - (format (if html5-fancy "\n

\n%s%s\n

" + (format (if html5-fancy "\n

\n%s%s\n

" "\n

\n%s%s\n") ;; ID. - (if (org-string-nw-p label) (format " id=\"%s\"" label) "") + (if html5-fancy attributes (if (org-string-nw-p label) (format " id=\"%s\"" label) "")) ;; Caption. (if (not (org-string-nw-p caption)) "" (format @@ -302,7 +302,7 @@ the plist used as a communication channel." " " raw)))) (label (org-html--reference paragraph info))) - (org-tufte-html-wrap-image contents info caption label))) + (org-tufte-html-wrap-image contents info attributes caption label))) ;; Regular paragraph. (t (format "\n%s

" (if (org-string-nw-p attributes) diff --git a/readme.org b/readme.org index 1ea5be3..a96c900 100644 --- a/readme.org +++ b/readme.org @@ -39,6 +39,8 @@ Just fetch [[file:org-tufte.el]] and save it somewhere. Then load it (setq org-tufte-htmlize-code t ;; htmlize and beautify source code! org-tufte-embed-images nil ;; do not embed images. faster! org-tufte-goto-top-button t ;; add go-to-top button in html + org-html-html5-fancy t ;; enable html5 elements + org-html-doctype "html5" ;; html5 page ) ) #+end_src @@ -66,6 +68,8 @@ configuration. #+end_src * Changelog +** v0.8.0 +- fullwidth image is supported for html5 page via =#+attr_html: :class fullwidth= ** v0.7.0 - Can work properly with ~rg-publish-org-to~ ** v0.6.0