HoTMetaL PRO provides screen-formatting capabilities that help you edit documents by allowing you to assign distinctive styles to the elements in your document. The purpose of these formatting features is to mimic the way a browser will format your document, and improve the appearance of your document during the editing process. The styles that you set with the Element Styles... command do not affect how browsers format the document. Several styles files corresponding to browser styles are provided. Only the HTML markup affects how a document looks in a browser.
All local screen-formatting is set using the Element Styles... command in the View menu.
Because HTML files are structured documents, setting a style for an element means setting it for all elements of that type.
The following styles can be set:
In addition, every element has a format type: block or inline. Block elements start and end on a separate line from adjacent content. Inline elements are not set off from adjacent text. All of the styles listed above can be applied to block elements; only font properties and color can be applied to inline elements.
You can change the format assigned to an element in the document at any
time. When you choose the Element Styles... command, HoTMetaL PRO gives you a
dialog box allowing you to set formatting parameters for the current element
(the one the insertion point or selection is in). If the insertion point
is outside the HTML element that surrounds the entire
document, the dialog box lets you set the default format. If you move the
insertion point to a different element while the
Styles dialog box is on the screen, the dialog box changes to
reflect the formatting of the new element.
The Styles dialog box will look like the following
illustration:
The element name (P in this example) is displayed in the dialog's title bar.
HoTMetaL PRO stores the formatting information set with the Element Styles... command in a binary styles file called hmpro3.stl. Whenever a document is saved, this styles file is updated with whatever styles are in effect for the document by default. You can also select or create a different styles file in a non-binary format.
HoTMetaL PRO can also load styles files in text form. To create a text-format styles file containing the styles in effect for the current document, choose Save Styles... in the View menu. To load a text-format styles file, choose Load Styles... in the View menu. You can switch styles in the middle of a HoTMetaL PRO session by loading a new text-format styles file with this command.
Note: The formatting information from a text-format styles file will not be saved in the default (binary) styles file until the current document is saved.
HoTMetaL PRO searches for the styles file in a set of directories called
the styles path. By default this path consists of the styles
directory located in the HoTMetaL PRO directory.You can modify the styles path
in the
Extensions/Paths section of the Options dialog box.
Choose a directory in the
Styles line. If you want just one directory in the styles path,
you can click on the [Choose] button and choose it. If you
want more than one, type them into the text entry box, separated by semi-colons
(;). HoTMetaL PRO searches through the directories in the order in which they
are entered, and uses the first styles file called
hmpro3.stl that it finds.
The styles path also becomes the the default directory for the Save Styles... and Load Styles... dialog boxes. If you choose a file extension, it becomes the default extension for these dialogs.
HoTMetaL PRO has several preformatted styles files (in text format) to choose from. Included are the following styles files, which you can load from the Styles directory:
To achieve a near-WYSIWYG effect in the HoTMetaL PRO document window, load one of these styles files and then choose the following commands (if they aren't in effect already) from the View menu: Hide Tags, Hide URLs, Hide Comments, Hide Invisibles, and Show Inline Images.
The Styles dialog box allows you to enter numerical values for
font size, line height, space above and below, and indention. These may be set
from a menu or entered directly in a text entry box. As appropriate, these
values may be absolute,
relative (+/-), or expressed as a
percentage of a base value. The following units may be used:
You can use any unit wherever you are allowed to enter values. For example, font size may be expressed in points, inches, picas, etc.
Units can be specified by giving the full unit name, or the first few letters of the unit name, as long as that is unambiguous (e.g., don't use `p' since that could mean `points' or `picas'). In addition, `cm' and `mm' specify centimeters and millimeters, respectively.
If you don't specify a unit, HoTMetaL PRO will interpret the value as points by default.
The following are examples of valid settings:
Notice that you don't need any space between the number and the unit.
Relative settings specify an amount to be added to or subtracted from a base
setting: they have the same format as absolute settings, but start with a `+' or
`-' sign. As well, you may set a value to be
Adopt Current, which means that the value is to be inherited from
the surrounding element. Some valid settings are:
Percentage values are specified with a percent (%) sign, the word `percent', or a suitable abbreviation, e.g.:
You can choose the font used for the current element type from the
option button labeled
Name in the Styles
dialog. If you want the current element to inherit the font of the element that
surrounds it, choose
Adopt Current. Use the Style list to add
style variations (bold, italic,
etc.).
The font you choose here will affect the HoTMetaL PRO display only. If you want to choose a font in a way that will affect how your document is displayed in a browser, see HTML extensions.
To select the font size, click on the Size option menu
and choose any size (including Adopt Current) shown. You can also
enter a size in the text entry box to the right of the menu. This size can
be an absolute or relative value. If the size you chose is unavailable, HoTMetaL
PRO will choose the next smallest font size. Relative values (+2 points, -3
points, etc.) are added to the font size of the surrounding element.
This setting affects the HoTMetaL PRO display only. To change the font size used in a browser, use the FONT or BASEFONT element.
The choices in the Style list allow you to add style
variations to the font. These can be set individually or in any combination.
Adopt Current means that the font style options of the
containing element are adopted in addition to those explicitly set for this
element type. If Adopt Current is the only option selected, then
the font style for an element of this type will be identical to the font style
of its containing element.
If you select the Toggle font style, the other style settings
are
turned off in the current element if they
are turned on in the containing element. For
example, an element whose font style is set to
Bold and Toggle will appear as bold text within
plain (Roman) surrounding text and as plain within bold surrounding text.
This setting affects the HoTMetaL PRO display only. To change the font style in a browser, surround the text with one of the `emphasis' elements, such as EM, STRONG, B, and I. Some browsers may support the S or STRIKE (strike-through), SUB (subscript), SUP (superscript), and U (underline) elements.
These styles determine how lines are formatted and are available only for block elements.
HoTMetaL PRO offers four styles of text alignment (also called
justification)-left, right, centered, and `both' (that is,
both left and right alignment). If you choose
Adopt Current, the alignment style is inherited from the
surrounding element. Choose the style you want from the option menu labeled
Alignment in the Styles
dialog box.
These settings affect the HoTMetaL PRO display only.
Aligning elements in a browser.
This group of choices allows you to specify how HoTMetaL PRO should treat
`return' characters for the current element type. If you type
Return or Enter in an element formatted in
Fill mode, the element will be
split. When
No Fill is selected, the element will not be split when you
type
Return or Enter.
Browsers typically display elements (with the exception of PRE) in fill mode.
The Show Invisibles command in the View menu will show you the location of `new line' characters.
These settings affect the HoTMetaL PRO display only.
You can select single, double, or triple spacing from the option menu
labeled
Line Height in the Styles
dialog box. A value may also be entered directly in the text entry box.
A percentage line height is interpreted as a percentage of single spacing. For example, 100 percent is the same as single spacing, 150 percent is 1.5 times as high as single spacing, and so on.
If you give a relative (+/-) value, the line height will be equal to the single-spaced line height, plus or minus the amount specified.
An absolute line height should be at least as large as the point size: otherwise, the lines will overlap. A value of about 1.2 times the point size would be normal.
If you select Adopt Current for the line height, then the
element you are formatting will assume the absolute line height of its
surrounding element. This could give undesirable results if the line height of
the surrounding element is smaller than the font size of the current element.
These settings affect the HoTMetaL PRO display only.
Space above and below control the vertical separation between elements. They are available only for block elements.
Space Above determines the minimum amount of vertical white
space that must precede the current element. If the element before this one has
a
Space Below value, the actual separation will be the greater
of the space above the current element and the space below the preceding
element.
Space Below determines the minimum amount of vertical white
space that must follow the element. The actual separation is the greater of the
current element's bottom space and the next element's top space.
A space above or below can be specified as a percentage of one line height for the current element. For example, if you want 1 1/2 lines of white space between paragraphs, set the space above to 150%.
If you specify an absolute amount, it will be added to the normal line spacing.
These settings affect the HoTMetaL PRO display only.
The left indent is measured from the left margin of the document window; the right indent is measured from the right margin of the document window. The two indents effectively specify the line length for the element.
If you specify a relative (+/-) left or right indent it is added to or
subtracted from the corresponding indent of the element that contains the
current element. For example, a value of `+1 inches' for the left indent
causes the indent to be one inch to the right of the left indent for the
containing element. An indent of Adopt Current is equal to the
corresponding indent of the containing element.
The first indent (indent for the first line) can be
different from the indent for subsequent lines: this is often done for
paragraphs. An absolute first indent will be measured from the left margin. A
relative first indent will be added to or subtracted from the left indent for
the current element. A first indent of Adopt Current is identical
to the left indent.
These settings affect the HoTMetaL PRO display only.
For each element type, you can choose a foreground color and a background color. The foreground color is the color of the text.
To choose the colors for an element, click on the
[Colors...] button in the
Styles dialog box.
HoTMetaL PRO displays a dialog box containing two scrollable lists from which colors can be chosen, one for the background, one for the foreground.

These lists contain the colors that are currently loaded into HoTMetaL PRO.
In addition, the lists contain entries
Adopt Current,
Default Background, and
Default Foreground. To choose a color, click on the color in
the list or type it in the text box directly. Then click on the
[Apply] button.
If you choose Adopt Current, the color of the surrounding
element will be adopted for the current element. Note that if you choose
Adopt Current for either the foreground or background color, then
the other one will revert to
Adopt Current also. You can, however, use
Default Background or
Default Foreground in conjunction with another color choice.
These settings affect the HoTMetaL PRO display only. To change the color
that a browser uses, choose Document Colors... (to change the default color), or
surround the specific text you want to change and click on the
toolbar button. See
click here for a discussion
of available colors and the color menu.
Normally highlighted text is displayed in white, with the background in black. If you want highlighted text to be displayed in reverse-video (that is, the current text color becomes the background color, and vice versa) you can put the following setting in the HoTMetaL PRO configuration file:
highlight_mode=invert
Once you've done this, restart HoTMetaL PRO for it to take effect.
X applications allocate a certain number of colors for their own use. Each display has a maximum number of colors that can be allocated (often this is 256) so you may find yourself running out of colors. To better manage your color resources, you can configure HoTMetaL PRO to allocate a certain number of colors on start-up. To do this, enter a setting such as the following in the HoTMetaL PRO configuration file:
colormap_segment_size=32
This doesn't limit the number of colors HoTMetaL PRO can use, just the initial allocation. This setting will take effect the next time you launch HoTMetaL PRO.
Choose Show Invisibles in the View menu to see characters that would otherwise be invisible. A carriage return is represented by a `paragraph' symbol; a newline by a `sunburst' or `currency' symbol; a space by a raised dot; a tab by a hash (number) sign, `#'; and a zero-width character by a tilde, `~'.
Choose Hide Invisibles to turn off the display of invisible characters.
The Options... command in the Special menu lets you set the following default display options. These settings affect the HoTMetaL PRO display only.
General section of
the
Options dialog box.Defaults for New/Open section of the Options dialog
box. This setting takes effect on start-up only.Size text to window: if you turn on this option, which is
found in the General section of the Options dialog
box, wrapped lines will adjust their length to fit the window if the window is
resized. If this option is turned off, wrapped lines will take their length from
the global margins.
Size text to window will cause a lot of reformatting, which may
be slow for large documents.