ANT_HTML

Microsoft Word for Windows 6.0 to HTML Conversion

This HTML template editor uses hidden text to insert HTML codes into any new or previously prepared Word document or any ASCII document. (The hidden codes are visible to HTML browsers.) Type as you normally would and use the tools as described. The editor is designed so that almost everything but typing the text is done for you automatically.

Author: Jill Swift, Montgomery, Texas. USA (jswift@freenet.fsu.edu)



INSTALLATION INSTRUCTIONS

Copy the file "ANT_HTML.DOT" into the Winword Template Directory. The End.

Back to Index

CREATING A HYPERTEXT DOCUMENT

If you want to create a new document:

  1. Choose File, New.
  2. Select the New Document option button (it's usually the default selection).
  3. Select the Ant_HTML template and choose OK.
  4. Create your document
  5. Save your original document and then convert with the CONVERT AND SAVE TOOL

If you want to open a document previously created in Word which is not yet formatted with HTML codes:

  1. Copy and paste the contents of the document into a new one as described above.
  2. Revise your document
  3. Save your original document and then convert with the CONVERT AND SAVE TOOL

If you want to open an ASCII document (or any document without a .DOC extension) which is not yet formatted with HTML codes:

  1. Open your document.
  2. Attach the ANT_HTML Template to your document, ( The easiest way or the regular way.)
  3. Revise the document
  4. Save your original document and then convert with the CONVERT AND SAVE TOOL

If you are opening a document already formatted with HTML codes:

  1. Open your document.
  2. Attach the ANT_HTML Template to your document, if it is not already attached. ( The easiest way or the regular way.)
  3. Revise the document
  4. Save with the SAVE CODED FILE TOOL
    (Do NOT use the CONVERT AND SAVE TOOL if codes are already embeded in your document).

Return to beginning of Creating a Hypertext Document

Two methods of attaching the Ant Template follow :


1.

REVISIONS MADE EASY: (or, at least, easier...)
{Do this once and never worry about it again:}

A macro called "Attach Ant HTML Template" has been included so that you may more easily change a document based on Word's "Normal" template to the Ant_HTML template. (All documents created in the Ant and saved with .HTM extensions become text files based on the Normal Template.)
If document revisions are necessary, the Attach Ant HTML Template macro automatically re-attaches the Ant Template, makes imperceptible adjustments to paragraph marks so that the macros will function efficiently and displays the Ant's Toolbar.
To make the macro readily available, copy the macro to your "Normal" template.

      1. While in any ANT_HTML document, choose Tools, Macro, Organizer...
      2. From the ANT_HTML.DOT list of macros (on the left), select Attach ANT HTML Template.
      3. Make sure the NORMAL.DOT list of macros is on the right.
      4. Choose Copy > >.
      5. Choose Close.
      6. You may then create a toolbar tool for the macro if you wish.


2.

Attaching the Template "the regular way" (i.e. without using the Attach Ant macro) :
      1. Choose File, Templates
      2. Check the box that reads "Automatically Update Document Styles"
      3. Choose Attach
      4. Choose ANT_HTML.DOT from the template list, then click OK, then click OK again.
        (If the Ant Toolbar does not appear, click the right mouse button anywhere on the toolbar
        and choose ANT_HTML toolbar.)
      5. For best results, use Word's Search and Replace feature to search for and replace all paragraph marks with paragraph marks. (That is, search for " ^p " and replace with " ^p ".)
        ASCII paragraph marks appear the same but behave differently when the macros encounter them.)
        If, instead, you run the "Attach ANT HTML Template" macro", the macro automatically attaches the template and takes care of the paragraph marks for you.

Return to beginning of Creating a Hypertext Document

ANT USER'S GUIDE

Viewing the Hidden Codes

You may toggle (turn on or off) the hidden codes using the VIEW HIDDEN CODES TOOL provided on the toolbar (shaped to look as much like spectacles as possible) or by using any standard Word method.

