Reply
 
Thread Tools Display Modes
  #1   Report Post  
Bob S
 
Posts: n/a
Default Font properties of table styles versus paragraph styles

This note was provoked by a thread in another newsgroup complaining
that font properties in table styles don't override those of the
paragraph styles in the tables. I do not intend to "excuse" the
behavior (if any excuse is needed), merely to supply a coherent
explanation for the behavior.

Here is my current hypothesis on the internal mechanisms behind the
seemingly-odd behavior of table styles versus paragraph styles. I
think that this hypothesis explains the observed behavior in a simple
way.

The "seemingly-odd behavior" is that font properties specified in
table styles will only override font properties specified in paragraph
styles if the paragraph styles call for unmodified 12-point TNR.

Let's look at "font name"; the other properties each work similarly.
When Word needs to decide how to display some piece of text that is in
a table, Word first starts looking at the paragraph style hierarchy,
using exactly the same process that it would use if the text were not
in a table. It starts with the paragraph style of the paragraph in the
table, and looks to see whether that style overrides the font name of
the base style or not. If it does override, then that font name is the
answer, and Word displays the text in that font and stops looking. If
it does not override, Word looks back at the base style to see whether
that overrides the font name. It keeps doing this all the way down the
inheritance chain. If nothing overrides, Word eventually gets down to
Normal style. Here is the trick; I will claim that Normal style is
actually a derived style based on something I will call Internal
Normal. So Word looks to see whether Normal overrides Internal Normal
or not, just as in all the previous cases. If Normal also says that it
does not override, then Word looks at the table style hierarchy to see
whether it overrides font name, and continues down that hierarchy
until it either finds an override or reaches the base of that tree.
The base of that tree is Table Normal, which has the same 12-point TNR
as Internal Normal.

(Why do I think that Normal style is actually a derived style? I adopt
this hypothesis because it seems consistent with Word's behavior, and
because it would be an easy implementation. For explaining Word's
behavior this hypothesis explains in a natural and consistent way the
odd-seeming fact that table style font name will only be effective if
all of the paragraph styles including Normal do not modify the default
12-point TNR style. Other explanations require odd special-casing to
explain this fact. In terms of easy implementation, Normal can be
copied, modified, or have an alias just like any other style, and the
other styles are all derived styles. The only internal special-casing
required is that Word does not display the "internal normal" style in
the style list.)

(In the first paragraph I said "the paragraph style"; actually Word
does all the usual things; it looks at direct formatting if any, then
at the style of the paragraph that you applied directly if any, then
at the paragraph style of the paragraph that the table is contained
in, and so on.)

Bob S
  #2   Report Post  
Klaus Linke
 
Posts: n/a
Default

Hi Bob,

I do not intend to "excuse" the behavior [...]


8-|

I think it's inexcusable.
In my book, it's a bug that wasn't caught in time and now we are stuck with it.
Who in his/her right mind would design it that way?

If you go down the inheritance chain, you can stop looking if you've found a
modification.
If the table style says "Arial", then it shouldn't matter one bit what's defined
in the base table style, or any style "further down".
Much less the "internal" Normal style below "Normal" (= the factory default
"Normal" style?).

BTW: You have to change the font size of the "Normal" paragraph style to 10 pt
if you want to set the font size in the table style.
Those 10 pt used to be the factory default font size for "Normal" in old
versions... which means that both the programmers that changed that default to
12 pt and those that designed table styles probably didn't get things quite
right (to say it politely).

Regards,
Klaus



"Bob S" wrote:
This note was provoked by a thread in another newsgroup complaining
that font properties in table styles don't override those of the
paragraph styles in the tables. I do not intend to "excuse" the
behavior (if any excuse is needed), merely to supply a coherent
explanation for the behavior.

Here is my current hypothesis on the internal mechanisms behind the
seemingly-odd behavior of table styles versus paragraph styles. I
think that this hypothesis explains the observed behavior in a simple
way.

The "seemingly-odd behavior" is that font properties specified in
table styles will only override font properties specified in paragraph
styles if the paragraph styles call for unmodified 12-point TNR.

Let's look at "font name"; the other properties each work similarly.
When Word needs to decide how to display some piece of text that is in
a table, Word first starts looking at the paragraph style hierarchy,
using exactly the same process that it would use if the text were not
in a table. It starts with the paragraph style of the paragraph in the
table, and looks to see whether that style overrides the font name of
the base style or not. If it does override, then that font name is the
answer, and Word displays the text in that font and stops looking. If
it does not override, Word looks back at the base style to see whether
that overrides the font name. It keeps doing this all the way down the
inheritance chain. If nothing overrides, Word eventually gets down to
Normal style. Here is the trick; I will claim that Normal style is
actually a derived style based on something I will call Internal
Normal. So Word looks to see whether Normal overrides Internal Normal
or not, just as in all the previous cases. If Normal also says that it
does not override, then Word looks at the table style hierarchy to see
whether it overrides font name, and continues down that hierarchy
until it either finds an override or reaches the base of that tree.
The base of that tree is Table Normal, which has the same 12-point TNR
as Internal Normal.

