You can view the places in your project where you have used local formatting. MadCap Analyzer suggests that you replace these instances of formatting with existing styles in your stylesheet that match the formatting that you have applied manually. This is different from a new style suggestion in the following way: With a new style suggestion, the properties in the tag do not match an existing style exactly; therefore, Analyzer suggests that you create a new style. On the other hand, if you make formatting changes that happen to result in an exact match to all of the properties in an existing style, Analyzer suggests that you replace the formatting with that style (rather than creating a new style).
Local formatting is simply a way to change the look and feel of content directly so that the changes are applied only to that specific content (as opposed to applying the changes throughout your project via the use of styles). Many easy-to-use tools are provided in Analyzer for editing and formatting topics directly in the XML Editor to give them the look and feel you want, without having to know XML at all. Simply open the topic that you want to format, and use the tool that suits your needs best. For example, if you want certain text to be bold, you can highlight the text and click the Bold button in the Text Format toolbar. This direct approach to formatting topics (sometimes called "inline" formatting) can be very attractive because it is quick and easy. However, it is recommended that you use style classes instead of local formatting whenever possible. Although local formatting is very convenient in the short-term, using style classes is much more efficient and can save you a great deal of time in the long-term.
- Open a project.
- Do one of the following, depending on the part of the user interface you are using:
- Ribbon Select the View ribbon. In the Dynamic Reports section, select Suggestions>Replace Local Style Suggestions.
- Analyzer Summary Window Pane Double-click the row that mentions local style replacement suggestions.
The Replace Local Style Suggestions window pane opens.
- To see more of the information in the window pane, drag the divider bar to make the pane wider:
- Apply Displays a check box next to the style suggestion. If you decide to replace the formatting with the suggested style, you need to make sure the check box is selected. If you do not want to replace the formatting with the existing style, but you do want to replace other formatting in the list, you can click the check box to remove the check mark.
- Selector Displays the base tag(s) where the formatting is found in the topic (e.g., p, div, ul, li), followed by a period and the name of the style class that Analyzer suggests you use.
- Properties Displays the formatting properties already set on the tag, which matches the formatting properties that you have applied manually.
- File Displays the path and name of the file where the formatting is found.
- Folder Displays the folder where the file is found.
If a certain number of items have been found, page navigation buttons in the local toolbar may be enabled. You can use these buttons to go to additional pages to display more items. You also have the option to view all items at once in one long list. This is called the View All option. You can toggle these views by clicking the View All/View as Pages button in the local toolbar. The button displays the opposite of whatever view is currently activated (e.g., If the View All option is currently active, the button shows View as Pages to indicate that if clicked, the button will switch the window pane to the View as Pages option).
- In the window pane, select all suggestions that you want to convert. If you want to select all rows click . You can hold the SHIFT key to select a range, or you can hold the CTRL key to select individual items.
- In the local toolbar, click the Apply button.
- In the message that opens, click OK. Another message lets you know how many files were changed.
Click OK. All of the selected suggestions are converted to styles.
Note: If you want to undo the conversions, you can use the Backups window pane (View>Backups).
See Restoring Backup Files.