Changes between Version 12 and Version 13 of NumberedHeadlinesPlugin


Ignore:
Timestamp:
Oct 26, 2009, 3:51:40 AM (15 years ago)
Author:
Martin Scharrer
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NumberedHeadlinesPlugin

    v12 v13  
    3636The following options can be added to select if
    3737 * headlines in outlines (`PageOutline`, TocMacro) should be numbered (#4521, #5241)
    38  * CSS should be used for the numbering
    3938 * numbering should start at the second level (`##`/`h2`) not at the first level (#4907)
    4039
     
    4342[numberedheadlines]
    4443numbered_outline      = true
    45 use_css_for_numbering = true
    4644numbering_starts_at_level_two = false
    4745}}}
     
    6462
    6563== Example ==
     64
     65=== Normal Usage ===
     66
    6667The following wiki text:
    6768{{{
     
    106107}}}
    107108
     109However with the config options `numbering_starts_at_level_two = true` it will be displayed without the first level numbers:
     110
     111{{{
     112#!html
     113<div style="border: thin solid ; padding-left: 1cm; width: 30em">
     114<h1>Introduction</h1>
     115<h1>Chapter 1</h1>
     116<h2>1. Section 1.1</h2>
     117<h3>1.1. Subsection 1.1.1</h3>
     118<h4>1.2. Subsection 1.1.2</h3>
     119<h2>2. Section 1.2</h2>
     120<h3>2.1. Subsection 1.2.1</h3>
     121<h3>Unnumbered</h3>
     122<h3>2.2. Subsection 1.2.2</h3>
     123<h1>Chapter 2</h1>
     124<h2>1. Section 2.1</h2>
     125<h3>1.1. SubSubsection 2.1.1</h3>
     126<h4>1.1.1. SubSubsection 2.1.1.1</h3>
     127<h5>1.1.1.1. Paragraph 2.1.1.1.1</h4>
     128<h6>1.1.1.1. Subparagraph 2.1.1.1.1</h5>
     129</div>
     130}}}
     131
     132=== User Specified Numbers ===
     133Since v0.2.1 leading zeros are ignored, which allows the use of numbered sections under an unnumbered chapter.
     134
     135This feature relates to ticket #4907.
     136
     137{{{
     138= Title =
     139## Section ##
     140## Section ##
     141}}}
     142is now displayed as:
     143{{{
     144#!html
     145<div style="border: thin solid ; padding-left: 1cm; width: 30em">
     146<h1> Title </h1>
     147<h2> 1. Section </h2>
     148<h2> 2. Section </h2>
     149</div>
     150}}}
     151
     152=== User Specified Numbers ===
     153Since v0.3 the numbers can be provided by the user to set or reset the counting.
     154The number are simply written before the headline text followed by a space.
     155
     156Single numbers set the value of the current level, while multiple numbers ('`1.2.3.`') set the values from the current level upwards.
     157Leading numbers as part of the headline text can be protected by using a dot followed by a space ('`. `') before them, e.g. '`## . 99 Red Balloons ##`'.
     158
     159This feature relates to ticket #4907.
     160
     161{{{
     162# First Chapter #
     163## First Section ##
     164## 5. Now Section Five  ##
     165## Next Section ##
     166## 2.5. Now Section Five in Chapter 2 ##
     167## Next Section ##
     168
     169# Next Chapter #
     170## Section ##
     171}}}
     172
     173will lead to the following numbering:
     174
     175{{{
     1761. First Chapter
     1771.1. First Section
     1781.5. Now Section Five
     1791.6. Next Section
     1802.5. Now Section Five in Chapter 2
     1812.6. Next Section
     182
     1833. Next Chapter
     1843.1 Section
     185}}}
     186
     187Headlines without an text but with a number will be not displayed at all (no HTML code generated), but the number is used as normal. This gives the user the possibility to change higher level heading numbers for following lower level headline without inserting empty headlines. Please note that for technical reasons there needs to be a space after the number and another one before the leading `#`, which makes two leading spaces.
     188
     189{{{
     190# 1.  #
     191## Section ##
     192# 2.  #
     193## Section ##
     194}}}
     195will produce:
     196{{{
     1971.1 Section
     1982.1 Section
     199}}}
    108200
    109201== Recent Changes ==