More method for numeric
tomaszx - April 23, 2008 - 12:54
| Project: | Table of Contents |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | AlexisWilke |
| Status: | closed |
Jump to:
Description
Hi.
I think that should be able to select method of numeric:
Example
1.
2.
1.
2.or
1. aaa
1.1 from aaa
2. bbb
2.1 from bbb
2.2 from bbb
2.2.1 from from bbb
#1
Unfortunately, there is no way to do your second style with CSS. If you want to change the style to something different, you could add something like this to style.css:
.toc-list ol {list-style-type: upper-roman;
}
w3schools has a good summary of valid CSS list types.
--Andrew
#2
Maybe try:
BODY {counter-reset: rozdzial; /* set main level to 0 */
}
H1:before {
content: "Rozdział " counter(rozdzial) ". ";
counter-increment: rozdzial; /* increment 1*/
}
H1 {
counter-reset: section; /* set section to 0 */
}
H2:before {
content: counter(rozdzial) "." counter(section) " ";
counter-increment: section;
}
or in php code but i dont have any ide how you are implement this :)
#3
Those CSS properties are really useful - thanks for pointing them out!
What you've posted would add numbered headings to headings automatically, which in itself is a useful feature. It would need to be limited so that it didn't number headings on inappropriate pages. The way I see it there are two pieces of functionality now:
I think only solutions using pure CSS should be considered acceptable, as changing the content headings themselves in the input filter could get messy really quickly.
If someone submits a patch with the above two features I'll be glad to take a look. I might get to this myself, but who knows when it will actually happen :)
--Andrew
#4
The problem is that those CSS do not work on all browsers. Whereas, adding the counters in PHP would work. That should be relatively easy to do also and I like it. We'll see...
Thank you.
Alexis
#5
This is done in PHP. Really, forget CSS for that sort of a thing!
It's in 3.x-dev Jul 5, 2009.
Thank you.
Alexis Wilke
#6
Automatically closed -- issue fixed for 2 weeks with no activity.