Skip to content

Commit

Permalink
Merge pull request #24 from lixinchin/master
Browse files Browse the repository at this point in the history
Pass `#+ATTR_*' tags to pandoc to allow resizing of images.
  • Loading branch information
kawabata committed Oct 31, 2016
2 parents a66a06f + 8194136 commit b401c0f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ox-pandoc.el
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@
:type 'list)

(org-export-define-derived-backend 'pandoc 'org
:translate-alist '((template . org-pandoc-template))
:translate-alist '((template . org-pandoc-template)
(paragraph . org-pandoc-identity))
;; :export-block "PANDOC"
:menu-entry
`(?p "export via pandoc"
Expand Down Expand Up @@ -1296,6 +1297,14 @@ Option table is created in this stage."
(funcall org-template contents info)
contents)))

(defun org-pandoc-identity (blob contents info)
"Transcode BLOB element or object back into Org syntax.
CONTENTS is its contents, as a string or nil. INFO is ignored.
Like `org-org-identity', but also preserves #+ATTR_* tags in the
output."
(ignore info)
(org-export-expand blob contents t))

(defun org-pandoc-put-options (options)
"Put alist OPTIONS to `org-pandoc-option-table'."
(dolist (option options)
Expand Down

0 comments on commit b401c0f

Please sign in to comment.