summaryrefslogtreecommitdiff
path: root/lisp/org-docbook.el
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2011-05-14 10:26:40 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2011-06-29 12:00:42 +0200
commit789380330add277d16792f2af52d770a0b01037f (patch)
tree5258e6857561fb09d65fe442c60786da7ab67041 /lisp/org-docbook.el
parentab9c52fd7911763a903a3d673dce2876ada9e551 (diff)
Insert a customizable separator between footnotes
* lisp/org-docbook.el (org-export-docbook-footnote-separator): new variable (org-export-as-docbook): add a separator between footnotes. * lisp/org-html.el (org-export-html-footnote-separator): new variable. (org-export-as-html): add a separator between footnotes. * lisp/org-latex.el (org-export-latex-footnote-separator): new variable. (org-export-latex-preprocess): add a separator between footnotes.
Diffstat (limited to 'lisp/org-docbook.el')
-rw-r--r--lisp/org-docbook.el29
1 files changed, 21 insertions, 8 deletions
diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
index f3cb48747..b006b74cc 100644
--- a/lisp/org-docbook.el
+++ b/lisp/org-docbook.el
@@ -148,6 +148,11 @@ avoid same set of footnote IDs being used multiple times."
:group 'org-export-docbook
:type 'string)
+(defcustom org-export-docbook-footnote-separator "<superscript>, </superscript>"
+ "Text used to separate footnotes."
+ :group 'org-export-docbook
+ :type 'string)
+
(defcustom org-export-docbook-emphasis-alist
`(("*" "<emphasis role=\"bold\">" "</emphasis>")
("/" "<emphasis>" "</emphasis>")
@@ -942,14 +947,22 @@ publishing directory."
org-export-docbook-footnote-id-prefix num)
t t line))
(setq line (replace-match
- (format "%s<footnote xml:id=\"%s%s\"><para>%s</para></footnote>"
- (match-string 1 line)
- org-export-docbook-footnote-id-prefix
- num
- (if footnote-def
- (save-match-data
- (org-docbook-expand (cdr footnote-def)))
- (format "FOOTNOTE DEFINITION NOT FOUND: %s" num)))
+ (concat
+ (format "%s<footnote xml:id=\"%s%s\"><para>%s</para></footnote>"
+ (match-string 1 line)
+ org-export-docbook-footnote-id-prefix
+ num
+ (if footnote-def
+ (save-match-data
+ (org-docbook-expand (cdr footnote-def)))
+ (format "FOOTNOTE DEFINITION NOT FOUND: %s" num)))
+ ;; If another footnote is following the
+ ;; current one, add a separator.
+ (if (save-match-data
+ (string-match "\\`\\[[0-9]+\\]"
+ (substring line (match-end 0))))
+ org-export-docbook-footnote-separator
+ ""))
t t line))
(push (cons num 1) footref-seen))))))