diff options
author | Jeremy Compostella <jeremy.compostella@gmail.com> | 2011-11-19 13:43:39 +0100 |
---|---|---|
committer | Jambunathan K <kjambunathan@gmail.com> | 2011-11-25 00:27:49 +0530 |
commit | bafffdc5f6eb4378a502ab6589b7d1d5f24e3547 (patch) | |
tree | fc2e747f171042f011d85994eceddac771c7ec77 | |
parent | 2ded8ccb8505961687dd7c5ba025e0ebed5bb89b (diff) | |
download | org-mode-bafffdc5f6eb4378a502ab6589b7d1d5f24e3547.tar.gz |
org-odt.el: Export TOC max-level information.
The TOC max level which could be specified by user is lost during the
export operation. However, this information could be useful in particular
with the ODT exporter. So if another script work on the ODT afterward and
ask to re-compute the TOC, the new TOC will keep this max level.
TINYCHANGE.
-rwxr-xr-x | contrib/lisp/org-lparse.el | 2 | ||||
-rw-r--r-- | contrib/lisp/org-odt.el | 7 | ||||
-rw-r--r-- | contrib/lisp/org-xhtml.el | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/contrib/lisp/org-lparse.el b/contrib/lisp/org-lparse.el index 2fa42c0..fadcbdf 100755 --- a/contrib/lisp/org-lparse.el +++ b/contrib/lisp/org-lparse.el @@ -1886,7 +1886,7 @@ See `org-xhtml-entity-format-callbacks-alist' for more information." (with-temp-buffer (org-lparse-bind-local-variables opt-plist) (erase-buffer) - (org-lparse-begin 'TOC (nth 3 (plist-get opt-plist :lang-words))) + (org-lparse-begin 'TOC (nth 3 (plist-get opt-plist :lang-words)) umax-toc) (setq lines (mapcar diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el index 944b5b2..cdfb023 100644 --- a/contrib/lisp/org-odt.el +++ b/contrib/lisp/org-odt.el @@ -908,14 +908,13 @@ styles congruent with the ODF-1.2 specification." (defun org-odt-end-footnote-definition (n) (org-lparse-end-paragraph)) -(defun org-odt-begin-toc (lang-specific-heading) +(defun org-odt-begin-toc (lang-specific-heading max-level) (insert (format " <text:table-of-content text:style-name=\"Sect2\" text:protected=\"true\" text:name=\"Table of Contents1\"> - <text:table-of-content-source text:outline-level=\"10\"> + <text:table-of-content-source text:outline-level=\"%d\"> <text:index-title-template text:style-name=\"Contents_20_Heading\">%s</text:index-title-template> -" lang-specific-heading)) - +" max-level lang-specific-heading)) (loop for level from 1 upto 10 do (insert (format " diff --git a/contrib/lisp/org-xhtml.el b/contrib/lisp/org-xhtml.el index 40ef571..c59c569 100644 --- a/contrib/lisp/org-xhtml.el +++ b/contrib/lisp/org-xhtml.el @@ -1067,7 +1067,7 @@ that uses these same face definitions." (org-lparse-begin-list-item 'unordered) (insert toc-entry)) -(defun org-xhtml-begin-toc (lang-specific-heading) +(defun org-xhtml-begin-toc (lang-specific-heading max-level) (org-lparse-insert-tag "<div id=\"table-of-contents\">") (insert (org-lparse-format 'HEADING lang-specific-heading |