Modify

Opened 5 years ago

Closed 5 years ago

#4907 closed defect (fixed)

Mixing Trac headlines and numbered headlines yields strange results

Reported by: kontakt at meitzner dot net Owned by: martin_s
Priority: normal Component: NumberedHeadlinesPlugin
Severity: minor Keywords:
Cc: rjollos Trac Release: 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 =
## First numbered heading ##start=1,depth=1

Attachments (0)

Change History (5)

comment:1 Changed 5 years ago by rjollos

  • Cc ryano@… added

comment:2 Changed 5 years ago by rjollos

  • Cc rjollos added; ryano@… removed

comment:3 Changed 5 years ago by martin_s

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

comment:4 Changed 5 years ago by martin_s

  • Status changed from new to 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 =
## First numbered heading ##
### sub ###

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

= Another title-like headline, unnumbered and does not reset numbers =
## Headline ##
### 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>
<h2> 1. Headline </h2>
<h3> 1.1. sub </h3>

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

Displayed as HTML:

Document Title

1. First numbered heading

1.1. sub

Another title-like headline, unnumbered but resets numbers

1. Headline

1.1. sub

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

2. Headline

2.1. sub

comment:5 Changed 5 years ago by martin_s

  • Resolution set to fixed
  • Status changed from assigned to closed

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.