I know it's possible to do something *similar* by using the standard tabs macro and giving it references to sections of the current tiddler, but among other problems, you can't really nest content that way. I'd like to be able to do something like this:
<<i-tabs major-choice "Choice A">>
Choice A, blah blah!
<<i-tabs major-choice "Choice B">>
Choice B, unlike Choice A, comes in two variants:
<<i-tabs minor-choice "Choice B-1">>
There's Choice B-1...
<<i-tabs minor-choice "Choice B-2">>
... and the imaginatively named B-2!!
<<i-tabs minor-choice end>>
<<i-tabs major-choice end>>
The output would be a pane with two tab buttons, marked "Choice A" and "Choice B"; if "Choice A" was selected, the pane would contain only the text "Choice A, blah blah!" If the other tab button, "Choice B", was selected, the pane would contain the text "Choice B, unlike Choice A, comes in two variants:" followed by a nested pane with two tab buttons, marked "Choice B-1" and "Choice B-2"... the nested pane would contain the text "There's Choice B-1..." or "... and the imaginatively named B-2!!" depending on which tab button was selected.
I've been trying to write this one myself but reluctantly coming to the conclusion that I have just too many projects on my plate and can't bring this one to fruition any time soon. Anyone else interested?
I know it's possible to do something *similar* by using the standard tabs macro and giving it references to sections of the current tiddler, but among other problems, you can't really nest content that way.
I actually use TiddlyWiki for composing long prose works - short stories, novels, screenplays, stage plays, etc. TW is very good for the way I write, where I may get a very clear idea for individual scenes before I know how to put them all together into a whole. With TW, I can open up a new tiddler, pour everything I know about the current scene into that tiddler, and then put tags on the tiddler and create references to it in other tiddlers to help me find it later, in the "weaving it all together" phase of the writing.
Sometimes, while I'm writing, I can see two (or more) ways to approach the current writing. To give an example, if I'm bringing "on stage" a new character and an important object they're carrying, I may be unsure whether it works better to describe the character first and then the object, or the other way around. What I would really like is an extension where, without breaking the flow of my writing, I can write quick rough versions of *both* approaches, and then when I put that tiddler in view mode, have those two passages appear as two tabs on one pane. So, something like the following:
(syntax line indicating the start of the inline-tabs section, and the start of the first tab)
The book was clearly ancient, bound in leather that rotted and gave up dust at every careless jostle. The cover bore no words, merely a sigil that made the viewer uneasy...
The man who carried the book out of the crypt seemed scarcely less ancient. It was impossible for those who watched him to tell whether his filmy eyes still saw, or whether he navigated his way over the uneven stone flooring by feel alone...
(syntax line indicating the start of the second tab)
The man who carried the book out of the crypt was ancient, so ancient that, while living, he seemed a walking symbol of mortality. It was impossible for those who watched him to tell whether his filmy eyes still saw, or whether he navigated his way over the uneven stone flooring by feel alone...
The book itself was clearly even more ancient, bound in leather that rotted and gave up dust at every careless jostle. The cover bore no words, merely a sigil that made the viewer uneasy...
(syntax line indicating the end of the tabs-section)
Now, what I *could* do is to put each of those two alternate versions into an individual tiddler, and then write a tabs macro in the tiddler that refers to those two individual tiddlers. The reason that's not an optimal solution is that I'm trying not to break the flow of my writing, and having to stop to create two individual tiddlers and then the tabs macro invoking them in the original tiddler is *very* flow-breaking. I know; I've tried it.
I can avoid the distraction of creating new individual tiddlers if I create sections in the current tiddler, mark them so that they don't show up in normal view mode but their content can still be transcluded, and then construct the macro invocation referring to those tiddler sections. But this is also very flow-breaking, and it has the additional disadvantage that if I have another choice I want to study both versions of, and that choice appears in one of the two tab-sections, I have to establish those two sub-choices as top-level tiddler sections, since sections can't nest, and then create the tabs macro. It's like doing Reverse Polish Notation with my wiki syntax, and while I know how to do RPN, I'd rather be giving my brain power to the *writing* rather than the syntax.
While writing this, I've thought of a way I *might* be able to get the effect I'm looking for with Nested Sliders. I don't know how well it will work, so I'll try it out and report in a few days. Thank you for all your help!
That is at least 95% if not ..
>Can you expand on the reason(s) why you would say that - for writing storylines - tabs make your life easier?
>What's better about tabs than sections in your context? I mean, if you don't want to interrupt your flow when writing, why do you want to interrupt your flow when reading?
>Is there some hidden idea behind that? At least to me, tabs do not seem an intuitive thing to come accros when reading a kind of manuscript.
>Can it be that your ultimate goal is to be able to construct your preferred storyline from individual choices that you want to toggle but ultimately actually mark the ones that you like best?
Tobias, that's exactly what my ultimate goal is. Sometimes I'll write several different versions of a scene, or a part of a scene, and I'll have to look back and forth between all the different versions I've written, comparing them, trying to figure out how I can combine the best parts of each attempt to make the final version.
At the *end* of the process, I'll have everything boiled down to one single final draft version, but while I'm trying to get to that final version, being able to toggle between the different versions would be extremely helpful.
>So maybe it's really not about tabs but about being able to have alternative parts of a tiddler that you want to hide / display / flick through and here you ultimately select one... and perhaps depending on your first choice a secondary subchoice.
Exactly! Tabs would be an easy UI element to flip between those alternative parts, but another element that did the same thing would also work.
>If that's the idea behind it... what would be the markup that you would need inside these tabs... would simple text suffice or would you also need to be able to put lists or headings etc?
>Tobias.
Headings, probably not. Lists... perhaps. Italics, strong text, wikilinks: definitely. Nested sliders: I would really like these - I use the "floating" version to make notes to myself.
Thank you!
Think this could be made much more easier with a inline script, or a ForEachTiddlers, but didn't found anything for example on abegoExtensions on how to use it for sections.
This does it: