This question about Missing functionality: Answered
EditChapterPlugin and ExplicitNumberingPlugin are incompatible
EditChapterPlugin only recognizes headings of the form
---+
,
---++
, ...
But ExplicitNumberingPlugin requires the form
---#
,
---##
, ...
Editing a chapter with heading
---### foo
causes the number to become fixed (i.e., hard-coded) as
---+++0.0.1 foo
Playing around with the order of plugin loading didn't help:
- With the default (alphabetical) plugin order, the section don't get numbered
- With ExplicitNumberingPlugin evaluated first, the sections are numbered in view mode, but editing a chapter still causes the number to become hard-coded.
I think all that's needed is for EditChapterPlugin to recognize the additional
---#*
form. That isn't working, even though the release notes indicate "support for legacy heading markup like
"--------#####"
, but I can't figure out the code:
-
/lib/TWiki/Plugins/EditChapterPlugin/Core.pm
has three instances of "\+#"
. Should that be "\+\#"
since #
is interpreted as the start of a comment (at least it is in my text editor).
- two of those three instances appear as
"---+[\+#]"
. Does that mean a leading +
is assumed? Also shouldn't that be escaped as "\-\-\-\+"
since those are special purpose characters in regular expressions?
In the meantime, I'm using a work-around based on
TWiki:Sandbox/NumberedHeadingsWithNesting, but I can't let it generate the plus signs in the headers for EditChapterPlugin:
- include this comment in the topic
<!-- Define variables with formulae for different levels, hidden in HTML comments (start at 2!):
* Set NH2 = %CALC{$SETM(nh2,+1) $SET(nh3,0) $GET(nh2).}%
* Set NH3 = %CALC{$SETM(nh3,+1) $SET(nh4,0) $GET(nh2).$GET(nh3).}%
* Set NH4 = %CALC{$SETM(nh4,+1) $SET(nh5,0) $GET(nh2).$GET(nh3).$GET(nh4).}%
* Set NH5 = %CALC{$SETM(nh5,+1) $GET(nh2).$GET(nh3).$GET(nh4).$GET(nh5).}%
* Initialize values: %CALC{$SET(nh2,0) $SET(nh3,0) $SET(nh4,0) $SET(nh5,0)}%
-->
- Then use headers like:
---++ %NH2%
---+++ %NH3%
---++++ %NH4%
---+++++ %NH5%
This is fixed in the recent release of ExplicitNumberingPlugin. It was released for testing on 3 March 2009. The plugin now removes any <textarea> elements prior to rendering the headings. Please open a new Task against ExplicitNumberingPlugin if this is still an issue.
-- GeorgeClark - 12 Mar 2009