Reply to topic  [ 9 posts ] 
How to find italic, but not italic bold 
Author Message

Joined: 2012-12-19 05:02:52
Posts: 226
How can I find all text in italic, but NOT in italic bold?


2013-12-13 14:30:21
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
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:
Attachment:
search.png
search.png [ 47.82 KiB | Viewed 3430 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.


2013-12-13 16:26:39
Profile WWW

Joined: 2012-12-19 05:02:52
Posts: 226
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),

Attachment:
AnyText.jpg
AnyText.jpg [ 72.99 KiB | Viewed 3401 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. :-)


2013-12-14 18:53:51
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Þ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


2013-12-14 21:19:31
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
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


2013-12-14 21:37:52
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
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.
Attachment:
Get Find Box Attributes Macro.jpg
Get Find Box Attributes Macro.jpg [ 94.73 KiB | Viewed 3390 times ]


Here is the macro used for this:
Attachment:
Get Find Attributes.nwm [16.58 KiB]
Downloaded 124 times

_________________
philip


2013-12-15 00:13:28
Profile
User avatar

Joined: 2006-06-16 16:17:50
Posts: 124
Location: Brighton & Hove, UK
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


2013-12-15 17:38:52
Profile WWW

Joined: 2012-12-19 05:02:52
Posts: 226
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


2013-12-15 21:45:30
Profile

Joined: 2012-12-19 05:02:52
Posts: 226
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 3361 times ]
2013-12-15 22:12:20
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: Majestic-12 [Bot] and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software