Opened 13 years ago

Closed 13 years ago

#4907 closed defect (fixed)

Reported by: Owned by: kontakt@… Martin Scharrer normal NumberedHeadlinesPlugin minor Ryan J Ollos 0.11

Description

When I want to use the first level Trac headline (=) as an unnumbered Title for the wiki page and then start numbered headings in the second level (##), skipping the first level (#), then The numbering of the second-level headlines starts with 0.1.

I would rather suspect the second level to sense that there is no upper-level numbering and start the numbering in the first level that uses the numbering, so the headline descrbes above would be numbered as 1. Lorem ipsum

Usually in a document I want the main title to be unnumbered. In OOo for example there is a seperate format "Title" which we don't have here.

Maybe it would be intersting anyways to allow users to influence the numbering via arguments to the plugin (like specifying the id). One could add a feature to re-start the numbering at any point, or to override the depth level to use.

In my case, this could look like

= Document Title =


comment:2 Changed 13 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; ryano@… removed

comment:3 Changed 13 years ago by Martin Scharrer

(In [6853]) Added option for numbering_starts_at_level_two. See #4907.

comment:4 Changed 13 years ago by Martin Scharrer

Status: new → assigned

Our idea of user settings looks good, but will require much more work. In the meanwhile use revision [6853] or later with numbering_starts_at_level_two = true in the config file. See NumberedHeadlinesPlugin#Configuration.

It changes the behavior globally so that the following wiki text:

= Document Title =
### sub ###

# Another title-like headline, unnumbered but resets numbers #
### sub ###

= Another title-like headline, unnumbered and does not reset numbers =
### sub ###


becomes equivalent to:

<h1> Document Title </h1>
<h2> 1. First numbered heading </h2>
<h3> 1.1. sub </h3>

<h1> Another title-like headline, unnumbered but resets numbers </h1>
<h3> 1.1. sub </h3>

<h1> Another title-like headline, unnumbered and does not reset numbers </h1>
<h3> 2.1. sub </h3>


Displayed as HTML:

Another title-like headline, unnumbered and does not reset numbers

comment:5 Changed 13 years ago by Martin Scharrer

Resolution: → fixed assigned → closed

As of [6856] there is the support to set headline numbers manually. Also leading zeros are ignored. This should resolve this ticket.

Modify Ticket

Change Properties