Plugin TableOfContents

TableOfContents plugin search the headings on the page and build table of contents. If heading contains an anchor then items of the table of contents will be links on the anchors.

Download (version 1.0.4)
Required OutWiker version: 1.8.0.731 or above

Using

TableOfContents plugin give two way to create a table of contents. First way is to insert wiki command (:toc:) on the page. In that case the table of contents will be rebuild by every rendering of the page.

If you do not like the table of contents which create command (:toc:) then you can to use the menu item "Wiki - Table of contents - Generate". In that case will be created the table of contents as wiki notation which you can change.

Consider a few examples.

Table of contents without links

Let the page contains a follow struct:

!! Intro
...
!! Chapter 1
...
!!! Section 1.1
...
!!! Section 1.2
...
!! Chapter 2
...
!! Resume

If you select menu item "Wiki - Table of contents - Generate" then in page the following text will be inserted:

* Intro
* Chapter 1
** Section 1.1
** Section 1.2
* Chapter 2
* Resume

As a result the table of contents will look like

Similat result can with (:toc:) wiki command.

Links in the table of contents

If headings contains anchors then TableOfContents plugin create the links on this anchors in table. The anchors can be in the following positions relative to heading:

  • direct before the tags !!...
  • right after the tags !!...
  • after heading

These occurrences shown in the following example:

!! [[#intro]] Intro
...
!! [[#chapter1]] Chapter 1
...
[[#section1_1]]
!!! Section 1.1
...
[[#section1_2]]
!!! Section 1.2
...
!! [[#chapter1]] Chapter 2
...
!! Resume [[#resume]]

For this struct of the page the table of contents will be as follow:

* [[Intro -> #intro]]
* [[Chapter 1 -> #chapter1]]
** [[Section 1.1 -> #section1_1]]
** [[Section 1.2 -> #section1_2]]
* [[Chapter 2 -> #chapter1]]
* [[Resume -> #resume]]

All headings will be as the links:

Similarly will be the result of the command (:toc:).

Version History

1.0.4 (October 17, 2016)

  • Added OutWiker 2.0 supporting.

1.0.3 (August 20, 2016)

  • Added the Swedish translation.

1.0.2 (20.01.2015)

  • Bug fixes.

1.0.1 (11.09.2014)

  • Updated the Italian localization.

1.0 (30.08.2014)

  • The first version.

Вы можете подписаться на новости сайта через RSS, Группу Вконтакте или Канал в Telegram.
0 stars Пока еще нет оценок