Plugin TableOfContents | jenyay.net

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.

TableOfContents 1.0.4 (Required OutWiker version: 1.8 - 2.1.0.834)

TableOfContents 1.3.1 (Required OutWiker version: 3.2.0.922 and 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:).

Versions history

1.3.1 (May 03, 2023)

  • Migrate to new API.

1.3 (October 19, 2019)

  • Migrate to new API.

1.2 (August 26, 2018)

  • Add German localization.

1.1.1 (June 16, 2018)

  • Fix errors.

1.1 (February 15, 2018)

  • Add OutWiker 2.1 support. Migrate to Python 3.

1.0.4 (October 17, 2016)

  • Added OutWiker 2.0 supporting.

1.0.3 (August 20, 2016)

  • Added the Swedish translation.

1.0.2 (January 20, 2015)

  • Bug fixes.

1.0.1 (September 11, 2014)

  • Updated the Italian localization.

1.0 (August 30, 2014)

  • The first version.

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

Рейтинг 1.0/5. Всего 1 голос(а, ов)