Merge branch 'structure-for-sebastian'
This commit is contained in:
commit
189f5a6ded
|
@ -1,3 +1,11 @@
|
||||||
|
2008-03-10 Carsten Dominik <dominik@science.uva.nl>
|
||||||
|
|
||||||
|
* org.el (org-html-level-start): Always have id's in HTML
|
||||||
|
headlines, even if there is no TOC to jump from. Put extra <divs>
|
||||||
|
in. One around the toc, one around the text between a headline
|
||||||
|
and its first subsection. Insert ids into div's that surround
|
||||||
|
whole sections including subsections.
|
||||||
|
|
||||||
2008-03-10 Bastien Guerry <bzg@altern.org>
|
2008-03-10 Bastien Guerry <bzg@altern.org>
|
||||||
|
|
||||||
* org-publish.el (org-publish-expand-components): Remove null
|
* org-publish.el (org-publish-expand-components): Remove null
|
||||||
|
|
29
org.el
29
org.el
|
@ -25654,6 +25654,7 @@ PUB-DIR is set, use this as the publishing directory."
|
||||||
table-buffer table-orig-buffer
|
table-buffer table-orig-buffer
|
||||||
ind start-is-num starter didclose
|
ind start-is-num starter didclose
|
||||||
rpl path desc descp desc1 desc2 link
|
rpl path desc descp desc1 desc2 link
|
||||||
|
snumber
|
||||||
)
|
)
|
||||||
|
|
||||||
(let ((inhibit-read-only t))
|
(let ((inhibit-read-only t))
|
||||||
|
@ -25730,6 +25731,7 @@ lang=\"%s\" xml:lang=\"%s\">
|
||||||
(nth 3 lang-words)
|
(nth 3 lang-words)
|
||||||
org-export-html-toplevel-hlevel)
|
org-export-html-toplevel-hlevel)
|
||||||
thetoc)
|
thetoc)
|
||||||
|
(push "<div id=\"text-table-of-contents\">\n" thetoc)
|
||||||
(push "<ul>\n<li>" thetoc)
|
(push "<ul>\n<li>" thetoc)
|
||||||
(setq lines
|
(setq lines
|
||||||
(mapcar '(lambda (line)
|
(mapcar '(lambda (line)
|
||||||
|
@ -25758,9 +25760,9 @@ lang=\"%s\" xml:lang=\"%s\">
|
||||||
(setq txt (replace-match " <span class=\"tag\"> \\1</span>" t nil txt)))
|
(setq txt (replace-match " <span class=\"tag\"> \\1</span>" t nil txt)))
|
||||||
(if (string-match quote-re0 txt)
|
(if (string-match quote-re0 txt)
|
||||||
(setq txt (replace-match "" t t txt)))
|
(setq txt (replace-match "" t t txt)))
|
||||||
|
(setq snumber (org-section-number level))
|
||||||
(if org-export-with-section-numbers
|
(if org-export-with-section-numbers
|
||||||
(setq txt (concat (org-section-number level)
|
(setq txt (concat snumber " " txt)))
|
||||||
" " txt)))
|
|
||||||
(if (<= level (max umax umax-toc))
|
(if (<= level (max umax umax-toc))
|
||||||
(setq head-count (+ head-count 1)))
|
(setq head-count (+ head-count 1)))
|
||||||
(if (<= level umax-toc)
|
(if (<= level umax-toc)
|
||||||
|
@ -25784,16 +25786,16 @@ lang=\"%s\" xml:lang=\"%s\">
|
||||||
(concat "@<span class=\"target\">" tg "@</span> ")
|
(concat "@<span class=\"target\">" tg "@</span> ")
|
||||||
t t line))
|
t t line))
|
||||||
(push (cons (org-solidify-link-text tg)
|
(push (cons (org-solidify-link-text tg)
|
||||||
(format "sec-%d" head-count))
|
(format "sec-%s" snumber))
|
||||||
target-alist))
|
target-alist))
|
||||||
(while (string-match "<\\(<\\)+\\|>\\(>\\)+" txt)
|
(while (string-match "<\\(<\\)+\\|>\\(>\\)+" txt)
|
||||||
(setq txt (replace-match "" t t txt)))
|
(setq txt (replace-match "" t t txt)))
|
||||||
(push
|
(push
|
||||||
(format
|
(format
|
||||||
(if todo
|
(if todo
|
||||||
"</li>\n<li><a href=\"#sec-%d\"><span class=\"todo\">%s</span></a>"
|
"</li>\n<li><a href=\"#sec-%s\"><span class=\"todo\">%s</span></a>"
|
||||||
"</li>\n<li><a href=\"#sec-%d\">%s</a>")
|
"</li>\n<li><a href=\"#sec-%s\">%s</a>")
|
||||||
head-count txt) thetoc)
|
snumber txt) thetoc)
|
||||||
|
|
||||||
(setq org-last-level level))
|
(setq org-last-level level))
|
||||||
)))
|
)))
|
||||||
|
@ -25802,6 +25804,7 @@ lang=\"%s\" xml:lang=\"%s\">
|
||||||
(while (> org-last-level (1- org-min-level))
|
(while (> org-last-level (1- org-min-level))
|
||||||
(setq org-last-level (1- org-last-level))
|
(setq org-last-level (1- org-last-level))
|
||||||
(push "</li>\n</ul>\n" thetoc))
|
(push "</li>\n</ul>\n" thetoc))
|
||||||
|
(push "</div>\n" thetoc)
|
||||||
(setq thetoc (if have-headings (nreverse thetoc) nil))))
|
(setq thetoc (if have-headings (nreverse thetoc) nil))))
|
||||||
|
|
||||||
(setq head-count 0)
|
(setq head-count 0)
|
||||||
|
@ -26123,6 +26126,8 @@ lang=\"%s\" xml:lang=\"%s\">
|
||||||
(org-html-level-start 1 nil umax
|
(org-html-level-start 1 nil umax
|
||||||
(and org-export-with-toc (<= level umax))
|
(and org-export-with-toc (<= level umax))
|
||||||
head-count)
|
head-count)
|
||||||
|
;; the </div> to lose the last text-... div.
|
||||||
|
(insert "</div>\n")
|
||||||
|
|
||||||
(unless body-only
|
(unless body-only
|
||||||
(when (plist-get opt-plist :auto-postamble)
|
(when (plist-get opt-plist :auto-postamble)
|
||||||
|
@ -26668,7 +26673,7 @@ stacked delimiters is N. Escaping delimiters is not possible."
|
||||||
"Insert a new level in HTML export.
|
"Insert a new level in HTML export.
|
||||||
When TITLE is nil, just close all open levels."
|
When TITLE is nil, just close all open levels."
|
||||||
(org-close-par-maybe)
|
(org-close-par-maybe)
|
||||||
(let ((l org-level-max))
|
(let ((l org-level-max) snumber)
|
||||||
(while (>= l level)
|
(while (>= l level)
|
||||||
(if (aref org-levels-open (1- l))
|
(if (aref org-levels-open (1- l))
|
||||||
(progn
|
(progn
|
||||||
|
@ -26700,13 +26705,13 @@ When TITLE is nil, just close all open levels."
|
||||||
(org-close-par-maybe)
|
(org-close-par-maybe)
|
||||||
(insert "<ul>\n<li>" title "<br/>\n")))
|
(insert "<ul>\n<li>" title "<br/>\n")))
|
||||||
(aset org-levels-open (1- level) t)
|
(aset org-levels-open (1- level) t)
|
||||||
|
(setq snumber (org-section-number level))
|
||||||
(if (and org-export-with-section-numbers (not body-only))
|
(if (and org-export-with-section-numbers (not body-only))
|
||||||
(setq title (concat (org-section-number level) " " title)))
|
(setq title (concat snumber " " title)))
|
||||||
(setq level (+ level org-export-html-toplevel-hlevel -1))
|
(setq level (+ level org-export-html-toplevel-hlevel -1))
|
||||||
(if with-toc
|
(unless (= head-count 1) (insert "\n</div>\n"))
|
||||||
(insert (format "\n<div class=\"outline-%d\">\n<h%d id=\"sec-%d\">%s</h%d>\n"
|
(insert (format "\n<div id=\"outline-container-%s\" class=\"outline-%d\">\n<h%d id=\"sec-%s\">%s</h%d>\n<div id=\"text-%s\">\n"
|
||||||
level level head-count title level))
|
snumber level level snumber title level snumber))
|
||||||
(insert (format "\n<div class=\"outline-%d\">\n<h%d>%s</h%d>\n" level level title level)))
|
|
||||||
(org-open-par)))))
|
(org-open-par)))))
|
||||||
|
|
||||||
(defun org-html-level-close (level max-outline-level)
|
(defun org-html-level-close (level max-outline-level)
|
||||||
|
|
Loading…
Reference in New Issue