Turning off italic in a character style

E

Evan Lenz

Is it possible to override a paragraph style's italic formatting through the
use of a character style for a particular run of text? Is this a known
limitation of using only styles? (I know this can be done through direct
formatting.)

I'm also wondering whether it's possible to do this for any of the other
on/off character properties. In my experimenting, I've only been able to
turn off the "double strikethrough" and "underline" properties through a
character style (though the "underline" property isn't really an on/off
property).

Thanks,
Evan
 
C

Charles Kenyon

I just checked in Word 2003 and having one paragraph style which has the
font set for Italics and applying a character style which also is set for
Italics gives a result of non-Italic text. So the answer is "yes." Note that
if most of your paragraph is formatted using a character style and you then
apply a paragraph style to that paragraph, it may remove the character
style.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
E

Evan Lenz

Thank you for correcting me on this obvious behavior. I was working directly
with WordprocessingML, and I was misled by this statement in the Office 2003
XML Reference Schemas "Overview of WordprocessingML" document:

"if either 'MyStyle' or 'MyFirstRunStyle' turned on bold formatting, the
text would be bold — even if one of the styles turned bold off."

The key missing point is that if *both* styles turn bold on, then the text
would *not* be bold. This is so fundamental that I'm surprised I didn't
realize it earlier. My tentative conclusion certainly didn't seem to mesh
with previous experience with Word.

What also confused me is that this is precisely opposite to the way you
override a base style's property settings in a derived style:

If <w:b w:val="off"/> in the derived style but <w:b w:val="on"/> in the base
style, then associated text will not be bold.

However, when a run's paragraph style has <w:b w:val="on"/>, then, to turn
off bold, the character style must also have <w:b w:val="on"/>. Unintuitive
and undocumented; I guess I don't feel that bad.

Moreover, the property settings don't behave uniformly. For example, to turn
"Strikethrough" off in a run when it's on in the paragraph style, you use
<w:strike w:val="on"/> in the character style. However, to turn "Double
strikethrough" off in a run when it's on in the paragraph style, you use
<w:dstrike w:val="off"/> in the character style. That is just strange.

Thanks again,
Evan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top