How to find italic, but not italic bold

Everything related to our flagship word processor.
Post Reply
Þorvarður
Posts: 410
Joined: 2012-12-19 05:02:52

How to find italic, but not italic bold

Post by Þorvarður »

How can I find all text in italic, but NOT in italic bold?
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: How to find italic, but not italic bold

Post by martin »

You'll want to do an attribute sensitive search, matching the attributes "italic" and "not bold". It's the latter that's a bit trickier, but let's walk through the process:

1. Open up NWP's find & replace window.
2. Insert the "AnyText" PowerFind bubble using the little gear icon's popup menu (or some equivalent wildcard).
3. Select the inserted bubble and apply italics (eg: via the menu Format > Font Face > Italic). This should automatically checkmark the "Attribute Sensitive" search option.
4. With the bubble still selected, apply bold once; then apply bold a second time to explicitly turn bold off (this actually adds a "not bold" or "unbold" attribute).

The resulting find window should look something like this:
search.png
search.png (47.82 KiB) Viewed 10919 times
A little bit more on what happened in step 4: by default the find field has no attributes applied. That means it doesn't care about any attributes, and only characters will be matched without regard to formatting. The first time you apply bold that adds a bold attribute "bold", as expected. The second time you apply bold that switches the bold attribute match to "not bold" or "unbold".

It would be better if the menus gave clearer feedback on what's happening exactly, or allow some other way to more explicitly choose these options, but hopefully this helps you get the job done.
Þorvarður
Posts: 410
Joined: 2012-12-19 05:02:52

Re: How to find italic, but not italic bold

Post by Þorvarður »

Excellent! Thank you Martin. Is the step 4 documented somewhere in the Nisus help manual?
martin wrote:It would be better if the menus gave clearer feedback on what's happening exactly, or allow some other way to more explicitly choose these options
Since Nisus has already an "Or" bubble (see screen shot),
AnyText.jpg
AnyText.jpg (72.99 KiB) Viewed 10890 times
one way could perhaps be to introduce an additional "Not" bubble. The user could then insert and apply italics to the "AnyText" bubble, then insert a "Not" bubble and finally "AnyText" with the attribute italic and bold. That would be very intuitive from the user's point of view, but I don't know if that is possible from the developer's point of view. :-)
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: How to find italic, but not italic bold

Post by phspaelti »

Þorvarður wrote:Since Nisus has already an "Or" bubble one way could perhaps be to introduce an additional "Not" bubble. The user could then insert and apply italics to the "AnyText" bubble, then insert a "Not" bubble and finally "AnyText" with the attribute italic and bold. That would be very intuitive from the user's point of view, but I don't know if that is possible from the developer's point of view. :-)
I'm not sure this is helping to solve the problem at issue. The problem is the (in)visibility of certain features (such as unbold). Think about the case where you want to search for a space that does not have italic applied to it but happens to be between two stretches of italic. In your notation that would be:

anyText anyText[NOT]anyText anyText

Looks intuitive :)
philip
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: How to find italic, but not italic bold

Post by phspaelti »

Just to elaborate a bit; I took Martin to be referring to the problem that always bother me about attribute sensitive searching. It's that I often have a hard time telling which attributes are being used/checked by the search. If you start with a 'clean' find dialog and construct the expression you usually have no problems, but if you use "copy to find" and then add or remove attributes, you often find that the search fails and it can sometimes be quite a challenge to figure out that there is some ruler or paragraph style applied that is causing the search to fail.

So I would like it if the find dialog had some visible list of the attributes (with words like 'unbold'). But the problem is that these attributes might be applied to only part of the find expression, and it would be quite a challenge to show how these attributes applied to the text.

But here is my idea: Imagine a button next to the find box that said "inspect attributes" and then, when clicked, would open a window in table form with two columns. The left column would show the bits of text with the same style. The column on the right would show the attributes in 'text' form (like in the style sheet).
philip
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: How to find italic, but not italic bold

Post by phspaelti »

Here is an impression of what I have in mind. Obviously a built in feature would have a better interface that actually allowed setting the attributes.
Note the specification of "bold=0" which means "unbold", etc.
Get Find Box Attributes Macro.jpg
Get Find Box Attributes Macro.jpg (94.73 KiB) Viewed 10879 times
Here is the macro used for this:
Get Find Attributes.nwm
(16.58 KiB) Downloaded 509 times
philip
User avatar
Patrick J
Posts: 124
Joined: 2006-06-16 16:17:50
Location: Brighton & Hove, UK
Contact:

Re: How to find italic, but not italic bold

Post by Patrick J »

The thing I've always wanted in a word processor is a way of showing what attributes are applied in the text. I imagine this would use bubble-like indicators in the text which could be viewed or not viewed with a button. There would be a bubble for where the attribute started and one for where it finished, like markup. Clicking on the bubbles would bring up a little window with the names of the styles starting or finishing at that point. I'd really like it if the bubbles could be moved around with drag and drop as well so they could be used to modify the beginning and ending of the attribute. Paragraph styles I guess would have bubbles that would only go at the beginning or end of paragraphs. Deleting either the start bubble or end bubble would remove both but there would be a dialogue box asking if you really want to do that first.

Anyway I bring up my idea because if it were implemented in the text, then maybe it could also be implemented in the Find/Replace dialogue.
Patrick
Þorvarður
Posts: 410
Joined: 2012-12-19 05:02:52

Re: How to find italic, but not italic bold

Post by Þorvarður »

phspaelti wrote:I'm not sure this is helping to solve the problem at issue. The problem is the (in)visibility of certain features (such as unbold). Think about the case where you want to search for a space that does not have italic applied to it but happens to be between two stretches of italic. In your notation that would be:

anyText anyText[NOT]anyText anyText
You are right, that isn't intuitive. I was actually thinking of a bubble search like this: anyText[NOT]anyText
Þorvarður
Posts: 410
Joined: 2012-12-19 05:02:52

Re: How to find italic, but not italic bold

Post by Þorvarður »

Patrick J wrote:The thing I've always wanted in a word processor is a way of showing what attributes are applied in the text. I imagine this would use bubble-like indicators in the text which could be viewed or not viewed with a button. There would be a bubble for where the attribute started and one for where it finished
I like your idea. :) — MS Word can show you the formatting if you click the text. This feature is in View > Reveal Formatting.
Attachments
Reveal Formatting in MS Word.jpg
Reveal Formatting in MS Word.jpg (78.32 KiB) Viewed 10850 times
Post Reply