Headings and Styles

Back to Index

HEADINGS 1 - 6. TOOLS , ADDRESS and TITLE STYLES:

If you place the cursor anywhere in a paragraph and click the tool, the contents of the entire paragraph will be automatically selected and formatted with codes If there is no text in the paragraph at the cursor location, the beginning and ending codes will be inserted on each side of the cursor.

NORMAL STYLE

The NORMAL TOOL changes paragraph formatting to "Normal" Style. (You may also use Word's Style Box.)

You may also select headings, styles, as well as numbered or unnumbered lists via Word's

STYLE BOX.

Use the Styles in the Style Box as you normally do. The codes won't be inserted until you choose the CHECK STYLES FOR HTML CODES TOOL described below.

When you use styles from the Word Style Box (to the left of the font selections on Word's standard formatting toolbar), you may quickly insert heading and style codes by choosing the

CHECK STYLES FOR. HTML CODES TOOL

It installs the appropriate codes around each style if they aren't there already.
(If some codes are already inserted, it will ignore them so you may use this tool as many times as you wish while preparing your document.)

Back to Index
Back to Lists

In addition to the above options, a

STYLE TOOL

provides a dialog box with a range of style choices including
< quote >.. < comment >.. < directory >.. < cite >.. < code >.. < fixed >. < keyboard >.. < sample >.. < strong >. and < variable >..
When an option is chosen, the codes will automatically be inserted at the cursor location. If no text is selected, the codes surround the cursor, so you can begin typing your entry immediately. If text is selected, the codes will surround the text. Use whatever method you find the most convenient.

Note: If you use the style called CODE, Word changes some entries like "<code> & lt; <code> ". Word reads it as....{yes, you guessed it}, CODE!

Back to Index

PRE

The PRE ("Preformatted") style is useful for sections of text that require columns and fixed width formatting. PRE uses a fixed width font. The PRE TOOL inserts the code "< /Pre> " on a line by itself to indicate where the preformatted formatting begins and inserts "< /Pre> " on a line by itself at the end. Spacing (tabs, indents, etc. will be determined to some degree by HTML browsers, so you may wish to preview your work in a browser before finalizing your document. Currently, Mosaic likes spaces better than tabs and likes tabs much better than indents. The PRE font looks like this:
                        This is a Pre Entry:           4567           8910
                        This is the second line:       7654           0198

Horizontal Rule

Horizontal Rule is a style which inserts a line across the entire width of the page. It can be inserted either by clicking the tool or by choosing Horizontal Rule in Word's Style Box. Because of the way Word moves horizontal lines down the page, it's easy to insert text into a paragraph formatted with a line and not know it. Ant_HTML attempts to alert you that you have either accidentally or intentionally formatted in the Horizontal Rule Style by making the paragraph marker gold. (A difference in shading is also visible in monochrome monitors.)


Two font styles: "Directive Text" and "URL Text" are used by the macros to facilitate the application of character attributes...to hide the directives and to show the URL links. You will not need them unless you hate red hidden text and would prefer some other color. You may alter the color in the Format Styles menu.


P Tool

Inserts a < P> tag (i.e. code) at the cursor location.
If you are creating a new document, you won't need it. The CONVERT AND SAVE TOOL will add these for you. ( Don't worry, It will not do any harm, if you use it. )

BR Tool

Inserts a <BR> code at the cursor location or at the end of each line in a selection and changes each selected paragraph to single line spacing. The <BR> code at the end of a line acts as a line break in hypertext documents. (If you use this in conjunction with any of the other tools, use the BR TOOL first.)

If you are creating a new document you don't need the BR tool. The CONVERT AND SAVE TOOL will insert these for you wherever you have inserted a line break (SHIFT+ENTER) ( It will not do any harm, if you do use it. ).

Bold and Italic Text

Use the standard BOLD and ITALIC TOOLS in any combination.. HTML codes will be inserted during conversion with either the CONVERT AND SAVE TOOL or the SAVE CODED TOOL.
(The normal underline feature is not shown in HTML browsers so it's not supported in this template.

Back to Index

Numbered and Unnumbered (bullet) Lists

NUMBERED LIST TOOL

or
UNNUMBERED LIST TOOL

If the text you select is already a list style, the tools change the level of the list. All text to be converted to a list should be included when you make your selection.

Each paragraph in the selected text is converted to a list item

(Use Word's Style Box styles if you prefer, or a combination.)

Description Lists

The DESCRIPTION LIST TOOL inserts <DL>,<DD> and </DL> codes either at the cursor location or around selected text. You will be prompted and asked whether you wish to add a Descriptive Title entry, a <DT>. If so, you may enter the text in the space provided or you may simply click OK and add the text immediately after the <DT> code in your document.

Below is an example of a Description List entry:

This is the title

This is the first paragraph of a description list entry. It wraps around like this: and just goes on and on and on and on and on and on forever almost and on and on and on and on and on and on and on and on and on and on and on.

And on and on and on and on and on and on and on and on til the words have no more meaning and so on and on and on and on and on and on and on and on and on and on and on until you realize that okay, enough is enough.

Hypertext Links

Back to Index

URL World Wide Web Anchors

( URL Links to locations outside the document or set of local documents)
URL LINK TOOL<

Inserts the appropriate Universal Resource Locator code around selected text. and presents a dialog box in which you type the URL destination.



For more examples, read A Beginner's Guide to URL's located on the Web at http://www.ncsa.uiuc.edu/demoweb/html-primer.html.

Local Anchors

(Links within documents and to other local documents):
You can create a hotword (or phrase) called a LOCAL ANCHOR REFERENCE
to point to a specific destination called a
LOCAL ANCHOR DESTINATION
within your document or in another local document.

TO CREATE A LOCAL LINK:

You'll be offered the option of actually installing the anchor destination either now or later.
You may combine local anchor references and destinations. For example:

All this is easier done than said. Just try it.


For more information see A Beginner's Guide to HTML .
You can find it on the World Wide Web. (The URL link is http://www.ncsa.uiuc.edu/demoweb/html-primer.html.)

Entering Graphics


When you select the GIF TOOL three options are presented.

    1... Inserts the appropriate .gif (graphic) reference and a graphic placeholder into the current document. (You can select this option and later delete the placeholder if you wish.

    2... Inserts the appropriate .gif reference and the actual picture into the current document. Note that certain graphic filter requirements must be met or the application can crash. Save often! (The placeholders should not present this problem.)

    3... Permits you to type the name of the .gif reference into a text box, then inserts the appropriate codes. This option does not automatically insert a placeholder, You can insert a placeholder in several ways should you wish to do so. Create your own or place the cursor next to your .gif reference and click on the PLACEHOLDER TOOL.

Gif Tip
Sometimes importing .gif files and other graphics into a Word document can cause the entire application to crash.. The ANT-HTML options, provide two alternatives that eliminate this problem. If your application is prone to crashing because of the .gifs, choose to use a placeholder or refer to the file using "text only" as described in the GIF TOOL options.

Converting and Saving Documents

Back to Index
Back to Creating A Hypertext Document

Back to Index
If you choose to close the .HTM document after converting and saving it, Word will display a dialog box with the following message:

Answer "NO" to this question. Your document will be saved in the correct format
(The Ant_HTML template will display a dialog box reminding you of this if you choose to save it immediately after the conversion.)



Removing Hidden Codes

While working on your document you might wish to add or delete some hidden codes.
Two Ant Tools Menu Items facilitate the removal of hidden codes and text during the document creation process.

ZAP CODES FROM THE SELECTION when selected, deletes the codes from whatever text you have selected.

ZAP CODES FROM DOCUMENT, when selected, deletes all the hidden codes from the entire document. ( Since some entries are ambiguous, it skips the questionable entires. When you select this menu item, a message will ask you if you're sure you wish to continue

Back to Index

In addition, two other Ant Tools Menu Items may be helpful:
MAKE HIDDEN and MAKE UNHIDDEN.
The names are not clever, but the macros may come in handy.


The ANT_HTML Editor Tool

When clicked...does nothing whatsoever except act as a spacer separating the two converting and saving tools. If you wish, you may remove it by pressing ALT and then dragging it off the toolbar with your mouse.

Tips and Notes

Back to Index

If the ANT_HTML toolbar is not displayed, click anywhere on the toolbar with the right mouse button and select the ANT TOOLBAR or from the View Menu, choose Toolbars, ANT_HTML and OK.

Three characters are special characters and are used to specify HTML tags. None of the three may be used "as is" within an HTML document. They are the left angle bracket ( < ), right angle bracket ( > ), and ampersand (& ). You may use these characters in your document. The CONVERT AND SAVE tool is designed to convert them (if they do not appear as red or as hidden text in your document) into code that HTML browsers can read or you may insert them yourself.
If you save your original document, after clicking on the CONVERT AND SAVE TOOL, the codes are inserted as red (and unhidden) text to make them easy to locate, if and when you revise the document.
If you wish to insert them yourself,

See RESOURCES for specific code information and for information regarding foreign characters.

CTRL+Spacebar easily changes hidden characters into normal text. The entry called MAKE UNHIDDEN on the Ant Tools Menu will do it for you, too.

CTRL+Q is handy for restoring the default paragraph formatting.

Just so you don't puzzle over it, HTML browsers ignore extraneous spaces, tabs and paragraph marks (unless they're inside your HTML codes).

Please note that the Ant sometimes adds extra paragraphs at the end of a document because of the way Microsoft Word reacts when it encounters the last paragraph mark in documents. If, after saving or converting your document, you find that additional paragraph marks have been inserted at the end of your document, you may delete them if you wish, but they will have no affect on the appearance of your HTML document.

My document fried and I don't know why.

The answer might be that you imported a text file which contained ANSI characters not supported by Microsoft Windows or Word. If you are importing an ASCII file which contains characters (like ANSI character #127 which generally looks like  , for example), you can easily remove them before pasting into Word with an editor like Q Edit. (To remove them in Q Edit, open the file, press CTRL-K, then press X, then ESC to quit. Save the file. The offending characters will have been removed.). Paste the remaining text into a Word document,

Hidden codes (in Tools Options View) should be turned on during the Save process. The template tools are designed to turn hidden codes on, if they were off, and to restore your preferred settings afterward. If this procedure goes bananas for any reason (and special pains were taken so it should not go bananas), your document won't convert properly. Turn Hidden Text ON and try again.

Perhaps you've had GIF grief?

More Information is available through the following hyperlinks:


Back to Index

Back to Tips and Notes

The name ANT_HTML was selected for several reasons. One was to name it so that it was conveniently located near the top of alphabetically arranged lists of filenames. It had to be an acronym and appropriate for the endeavor. (The acronym is a secret.) Also, it had to be short. It had to be unpretentious. It had to be lively. The result is the Ant, a program designed to do any hypertext preparation drudgery for you. Let me know how you like it.

.


Copyright and Warranty

This software is distributed as is and no warranty of any kind is made. It's an Alpha version.
You may distribute this template in it's entirety for use in non-commercial ventures provided that it's source is acknowledged. Under no circumstances may copies be sold or incorporated in other materials which are sold without prior permission from the author, Jill Swift. Please feel free to send any email to EJS01@freenet.fsu.edu. No promises are made regarding responses, but your comments are welcome.


Jill Swift
Montgomery, Texas
(jswift@freenet.fsu.edu)

May 20, 1994

Back to Index