Trying to install https://kookma.github.io/TW-TOC/ plugin

I’m trying to install TOC Plugin.

I followed the instructions and the plugin appeared to be installed so I suspect my problem is more likely that I don’t really know what to do to get it to work. I am completely new to TW so struggling to figure out how to do things.

I see a tag structure on the examples on the TOC Plugin Private 1.6.3 — table of contents with navigation tools website and tried to apply it to a few of the tiddlers in my application but I’m not seeing a new tab like the ones on the demo website.

I was expecting to see a new tab on the panel to the right with the original 5 tabs but nothing has changed.

The plugin information talks about some macros. Do I need to run these and if so how do I run them?

Would really appreciate assistance from anyone that can give me some guidance.

Thanks

So, I assume you have an established set of tiddlers that form a TOC (that is, tiddlers that tag other tiddlers) ?

Mohammad 's macros allow you to form a TOC from tiddlers that have been used to tag other tiddlers. There’s a set of these macros already in TiddlyWiki, but one of Mohammad’s version adds navigation so you can move up and down the TOC tree. Another version limits the tree to two levels, enhancing performance. The macros have nothing to do with tabs appearing in the sidebar (that is done with a special tag – see below).

So in whatever tiddler you would like the TOC to occur, per the instructions you put something like this at the top:

\import [all[tiddlers+shadows]tag[$:/tags/Macro/Toc]]

This allows the macro to exist inside the tiddler. And then you put the macro like this inside the tiddler:

<<twolevel-toc-expandable tag:"book" exclude:"" stateTiddler:"20200220">>

Except of course your “tag” would be whatever your top level tiddler in your TOC structure was.

Now if you add the tag $:/tags/SideBar to this tiddler, it will appear over in the sidebar. If you add a caption field to this tiddler, then the contents of the caption field will be the title that is shown over in the sidebar.

There are other tools in the Demo to allow you to add navigation within tiddlers that are part of the TOC. But you can read about them in the tutorial.

Hopefully this will get you started.

Good luck!

1 Like