[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Re: KWord & Chapters...
From:       Rodolfo Conde Martinez <aragorn () ciencias ! unam ! mx>
Date:       2003-02-19 7:22:52
[Download RAW message or body]

On Tuesday 18 February 2003 01:01 pm, David Faure wrote:
> On Monday 17 February 2003 23:26, Rodolfo Conde Martinez wrote:
> > 	The 'Introduction' word is with head 1, thats fine, but when generating
> > a contents table its not included.....is this a missing feature or how do
> > i include it in the toc ??
>
> Ouch. I made a choice, long ago, which goes against this:
>
>         // We recognize headers by the "numbering" property of the
> paragraph // This way, we don't rely on a particular name (breaks when
> renaming) // nor on whether the user used styles or not.
>         // It even lets a user create two styles for the same level of
> chapter. if ( p->counter() && p->counter()->numbering() ==
> KoParagCounter::NUM_CHAPTER )
>
> What I apparently missed is the fact that people might not only want
> numbered paragraphs in a Table Of Contents.
>
> The fix for your problem is easy: the above logic (kword/contents.cc:68)
> needs to be turned into
>     if ( p->style() && p->style()->name().startsWith( "Head" ) )
>
> But this isn't a good long-term solution. The above problems will happen.
> A user creating a style named "Titre 4" (french for "Head 4") will have no
> way to include it in the TOC.
>
> I think the only solution is to either
> 1) ask which styles to use when "Insert / Table Of Contents" is being
> called. or
> 2) add a checkbox to the style manager, titled "Include in Table Of
> Contents".
>
> OOo seems to have "Outline styles" which are separate from normal
> "paragraph styles", if I read the doc correctly - this would mean something
> like solution 2). How does that sound?

	It seems to me that solution 2) is good, giving the user the ability to 
choice, or maybe just in the special case of preface and introduction do a 
search for this in the text property of the styles (if i understand well) but 
that would have to be a search on text like i18n("Preface") to cover all, i 
guess this is not very neat, so i stay with solution 2 :)

	for now im good with the bugfix, i think i will not generate the TOC in some 
time so you guys have time to think about it :P, i will be risking using 
always the latest kword just remind me of making backups of my .kwd files 
just in case :).

	Another little feature request: Would it be too dificult to add also an 
"Index generation" option :) ??

	Great job in kword, kformula and all KOffice apps thanks all !!!!

	Greetings....

-- 
rcm
rcm@gmx.co.uk
aragorn@ciencias.unam.mx
GPG Public Key: http://ada.fciencias.unam.mx/~rconde/rodolfo_gpg.txt
ICQ #118193727
____________________________________
koffice mailing list
koffice@mail.kde.org
To unsubscribe please visit:
http://mail.kde.org/mailman/listinfo/koffice
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic