If you see tags such as %SECTION0% on the next line, read TocPlugin

This topic describes the facilities provided by the TOC Plugin for the support of documentation generation. The extensions support definition of an order among the topics in the web for the generation of tables of contents, together with cross-references that operate within, as well as between, topics.

Installation of the Plugin is straightforward. Simply unpack the tar file at the top level of your installation.

The documentation extensions depend on the existance of a special topic called WebOrder, which is is analagous to a Framemaker "book". This topic should contain a list of the topics you want included. This list must be formatted as a wiki-format bulleted list e.g.
   * PageOne
   * [[Page two]]
Both WikiWords and [[Odd Wiki Words]] may be used to refer to topics.

NOTES
  • The WebOrder can contain any other TML or HTML formatting but it should be noted that all TML-format list bullets in the topic are taken as part of the ordering list.

Following the TWiki standard, attributes are used to pass values to tags to control their behaviour. Attributes are given as a list of name = value pairs enclosed in curly braces {} after the tag name. For example:
%REF{type=Figure,topic="SpidersOfTheWorld",name="The Funnel Web"}%

NOTES
  • Attribute values that contain only no spaces or punctuation need not be quoted, but values containing punctuation or white space must be protected by double quotes. You are highly recommended to stick to values that don't require quoting! All attribute names and values are case sensitive.

Supported attributes: name

Subsections may be inserted in any topic using the SECTIONn tag, where n is the required subsection level. The heading of the section is taken as all text after the tag up to the end of line. For example, the heading at the top of this section is marked with
%SECTION1{name=SECTION}% Creating sections using the =SECTION= tag

NOTES
  • See also Bad REF: Current topic not in WebOrder for information about modifying section numbering from the WebOrder topic.
  • Sections do not have to be named, but if they are not then they can only be referred to by knowing the exact section number. Section names must be unique within the topic.
  • The only way to close a section is to start a new section with a different level, or to end the topic.
  • You can still use standard HTML heading tags such as <H1>, but sections marked this way will not be included in the table of contents.

If a %SECTION0% tag occurs in a topic, the heading of that section will replace the topic name in the table of contents.

NOTES
  • The name attribute cannot be used to refer to a %SECTION0% tag.

Supported attributes: depth topic

You can build a table of contents by inserting
%CONTENTS%
in a topic. The first level of the table of contents is normally the topics in the order of the list in WebOrder, though see Bad REF: Current topic not in WebOrder for information about modifying section numbering from the WebOrder topic. Subsections listed in the table are automatically linked to the target SECTION.

  • The topic attribute may be used to generate a table of contents for just one topic.
  • The depth attribute may be used to set the maximum number of levels to generate.

Bad topic TocPluginHelp

Supported attributes: none

Any topic (but most usually the WebOrder topic) may include the
%TOCCHECK%
tag. This causes the entries in the WebOrder topic to be cross-referenced against the files actually stored in the web (see WebIndex). Any topics which exist as files in the web but are missing from the WebOrder will be listed.

NOTES
  • Any topics that begin with the characters "Web" are special topics and are excluded from the list, though they can still be listed in the WebOrder and will appear in the table of contents.

