ox: Add #+SUBTITLE property
This commit is contained in:
17
ox-rst.el
17
ox-rst.el
@@ -92,7 +92,8 @@
|
|||||||
((?R "As reStructuredText buffer" org-rst-export-as-rst)
|
((?R "As reStructuredText buffer" org-rst-export-as-rst)
|
||||||
(?r "As reStructuredText file" org-rst-export-to-rst)))
|
(?r "As reStructuredText file" org-rst-export-to-rst)))
|
||||||
:options-alist
|
:options-alist
|
||||||
'((:rst-link-org-as-html nil nil org-rst-link-org-files-as-html)
|
'((:subtitle "SUBTITLE" nil nil parse)
|
||||||
|
(:rst-link-org-as-html nil nil org-rst-link-org-files-as-html)
|
||||||
(:rst-link-use-abs-url nil "rst-link-use-abs-url" org-rst-link-use-abs-url)
|
(:rst-link-use-abs-url nil "rst-link-use-abs-url" org-rst-link-use-abs-url)
|
||||||
(:rst-inline-images nil nil org-rst-inline-images)
|
(:rst-inline-images nil nil org-rst-inline-images)
|
||||||
(:rst-inline-image-rules nil nil org-rst-inline-image-rules)
|
(:rst-inline-image-rules nil nil org-rst-inline-image-rules)
|
||||||
@@ -446,9 +447,13 @@ INFO is a plist used as a communication channel."
|
|||||||
INFO is a plist used as a communication channel."
|
INFO is a plist used as a communication channel."
|
||||||
(let* (;; Links in the title will not be resolved later, so we make
|
(let* (;; Links in the title will not be resolved later, so we make
|
||||||
;; sure their path is located right after them.
|
;; sure their path is located right after them.
|
||||||
(title (if (plist-get info :with-title)
|
(with-title (plist-get info :with-title))
|
||||||
|
(title (if with-title
|
||||||
(org-export-data (plist-get info :title) info)
|
(org-export-data (plist-get info :title) info)
|
||||||
""))
|
""))
|
||||||
|
(subtitle (if with-title
|
||||||
|
(org-export-data (plist-get info :subtitle) info)
|
||||||
|
""))
|
||||||
(author (and (plist-get info :with-author)
|
(author (and (plist-get info :with-author)
|
||||||
(let ((auth (plist-get info :author)))
|
(let ((auth (plist-get info :author)))
|
||||||
(and auth (org-export-data auth info)))))
|
(and auth (org-export-data auth info)))))
|
||||||
@@ -475,11 +480,17 @@ INFO is a plist used as a communication channel."
|
|||||||
(concat author email))
|
(concat author email))
|
||||||
((org-string-nw-p author) author)
|
((org-string-nw-p author) author)
|
||||||
((org-string-nw-p email) email)) title))
|
((org-string-nw-p email) email)) title))
|
||||||
(titleline (make-string (string-width title) ?=)))
|
(titleline (make-string (string-width title) ?=))
|
||||||
|
(subtitleline (make-string (string-width subtitle) ?-))
|
||||||
|
(subtitle (if (not (string= subtitle ""))
|
||||||
|
(concat subtitleline "\n"
|
||||||
|
subtitle "\n"
|
||||||
|
subtitleline "\n") "")))
|
||||||
(concat
|
(concat
|
||||||
titleline "\n"
|
titleline "\n"
|
||||||
title "\n"
|
title "\n"
|
||||||
titleline "\n"
|
titleline "\n"
|
||||||
|
subtitle
|
||||||
(when (org-string-nw-p author) (concat "\n :Author: " author))
|
(when (org-string-nw-p author) (concat "\n :Author: " author))
|
||||||
(when (org-string-nw-p email) (concat "\n :Contact: " email))
|
(when (org-string-nw-p email) (concat "\n :Contact: " email))
|
||||||
(when (org-string-nw-p date) (concat "\n :Date: " date))
|
(when (org-string-nw-p date) (concat "\n :Date: " date))
|
||||||
|
|||||||
Reference in New Issue
Block a user