Ozgur Ugras BARAN wrote:
On 5/10/07, Abdelrazak Younes <[EMAIL PROTECTED]> wrote:

If you want something to play with, it would be nice if we update the
TocBackend to support Paragraph layout too.



OK, sure. Tell me what has to be done.

There is a bug reproted this morning by Bennett which is related to that (titled fatal Paragraph-bug in LyX150 (OS X)).

Also here is a report from helge and my answer to him:

Helge Hafting wrote:
> This has become a very nice tool!  Still, I see a problem:
>
> 1. Select some heading in the userguide.
> 2. Demote it so much that it is no longer numbered.
> 3. Note that it is now no longer electible for promotion, so
>    no way to undo the effect manually.
>
> It isn't supposed to be like that, is it?
> I suggest that one shouldn't be allowed to demote down to a level
> from which promotion isn't possible. Or alterntatively, allow
> promotion of lower levels.

I agree. If so wants to look at this problem, I think the relevant portion od code is in TocBackend::update():


/// now the toc entry for the paragraph
int const toclevel = pit->layout()->toclevel;
if (toclevel != Layout::NOT_IN_TOC
    && toclevel >= min_toclevel
    && toclevel <= bufparams.tocdepth) {
    // insert this into the table of contents
    if (tocstring.empty())
        tocstring = pit->asString(*buffer_, true);
    toc.push_back(
        TocItem(pit, toclevel - min_toclevel, tocstring));
}


I guess we should not check for (toclevel <= bufparams.tocdepth).

Abdel.

Reply via email to