TextSpresso Manual Menu

Editing Filters

Overview

Creating Filters

Editing Filters

Duplicating Filters

Deleting Filters

Favorite Filters

Filter Categories

Importing Filters

Exporting Filters

Overview of Filter Types

Overview

One of the things which sets TextSpresso apart from its competition is its exceptional editable filter support. TextSpresso provides a total of seven different core filter types and provides user friendly graphical editors for each filter type. This allows you to adapt TextSpresso to your specific needs, modifying the included filters to your specifications and creating entirely new ones without resorting to cryptic programming languages or cumbersome user interfaces.

You can also share filters you create with other users, and download new and improved filters from the Taylor Design web site as they become available.

Finally, you can categorize your filters any way you like. By categorizing filters you can organize your library to make filters easily accessible. You can even mark often used filters as "Favorites" so that they appear at the top of the Filter menu for rapid access.

In this chapter you will learn how to create, edit, import, export, and manage your filters.

Creating Filters

When you create a filter you select the specific type of filter you want to create. TextSpresso then creates a new filter of the selected type and allows you to edit it. To create a new filter do the following:

  1. Select the New Filter... command from the Edit Filters submenu of the Filter menu. Or you can select New Filter... from the palette command menu in the Filter Palette.
  2. Select the type of filter you wish to create.
  3. Click OK.

A filter editor for the type of filter you created will be opened so that you can define your new filter. You can read more about what is common to all filter editors below. You can read more about the specific filter editor for you new filter in subsequent chapters.

Note that when creating a filter, the Save button in the editor finishes creating the filter, while the Cancel button cancels the new filter.

Editing Filters

Every filter type has its own graphical filter editor which allows you to define the filter. Since each filter type has its own function and design rules this chapter will only cover that which is common to editing all filter types.

There are two ways to open the filter editor for a particular filter. The first method is:

  1. Select Edit Filter... from the Edit Filters submenu of the Filter menu.
  2. Select the filter you wish to edit.
  3. Click Edit.

The second method is:

  1. If it's not open, open the Filter Palette by selecting Filter Palette from the Windows menu.
  2. Select the filter you wish to edit in the palette. If you select more than one filter, only one editor will be opened for the first filter selected.
  3. Select Edit Filter... from the palette command menu. Or, if no documents are open, you may simply double-click the filter you wish to edit.

The top and bottom portion of every filter editor is the same. In the top portion there are fields for typing both the filter name and category, and for entering any notes about the filters function and design. Simply enter the information in these fields. You'll notice that there's a popup menu next to the Category field. This menu lists the existing categories, and selecting one from this menu automatically fills the Category field. (Click to learn more about filter categories.)

There's also a check box titled Favorite? Check this box to make the filter a favorite filter. (Click to learn more about favorite filters.)

Finally, there's a Hot Key field for entering a hot key. You can learn more about Hot Filter and hot keys in the Hot Filter chapter.

In the bottom portion there is a Save button which saves any changes you have made or creates the filter. There is a Cancel button which cancels the edit or creation.

The middle of the filter editor is specific to the filter type you are editing. To learn more about editing a particular filter type, turn to the appropriate chapter for that type.

Note on text fields: Some of the filter editors, such as those for the Replace Text and Replace Pattern filter types, use non-standard text fields for entering search and replace strings. These text fields can display any character in the 8-bit Mac ASCII range, including control characters. Unlike a normal text field, they map each real character in the text to one or more display characters for display. This way control characters can be displayed by their abbreviated names or codes, such as NUL (for ASCII 0) or CR (for carriage return).

Because these are non-standard fields they don't provide all of the same features as a regular Mac OS text field. In particular you can't select, cut, copy, clear or delete a subset of the displayed text, nor can you paste new text in the middle of the field. You can type and delete normally, but the cursor is always positioned at the end of the text. Cut, Copy, Paste, and Clear always operate on the entire field.

We're working on improving these special fields so that they work exactly like standard Mac OS text fields while providing the special display capabilities. For now, be aware that there are some differences with these fields with respect to selecting text.

You will also notice that wherever you see one of these special fields, you will see a popup character menu next to the field. Selecting any character in this field pastes the character at the end of the field. Using this popup menu you can enter characters which cannot normally be entered from the Macintosh keyboard, such as NUL and Linefeed (LF).

Duplicating Filters

Sometimes you may want to duplicate an existing filter and modify it slightly rather than start from scratch. To duplicate a filter do the following:

  1. Select Duplicate Filter... from the Edit Filters submenu of the Filter menu.
  2. Select the filter or filters you wish to duplicate.
  3. Click OK.

You can also use the Filter palette:

  1. If it's not open, open the Filter Palette by selecting Filter Palette from the Windows menu.
  2. Select the filter or filters you wish to duplicate in the palette.
  3. Select Duplicate Filter from the palette command menu.

The filter copy will have a number after its name. You can then select and edit the filter to your liking.

Deleting Filters

You can delete filters which you no longer use or which you have replaced. Filters don't occupy very much RAM, so you shouldn't be too concerned with deleting unused filters. Better to keep a filter around for when you do need it rather than throw it away.

Warning: You cannot undo a filter deletion, so be careful with this command. It's a good idea to export filters you want to delete before deleting them so that you can restore them later.