The following topics were not found in the WebOrder:
  1. ACRONYM
  2. AccessControl
  3. AdminDocumentationCategory
  4. AdminSkillsAssumptions
  5. AdminToggle
  6. AdminToolsCategory
  7. AppendixCascadingStyleSheets
  8. AutoViewTemplatePlugin
  9. BeginnersStartHere
  10. BookView
  11. BookmakerPlugin
  12. BulkRegistration
  13. BulkResetPassword
  14. CacheContrib
  15. Category
  16. ChangeEmailAddress
  17. ChangePassword
  18. ClassMethod
  19. CommandAndCGIScripts
  20. CommentPlugin
  21. CommentPluginTemplate
  22. CompareRevisionsAddOn
  23. CompareRevisionsAddonPlugin
  24. CompleteDocumentation
  25. ConfigurePlugin
  26. Contribs
  27. ContributedAddOns
  28. CountryList
  29. DataForms
  30. DefaultPreferences
  31. DefaultPreferencesForm
  32. DefaultUserRegistration
  33. DefaultWebStatistics
  34. DeveloperDocumentationCategory
  35. DevelopingPlugins
  36. DocumentGraphics
  37. EditRowPlugin
  38. EditRowPluginExamples
  39. EditTablePlugin
  40. EditingShorthand
  41. EmptyPlugin
  42. EnhancementRequests
  43. ExampleTopicTemplate
  44. FAQAnApplicationWithWikiForm
  45. FAQDeleteOrRenameATopic
  46. FAQDeleteOrRenameAnAttachment
  47. FAQDownloadSources
  48. FAQEditDoesNotIncreaseTheRevision
  49. FAQEditTemplate
  50. FAQForm
  51. FAQGnuGeneralPublicLicense
  52. FAQHiddenUsersAndGroups
  53. FAQRebuildingWikiUsersTopic
  54. FAQSearchDoesNotWork
  55. FAQSimultaneousEdits
  56. FAQTemplate
  57. FAQTroubleshootingExtensions
  58. FAQViewTemplate
  59. FAQWhatIsWikiWiki
  60. FAQWhyYouAreAskedToConfirm
  61. FamFamFamContrib
  62. FamFamFamFlagIcons
  63. FamFamFamFoswikiExtras
  64. FamFamFamMiniIcons
  65. FamFamFamMintIcons
  66. FamFamFamSilkCompanion1Icons
  67. FamFamFamSilkCompanion2Icons
  68. FamFamFamSilkGeoSilkIcons
  69. FamFamFamSilkIcons
  70. FastCGIEngineContrib
  71. FileAttachment
  72. FileAttribute
  73. FormatTokens
  74. FormattedSearch
  75. FoswikiServerInformation
  76. FrequentlyAskedQuestion
  77. FrequentlyAskedQuestions
  78. GlossaryOfTerms
  79. GoBox
  80. GoodStyle
  81. HierarchicalNavigation
  82. HierarchicalNavigationChildExample
  83. HistoryPlugin
  84. HomePagePlugin
  85. IfStatements
  86. ImagePlugin
  87. IncludeTopicsAndWebPages
  88. InstallationGuide
  89. InstallationGuidePart2
  90. InstalledPlugins
  91. InstantEnhancements
  92. InterWikis
  93. InterwikiPlugin
  94. JEditableContrib
  95. JQueryAjaxHelper
  96. JQueryAutocomplete
  97. JQueryBgiframe
  98. JQueryBlockUI
  99. JQueryButton
  100. JQueryChili
  101. JQueryCodingStandards
  102. JQueryCookie
  103. JQueryCorner
  104. JQueryCycle
  105. JQueryDebug
  106. JQueryEasing
  107. JQueryEmpty
  108. JQueryFarbtastic
  109. JQueryFluidFont
  110. JQueryFocus
  111. JQueryFontAwesome
  112. JQueryForm
  113. JQueryFoswiki
  114. JQueryGradient
  115. JQueryHoverIntent
  116. JQueryI18N
  117. JQueryInnerFade
  118. JQueryLiveQuery
  119. JQueryLoader
  120. JQueryLocalScroll
  121. JQueryMaskedInput
  122. JQueryMasonry
  123. JQueryMedia
  124. JQueryMetadata
  125. JQueryMigrate
  126. JQueryPNotify
  127. JQueryPlaceholder
  128. JQueryPlugin
  129. JQueryPopUpWindow
  130. JQueryQueryObject
  131. JQueryRating
  132. JQueryRender
  133. JQueryScrollTo
  134. JQuerySerialScroll
  135. JQueryShake
  136. JQueryShrinkUrls
  137. JQuerySimpleModal
  138. JQuerySlimbox
  139. JQueryStars
  140. JQuerySuperfish
  141. JQuerySupersubs
  142. JQueryTabpane
  143. JQueryTextboxList
  144. JQueryTmpl
  145. JQueryTooltip
  146. JQueryTreeview
  147. JQueryUI
  148. JQueryUIAutocomplete
  149. JQueryUIDialog
  150. JQueryUITooltip
  151. JQueryValidate
  152. JQueryWikiWord
  153. JSCalendarContrib
  154. JSCalendarContribInline
  155. JSTreeContrib
  156. JavascriptFiles
  157. JsonRpcContrib
  158. LanguageSelector
  159. Macros
  160. MacrosQuickReference
  161. MailerContrib
  162. MailerContribPlugin
  163. MainFeatures
  164. ManagingTopics
  165. ManagingUsers
  166. ManagingWebs
  167. MetaData
  168. ModPerlEngineContrib
  169. NatEditHelpText
  170. NatEditPlugin
  171. NatEditWordHelpText
  172. NewUserTemplate
  173. ObjectMethod
  174. OriginalDocumentGraphics
  175. PackageForm
  176. PageCaching
  177. ParentList
  178. PatternSkin
  179. PatternSkinCss
  180. PatternSkinCssCookbook
  181. PatternSkinCssCookbookCenterPage
  182. PatternSkinCssCookbookCenterPageBorder
  183. PatternSkinCssCookbookEditTableStyle
  184. PatternSkinCssCookbookFonts
  185. PatternSkinCssCookbookHideActions
  186. PatternSkinCssCookbookNoLeftBar
  187. PatternSkinCssCookbookNoTopBar
  188. PatternSkinCssCookbookSidebarBackground
  189. PatternSkinCssCookbookSidebarToggle
  190. PatternSkinCustomization
  191. PatternSkinElements
  192. PatternSkinGraphics
  193. PatternSkinHorizontalNavigationExample
  194. PatternSkinNavigation
  195. PatternSkinTheme
  196. PatternSkinTheme115
  197. PatternSkinTheme2009
  198. PatternSkinThemeFatWilly
  199. PatternSkinThemeFatWillyNavigation
  200. PendingRegistrations
  201. PendingRegistrationsTemplate
  202. PerlDependencyReport
  203. PerlDoc
  204. PlainFileStoreContrib
  205. PlainSkin
  206. Plugins
  207. PreferenceSettings
  208. PreferencesPlugin
  209. PreviewBackground
  210. PrintSkin
  211. ProjectContributor
  212. ProjectLogos
  213. PubLinkFixupPlugin
  214. PublishedAPI
  215. QuerySearch
  216. QuerySearchPatternCookbook
  217. RCSStoreContrib
  218. ReferenceManual
  219. RegularExpression
  220. ReleaseHistory
  221. ReleaseNotes01x00
  222. ReleaseNotes01x01
  223. ReleaseNotes02x00
  224. ReleaseNotes02x01
  225. RemoveUser
  226. RenameWeb
  227. RenderListPlugin
  228. ResetPassword
  229. SearchHelp
  230. SearchPatternCookbook
  231. SiteChanges
  232. SiteMap
  233. SitePermissions
  234. SiteToolStatistics
  235. SiteTools
  236. SkinBrowser
  237. SkinTemplateTokens
  238. SkinTemplateViewTemplate
  239. SkinTemplates
  240. Skins
  241. SlideShowPlugin
  242. SmiliesPlugin
  243. SpreadSheetPlugin
  244. StandardColors
  245. StaticMethod
  246. SubscribePlugin
  247. SystemRequirements
  248. TWikiCompatibilityPlugin
  249. TablePlugin
  250. TemplateTopics
  251. TemplateWeb
  252. TextEditor
  253. TimBernersLee
  254. TimeSpecifications
  255. TinyMCEFrequentlyAskedQuestions
  256. TinyMCEPlugin
  257. TinyMCEQuickHelp
  258. TipTopic001
  259. TipTopic002
  260. TipTopic003
  261. TipTopic004
  262. TipTopic005
  263. TipTopic006
  264. TipTopic007
  265. TipTopic008
  266. TipTopic009
  267. TipTopic010
  268. TipTopic011
  269. TipTopic012
  270. TipTopic013
  271. TipTopic014
  272. TipTopic015
  273. TipTopic016
  274. TipTopic017
  275. TipTopic018
  276. TipTopic019
  277. TipTopic020
  278. TipTopic021
  279. TipTopic022
  280. TipTopic023
  281. TipTopic024
  282. TipTopic025
  283. TipTopic026
  284. TipTopic027
  285. TipTopic028
  286. TipTopic029
  287. TipsContrib
  288. TipsOfTheDay
  289. TipsOfTheDayAddNew
  290. TipsOfTheDayAdmin
  291. TipsOfTheDayInclude
  292. TipsOfTheDayTemplate
  293. TipsTopics
  294. TocPluginHelp
  295. TopicClassification
  296. TopicDoesNotExistViewTemplate
  297. TopicMarkupLanguage
  298. TopicTitlePlugin
  299. TopicUserMappingContrib
  300. TopicsAndWebs
  301. TreePlugin
  302. TreePluginBookviewOutlineSample
  303. TreePluginHeadingOutlineSample
  304. TreePluginSamples
  305. TwentyMinuteTutorial
  306. TwistyPlugin
  307. UpdatesPlugin
  308. UpgradeGuide
  309. UserAuthentication
  310. UserDocumentationCategory
  311. UserForm
  312. UserFormHelp
  313. UserName
  314. UserRegistration
  315. UserRegistrationParts
  316. UserSetting
  317. UserToolsCategory
  318. UsersGuide
  319. UsersTemplate
  320. UsingHTML
  321. VarACTIVATEDPLUGINS
  322. VarADDTOHEAD
  323. VarADDTOZONE
  324. VarALLVARIABLES
  325. VarATTACHURL
  326. VarATTACHURLPATH
  327. VarAUTHREALM
  328. VarBASETOPIC
  329. VarBASEWEB
  330. VarBUTTON
  331. VarCALC
  332. VarCALCULATE
  333. VarCOMMENT
  334. VarCOVER
  335. VarDATE
  336. VarDISPLAYTIME
  337. VarEDITTABLE
  338. VarENCODE
  339. VarENDCOLOR
  340. VarENDINCLUDE
  341. VarENDSECTION
  342. VarENDTAB
  343. VarENDTABPANE
  344. VarENDTWISTY
  345. VarENDTWISTYTOGGLE
  346. VarENV
  347. VarEXAMPLETAG
  348. VarEXPAND
  349. VarFAILEDPLUGINS
  350. VarFORMAT
  351. VarFORMFIELD
  352. VarGMTIME
  353. VarGROUPINFO
  354. VarGROUPS
  355. VarHISTORY
  356. VarHOMETOPIC
  357. VarHTTP
  358. VarHTTPHOST
  359. VarHTTPS
  360. VarICON
  361. VarICONURL
  362. VarICONURLPATH
  363. VarIF
  364. VarINCLUDE
  365. VarINCLUDINGTOPIC
  366. VarINCLUDINGWEB
  367. VarJQICON
  368. VarJQICONPATH
  369. VarJQPLUGINS
  370. VarJQREQUIRE
  371. VarJQTHEME
  372. VarLANG
  373. VarLANGUAGE
  374. VarLANGUAGES
  375. VarLOCALSITEPREFS
  376. VarLOGIN
  377. VarLOGOUT
  378. VarMAINWEB
  379. VarMAKETEXT
  380. VarMETA
  381. VarMETASEARCH
  382. VarNONCE
  383. VarNOP
  384. VarNOTIFYTOPIC
  385. VarPERLDEPENDENCYREPORT
  386. VarPLUGINDESCRIPTIONS
  387. VarPLUGINVERSION
  388. VarPOPUPWINDOW
  389. VarPUBURL
  390. VarPUBURLPATH
  391. VarQUERY
  392. VarQUERYPARAMS
  393. VarQUERYSTRING
  394. VarREMOTEADDR
  395. VarREMOTEPORT
  396. VarREMOTEUSER
  397. VarRENDERLIST
  398. VarRENDERZONE
  399. VarREVARG
  400. VarREVINFO
  401. VarREVTITLE
  402. VarSCRIPTNAME
  403. VarSCRIPTSUFFIX
  404. VarSCRIPTURL
  405. VarSCRIPTURLPATH
  406. VarSEARCH
  407. VarSERVERINFORMATION
  408. VarSERVERTIME
  409. VarSESSIONID
  410. VarSESSIONVAR
  411. VarSESSIONVARIABLE
  412. VarSET
  413. VarSHOWPREFERENCE
  414. VarSKIN
  415. VarSLIDESHOWEND
  416. VarSLIDESHOWSTART
  417. VarSPACEDTOPIC
  418. VarSPACEOUT
  419. VarSTARTINCLUDE
  420. VarSTARTSECTION
  421. VarSTATISTICSTOPIC
  422. VarSTOPINCLUDE
  423. VarSTOPSECTION
  424. VarSUBSCRIBE
  425. VarSYSTEMWEB
  426. VarTAB
  427. VarTABLE
  428. VarTABPANE
  429. VarTOC
  430. VarTOPIC
  431. VarTOPICLIST
  432. VarTREEVIEW
  433. VarTWIKIWEB
  434. VarTWISTY
  435. VarTWISTYBUTTON
  436. VarTWISTYHIDE
  437. VarTWISTYSHOW
  438. VarTWISTYTOGGLE
  439. VarURLPARAM
  440. VarUSERINFO
  441. VarUSERNAME
  442. VarUSERSWEB
  443. VarVAR
  444. VarWEB
  445. VarWEBLIST
  446. VarWEBPREFSTOPIC
  447. VarWIKIAGENTEMAIL
  448. VarWIKIAGENTNAME
  449. VarWIKIHOMEURL
  450. VarWIKINAME
  451. VarWIKIPREFSTOPIC
  452. VarWIKITOOLNAME
  453. VarWIKIUSERNAME
  454. VarWIKIUSERSTOPIC
  455. VarWIKIVERSION
  456. VarWIKIWEBMASTER
  457. VarWIKIWEBMASTERNAME
  458. WYSIWYG
  459. WelcomeGuest
  460. WikiCulture
  461. WikiName
  462. WikiSyntaxSummary
  463. WikiWord
  464. WysiwygPlugin
  465. WysiwygPluginSettings
  466. WysiwygPluginTopicLister

