Subject: Re: Normal Clean style
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Fri Aug 03 2001 - 08:40:09 CDT
On Thu, 2 Aug 2001, John L. Clark wrote:
> On Thu, Aug 02, 2001 at 03:24:13PM -0000, David Chart wrote:
> > Looking at the style definition in exported XHTML, the purpose of the
> > Normal Clean style appears to be to ensure that everything gets set back to
> > the default after a Heading or similar. Is that right?
> >
That was the idea of Normal Clean. I defined it or remove all traces of a
previous style and to get as close as possible back to "default".
After my recent forays into the PieceTable I discovered a format change
parameter called PTC_removeFMT. This is not used anywhere in fv_View or
anywhere else in AbiWord right now. Instead of called "Normal Clean" we
could just have a method "set to default" which removes all formatting at
a particular document position or range.
> > This means that most paragraphs in my documents are now Normal Clean, not
> > just Normal, and this has broken the nice XHTML export. Because the
> > exporter doesn't know that Normal Clean is exactly the same as Normal, it
> > is exporting redundant style information to every paragraph.
> >
> > Is there any way to roll all of the Normal Clean properties into Normal?
> > Or, alternatively, set the next style from Normal Clean to be Normal? Then
> > there would only be a few such paragraphs, and that's less of a problem.
>
> This brings up a general issue that I've had with our styles list ever
> since we started getting styles like Normal Clean and Numbered Headings.
> First of all, I think that the addition of so many styles which actually
> provide structural, not markup, information, without characterizing
> those styles at all, is a pollution of the Styles pool/namespace. For
> example, I don't understand why the Normal Clean style should be
> necessary.
>
It was necessary because "Normal" did not set all properties back to
default. Any property not defined in the "Normal" style retains the value
it had previously. So for example I don't think bgcolor is defined in
"normal" so if you had a style with bgcolor set to some weird value and
then set the style to "Normal" the background color remains.
> Having worked with styles before, and evenwithin our codebase, I get
> bewildered when I see our unorganized, ungainly long list of styles to
> choose from. That it should even come to the point where I have to
> manually sort through styles by name in the XHTML exporter is indicative
> of a problem.
>
I fully agree. These should be presented to the user as a tree view which
can be expanded as needed. So the user sees: "Numbered Headings" as a node
in the tree, presses it and it expands to show Numbered Heading_1,
Numbered heading_2, etc
What we have now is just a stop gap.
> A style should be a grouping of certain formatting characteristics which
> provide information about how the structure of a document is presented.
> Arguments can be made on both sides of the fence that lists do or do not
> fall under this characteristic. Assuming, for the moment, that they do
> (which is only /mostly/ consistent with the way Abi does it currently),
> list formatting information should be separated from issues such as
> boldness, font, etc (which are part of the numbered heading styles).
>
Yes the various list styles should be in their own seperate tree node.
> I believe the solution is to organize our styles better, which should be
> fairly straightforward to do within the PD_Style class, and to rethink
> how we go about mixing and matching our styles. For example, I feel
> that a numbered heading should be a list with a heading style applied to
> it.
If you look you'll see it is actually a Heading Style with some list
definitions included so it is exactly this already. We just need to
present this to the user in a more coherent manner.
Are you suggesting something like:
NumberedHeading::Numbered Heading 1
NumberedHeading::Numbered Heading 2
NumberedHeading::Numbered Heading 3
NumberedHeading::Section Heading 1
.
.
.
.
?
Cheers
Martin
This archive was generated by hypermail 2b25 : Fri Aug 03 2001 - 08:40:15 CDT