This chapter discusses the HoTMetaL PRO commands for creating, opening, closing, and saving files, previewing the current document with a browser, and checking document correctness.
Choose New... from the File menu (or click on the
toolbar button) to create a new file. HoTMetaL PRO will open the `default template' file chosen with the
Preferences... command.
Choose Open... from the File menu (or click on the
toolbar button) to open an existing file.
The default file extension in the Open dialog
box is .html. When you open a file, HoTMetaL PRO converts the `raw
HTML' into a graphical format in which the tags are replaced by tag icons, and HoTMetaL PRO's graphical editing features are available. You cannot open a file that's already open.
The names of the last four files that you opened with HoTMetaL PRO are added to the File menu. You can open a file (or make it the current file, if it's already open) by choosing it from this menu.
Choosing the Documents... command in the File menu gives you a dialog box that contains a list of the open files. To make a particular file the current file, click once on the filename. Leaving this dialog box open on the screen also provides quick access to the New and Open... commands. To choose one of these commands, click on the appropriate button.
The Open... command has several built-in filters that let you open files in other word-processing formats, as well as plain text. These files are converted into HTML. In any case, the conversion program determines the file format automatically, except for files with the .html file extension-these are assumed to be HTML files.
HoTMetaL PRO supports the following common word-processor formats:
In addition, the following formats are supported:
You will get an error message if the file is not in one of the supported formats.
If a file is in an unsupported format, you may be able to open it and save it in a supported format with another application.
If a document contains a graphic in one of the supported graphics formats, it will be converted to GIF format and saved in a separate file. An IMG element whose URL contains the full path to the GIF will be placed in the converted document. HoTMetaL PRO will convert graphics in BMP, GIF, JPEG (JFIF), MacPaint, PCX, and TIFF format. In addition, the graphics parts of EPS, PICT, RTF, SDW (AMI Draw), WMF, and WordPerfect Graphics files will be converted.
Graphics that are inserted in word-processor files by means of links (rather than inserted directly in the file) will not be converted.
Paragraphs in word-processor files are converted to P elements, quoted paragraphs to BLOCKQUOTE, headings to H1-H6, numbered lists to OL, bulleted lists to UL, bold text to B, italic text to I, graphics to IMG, and tables to HTML tables.
The conversion program uses various guidelines to decide how to perform the conversions: because word-processor files tend to be less structured than HTML, you should expect to do some refinement of the markup using HoTMetaL PRO's markup tools. Also, the conversion doesn't employ the full HTML element set so you may wish to use `richer' markup. In any case, you should always review the converted file before putting it on the Web.
You can configure how HoTMetaL PRO converts paragraphs, blockquotes, and headings by editing a configuration file. See Appendix 2: File conversion (click here) for more information.
If an HTML file contains markup errors, HoTMetaL PRO will try to rearrange the markup so that the file can be opened and displayed in graphical format. In these situations HoTMetaL PRO will usually succeed in creating a valid file, although you may have to adjust some of the markup manually. If HoTMetaL PRO cannot turn on rules checking (see click here), it will give a warning message informing you of the problem, and the insertion point will move to the location of the error.
In some cases rules checking can be turned on but the file will not validate (see click here). This normally means that some element is missing a required sub-element: for example, an OL might not have any LI elements in it. HoTMetaL PRO does not inform you automatically if the file will not validate: you can check if the file validates by choosing Validate Document from the Special menu.
If the HTML errors are so serious that the file cannot be opened in graphical format (for example, if the file contains a non-HTML element), HoTMetaL PRO will open it as a text file. This gives you the opportunity to correct the errors manually. Although the graphical editing features of HoTMetaL PRO are not available if you're editing a text file, you can still use Validate Document to locate errors. When you've corrected the errors, choose Interpret Document from the Special menu. This performs the equivalent of Open... on the text document.
Templates are pre-defined structures for documents. They are used as forms or document outlines that you can enter text into without necessarily having to insert any of the markup yourself.
To open a template, click on the Open Template... command. This brings up a
file selection
dialog box labeled Open Template, which displays the files and
directories in the
templates directory. The file aareadme.html in this directory gives you an index of templates. Each file
corresponds to a template: to open a template, just select it from this dialog box as you would any other file. The document name in the document window's title bar will be in the form
Document1,
Document2, and so forth.
When the template file is opened you can enter text or elements into it, and later save the file.
A number of templates are shipped with HoTMetaL PRO, but you can work with templates that were created at your own site.
To create a template file with HoTMetaL PRO, you should just create a file as you normally would and save it in the templates directory.
The Save command (or the
toolbar
button) saves the current file (that is, the file that is open in the
HoTMetaL PRO document window)
to the disk. Files are always saved in HTML format.
Note: HoTMetaL PRO saves a `document type declaration' (DOCTYPE) at the top of the file.
If you have rules checking turned on, the file will be validated when you save it, and you will be warned if there are errors and asked if you still want to save. If you do, the saved file will be invalid and HoTMetaL PRO may have trouble opening it in the future.
To save the file under a new name, choose Save As... from the File menu.
Using the Preferences... command in the Special menu, you can specify that HoTMetaL PRO should:
See the section Preferences (click here) in the Getting started chapter for more information.
Choose the Print... command in the File menu to print one or more pages of the current document.
The following dialog box appears:
The six text entry boxes in the lower part of the dialog box allow you to describe the page header and footer by specifying the text of their left, middle, and right components.
There are a number of special strings you can put in headers and footers:
The screen formatting options currently in use for the different elements (font, font size, line height, etc.) will appear in the printed output. If tag icons are currently displayed on the screen, they will be printed.
You can select a spooler, such as lpr, or another program to process the output, by choosing the Preferences... command in the Special menu and entering a Print Filter option.
If you want to see what your document will look like in a web browser, choose Preview... in the File menu.
If your document hasn't been saved, you will be given the choice of saving it and previewing, saving it as a temporary file and previewing, or cancelling the operation.
If you want to add a browser to the list:
Selection text entry box. You can also type command line options after the command.To delete a browser from the list:
Previewing a document with this command is the same as saving the file with HoTMetaL PRO, launching the browser independently of HoTMetaL PRO, and then opening the file with the browser.
The Close command in the File menu closes the current file. If the file has had changes made to it since it was last saved, you will be prompted to save the changes before closing it.
Quits HoTMetaL PRO. If an open file has been changed since the last time it was saved, you will be prompted to save the file before exiting.