title: $:/core/macros/toc tags: $:/tags/Macro \whitespace trim \procedure toc-open-icon() $:/core/images/down-arrow \procedure toc-closed-icon() $:/core/images/right-arrow \function tf.makeTocState() [[$:/state/toc]addsuffixaddsuffix[/]addsuffix] \procedure toc-caption() <$set name="tv-wikilinks" value="no"> <$transclude field="caption"> <$view field="title"/> \end \function tf.newPath() [addsuffix[/]addsuffix] \procedure toc-body(tag,sort:"",itemClassFilter,exclude,path)
    <$list filter=`[all[shadows+tiddlers]tag!has[draft.of]$(sort)$] -[] -[subfilter]`> <$let item=<> path=<> > <$set name="excluded" filter="[subfilter] []">
  1. >> <% if [all[current]toc-link[no]] %> <> <% else %> <$link to={{{ [get[target]else] }}}><> <% endif %> <$macrocall $name="toc-body" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<>/>
\end \procedure toc(tag,sort:"",itemClassFilter:"", exclude) <$macrocall $name="toc-body" tag=<> sort=<> itemClassFilter=<> exclude=<>/> \end \procedure toc-item(isUnlinked:"") <$reveal type="nomatch" stateTitle=<> text="open"> <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> <$transclude tiddler=<> /> <% if [match[yes]] %> <> <% endif %> <$reveal type="match" stateTitle=<> text="open"> <$button setTitle=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> <$transclude tiddler=<> /> <% if [match[yes]] %> <> <% endif %> \end \procedure toc-linked-expandable-body(tag,sort:"",itemClassFilter,exclude,path) <$qualify name="toc-state" title=<> >
  • >> <$link to={{{ [get[target]else] }}}> <> <> <$reveal type="match" stateTitle=<> text="open"> <$macrocall $name="toc-expandable" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<>/>
  • \end \procedure toc-unlinked-expandable-body(tag,sort:"",itemClassFilter,exclude,path) <$qualify name="toc-state" title=<>>
  • >> <> <$reveal type="match" stateTitle=<> text="open"> <$macrocall $name="toc-expandable" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<>/>
  • \end \procedure toc-expandable-empty-message() <$macrocall $name="toc-linked-expandable-body" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<>/> \end \procedure toc-expandable(tag,sort:"",itemClassFilter:"",exclude,path) <$let path=<>> <$set name="excluded" filter="[subfilter] []">
      <$list filter=`[all[shadows+tiddlers]tag!has[draft.of]$(sort)$] -[] -[subfilter]`> <$list filter="[all[current]toc-link[no]]" emptyMessage=<> > <$macrocall $name="toc-unlinked-expandable-body" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<> />
    \end \procedure toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter,exclude,path) <$qualify name="toc-state" title=<>>
  • >> <$link to={{{ [get[target]else] }}}> <$list filter=`[all[current]tagging[]$(sort)$] -[subfilter] +[limit[1]]` variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}"> <> <> <$reveal type="match" stateTitle=<> text="open"> <$macrocall $name="toc-selective-expandable" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<>/>
  • \end \function tf.toc-getItemClass() [get[text]matchthen[toc-item-selected]else[toc-item]] \procedure toc-unlinked-selective-expandable-body(tag,sort:"",itemClassFilter,exclude,path) <$qualify name="toc-state" title=<> >
  • >> <$list filter=`[all[current]tagging[]$(sort)$] -[subfilter] +[limit[1]]` variable="ignore" emptyMessage="""<$button class="tc-btn-invisible">{{$:/core/images/blank}}<>""" > <> <$reveal type="match" stateTitle=<> text="open"> <$macrocall $name="toc-selective-expandable" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<>/>
  • \end \procedure toc-selective-expandable-empty-message() <$macrocall $name="toc-linked-selective-expandable-body" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<>/> \end \procedure toc-selective-expandable(tag,sort:"",itemClassFilter,exclude,path) <$let tag=<> sort=<> itemClassFilter=<> path=<>> <$set name="excluded" filter="[subfilter] []">
      <$list filter=`[all[shadows+tiddlers]tag!has[draft.of]$(sort)$] -[] -[subfilter]`> <$list filter="[all[current]toc-link[no]]" variable="ignore" emptyMessage=<> > <$macrocall $name="toc-unlinked-selective-expandable-body" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<> />
    \end \procedure toc-tabbed-external-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText,missingText,template:"",exclude) <$tiddler tiddler={{{ [get[text]] }}}>
    <$linkcatcher to=<>>
    <$macrocall $name="toc-selective-expandable" tag=<> sort=<> itemClassFilter="[all[current]] -[get[text]]" exclude=<> />
    <$reveal stateTitle=<> type="nomatch" text=""> <$transclude mode="block" tiddler=<