-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a toc/table of contents option #291
Comments
I was thinking a simple Not sure if the case for a toc query type is strong enough (why would one want to generate ToC based on a different zettel?) ... although the idea (i.e., using query type to say 'i want toc here') is interesting. |
I was thinking about something similar to the latter idea, which would behave like Example:
There are some issues with this though, because we don't know how to order the zettels, and also because a single zettels can have multiple tags that match |
Well, the question is a bit, what use cases we assume valid for a zettelkasten. But imagine you are writing a book. Every chapter is one zettel, which has multiple sections. I am actually planing to collect theorems for my thesis in neuron. Right now if I want a linked toc, I need to put every section in one zettel. With a toc feature, I could just have everything in one zettel. With the fancy toc feature, I could go the middle ground. The toc could span multiple zettels but also the structure inside them. I really like the idea the longer I think about it. Of course, as always, someone would need to implement it. |
One second motivation, why a <z:toc> query or something like that would be useful is that it gives the possibility to have some introductory text before the toc, like the wikipedia does it. |
I've written a little tool that accomplishes something similar to this using jq to parse Neuron's query output. If I want a zettel to appear in my ToC (I call it an index, but it is really more of a ToC), I add a tag starting with I have my tool configured to generate a new zettel for each level of the index hierarchy, with links to any leaf nodes (zettels) or sub-trees (deeper layers of the index hierarchy). Here's an example of navigating the generated index/ToC pages: It can be tweaked to use a 'sentinel' other than It works pretty well for me so far, maybe it could help inspire the UI of a similar feature built in to Neuron. P.s. be careful if you try to use my script, as it will |
The suggestion to support Wikipedia style |
I think at would be good to have the possibility, to set a flag to automatically generate a table of contents at the beginning of the zettel based on the headings in the zettel.
Alternative suggestion would be to have some custom query like <toc?for_zettels=...> That would be even more flexible e.g. giving the possibility to make one zettel with the table of contents of multiple others.
The text was updated successfully, but these errors were encountered: