Version 11 (modified by 15 years ago) (diff) | ,
---|
Table of Contents
Wiki syntax for numbered headlines
Description
This plug-in provides a new TracWiki syntax for numbered headlines (h1
-h6
HTML tags).
New Wiki Syntax
The wiki syntax for numbered headlines is a follows:
Instead of: == Unnumbered Headline == or == Unnumbered Headline ==#ownID write: ## Numbered Headline ## or ## Numbered Headline ##=ownID
You can mix both unnumbered and numbered headlines on the same wiki page. Headlines from first order (1x#
on each side) to sixth order (6x#
on each side) are supported. An own ID can be given by adding "=
idname", which should be an valid XHTML name.
Configuration
To enable this plugin put the following into your trac.ini
configuration file:
[components] tracnumberedheadlines.* = enabled
The following options can be added to select if
- headlines in outlines (
PageOutline
, TocMacro) should be numbered (#4521, #5241) - CSS should be used for the numbering
- numbering should start at the second level (
##
/h2
) not at the first level (#4907)
(Default values are shown)
[numberedheadlines] numbered_outline = true use_css_for_numbering = true numbering_starts_at_level_two = false
Bugs/Feature Requests
Existing bugs and feature requests for NumberedHeadlinesPlugin are here.
If you have any issues, create a new ticket.
Download
Download the zipped source from [download:numberedheadlinesplugin here].
Source
You can check out NumberedHeadlinesPlugin from here using Subversion, or browse the source with Trac.
Example
The following wiki text:
= Introduction = # Chapter 1 # ## Section 1.1 ## ### Subsection 1.1.1 ### ### Subsection 1.1.2 ### ## Section 1.2 ## ### Subsection 1.2.1 ### === Unnumbered === ### Subsection 1.2.2 ### # Chapter 2 # ## Section 2.1 ## ### SubSubsection 2.1.1 ### #### SubSubsection 2.1.1.1 #### ##### Paragraph 2.1.1.1.1 ##### ###### Subparagraph 2.1.1.1.1 ######
will be displayed like this:
Introduction
1. Chapter 1
1.1. Section 1.1
1.1.1. Subsection 1.1.1
1.1.2. Subsection 1.1.2
1.2. Section 1.2
1.2.1. Subsection 1.2.1
Unnumbered
1.2.2. Subsection 1.2.2
2. Chapter 2
2.1. Section 2.1
2.1.1. SubSubsection 2.1.1
2.1.1.1. SubSubsection 2.1.1.1
2.1.1.1.1. Paragraph 2.1.1.1.1
2.1.1.1.1. Subparagraph 2.1.1.1.1
Recent Changes
- 17125 by rjollos on 2018-04-14 09:09:35
-
TracNumberedHeadlinesPlugin 0.5: Conform to PEP8
- 15264 by rjollos on 2016-02-11 04:22:34
-
Remove unnecessary svn:mime-type on py files
svn:mime-type was set to "plain" for many files.
- 10976 by rjollos on 2011-12-01 10:26:01
-
Added plugin revision info to webadmin page.
(more)
Author/Contributors
Author: martin_s
Contributors: JoshuaH (Page Outline support, see #4521)