Changes between Version 37 and Version 38 of TocMacro


Ignore:
Timestamp:
Jan 2, 2009, 4:15:41 PM (6 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TocMacro

    v37 v38  
     1[[TOC(TracGuide, TracInstall, TracUpgrade, TracIni, TracAdmin, TracBackup, TracLogging, TracPermissions, TracWiki, WikiFormatting, TracBrowser, TracRoadmap, TracChangeset, TracTickets, TracReports, TracQuery, TracTimeline, TracRss, TracNotification)]]
     2
     3= Table of Contents Macro =
     4
     5== Description ==
     6
     7The TocMacro generates a table of contents for the current page or a set of pages.
     8
     9If no arguments are given, a table of contents is generated for the current page, with the top-level title stripped:
     10
     11{{{
     12[[TOC]]
     13}}}
     14
     15To generate a table of contents for a set of pages, simply pass them as comma separated arguments to the TOC macro. This is the macro call for the table of contents visible on the right side of this page:
     16
     17{{{
     18[[TOC(TracGuide, TracInstall, TracUpgrade, TracIni, TracAdmin, TracBackup, TracLogging,
     19TracPermissions, TracWiki, WikiFormatting, TracBrowser, TracRoadmap, TracChangeset,
     20TracTickets, TracReports, TracQuery, TracTimeline, TracRss, TracNotification)]]
     21}}}
     22
     23
     24A wildcard '*' can be used to fetch a sorted list of all pages starting with the preceding pagename stub (Since [2801]):
     25
     26{{{
     27[[TOC(Trac*, WikiFormatting, WikiMacros)]]
     28}}}
     29
     30For 'titleindex' argument, an empty pagelist will evaluate to all pages (Since [2801]):
     31
     32{{{
     33[[TOC(titleindex, notitle, heading=All pages)]]
     34}}}
     35
     36'sectionindex' allows to generate a title index for all pages in a given section of the wiki. A section is defined by wiki page name, using '/' as a section level delimiter (like directories in a file system). Giving '/' or '*' as the page name produces the same result as 'titleindex' (title of all pages). If a page name ends with a '/', only children of this page will be processed. Else the page given in the argument is also included, if it exists. For 'sectionindex' argument, an empty pagelist will evaluate to all page below the same parent as the current page:
     37
     38{{{
     39[[TOC(sectionindex, notitle, heading=This section pages)]]
     40}}}
     41
     42The following ''control'' arguments change the default behaviour of the TOC macro (Since [22]):
     43
     44|| '''Argument''' || '''Meaning''' ||
     45|| `heading=<x>` || Override the default heading of "Table of Contents" or "Page Index" for titleindex. ||
     46|| `noheading` || Suppress display of the heading. ||
     47|| `depth=<n>` || Display headings of ''subsequent'' pages to a maximum depth of '''<n>'''. ||
     48|| `inline` || Display TOC inline rather than as a side-bar. ||
     49|| `sectionindex`|| Only display the page name and title of each page for all pages in a given section. (Since [3417]). ||
     50|| `titleindex`|| Only display the page name and title of each page, similar to TitleIndex. (Since [37]). ||
     51|| `notitle` || Supress display of page title (Since [2801]). ||
     52
     53== Bugs/Feature Requests ==
     54
     55Existing bugs and feature requests are [query:status!=closed&component=TocMacro&order=priority here]. If you have any issues, create a
     56[/newticket?component=TocMacro new ticket].
     57
     58== Installation ==
     59
     60Both 0.10 and 0.11 entries at Python Package Index (pypi) are not up-to-date with latest versions and dependencies. To install the most recent versions, use direct installation from source:
     61
     62{{{
     63easy_install http://trac-hacks.org/svn/tocmacro/0.10   # 0.10
     64easy_install http://trac-hacks.org/svn/tocmacro/0.11   # 0.11
     65}}}
     66
     67...or download / check out the source from repository (see below) and install it in usual manner.
     68
     69Do not forget to '''enable''' the '''macro''' in trac.ini (at least with 0.11 and 0.10.4) in the components section like this:
     70{{{
     71tractoc.* = enabled
     72}}}
     73
     74
     75== Download ==
     76
     77download:tocmacro
     78
     79TocMacro requires that AnchorPatch be applied to [wiki:0.8] Trac. Trac [wiki:0.9] already includes this patch.
     80
     81== Source ==
     82
     83You can check out the source for TocMacro from Subversion at http://trac-hacks.org/svn/tocmacro.
     84
     85== Example ==
     86
     87{{{
     88[[TOC(inline, heading=Trac Table of Contents, TracGuide, TracInstall, depth=2,
     89 TracLogging, depth=99, TracPermissions)]]
     90}}}
     91
     92On the right you can see the TOC macro version of the default !TracGuideToc macro.
     93
     94
     95== Change Log ==
     96
     97[[ChangeLog(/tocmacro, 3)]]
     98
     99== Author/Contributors ==
     100
     101'''Authors:''' [wiki:athomas], [wiki:jouvin], [wiki:coderanger], [wiki:cboos], [wiki:osimons]
     102
     103
     104