Sunday, October 30, 2005 Andrew Brown wrote:

> Giuseppe Bilotta <[EMAIL PROTECTED]> wrote in 
> news:[EMAIL PROTECTED]:

>> However, I honestly don't see the need for non-cascading
>> style: a style which is not supposed to inherit from the
>> surroundings should just set the non-inherited property
>> itself.

> Doesn't help at all with a series of linked heading
> styles, all inheriting from higher up the hierarchy.

Apart from the fact that Heading styles are paragraph, not
character styles, and for paragraph I'm not sure we want
cascades, you should keep in mind that style hierarchy and
cascading are not in contrast. You just follow up the
hierarchy collecting properties, and all the properties that
are not set will just take the value the text already has.

Say that you have a chain of styles A_1, A_2, ... A_n, such
that A_i is linked to A_{i-1} when i > 1 (so A_2 is linked
to A_1, A_3 to A_2, etc). When you apply style A_n, you
collect all the properties set in A_n, then go to the linked
style and collect all the properties set in A_{n-1} that
were not set already, and so on and so forth until you reach
the end.

Note that this is how it works presently, except that in the
end you get to a style (Default or other base style) where
*everything* is set (this is the characteristic of base
Styles), so when you are done running up your hierarchy you
end up with *all* the propertie set: there is no way you
could then get 'cascades' since no property can be taken
from the surrounding text is everything is set.

This is what we have now. What we (well, at least I) want is
the possibility to have (character) styles whose hierarchy
does *not* end in a base Style. Such a style would then
cascade to previously applied styles (and ultimately Default
anyway, since all text in the document always starts at Default
style anyway).

If you have any experience with image editing and layers,
you can think of each style as a layer. You have the Default
style which is the 'background layer'. This layer is totally
opaque: it sets every single aspect of every single property.

When you apply a style A, you simply add a new layer. All
properties which are not set correspond to transparent areas
of the layer, all properties which are set correspond to
opaque areas. When this style is linked to another style B,
you insert the layer for style B under the layer for style
A. Opaque areas of A are visible, transparent areas let you
see through to the corresponding areas of B.

This is no different than what happens *now*. But we cannot
have true cascading because every style that does not set
all properties *must* inherit from another one, so you will
always end up with a totally opaque layer which will obscure
any properties the text already had.

Try, I just did. Create a new character style, and link it
with - None - (which means you want a base Style). As soon
as you try to exit the dialog or change tab, you get a
message box telling you that the style cannot be a base
Style, "because it would result in a recursive reference".

Instead, this is exactly what we want: Styles which do not
have a hierarchy but do not set all properties. These styles
should be handled by leaving all unset properties unaltered
in the existing text.

-- 
Giuseppe "Oblomov" Bilotta


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to