The Markup menu contains commands to insert and edit HTML markup.
Sometimes you will attempt to open a document that contains structural errors and HoTMetaL PRO will be unable to correct them. In this situation HoTMetaL PRO will give you the choice of passing the file through a filter or opening it as a text document so that you can correct the errors manually. In the latter case, when you have corrected the errors in a text document, and while the text document is still the current open document, you can use Interpret Document to convert it into an open document in HoTMetaL PRO's internal format (which causes tag icons to be displayed and allows graphical editing). Alternatively, you can save the document and then open it using the Open... command in the File menu.
If Interpret Document discovers an error in the document, the error will be reported and the insertion point will move to its location. In this situation, the document will not be converted to HoTMetaL PRO format.
Interpret Document is very similar to Open...: the difference is that Interpret Document does the equivalent of an open on the current open text document, rather than on a file that was chosen from a file selection dialog box.
This command will be enabled only of the current document is a text document. Normally HoTMetaL PRO does not allow you to open a text document for editing as text: a file can be opened in this form only if it contains structural errors that HoTMetaL PRO cannot resolve.
This command creates a new element by inserting a new pair of start- and end-tag icons.
When you
invoke this command, you are given the Insert Element dialog
box, which contains a list of names of the elements permitted by the
rules file at the location of the insertion point (or selection) in the
document.
The left column of the list box contains an alphabetical list of element names; the right column contains a phrase describing the corresponding element. The first element (if there is one) required by the HTML rules file at this point in the document will be followed by the `<' character.
To select an element, click once on the line containing the element name, or type the first character of the element name repeatedly until the correct element is selected. Then click once on the [InsElem] button to insert it. Alternatively, you can double-click on the line that contains the element name in the scroll box.
If the document contains a selection rather than an insertion point, the selection will be overwritten by the inserted element.
Insert Element... will be disabled and the menu item grayed-out if there are no elements that can be inserted at the insertion point or current selection without creating an incorrectly marked up document. Often the command will become enabled if rules checking is turned off (see Turn Rules Checking On/Off), but there are some elements in which you will never be allowed to insert an element: BASE, BR, HR, IMG, INPUT, ISINDEX, LINK, LISTING, META, NEXTID, PLAINTEXT, and XMP.
The Insert Element dialog box includes a check box labeled Include Required Elements. When this box is selected, inserting an element causes the first required subelement (if there is one) to be inserted as well. This option may also be set with the include_required_elements configuration variable. This process is recursive, so that if the required subelement itself has a required subelement, this element will also be inserted, and so forth. Note that this does not mean that all required subelements of the current element will be inserted, only the first required subelement (and its required subelements).
This command lets you surround the current selection with a new element.
This command will be available only if the document contains a selection. When you invoke Surround..., the Surround dialog box appears: it contains a list of elements that can surround the selection and still leave the document correctly marked up. Choose an element in the same manner as when inserting an element. Required and included elements will be identified in the same way as in the Insert Element dialog box.
The command will be disabled and the menu item grayed-out if there are no elements that can surround the selection without creating an incorrectly marked up document. Often the command will become enabled if rules checking is turned off (see Turn Rules Checking On/Off), but there are some circumstances in which you will never be allowed to surround a selection.
A selection inside LISTING, PLAINTEXT, or XMP cannot be surrounded.
Changes the type of the current element. (The current element is the innermost element containing the insertion point or selection. If the selection consists of an entire element, including its start- and end-tags, then the current element is the one containing the selected element, not the selection itself.)
When you invoke this command, HoTMetaL PRO presents you with a dialog box containing a list of elements that can replace the current element and still leave the document correctly marked up. You may choose the appropriate element from the list in the ways described above for the Insert Element... and Surround... commands.
The command will be disabled and the menu item grayed-out if there are no elements that can replace the current element without creating an incorrectly marked up document. Often the command will become enabled if rules checking is turned off (see Turn Rules Checking On/Off in the Special menu), but there are some circumstances in which you will not be allowed to change the current element:
Splitting an element literally means breaking it into two elements at the current insertion point or selection.
If the document contains a selection, this command creates two elements of the same type, one containing all of the content before the beginning of the selection and the other containing the remaining content. If there is an insertion point directly before an end-tag (for example, when you are typing at the end of a paragraph) then Split creates a new, empty element with the same type as the current element. In fact, the most common use of the Split command is to start a new paragraph. When the current paragraph is finished, selecting Split will start a new one.
The command will be disabled and the menu item grayed-out if the current element cannot be split without creating an incorrectly marked up document. This command will always become enabled if rules checking is turned off (see Turn Rules Checking On/Off).
When you split an element that has attributes, each of the resulting elements will adopt the attributes of the original element. In some cases, the Edit Attributes dialog box will appear, allowing you to edit the attributes of the new element containing the insertion point. The prompt_for_attrs configuration variable may be used to configure HoTMetaL PRO so that attributes are always asked for, or asked for only when one of the attributes is mandatory.
If the Include Required Elements option is turned on, then if you are using Split to create a new, empty element by splitting the current element just before the end tag, the new element's first required element will be inserted. This is the same as if the Insert Element... command were used to insert the new element.
Combines the current element and the previous element. You are allowed to join only elements of the same type--two paragraphs, for example, or two list items.
The command will be disabled and the menu item grayed-out if the action will leave the document incorrectly marked up, if the two elements to be joined are not of the same type, or if there is any text other than spaces, tabs or carriage returns between the two elements. (Any such "white space" between the elements will be deleted by the Join command.)
If the elements have attributes, then the attributes of the first element will be adopted for the new element.
Deletes the start- and end-tags of the current element without affecting its contents.
The command will be disabled and the menu item grayed-out if the action will leave the document incorrectly marked up. However, it will always be enabled if the rules are not being checked (see Turn Rules Checking On/Off).
This command lets you view and edit the attributes of the current element. If you wish to edit an attribute that specifies a URL, you should instead use the Edit URL... command.
To edit the attributes of an element, set the insertion point inside that element (i.e., make it the current element). Then invoke the Edit SGML Attributes... command. You will be presented with a dialog box that can be used to edit the attribute list.
The dialog box will change depending on the type and number of attributes that have been defined for this element in the rules file. In every case, however, the dialog box will consist of several lines, one per attribute. Each line will consist of:
The name of the attribute.
A drop-down list box or a text box, depending on the
type of attribute. If the attribute value is defined as being one of a
list of values, then the line in the dialog box line for that attribute
will contain a drop-down list box giving the possible values.
Otherwise, you will see a text box. Here is an example showing both
possibilities:
When you have entered the desired attribute values, click on the [Apply] button.
Edit URL... is used to edit an attribute that represents a URL. To use this command you should:
The
Edit URL dialog box contains the following controls:
gopher://<host>:<port>
To edit a URL, you should do the following:
This command lets you insert a character entity into the document. Character entities represent special characters that you may not be able to enter into a document directly from your keyboard.
When you invoke this command you get a dialog box displaying containing push buttons for the "special" characters in the ISO 8859-1 character set. To insert a character, just click on the button with the mouse.
If the character you want to insert is not found in this dialog box, you should click on the [Other...] button. When you do so you will get a dialog box that lets you choose character entities from a number of entity sets. The entity set is chosen from the drop-down list box labeled Entity Set. The character entities in the selected entity set are displayed in the list labeled Defined Entities. This list has has three columns: the first column gives the entity names; the second column will give some information about the kind of entity that has been defined (normally this will say SDATA, indicating that the character entity is a "specific character data entity" in SGML); the third column in the list gives the content of the character entity.
To choose an entity set, click on the Entity Set drop-down list box and make a selection from the list that appears. One of your choices is Local & Active: this set contains all the character entities that have been used in the current document so far. The effect of this is that character entities that are likely to be frequently used are conveniently grouped together. If no entities have been used to this point, this list will be empty. The other entity sets have labels indicating the kind of special character that they contain--diacritical marks, special graphics characters, etc. When you choose an entity set, its entities will be displayed in the Defined Entities list.
You can insert a character entity by double-clicking on the entity name, or clicking once on the name and once on the [[Insert]] button.
If the document contains a selection (as opposed to an insertion point) before the character is inserted, the selection will be replaced by the entity reference.
You will never be allowed to insert a character entity into the elements BASE, BR, HR, IMG, INPUT, ISINDEX, LINK, LISTING, META, NEXTID, PLAINTEXT and XMP.
If the Show Tags command is invoked (see the View menu) a character entity appears on the screen as an icon consisting of a box containing the character name. If Hide Tags is invoked, the character itself is displayed. (There are a few characters that HoTMetaL PRO cannot display--in these cases the character name, surrounded by square brackets, will be displayed instead.) By default, character entities (and tags) are displayed as icons.
You cannot put an insertion point in the icon or the expanded text view of the character entity. You can only select the entire character. That is done by clicking the mouse to one side of it and then dragging across it.
Allows you to change default settings for the entire table, for all rows, or for all columns. Any properties you set here are overridden by changes you make to individual rows, columns, or cells using the Cell-Row-Column Properties... menu selection.
The Table Properties... command presents you with a dialog box that consists of three sections:
This section of the dialog box allows you to indicate the height and width of the table. Neither of these items is required: the table height defaults to the combined height of the rows, and the width defaults to the combined widths of the columns.
This section of the dialog box allows you to indicate how rows in the table should be formatted. A setting for an individual row using the Cell-Row-Column Properties... command will override the settings in this dialog box.
Use this entry to indicate the default row height.
If you do not specify a value, the row height is taken to be the height of the table divided by the number of rows in the table.
Indicate here how text should be vertically aligned in the cells of the rows. Top justification is the default.
Indicate here the row separator along the bottoms of the rows. The default is a single line.
Indicate here the left-most column separator in the table. The default is a single line.
This section of the dialog box allows you to indicate how columns in the table should be formatted. A setting for an individual column using the Cell-Row-Column Properties... command will override the settings in this dialog box.
Indicate here the default column width.
If you do not specify a value, the width of a column is taken to be the width of the table divided by the number of columns in the table.
Indicate here how text should be horizontally aligned in the cells of the table. Left justification is the default.
Indicate here the column separators along the right edges of the columns. The default is a single line.
Indicate here the top-most row separator in the table. All other row separators are determined by the row settings or by the cell above the separator.
Provides a dialog box for setting the properties of the row, column and cell containing the insertion point. Row and column changes apply only to the current row and column, but override any settings you may have made with the Table Properties... command. Changes you make in this dialog box to the current cell properties override properties of the current column and row as well as those for the entire table.
The Edit Row/Column/Cell Properties dialog box has three sections:
This section of the dialog box allows you to indicate how the row containing the insertion point should be formatted. These settings override (for the current row) any defaults you may have set using the Default Row Properties section of the Table Properties dialog box. You can override these settings for individual cells by using the Cell Properties section of this dialog box.
These entries set the height of the current row. If you do not specify the height it will taken to be the default row height set in the Table Properties dialog box.
Indicate here how text should be vertically aligned in the cells of this row. This choice defaults to adopt current (AC).
If you choose adopt current, the vertical alignment setting in the Default Row Properties section of the Table Properties dialog box will be inherited.
Indicate here the separator along the bottom of the current row. If you choose adopt current, the row separator set in the Default Row Properties section of the Table Properties dialog box will be inherited. The default is adopt current.
Indicate here the left-most column separator in this row. All other column separators are determined by the column settings or by the cell to the left of the separator. If you choose adopt current the left-most column separator set in the Default Row Properties section of the Table Properties dialog box will be inherited. The default is adopt current.
This section of the dialog box allows you to indicate how the current column (the one containing the insertion point) should be formatted. These settings override (for the current column) the settings from the Default Column Properties section of the Table Properties dialog box. You can override these settings for individual cells using the Cell Properties section of this dialog box.
Use these entries to indicate the width of the current column. The width of the column defaults to the column width set in the Table Properties dialog box.
You may set the column width as a percentage of the total table width only if the table width has been set explicitly using the Table Properties... command.
Indicate here how text should be justified in the cells of the current column. If you choose adopt current as the justification, the justification set in the Default Column Properties section of the Table Properties dialog box will be inherited. Justification defaults to adopt current.
Indicate here the column separators along the right edges of the current column. If you choose adopt current, the column separator set in the Table Properties dialog box will be inherited. The default is adopt current.
Indicate the top-most row separator in this column. All other row separators are determined by the row settings or by the cell above the separator. If you choose adopt current, the top-most row separator set in the Table Properties dialog box will be inherited. The default is adopt current.
This section of this dialog box allows you to set properties that only apply to the cell containing the insertion point. These settings override (for the current cell) the row and column settings you may have made with this dialog box as well as the default settings from the Table Properties dialog box.
Indicate here how text should be vertically aligned in this cell. If you choose adopt current, the vertical alignment from the row that contains the current cell is inherited. Vertical alignment defaults to adopt current.
Indicate here how text should be justified in this cell. If you choose adopt current, the justification of the column containing the cell will be inherited. Justification defaults to adopt current.
Indicate here the column separator on the right edge of this cell. If you choose adopt current, the column separator set with Table Properties... will be inherited. The default is adopt current.
To set the column separator along the left edge of the cell, you must set the column separator for the cell(s) that are immediately to the left of the current cell.
Indicate here the row separator along the bottom of this cell. If you choose adopt current, the row separator set with Table Properties... will be inherited. The default is adopt current.
To set the row separator along the top of this cell, you must set the column separator for the cell(s) that are immediately above the current cell.
Permits you to add or delete a single row or column.
The dialog box lets you carry out the following operations:
The [Insert Row Above] and [Insert Row Below] buttons create a new row that takes on the row defaults of the active row. The tables interface determines which row is active, as follows:
For example, if the insertion point is located in a cell spanning two rows and you click on the [Insert Row Below] button, the new row has the same defaults as the lower of the two spanned rows.
A new row is created above (or below) the active cell. The cells in the new row each contain exactly one grid cell, except where inserting such a cell would cause an existing spanned cell to be split. In that case, the number of rows spanned by the existing cell is increased by one.
The [Insert Column Left] and [Insert Column Right] buttons create a new column that takes on the column defaults of the active column. The tables interface determines which column is active, as follows:
For example, if the insertion point is located in a cell spanning two columns and you click on the [Insert Column Right] button, the new column has the same defaults as the rightmost of the two spanned columns.
The new column is created next to the active column, in the direction of the insert. Each cell in the new column consists of exactly one grid cell, except where inserting such a cell would cause an existing spanned cell to be split. In that case, the number of columns spanned by the existing cell is increased by one.
The [Delete Row] and [Delete Column] buttons delete the current row or column, along with its contents, subject to these rules:
Allows you to change the spanning on the cell containing the insertion point.
The dialog box contains eight icons, four for extending cells and four for contracting them.
The cell-extending icons, in clockwise order from the top, are:
All extending actions eliminate one cell from the table. Cells may be extended subject to these rules:
The cell-contracting icons, in clockwise order from the top, are:
A contracting action creates a new cell in the space left by the contraction; the new cell consists of at least one grid cell.