title: $:/core/macros/toc tags: $:/tags/Macro \define toc-caption() <$set name="tv-wikilinks" value="no"> <$transclude field="caption"> <$view field="title"/> \end \define toc-body(rootTag,tag,sort:"",itemClassFilter)
    <$list filter="""[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]"""> <$set name="toc-item-class" filter="""$itemClassFilter$""" value="toc-item-selected" emptyValue="toc-item">
  1. >> <$list filter="[all[current]toc-link[no]]" emptyMessage="<$link><$view field='caption'><$view field='title'/>"> <> <$list filter="""[all[current]] -[[$rootTag$]]"""> <$macrocall $name="toc-body" rootTag="""$rootTag$""" tag=<> sort="""$sort$""" itemClassFilter="""$itemClassFilter$"""/>
\end \define toc(tag,sort:"",itemClassFilter) <> \end \define toc-linked-expandable-body(tag,sort:"",itemClassFilter) <$set name="toc-state" value=<>> <$set name="toc-item-class" filter="""$itemClassFilter$""" value="toc-item-selected" emptyValue="toc-item">
  • >> <$link> <$reveal type="nomatch" state=<> text="open"> <$button set=<> setTo="open" class="tc-btn-invisible"> {{$:/core/images/right-arrow}} <$reveal type="match" state=<> text="open"> <$button set=<> setTo="close" class="tc-btn-invisible"> {{$:/core/images/down-arrow}} <> <$reveal type="match" state=<> text="open"> <$macrocall $name="toc-expandable" tag=<> sort="""$sort$""" itemClassFilter="""$itemClassFilter$"""/>
  • \end \define toc-unlinked-expandable-body(tag,sort:"",itemClassFilter) <$set name="toc-state" value=<>> <$set name="toc-item-class" filter="""$itemClassFilter$""" value="toc-item-selected" emptyValue="toc-item">
  • >> <$reveal type="nomatch" state=<> text="open"> <$button set=<> setTo="open" class="tc-btn-invisible"> {{$:/core/images/right-arrow}} <> <$reveal type="match" state=<> text="open"> <$button set=<> setTo="close" class="tc-btn-invisible"> {{$:/core/images/down-arrow}} <> <$reveal type="match" state=<> text="open"> <$macrocall $name="toc-expandable" tag=<> sort="""$sort$""" itemClassFilter="""$itemClassFilter$"""/>
  • \end \define toc-expandable(tag,sort:"",itemClassFilter)
      <$list filter="[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]"> <$list filter="[all[current]toc-link[no]]" emptyMessage="<>"> <>
    \end \define toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter) <$set name="toc-state" value=<>> <$set name="toc-item-class" filter="""$itemClassFilter$""" value="toc-item-selected" emptyValue="toc-item">
  • >> <$link> <$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}"> <$reveal type="nomatch" state=<> text="open"> <$button set=<> setTo="open" class="tc-btn-invisible"> {{$:/core/images/right-arrow}} <$reveal type="match" state=<> text="open"> <$button set=<> setTo="close" class="tc-btn-invisible"> {{$:/core/images/down-arrow}} <> <$reveal type="match" state=<> text="open"> <$macrocall $name="toc-selective-expandable" tag=<> sort="""$sort$""" itemClassFilter="""$itemClassFilter$"""/>
  • \end \define toc-unlinked-selective-expandable-body(tag,sort:"",itemClassFilter) <$set name="toc-state" value=<>> <$set name="toc-item-class" filter="""$itemClassFilter$""" value="toc-item-selected" emptyValue="toc-item">
  • >> <$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}} <$view field='caption'><$view field='title'/>"> <$reveal type="nomatch" state=<> text="open"> <$button set=<> setTo="open" class="tc-btn-invisible"> {{$:/core/images/right-arrow}} <> <$reveal type="match" state=<> text="open"> <$button set=<> setTo="close" class="tc-btn-invisible"> {{$:/core/images/down-arrow}} <> <$reveal type="match" state=<> text="open"> <$macrocall $name="""toc-selective-expandable""" tag=<> sort="""$sort$""" itemClassFilter="""$itemClassFilter$"""/>
  • \end \define toc-selective-expandable(tag,sort:"",itemClassFilter)
      <$list filter="[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]"> <$list filter="[all[current]toc-link[no]]" variable="ignore" emptyMessage="<>"> <>
    \end \define toc-tabbed-selected-item-filter(selectedTiddler) [all[current]field:title{$selectedTiddler$}] \end \define toc-tabbed-external-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText,missingText,template:"") <$tiddler tiddler={{$selectedTiddler$}}>
    <$linkcatcher to="$selectedTiddler$">
    <$macrocall $name="toc-selective-expandable" tag="""$tag$""" sort="""$sort$""" itemClassFilter=<>/>
    <$reveal state="""$selectedTiddler$""" type="nomatch" text=""> <$transclude mode="block" tiddler="$template$">

    <>

    <$transclude mode="block">$missingText$ <$reveal state="""$selectedTiddler$""" type="match" text=""> $unselectedText$
    \end \define toc-tabbed-internal-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText,missingText,template:"") <$linkcatcher to="""$selectedTiddler$"""> <$macrocall $name="toc-tabbed-external-nav" tag="""$tag$""" sort="""$sort$""" selectedTiddler="""$selectedTiddler$""" unselectedText="""$unselectedText$""" missingText="""$missingText$""" template="""$template$"""/> \end