On Thu, Jan 18, 2007 at 06:59:10PM +0200, Martin Vermeer wrote:
> On Thu, Jan 18, 2007 at 05:02:20PM +0100, Jean-Marc Lasgouttes wrote:
> > >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
> > 
> > >> If you want to take in account branches (or more generally nested
> > >> textinset), you should do it completely, I can't believe it is so
> > >> difficult.
> > 
> > Martin> I think branches are the main problem. We don't really need to
> > Martin> see footnotes and the like in the ToC. But when using
> > Martin> branches, e.g., for translating to two languages, all of the
> > Martin> section header text will be inside one or the other branch
> > Martin> inset. There is nothing left and the ToC entry will be just
> > Martin> the number. This is IMHO the only thing that needs fixing.
> > 
> > I think it would be interesting to try to implement
> > insettext::addToTOC and make it add call the existing code
> > recursively. It is probably not that much work.
> 
> Probably so.
>  
> > Then you would have to specialize it for branch (exit early if
> > inactive) and maybe note (never output anything).
> 
> I suspect you would have to shortcircuit it for every collapsable inset that 
> is closed.
> 
> > This is the way I have been wanting to go for numbering, but I never
> > found the time to actually do it. I think it is much better than an
> > ad-hoc solution. 
> 
> This is not an ad-hoc solution. It is the ONLY solution that will put in ToC 
> entries
> for headers that are not inside a branch inset but CONTAIN one or more branch 
> insets.
> It's the solution to a different problem. And essentially a useability bug 
> fix... a ToC
> containing only numbers is unuseable for navigation or outlining.
> 
> > And I am sure there are people who put section
> > headers in minipages...
> 
> Sure. That's where _your_ proposed solution is called for.
> 
> > JMarc
> 
> - Martin

Actually putting section headers in minipages already works... as long
as you don't close the minipage and try to go the header inside by means
of ToC or navigation menu. The crash error message is

Assertion triggered in virtual void
lyx::InsetCollapsable::cursorPos(const lyx::BufferView&, const
lyx::CursorSlice&, bool, int&, int&) const by failing check "status() !=
Collapsed" in file insetcollapsable.C:244

I put this in bugzilla this afternoon.

The mechanism by which collapsible insets are recursively traversed by
ToC I don't know. It's not the inset.addToToC mechanism. Anyway, we have
to stop this crash by preventing the cursor to go into a closed inset.
How to do that? 

- Martin

Attachment: pgpUOD3YYkDCn.pgp
Description: PGP signature

Reply via email to