Docbook export: Implement ordered lists with offset
This commit is contained in:
parent
a9539f449c
commit
d555545b48
|
@ -1,3 +1,8 @@
|
||||||
|
2010-04-27 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org-docbook.el (org-export-as-docbook): Implement ordered
|
||||||
|
lists starting at some offset.
|
||||||
|
|
||||||
2010-04-26 Carsten Dominik <carsten.dominik@gmail.com>
|
2010-04-26 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
* org.el (org-link-types, org-open-at-point): Add doi links.
|
* org.el (org-link-types, org-open-at-point): Add doi links.
|
||||||
|
|
|
@ -533,7 +533,7 @@ publishing directory."
|
||||||
table-buffer table-orig-buffer
|
table-buffer table-orig-buffer
|
||||||
ind item-type starter didclose
|
ind item-type starter didclose
|
||||||
rpl path attr caption label desc descp desc1 desc2 link
|
rpl path attr caption label desc descp desc1 desc2 link
|
||||||
fnc item-tag
|
fnc item-tag initial-number
|
||||||
footref-seen footnote-list
|
footref-seen footnote-list
|
||||||
id-file
|
id-file
|
||||||
)
|
)
|
||||||
|
@ -998,7 +998,11 @@ publishing directory."
|
||||||
starter (if (match-beginning 2)
|
starter (if (match-beginning 2)
|
||||||
(substring (match-string 2 line) 0 -1))
|
(substring (match-string 2 line) 0 -1))
|
||||||
line (substring line (match-beginning 5))
|
line (substring line (match-beginning 5))
|
||||||
item-tag nil)
|
item-tag nil
|
||||||
|
initial-number nil)
|
||||||
|
(if (string-match "\\`\\[@start:\\([0-9]+\\)\\][ \t]?" line)
|
||||||
|
(setq initial-number (match-string 1 line)
|
||||||
|
line (replace-match "" t t line)))
|
||||||
(if (and starter (string-match "\\(.*?\\) ::[ \t]*" line))
|
(if (and starter (string-match "\\(.*?\\) ::[ \t]*" line))
|
||||||
(setq item-type "d"
|
(setq item-type "d"
|
||||||
item-tag (match-string 1 line)
|
item-tag (match-string 1 line)
|
||||||
|
@ -1031,7 +1035,18 @@ publishing directory."
|
||||||
(org-export-docbook-close-para-maybe)
|
(org-export-docbook-close-para-maybe)
|
||||||
(insert (cond
|
(insert (cond
|
||||||
((equal item-type "u") "<itemizedlist>\n<listitem>\n")
|
((equal item-type "u") "<itemizedlist>\n<listitem>\n")
|
||||||
((equal item-type "o") "<orderedlist>\n<listitem>\n")
|
((equal item-type "o")
|
||||||
|
;; Check for a specific start number. If it
|
||||||
|
;; is specified, we use the ``override''
|
||||||
|
;; attribute of element <listitem> to pass the
|
||||||
|
;; info to DocBook. We could also use the
|
||||||
|
;; ``startingnumber'' attribute of element
|
||||||
|
;; <orderedlist>, but the former works on both
|
||||||
|
;; DocBook 5.0 and prior versions.
|
||||||
|
(if initial-number
|
||||||
|
(format "<orderedlist>\n<listitem override=\"%s\">\n"
|
||||||
|
initial-number)
|
||||||
|
"<orderedlist>\n<listitem>\n"))
|
||||||
((equal item-type "d")
|
((equal item-type "d")
|
||||||
(format "<variablelist>\n<varlistentry><term>%s</term><listitem>\n" item-tag))))
|
(format "<variablelist>\n<varlistentry><term>%s</term><listitem>\n" item-tag))))
|
||||||
;; For DocBook, we need to open a para right after tag
|
;; For DocBook, we need to open a para right after tag
|
||||||
|
|
Loading…
Reference in New Issue