Sorry for not being more clear. It is an inline script and only works if 
Eric's InlineJavascriptPlugin (TiddlyTools) is installed.

Next create a tiddler with the script and name it for example:

SectionTabs

<script>
var here = window.story.findContainingTiddler(place);  
var tiddler = store.getTiddler(here.getAttribute("tiddler"));  
var title = tiddler.title;  
var pattern=/(^|\n)!{1,6}([^eE\n][^nN\n][^dD\n])[^\n]*\n/g;
var matches=store.getTiddlerText(title).match(pattern);
var out='<<tabs txtCurrentTab ';
for (var i=0;i<matches.length;i++) {
    var 
m=matches[i].replace(/!{1,6}|\n/g,'').replace(/"/g,'\\x22').replace(/>>/g,'>\\>').replace(/\}\}\}/g,'}\\}\\}');
    out+= '{{"'+m+'"}} {{"'+m+'"}} {{"'+title+'##'+m+'"}} ';
}
out += '>>';
return out;
</script>


No tags are required for this SectionTab tiddler. Then simple add <<tiddler 
SectionTab>> transclusion at the beginning of a tiddler, and comment the 
main content of it out. eg.

<<tiddler SectionTab>>/%

! Chapter 1

text

! Chaper 2

some more text

%/


It will create a tab for each chapter of that tidder.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/tiddlywiki/-/UAYcvYeMXsoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to