WOW, This is amazing Jeremy! As mush as I go deeper in Tiddlywiki, I found more amazing thing. This gives us a lot of flexibility. I gonna to make some examples in TW-Scripts for this.
By now I understood * I can have macro overloading in TW * I can send a macro name like a pointer from scope 1 to another macro. * I can define variables and constants * I can have decision making * I can loop over items * .... This is amazing! --Mohammad On Thursday, February 7, 2019 at 3:58:34 PM UTC+3:30, Jeremy Ruston wrote: > > You said, the *toc-caption* here will override the one in the core! Can I > conclude that: > > If a macro is called in a scope of a tiddler and it calls a macro >> internally say maymac, then if the maymac is existed in the scope of >> calling tiddler, it will override the core or other scope macros! Is this >> kind of overloading? > > > > Yes, exactly that. > > It’s the same mechanism by which the following example renders “Ringo”: > > <$set name="foo" value="John"> > <$set name="foo" value="Paul"> > <$set name="foo" value="George"> > <$set name="foo" value="Ringo"> > <$text text=<<foo>>/> > </$set> > </$set> > </$set> > </$set> > > > Best wishes > > Jeremy > > > > --Mohammad > > On Thursday, February 7, 2019 at 2:59:01 PM UTC+3:30, Jeremy Ruston wrote: >> >> I’m not sure if it will let you do exactly what you want in this >> situation, but the reason that the toc-caption macro is separated out is so >> that it can be redefined for a particular instantiation of the TOC. For >> example, here we have a tabbed internal navigation TOC where the >> toc-caption macro has been modified to put a percentage sign before each >> caption. The toc-caption macro defined in this tiddler will override the >> one in the core. >> >> \define toc-caption() >> <$set name="tv-wikilinks" value="no"> >> % <$transclude field="caption"> >> <$view field="title"/> >> </$transclude> >> </$set> >> \end >> >> <$macrocall >> $name="toc-tabbed-internal-nav" >> tag="TableOfContents" >> selectedTiddler="$:/temp/toc/selectedTiddler" >> unselectedText="<p>Select a topic in the table of contents. Click the >> arrow to expand a topic.</p>" >> missingText="<p>Missing tiddler.</p>" >> /> >> >> >> Best wishes >> >> Jeremy. >> >> >> On 7 Feb 2019, at 04:32, S. S. <[email protected]> wrote: >> >> >> David, >> >> Open the shadow tiddler: *$:/core/macros/toc* >> Find this line : *\define toc-tabbed-external-nav* >> Yes, this is the correct line for modifying the *toc-tabbed-internal-nav* >> - as that macro calls it. >> >> Find this line: >> <h1><<toc-caption>></h1> >> >> Change it to this : >> <h1><$view field="title"/></h1> >> >> Should work! >> Regards >> >> >> On Thursday, February 7, 2019 at 6:43:02 AM UTC+7, David Gifford wrote: >>> >>> Hi all >>> >>> How would I tweak $:/core/macros/toc (or something else) so that each >>> tab in the toc would show the caption field of the tiddler, but the title >>> within the tab contents would show the longer title field of the tiddler? >>> >> >> -- >> 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 [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/tiddlywiki. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/tiddlywiki/e3fc8dd3-8791-4db0-9860-3ca129fcf26d%40googlegroups.com >> >> <https://groups.google.com/d/msgid/tiddlywiki/e3fc8dd3-8791-4db0-9860-3ca129fcf26d%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> >> >> > -- > 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 [email protected] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > Visit this group at https://groups.google.com/group/tiddlywiki. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywiki/c19bf7dd-d88c-4160-8ce6-1a16b6fffba0%40googlegroups.com > > <https://groups.google.com/d/msgid/tiddlywiki/c19bf7dd-d88c-4160-8ce6-1a16b6fffba0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e5372b09-1e66-4577-b7d4-d46c89f005fd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

