[TW5] Table of Contents

1,117 views
Skip to first unread message

MetalSoviet

unread,
Mar 23, 2014, 4:42:27 PM3/23/14
to tiddl...@googlegroups.com
Is there something that creates automatically a table of contents based on headers, like the ones in Wikipedia?

If you could provide me a code or something it would be nice, because I have no idea about java and I still have a way to go through CSS.

Thanks

Stephan Hradek

unread,
Mar 24, 2014, 1:25:31 AM3/24/14
to tiddl...@googlegroups.com


Am Sonntag, 23. März 2014 21:42:27 UTC+1 schrieb MetalSoviet:
Is there something that creates automatically a table of contents based on headers, like the ones in Wikipedia?
No.
 
If you could provide me a code or something it would be nice, because I have no idea about java
What would you want to do with Java? It's JavaScript.
 

Daniel Baird

unread,
Mar 24, 2014, 1:57:48 AM3/24/14
to tiddlywiki

Usually if you think you need a table of contents in a tiddler, you're putting too much into a single tiddler.

Instead, put the content from each 'section' into a tiddler of its own.  Then tag that tidder with some tag.  Now your Table of Contents appears in that tag's list, and you have a proper microcontent tiddlywiki.



--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Daniel Baird
retro objoke: Chuck Norris had a problem so he decided to use regular expressions. Now, every problem in the world is solved.

MetalSoviet

unread,
Mar 24, 2014, 5:15:58 AM3/24/14
to tiddl...@googlegroups.com


El lunes, 24 de marzo de 2014 00:57:48 UTC-5, Daniel Baird escribió:

Usually if you think you need a table of contents in a tiddler, you're putting too much into a single tiddler.

Instead, put the content from each 'section' into a tiddler of its own.  Then tag that tidder with some tag.  Now your Table of Contents appears in that tag's list, and you have a proper microcontent tiddlywiki.


My tiddlywiki is a knowledge database for class notes. I need a TOC for every tiddler that builds itself based on headers.

Stephan Hradek

unread,
Mar 24, 2014, 6:50:52 AM3/24/14
to tiddl...@googlegroups.com


Am Montag, 24. März 2014 10:15:58 UTC+1 schrieb MetalSoviet:

My tiddlywiki is a knowledge database for class notes. I need a TOC for every tiddler that builds itself based on headers.
Why would you think you *need* it and why do you not think, putting the notes into seperate tiddler could be a valid soluton?

You could try my experimental $:/core/modules/filters/match.js you can get from http://tiddlystuff.tiddlyspot.com/ but I would not recommend it.

You'd need a filter something like this: "[is[current]match:text/^(!.+)$/]".

Daniel Baird

unread,
Mar 24, 2014, 7:42:54 PM3/24/14
to tiddlywiki
On 24 March 2014 20:50, Stephan Hradek <stephan...@gmail.com> wrote:


Am Montag, 24. März 2014 10:15:58 UTC+1 schrieb MetalSoviet:

My tiddlywiki is a knowledge database for class notes. I need a TOC for every tiddler that builds itself based on headers.
Why would you think you *need* it and why do you not think, putting the notes into seperate tiddler could be a valid soluton?


I can imagine that if you're typing notes rapidly through a lecture, the content is pretty unformed as it goes in.  Then you might go back later (or while the professor is trying to get the projector to work for the next bit of the lecture) and add headings, shuffle stuff around etc.  That would be harder to do if you had spread the content across multiple tiddlers.  Is that your situation Metal?

There used to be plugins for TWC that did tables of content for individual tiddlers, e.g http://www.tiddlytools.com/#TableOfContentsPlugin .  Probably that wouldn't work in TW5, but you could try your hand at adapting it.  Let Eric (the plugin author) know if you're going to try.

Cheers
;Daniel

MetalSoviet

unread,
Mar 24, 2014, 10:50:09 PM3/24/14
to tiddl...@googlegroups.com
Exactly what you said. The problem is that I don't have a lot of Java knowledge and I wondered if someone had a plugin for offline TW5. At least now I know where to find a base if someday I learn some Java.

So, no TW5 plugins?

Daniel Baird

unread,
Mar 24, 2014, 11:29:06 PM3/24/14
to tiddlywiki
On 25 March 2014 12:50, MetalSoviet <leviathan...@hotmail.com> wrote:
Exactly what you said. The problem is that I don't have a lot of Java knowledge and I wondered if someone had a plugin for offline TW5. At least now I know where to find a base if someday I learn some Java.

So, no TW5 plugins?


None I'm aware of.  Have you considered going back to Classic Tiddlywiki, where you can use the plugin I linked to?

And you should note that Java and JavaScript just _sound_ the same -- they're unrelated and are quite different languages.  TW is written in JavaScript.

Cheers
;Daniel

Birthe C

unread,
Mar 25, 2014, 5:53:57 AM3/25/14
to tiddl...@googlegroups.com
I find that using TiddlyWiki is very often about finding a way around to do things. As a new user to TiddlyWikiClassic I always wanted a ToC. I got it with extensive help from Måns in a danish group. It looked nice but at the same time I got it, I found that using MPTW with newHereplugin and tagglytagging really was the best and quickest way for me to take notes.

Now we have the newHere button to add to TW5, but sure I miss tagglytagging.
I just love that TW5 is again able to use tiddlyspot.
Thanks, thanks and more thanks.

Birthe

Daniel Baird

unread,
Mar 25, 2014, 8:05:20 PM3/25/14
to tiddlywiki

I agree, if your instructor says when they're moving on to a new topic, TagglyTagging and NewHere would probably be good for note taking even for the fastest talking lectures.


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Captain Packers

unread,
Aug 9, 2017, 10:29:27 AM8/9/17
to TiddlyWiki
I still think anchor tags that can be used to generate a toc within a tiddler could be useful. One example where I would like to use them is in code documentation. If you generate a document for each module, you may want a section with a heading Change Log. From my experience, you can't create multiple tiddlers with the same name. So using the macro toc would end up showing Change Log for one module, and then it would be Change Log(1) in the next, and Change Log(2) in the next, and that isn't pretty.

Mark S.

unread,
Aug 9, 2017, 11:48:31 AM8/9/17
to TiddlyWiki
Considering that you've just bumped a 3 year old thread, I wouldn't hold my breath.

The TOC macro will use the caption field by default, and you can have more than one tiddler with the same caption. Maybe that will give you better results?

Good luck,
Mark
Reply all
Reply to author
Forward
0 new messages