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

List:       koffice-devel
Subject:    Re: RFC: Numbered paragraphs in new kword
From:       Thomas Zander <zander () planescape ! com>
Date:       2001-03-06 11:45:52
[Download RAW message or body]

> Hi all,
> 
> Paragraph numbering in the new kword is coming alive. Now, I'd like to 
> establish a clear set of rules for numbering to make sure it all works as we 
> expect. This is what I propose, comments welcome...
> 
> 1. A paragraph is either unnumbered, numbered as a heading, or numbered as a 
> list entry.

Well, I think a bit more explaining is in order here, some things are a tad off...

When you set a paragraph to be of Heading4, KWord automatically adds a numbering
instance to the paragraph. Where the depth is copied from the style. In this case 4.
This makes the layout  "1.2.3.4  text"

When you set a paragraph to be unnumbered, by selecting the bullets icon, KWord
also adds a numbering to the para. The type is then unnumbered. (and depth irrelevant)

The more difficult thing is with non-paragraph numbering. We have list numbering
now, but this is not enough.
Let me explain with an example.

1.1 Header

a list item
b list item
c list item
  1 list2 item
  2 list2 item
d list item
  1 list3 item
  2 list3 item
    2.1 list4 item
    2.2 list4 item
e list item

1.2 Header

The former is now impossible (and if I understand correctly it is also impossible 
with your suggestion) , we dont have the concept of different lists, and depth is 
not used in lists (IIRC).  Try the current implementation to create this ;)


So what we need is the following:

- Any para _can_ have a numbering. You simply instanciate a new numbering class 
  for this para.  I don't think you want every para to know its level in the hierarchy
  because 1) you can easily find out from the style 2) there is no difference in rendering
  of non-numbered paragraphs when they are in anohter level in the hierarchy.
- Numbering has a type; numbered and unnumbered. 
  - unnumbered has a variable character as 'bullet'
  - numbered has a numbering type 'a,1,III'
- Numbering hava a depth, this depth is 1,2,3,... As their position in the hierarchy
  This is normally copied from the style.
- Numbering has a flow. A flow only used for the numbering.
  One predefined flow are the headings. This is needed to keep numbering if there are 
  non-numbered paragraphes between the numbered paragraphs. (we start new numbering if
  there is a non-numbered para, this is correct, and enough in most cases)
  So in my example above we have at minimum 3 flows. The rest can stay flowless. (as they
  start counting at 1 every time)
 - The headers have a flow (namely the TOC flow) 
 - The a,b,c,d,e,f have a flow. Simply because they are not continues
 - The 1, 2, 2.1, 2.2 have 1 flow. This is needed so we know that the 2.1 has 
   a major number of 2, and not 1.


In addition every flow can have a starting position. I can understand that you 
don't want every flow to start at 1, or 1.1 for that matter, you must be able to say
that this flow starts at (for example) 4.3

> 
> 2. All paragraphs have a depth. The depth of a paragraph reflects its logical 
> place in the hierarchy. This depth is:

Just use numbers as I did in my example above. These numbers then reflect the 
amount of digits used. So the 2.1 in my example above should have depth 2.

> 3. A heading numbered paragraph at depth d is numbered as:

We don't have a Heading numbering anymore (IMO), this is just another flow.

> Any preceeding unnumbered paragraph is skipped as if it did not exist.

No, in most document people make lists that simply count from 1 to n, and start
a new list after a number of unnumbered paragraphs. So doing what you suggest here
breaks the normal usage of a lot of users.

> In 
> addition, a manual override is provided for the first paragraph in a document.

Agreed. (well, the manual override should be for the first para in every flow)

> 4. A list numbered paragraph at depth d is numbered as:
> 
> - "n+1" if any preceeding heading numbered paragraph is of level equal to d 
> and has number "n".
> 
> - "1" if any preceeding list numbered paragraph is of level less than d.
> 
> - "1" if any preceeding paragrpah is not list numbered.

Yap.

-- 
Thomas Zander                                            zander@earthling.net
The only thing worse than failure is the fear of trying something new
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel

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

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