Bookmarks and references can be inserted into text using the ANCHOR and REF tags. These can be used for references, for example, to tables or figures.

NOTES
  • Anchors and references only work within the current web; they cannot be used to create references between webs.

Supported attributes: type name display

The ANCHOR tag creates a jump target suitable for jumping to from somewhere else. The type adds the anchor to a "group"; this group is required when generating a reference to the anchor, and may be used to generate tables of same-type anchors (see Bad REF: Current topic not in WebOrder below). The type can be any name, though convention suggests the use of types such as Figure and Table. The special group Section is used internally to refer to sections and subsections. Avoid using it for an ANCHOR or you may see strange results.

The ANCHOR tag is normally visible in the output, though it may be made invisible by setting the display attribute to no . For example:
%ANCHOR{type=Figure,name=A,display=no}% Here be sea
monsters
will generate an invisible anchor on the text (there's one one the line above, honest!) and
<A name="#Figure_A"> </A>
%ANCHOR{type=Table,name=A}% A wooden table
will generate:

All the text between the anchor and the next end-of-line will be used to create the anchor. If the anchor is invisible, this text will be invisible too.

Supported attributes: type topic name

The REF tag may be used to refer to an anchor. Anchors are automatically inserted by SECTION tags or may be added using the ANCHOR tag. For a REF tag to work, the type of the target must be known. For example:
See %REF{type=Example,name=WebOrder}% for more information about WebOrder
will generate:

See Bad REF: Current topic not in WebOrder for more information about WebOrder

To refer to anchors in a different topic, use the topic attribute. You can refer to sections by name by using the special type Section e.g. %REF{type=Section,name=TOCCHECK}%.

If you refer to a non-existant anchor you are warned: for example,
%REF{type=Reference,name=NonExistantAnchor}%
generates

Bad REF: Current topic not in WebOrder

Supported attributes: type

The REFTABLE tag can be used to build tables of references based on the type assigned to anchors. For example, if you have a lot of anchors of type Example you can build a table of all these anchors thus:
%REFTABLE{type=Example}%
This will insert a table like this:
Example

and
%REFTABLE{type=Figure}%
will insert a table like this:
Figure

All topics listed in the WebOrder are scanned, but only anchors of the requested type will be listed.

NOTES
  • If you use REFTABLE with the type Section the table will contain a list of all named sections. For example

When using the WebOrder special topic to collect a list of topics into a somewhat "linearized" form (a "book"), it is often very convenient to be able to add navigation buttons to the previous and the next pages as well as to the home page (table of contents). This can be done by adding the %TOCBUTTONS% tag to your pages. For example, you can use it in a template which is included either at the top or the bottom of your pages. The included "view.tocbuttons.tmpl" template (intended to be used with NatSkin) adds the %TOCBUTTONS% tag to the content footer of all pages in the web. To activate it, use "* set SKIN = tocbuttons, nat" in your WebPreferences.

Note that the "Prev", "Home" and "Next" links will be added only for such topics that are listed in the WebOrder special topic, and they will only be inserted when viewing a page, i. e. they will for example not show up when printing such a topic or the whole "book".

It is possible to change the way the table of contents for the web is ordered by using extra levels of indent in the WebOrder. If you indent a topic below another topic, then that topic will be treated as a section of the parent topic. Section numbers within the subtopic are adjusted accordingly. For example, say the WebOrder contains
	* [[Top level topic]]
	* AnotherTopLevelTopic
TopLevelTopic will be numbered 1., and the first SECTION1 within TopLevelTopic will be 1.1. AnotherTopLevelTopic will be numbered 2. If, instead, WebOrder contains
	* [[Top level topic]]
		* [[Second level topic]]
	* AnotherTopLevelTopic
TopLevelTopic will still be numbered 1., but now SecondLevelTopic will be numbered 1.1., and the first SECTION1 within SecondLevelTopic will be 1.1.1. The first SECTION1 within TopLevelTopic will now be numbered 1.2. AnotherTopLevelTopic will still be numbered 2.

  • Include a %TOCCHECK% tag at the end of the table of contents topic.
  • Name all sections. This makes it easier to refer to them by symbolic names rather than trying to REF numbered sections.

This topic: System > TocPluginHelp
Topic revision: 15 Apr 2011, UnknownUser
Copyright 2020 Sheriff Cyber Security, LLC. All rights reserved.