• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

4. Editing Power Tools > 39. Apply Context-Sensitive Formatting

Apply Context-Sensitive Formatting

Which character style you apply to a selection of text may depend on its context. This hack makes it easy to apply the correct one of several similar styles by using a macro to examine the selection’s surroundings.

A complex document template may have several similar character styles, each fulfilling a different semantic purpose in the document’s structure. The template used for this manuscript, for example, has two styles used to emphasize portions of text: one called emphasis (used to emphasize normal body text) and the other replaceable (used to emphasize text presented in a constant-width font). Which style is used depends on the context of the text to be emphasized.

One way to ensure the correct application of several different, but similar, character styles is to provide users with a detailed set of instructions about which style to use in any particular situation (and when not to use a particular style, such as in a heading). But many people will simply do what they’ve always done in Word to emphasize text: press the I button on the Formatting toolbar.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint