Bastien <b...@altern.org> writes: > I fail to understand why an additional <div id="preamble"> > should break Sebastian's tool. > </mode lazybum>
For starters, the title now resides in the preamble, but the script looks for it in content. This error is easily fixed, but I don't know if it has further repercussions. --8<---------------cut here---------------start------------->8--- diff --git a/code/org-info-js/org-info-src.js b/code/org-info-js/org-info-src.js index 2e49e9c..33faaac 100644 --- a/code/org-info-js/org-info-src.js +++ b/code/org-info-js/org-info-src.js @@ -522,6 +522,14 @@ var org_html_manager = { } else { // be backward compatible t.BODY = document.getElementsByTagName("body")[0]; }} + t.PREA = document.getElementById("preamble"); + t.POST = document.getElementById("postamble"); + if(null == t.PREA) { + t.PREA = t.BODY; + } + if(null == t.POST) { + t.POST = t.BODY; + } if(! t.WINDOW) { t.WINDOW = document.createElement("div"); t.WINDOW.style.marginBottom = "40px"; @@ -738,7 +746,7 @@ var org_html_manager = { // Move the title into the first visible section. // TODO: show title above everything if FIXED_TOC !!! - t.TITLE = t.BODY.getElementsByTagName("h1")[0]; + t.TITLE = t.PREA.getElementsByTagName("h1")[0]; if(t.INNER_TITLE && !t.FIXED_TOC && t.VIEW != t.SLIDE_VIEW) { t.INNER_TITLE = t.TITLE.cloneNode(true); /* TODO: this is still based on wrong behaviour of browsers (same id for two elements) --8<---------------cut here---------------end--------------->8--- Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Terratec KOMPLEXER: http://Synth.Stromeko.net/Downloads.html#KomplexerWaves