[tw5] Re: Getting transclusion the whole table of content

2020-03-27 Thread TonyM
The islander I see in retrospect its confusing. I believe I was referring to a custom recursive function inside the list, I should not have placed the existing macro name there. Perhaps start a new topic with what you after. I and others have learned a lot since then. Regards Tony -- You re

[tw5] Re: Getting transclusion the whole table of content

2020-03-27 Thread The Islander
Hi @TonyM, could you clarify with some code explaining what you've said below? For example, in this post: https://groups.google.com/d/msg/tiddlywiki/tH2hWn2XPIM/Cpsqw4QAAwAJ I don't see the list filter affecting the output of the toc macro at all. <$list filter="[all[current]has[caption]get[ca

[tw5] Re: Getting transclusion the whole table of content

2018-07-13 Thread TonyM
Andrej, Good work, I was about to reply with the basic "recursion" approach, where the macro calls itself, importantly from inside a list widget, so it is limited to the set of members in that lists filter. I think a lot of people leave this behaviour to toc macros when you can build it yours

[tw5] Re: Getting transclusion the whole table of content

2018-07-13 Thread Andrej Korenić
Well, I got it working... I don't know how but here is the solution... I created tiddler called Transclude chapters that was tagged with $:/tags/Macro. Code is this: \define transclude_chapters(tag,sort:"",itemClassFilter,exclude,path) <$list filter="""[all[shadows+tiddlers]tag[$tag$]!has[dra

[tw5] Re: Getting transclusion the whole table of content

2018-07-13 Thread Andrej Korenić
I found an example at TW5 Magick by Stephan Hradek called Another TOC example but I am still not good enough at TW5 scripting to understand fully how it works... Basically your code from up above gets the list of tiddlers correctly and

[tw5] Re: Getting transclusion the whole table of content

2018-07-13 Thread Andrej Korenić
Thank you Mark for the effort. It did something partially... What I needed was to transclude all tiddlers that are connected to a root tag, in the similar manner as ToC works: Chapters Chapter 1 Chapter 2 Chapter 2.1 I managed to use TW5 macro to make ToC based on tags and ordered by means of

[tw5] Re: Getting transclusion the whole table of content

2018-07-12 Thread 'Mark S.' via TiddlyWiki
There are multiple ways to interpret your request. Here's one: \define toc-body(tag,sort:"",itemClassFilter,exclude,path) <$list filter="""[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$] -[[$tag$]] $exclude$"""> <$vars item=<> path="""$path$/$tag$""" excluded="""$exclude$ -[[$tag$]]

[tw5] Re: Getting transclusion the whole table of content

2018-07-12 Thread Andrej Korenić
I guess that I would need to adapt ToC macro not to show only caption or title, but to transclude the content of every tiddler so some change in code like this is needed... \define toc-caption() <$set name="tv-wikilinks" value="no"> <$transclude field="caption"> <$view field="title"/>