[softwarelist] Re: Removing local effects

  • From: David Pilling <flist@xxxxxxxxxxxxxxxxxxx>
  • To: davidpilling@xxxxxxxxxxxxx
  • Date: Sun, 7 Jan 2007 17:32:25 +0000

In message <45A1104E.6030804@xxxxxxxx>, Clive Bonsall <C.Bonsall@xxxxxxxx> writes

Hadn't thought of that. One problem I've discovered, OPW's Search & Replace facility won't allow strings like {italic 1} in the search field (tho' notepad will). What is the way around that?

Yes, {} have a special meaning in the search and replace fields. So you have to quote them out with a | (bar) character. You'd search for

|{italic 1}


I know ... 20/20 hindsight, etc. But I've hit a problem when trying to replace the italics effect with my own user-defined style (apart from the search & replace problem, that is). ISTM that when you apply italics as an effect, only one thing changes, i.e. normal text becomes italic (everything else --- point size, leading, etc. --- remains the same); the effect is simply overlaid on the

Correct.

Is it possible to create an Italics style that behaves in exactly the same way ...

Yes. Styles have the same three state way of working. In the e.g. text and format windows for setting up styles you have three-state buttons. For example the button for italic in a style can be clear or ticked (as usual) but it can also show a third state which means "does nothing to italics".

This situation applies to every attribute, space before, after, justification.

What I'm finding so far is, if I create an Italics style based on Bodytext (which

Bodytext is a special case because it usually sits underneath all other styles it has to set all attributes. You don't want to base styles on Bodytext, it is a bad example of what a style should do.

Normally there is a series of layers

Effects
user style 1
user style 2
...
Bodytext

The topmost layer that changes something provides the value for the displayed text.

As I just said that implies that Bodytext sets every attribute, you'll find that you can't turn off attributes in Bodytext.

In the example above, style 1 might set italic, style 2 might set bold, Effects might set underline. The resulting text will be italic+bold+underline.

If Effects set italic off, then despite what style 1 sets, the resulting text will not be in italics.

If you go to Bodytext and change the text colour to pink, the resulting text will be pink.

Anyway you use user styles to change just the things you want changing and you should leave other things in the user style definition set to "do nothing".



--
David Pilling
email: david@xxxxxxxxxxxxxxxxxxx
  web: http://www.davidpilling.net
 post: David Pilling P.O. Box 22 Thornton Cleveleys Blackpool. FY5 1LR UK
  fax: +44(0)870-0520-941



Other related posts: