How do I search for text formatting?

Moderator: faq-editor

Post Reply
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

How do I search for text formatting?

Post by martin »

Users often ask us how they can search for text using certain formatting. Some example tasks:

1. Change all text using the Times New Roman font to use the Arial font instead.
2. Skim through a document looking for any text using a particular heading style.
3. Select all text using a particular character style, so you can copy the matching list to a separate file.

This FAQ topic will go over a few different ways of searching for formatting in Nisus Writer. This topic will start with the easiest way of searching for formatting using built-in menu commands, and then show progressively more complex strategies that allow for more flexibility.


Find formatting using styles:
If your document makes consistent use of user-defined styles (eg: Emphatic, Heading 1, etc) you can easily use built-in menu commands to select text in the same style. These commands all make use of the style that's currently applied to the selected text in order to find text using the same style. Here's what you do:

1. Select some text using one or more styles.
2. Use the Format menu to choose a style selection command, eg: Format > Character Style > Select All in Style

There are commands that select just the next matching text, or all text using that style.


Find formatting using the Formatting Examiner palette:
This palette allows you to see exactly what formatting is applied to the selected text, and also allows you to search for other text using similar formatting.

expalette.png
expalette.png (34.59 KiB) Viewed 15753 times

How to use the palette:

1. Select any text in your document that has the desired formatting.
2. In the palette's formatting list, select the formatting you'd like to search for.
3. In the lower part of the palette click the left/right arrow buttons to jump to the next/previous match.
--> You can use the button with the gear icon to Find or Select All text using the formatting at once.

The palette can match multiple kinds of formatting, eg: select both Font Size 15pt and Text Color Cyan to match only text using both kinds of formatting.


Find formatting using custom search expressions:
You can use PowerFind and the Formatting Sensitive option to match text using particular formatting:

1. Open Nisus Writer's Find panel.
2. Enter a search expression that can match the text characters you're interested in.
--> If you want to match most regular text (words, numbers, and punctuation) then the "AnyText" bubble works nicely.
3. Select the expression you've entered in the "Find what" field.
4. Use the main menus to apply the desired formatting. This will automatically checkmark the "Formatting Sensitive" option.
5. Click the find panel's search buttons to select the matching text.

find.png
find.png (35.44 KiB) Viewed 15753 times

You can apply multiple kinds of formatting to your search expression. You can even apply different formatting to different parts of the expression. For example, you could search for all bold numbers followed by blue punctuation. Formatting sensitive search is compatible with regular expressions (regex).

regex.png
regex.png (14.89 KiB) Viewed 15751 times


Find formatting using macros:
There are some macros under the menu Macros > Find that can select formatted text. The "Select By Font" macro will let you pick from all fonts in the document. The "Select By Attributes" macro lets you pick from a big list of formatting, using the formatting applied to the current selection as filtering criteria.



What can I do with the matching text?
If you use any of the above methods to match text using certain kinds of formatting, it's easy to subsequently reformat it. Nisus Writer allows you to edit text formatting en-masse for multi-part selections. After you've selected all matching text, just use normal formatting commands to edit your text. For example, use the main menu or palettes to adjust the font.

If you open your matches in a Find All results listing window you can also easily copy the results. Just right-click the list to show a contextual menu that allows copying the results with or without context:
results.png
results.png (65.56 KiB) Viewed 15753 times
Post Reply