The Special menu contains commands for document checking and macros.
Verifies that the markup in a document is correct and complete.
If the validation process finds an error in the document, you will be notified of the error and the insertion point will move to the place where the error occurred.
The purpose of the Validate Document command is to catch and report any markup errors not found by the rules checking. It will check that:
If your document contains a selection, the menu item will read Validate Selection. In this case, your selection will be validated as a partial document.
This command toggles the state of rules checking in HoTMetaL PRO.
When rules checking is on, HoTMetaL PRO uses the rules file to ensure that the document being edited will be correctly marked up. While this checking is not complete, it will nevertheless catch and prevent most markup errors.
HoTMetaL PRO prevents markup errors in a number of ways.
The commands that could cause errors are disabled. For example, the Surround command in the Markup menu will be grayed-out if the document would not be correctly tagged after the selected content was surrounded by any element.
A restricted list of elements is presented. For example, the Insert Element... command will only present a list of those elements that will leave the document correctly tagged after the insertion.
An opportunity is given to cancel a command before any damage is done. For example, if a Paste operation would leave the document incorrectly tagged, HoTMetaL PRO will present a warning giving the choice of canceling the paste or completing the command after first turning rules checking off.
Rules checking is normally desirable, since it greatly reduces the chance of making markup errors. However, there are occasions when rules checking can get in the way of the job at hand. Most commonly this happens when the operation that you are performing involves two or more steps, and one of those intermediate steps will leave the document temporarily incorrectly marked up.
When the rules are not being checked, the commands that were previously disabled will usually become enabled; for the exceptions, see the documentation on the individual commands. This means that you will be able to create an incorrectly tagged document, and therefore you should leave the rules off only as long as you need to.
When you choose Turn Rules Checking On from the menu, the menu item changes to Turn Rules Checking Off to indicate that this state can be toggled. When you turn rules checking back on, HoTMetaL PRO will quickly scan your document to make sure it is correctly tagged. If it isn't, HoTMetaL PRO will present a warning describing the problem and the insertion point moves to the location of the error. Rules checking will remain off. Select Turn Rules Checking On again after the problem is corrected.
Macros are sequences of actions associated with user-defined keyboard sequences (known as accelerators). Using the Record Macro and Stop Recording... commands, described below, you can associate an accelerator with a series of HoTMetaL PRO operations.
The Run Macro... command presents a dialog box that gives a list of all the macros that are currently available. This list includes macros that have been loaded from a file and those that have been defined in the current session but not saved to a file. If a macro file is loaded, the dialog box displays the filename.
Clicking on the [Run] button will cause the highlighted macro to be executed, that is, HoTMetaL PRO will carry out the series of operations associated with the macro. You can run only one macro at a time.
This command presents you with a file chooser dialog box from which you may select a file of macros to be loaded. Macro files are created by recording macros with HoTMetaL PRO and saving them to a file with the Save Macros... command.
After a macro file is loaded, the previously loaded macros are unavailable. If any macros have been defined but not yet saved, these will be lost. Before the new macro file is loaded, you will receive a warning dialog giving you the opportunity to save any unsaved macros.
Macros are not associated with a specific document, so any macros you load will be available for use with all files that you are editing in the current HoTMetaL PRO session.
Macro files are stored as text. They may be opened and edited using HoTMetaL PRO--for example, you could combine several special-purpose macro files into a larger file using copy and paste. These macro files may be used by versions of HoTMetaL PRO running on different platforms.
This command presents you with a file selection dialog box in which you can save the currently loaded macros to a file. A macro file saved in this way may be loaded using the Load Macros... command.
If any macros are still unsaved when you attempt to exit HoTMetaL PRO, you will get a warning message informing you of this and giving you the opportunity to save the macros before exiting.
This command gives you a dialog box that lets you change the accelerator for a macro or delete a macro.
If you want to change the accelerator for a macro, click on the macro name in the list of macros. This causes the name and bindings of the macro to appear in the controls at the top of the box.
Once you've done this you can change the accelerator for the macro by means of the Ctrl and Shift check boxes and the Key drop-down list box. Combinations that consist of KEY:Ctrl plus a letter are reserved by HoTMetaL PRO and you will not be allowed to use these as macro accelerators.
When you have made the desired changes, click on the [Apply] button.
To delete a macro from the list of available macros, highlight the macro in the list and click on the [Delete] button. If you delete a macro that has been loaded from a file, the macro is removed only from HoTMetaL PRO's list of available macros--it is not deleted from the file from which it was loaded, and can subsequently be re-loaded. You can delete only one macro at a time.
These commands are used to begin and end a macro. The sequence of actions associated with creating a macro is as follows:
The progress message area of the main window displays the phrase Recording macro while a macro is being recorded. The usual messages like Opening... will show up when appropriate, but any time the message area would normally be empty, it will instead say Recording macro.
Macros may be associated with text and/or elements to be inserted in a document, a single command, or a complex series of commands. Some actions that you can perform with macros are:
A macro should be self-contained, that is, its completion must not depend on any user input, such as typing in a text field in a dialog box or making a selection from a list. Consequently, there are some sequences of actions that cannot successfully be associated with a macro. As a general guideline, if a macro involves invoking any of the commands whose name ends in "...", that command should be completed somewhere in the macro. So, for example, you can define a macro that inserts a particular element, but you cannot define a macro that simply brings up the Insert Element dialog box.
An exception to this rule is the action of clicking in an alert box. For example, you may create a macro that invokes the Validate command. When the macro is executed, if there are any warning messages, you will be presented with a caution box, and the validation will continue if you click on the [Continue] button.
Mouse clicks in content are ignored during macro recording. The first time you attempt to use the mouse to change the selection, HoTMetaL PRO will beep. The second time, you will get a message saying that you should use the cursor (arrow) keys to change the selection.
Spell checking operations should also not be put in a macro.
When you have carried out all the actions you want a macro to contain, click on Stop Recording... to end the macro.
A dialog box will appear, allowing you to select a name and an
accelerator for the macro. The macro name is to help you identify the
macro in the list in the dialog box that appears when you invoke the
Run Macro... command. The accelerator is
the sequence of keystrokes that will run the macro.
An accelerator can consist of any choice from the drop-down list box labelled Key (a letter, number, function key, or arrow key), alone or preceded by KEY:Shift, KEY:Ctrl, or KEY:Alt. Accelerators consisting of KEY:Ctrl plus a letter are reserved by HoTMetaL PRO and you may not use these as macro accelerators: the other combinations are valid.
To include KEY:Ctrl, KEY:Alt, or KEY:Shift in the accelerator, click on the appropriate check box.
You will receive a warning if you attempt to use an accelerator that has already been used for another macro.
When you have chosen the name and accelerator, click on the [New Macro] button.