To delete a filter:

  1. Select Delete Filter... from the Edit Filters submenu of the Filter menu.
  2. Select the filter or filters you wish to delete in the Delete Filter dialog and click Delete.
  3. Confirm your deletion in the dialog which follows by clicking Delete.

You can also delete filters from the Filter Palette:

  1. If it's not open, open the Filter Palette by selecting Filter Palette from the Windows menu.
  2. Select the filter or filters you wish to delete in the palette.
  3. Select Delete Filter from the palette command menu.
  4. Confirm your deletion in the dialog which follows by clicking Delete.

Favorite Filters

TextSpresso allows you to mark your most frequently used filters as favorite filters. Favorite filters are listed near the top of the Filter menu and can be accessed without going into a category submenu. They also may be listed separately in the Filter Palette. Optionally, they are sorted to the top of the Filter Palette in all categories if this preference is turned on in the Application Preferences window (see the Preferences chapter for more information). By marking your work filters as favorites you can make them easier to access and group them together despite their being from separate categories.

As you learned above, you can mark a filter as a favorite using the filter editor. Another way to mark a favorite filter is listed below:

  1. If it's not open, open the Filter Palette by selecting Filter Palette from the Windows menu.
  2. Select the filter or filters to mark in the palette.
  3. Select Favorite from the palette command menu. If you want to remove the filters from the list of favorites, select Normal instead.

Filter Categories

TextSpresso allows you to assign each filter to a category. In the Filter menu filters are listed under their category submenus. In the Filter Palette you can choose to view only filters from a specific category. The filters included with TextSpresso are organized according to their functions, i.e. Internet filters, Publishing filters, etc.

As you learned above, you can assign a filter to a specific category using the filter editor. Another way to move filters to a new category is listed below:

  1. If it's not open, open the Filter Palette by selecting Filter Palette from the Windows menu.
  2. Select the filter or filters to move in the palette.
  3. Select Category... in the palette command menu.
  4. Type the category to which you wish to move the selected filters. You can choose an existing category from the dialog's popup menu. If you type a new category, it will be created automatically.
  5. Click Save.

Categories are your tool for organizing your filters. They make it easier to find filters in a large library.

Importing Filters

To import filters created by other TextSpresso users, do the following:

  1. Select the Import Filters... command from the Edit Filters submenu of the Filter menu.
  2. Navigate to and open the filter file you wish to import.
  3. Select the filters you wish to import. To import all of the filters, select the Select All command from the Edit menu.
  4. Import the filters by clicking either Import or Replace. The Import button will number any imported filters that have duplicate names. For instance, if you try to import a filter named "Strip Tabs" and you already have a "Strip Tabs" filter in your library, Import will add a number to the end of the imported filter so that its new name is "Strip Tabs 1". Replace will replace any filters with duplicate names. In the above example, the old "Strip Tabs" would be completely replaced with the new "Strip Tabs". Be careful using Replace, as the old filters will be unrecoverable after the import.

Exporting Filters

To export filters you've created so that other TextSpresso users can use them, do the following:

  1. Select the Export Filters... command from the Edit Filters submenu of the Filter menu.
  2. Select the filters you wish to export using the Export Filters dialog. To export all of the filters, select the Select All command from the Edit menu.
  3. Click Export.
  4. Save your filters file using the Mac OS save dialog.

Overview of Filter Types

The current filter types and their uses are listed below.

  • Break Text - This filter type is used to insert a string every x number of characters in the text. Its name comes from the fact that it is useful for breaking text into even sized lines, such as in the Hard Wrap... command (which invokes a Break Text filter).
  • Character Table - This filter type is used to search and replace individual characters. It's different from the standard Replace Text filter in three ways. First, it's capable of searching and replacing any where from 1 to all 256 8-bit characters in a single pass. You define this filter by setting up a table which maps find characters to replace characters. Second, it can only find/replace individual characters. Third, because it's optimized for characters, it's brutally fast. You can map all 256 characters without any speed penalty over mapping 1 character. This filter is useful for transforming character sets. For instance, Mac to PC characters, or upper to lower case.
  • Insert Text - This filter type is used to insert text at or over one or more user specified locations relative to the beginning, middle, or end of the text. It can also be used to delete text from one or more locations.
  • MultiFilter - This filter type is used to encapsulate multiple filters into a single action. A MultiFilter doesn't do anything to the text by itself. Instead it calls upon the listed filters, in order, to apply themselves to the text. It allows you to apply complex filter sets to text with a single command.
  • Replace Pattern - This filter type is used to search and replace patterns of characters rather than fixed width strings. Though not as flexible as regular expressions (soon to be added), Replace Pattern is very fast for a pattern matcher and very easy to define. This filter type would be used to do things like strip tags, replace a series of characters with one character, etc.
  • Replace Text - This filter type corresponds to the Find & Replace commands found in most word processors and text editors. It searches for one string and replaces it with another string. This filter supports wild card characters, Break Lists, and Character Masks. These features make it much more flexible than meets the eye.
  • Word Table - This filter type is used to quickly find and replace a large number of similar text sequences. It was designed, and is ideal, for filtering escape code sequences such as HTML and MIME codes.