(Why do I think that Normal style is actually a derived style? I adopt
this hypothesis because it seems consistent with Word's behavior, and
because it would be an easy implementation. For explaining Word's
behavior this hypothesis explains in a natural and consistent way the
odd-seeming fact that table style font name will only be effective if
all of the paragraph styles including Normal do not modify the default
12-point TNR style. Other explanations require odd special-casing to
explain this fact. In terms of easy implementation, Normal can be
copied, modified, or have an alias just like any other style, and the
other styles are all derived styles. The only internal special-casing
required is that Word does not display the "internal normal" style in
the style list.)

(In the first paragraph I said "the paragraph style"; actually Word
does all the usual things; it looks at direct formatting if any, then
at the style of the paragraph that you applied directly if any, then
at the paragraph style of the paragraph that the table is contained
in, and so on.)

Bob S



  #3   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi Klaus,

In my book, it's a bug that wasn't caught in time and now we are stuck with it.
Who in his/her right mind would design it that way?

Actually, it WAS designed this way - I had a long discussion with the MS people
during Word 2002 Beta 1 on the hierarchy of the new styles. I'm not saying I
agree with it, necessarily, but consider this scenario:

A Table Style doesn't let you link different parts to specific paragraph styles.
So, say you want to use formatting in certain parts of the table that's not
supported by the Table Style concept. You can apply any paragraph style to the
table to override the Table Style.

Surely, we'd be getting complaints if paragraph styles were NOT able to override
Table Styles. The real mistake in design, from my POV, is not being able to
assign paragraph styles to parts of a table. But heh, all anyone was ever asking
for before this was "personalized Table AutoFormat". Really. And that's exactly
what we got! Only, now that we have it, we're not satisfied...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #4   Report Post  
Klaus Linke
 
Posts: n/a
Default

Hi Cindy,

So in this game of rocks/paper/scissors, paragraph styles beat table styles.
But at the same time, even if you don't have applied a paragraph style, the
"Normal" paragraph style is always applied implicitly.

In this case, I don't envy the poor guy/gal that had to find a work-around for
the table style's paragraph and font formatting to show at all...

The real mistake in design, from my POV, is not being able to
assign paragraph styles to parts of a table.


Looks about the same from he Paragraph and font formatting shouldn't have
been dealt with directly in table styles at all.
They should only specify borders and shading, cell padding, possibly column
widths, space before/after... *and* paragraph styles.

Thank you for the really interesting insights!
Klaus




"Cindy M -WordMVP-" schrieb im Newsbeitrag
news:VA.0000a787.004ed3cf@speedy...
Hi Klaus,

In my book, it's a bug that wasn't caught in time and now we are stuck with

it.
Who in his/her right mind would design it that way?

Actually, it WAS designed this way - I had a long discussion with the MS

people
during Word 2002 Beta 1 on the hierarchy of the new styles. I'm not saying I
agree with it, necessarily, but consider this scenario:

A Table Style doesn't let you link different parts to specific paragraph

styles.
So, say you want to use formatting in certain parts of the table that's not
supported by the Table Style concept. You can apply any paragraph style to the
table to override the Table Style.

Surely, we'd be getting complaints if paragraph styles were NOT able to

override
Table Styles. The real mistake in design, from my POV, is not being able to
assign paragraph styles to parts of a table. But heh, all anyone was ever

asking
for before this was "personalized Table AutoFormat". Really. And that's

exactly
what we got! Only, now that we have it, we're not satisfied...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or

reply
in the newsgroup and not by e-mail :-)



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table style keeps losing its font Todd Crandell Tables 6 May 27th 05 06:49 PM
Default font - possible bulletproof fix in Word 2003 [email protected] Microsoft Word Help 0 January 14th 05 10:14 PM
Multiple styles in a single paragraph skibikegolf Microsoft Word Help 1 January 5th 05 10:57 AM
Autoformat table doesn't format font's after changing default font B?atrice Karjalainen Tables 2 December 4th 04 03:58 PM
table properties, Autotext, and autoformatting sheilam Tables 1 November 30th 04 11:45 AM


All times are GMT +1. The time now is 06:19 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"