Function: org-odt-special-block
org-odt-special-block is a byte-compiled function defined in
ox-odt.el.gz.
Signature
(org-odt-special-block SPECIAL-BLOCK CONTENTS INFO)
Documentation
Transcode a SPECIAL-BLOCK element from Org to ODT.
CONTENTS holds the contents of the block. INFO is a plist holding contextual information.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-odt.el.gz
;;;; Special Block
(defun org-odt-special-block (special-block contents info)
"Transcode a SPECIAL-BLOCK element from Org to ODT.
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
(let ((type (org-element-property :type special-block))
(attributes (org-export-read-attribute :attr_odt special-block)))
(cond
;; Annotation.
((string= type "annotation")
(let* ((author (or (plist-get attributes :author)
(let ((author (plist-get info :author)))
(and author (org-export-data author info)))))
(date (or (plist-get attributes :date)
;; FIXME: Is `car' right thing to do below?
(car (plist-get info :date)))))
(format "\n<text:p>%s</text:p>"
(format "<office:annotation>\n%s\n</office:annotation>"
(concat
(and author
(format "<dc:creator>%s</dc:creator>" author))
(and date
(format "<dc:date>%s</dc:date>"
(org-odt--format-timestamp date nil 'iso-date)))
contents)))))
;; Textbox.
((string= type "textbox")
(let ((width (plist-get attributes :width))
(height (plist-get attributes :height))
(style (plist-get attributes :style))
(extra (plist-get attributes :extra))
(anchor (plist-get attributes :anchor)))
(format "\n<text:p text:style-name=\"%s\">%s</text:p>"
"Text_20_body" (org-odt--textbox contents width height
style extra anchor))))
(t contents))))