From bafffdc5f6eb4378a502ab6589b7d1d5f24e3547 Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Sat, 19 Nov 2011 13:43:39 +0100 Subject: [PATCH] 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. --- contrib/lisp/org-lparse.el | 2 +- contrib/lisp/org-odt.el | 7 +++---- 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 2fa42c013..fadcbdf1f 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 944b5b209..cdfb0237a 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 " - + %s -" 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 40ef5715e..c59c56979 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 "
") (insert (org-lparse-format 'HEADING lang-specific-heading -- 2.11.4.GIT