ANT_HTML and ANT_PLUS

Microsoft Word 6.0 to HTML Conversion

International Versions

For Word for Windows, Word for Macintosh and Power Macintosh


ANT_HTML.DOT - Version 2.1a.
Word 6.0 To HTML Conversion Utility

ANT_PLUS.DOT - Version 2.1a.
A template which combines the ANT_HTML Utility with the HTML to WYSIWYG Conversion Utility

ANT_PLUS also permits conversion to ASCII or to any other file format available in WfW 6.0


The templates use 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 editors are designed so that almost everything but typing the text is done for you automatically The templates are offered as shareware for a nominal fee. See the README.WRI file for new features, improvements and more information. Also see the copyright notice at the end of this page.

The ANT_HTML template includes a demo version of the ANT_PLUS program. ANT_PLUS converts HTML documents into the Word 6.0 WYSIWYG (What-You-See-Is-What-You-Get) environment. To see the demonstration, open a new document based on the ANT_HTML.DOT template, place the file "antdemo.htm" into the same directory as your new document and click the HTML TO WYSIWYG TOOL.
(Remove the tool, if you wish, by holding down the ALT key while dragging the tool from the toolbar.)
See the README.WRI file in this package or contact me at the email address below for more information.

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



INSTALLATION INSTRUCTIONS

  1. Copy all the files into the same directory or folder. (You may name it whatever you like.)
    (It can be anywhere; just so it's NOT within any of your Word directories or folders.)
  2. Open Word
  3. Open the ANT_INST.DOC file and double-click the red button. The End.
Just so you know, after double-clicking the red button, the Ant will automatically perform these tasks...

CREATING A HYPERTEXT DOCUMENT

If you want to create a new document:

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

If you want to revise any document (.DOC, .TXT, .HTM, etc.) :

  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
  4. Convert with the CONVERT AND SAVE TOOL

NOTE to ANT_PLUS users :
Click the HTML to WYSIWYG TOOL and revise or print your document.
(You can easily remove all HTML tags, if you wish, with the "Zap Codes from Entire Document" macro available on the ANT TOOLS menu.
The HTML TO WYSIWYG Tool assumes that lists are not nested (i.e. inside each other). It also assumes that for each beginning HTML tag in the document, an ending tag exists.

NOTE to ANT_HTML users :

Although ASCII text is not automatically converted into WYSIWYG text, revisions of hypertext documents are possible. (The revisions will appear as WYSIWYG.)


When revising a document, you may, if you wish, use the Attach Ant macro, although the cut and paste method is more reliable. (Word, for unknown reasons, doesn't always attach a new template properly.)
    1. Attach the ANT Template to your document, ( The easiest way or the regular way.)
    2. Revise the document
    3. Save your original document and then
    4. convert with the CONVERT AND SAVE TOOL


Return to beginning of Creating a Hypertext Document

Two methods of attaching the Ant Template follow :


It is recommended that you use the cut and paste method and not the following methods if you are revising an HTML document.

1.

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

A macro called "Attach Ant Template" has been included so that you may more easily change a document based on Word's "Normal" template to the Ant 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 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.

If you chose not to have the "Attach Ant Template" macro automatically installed during the Ant's installation process, you can install the macro manually at any time. Here's how:

To make the macro readily available, copy the macro to your "Normal" template.

      1. While in any document based on the Ant Template, choose Tools, Macro, Organizer...
      2. From the Ant's list of macros (on the left), select Attach ANT 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 the Ant template 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 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 " on English language versions of Word 6.0, or search for " ^a" and replace with " ^a" on German versions of Word 6.0, etc. See the Word manual for the Search and Replace characters for paragraph marks specific to your version of Word .)
        ASCII paragraph marks appear the same but behave differently when the macros encounter them.)
        If, instead, you run the "Attach ANT Template" macro", the macro automatically attaches the template and replaces the paragraph marks for you.
Return to beginning of Creating a Hypertext Document

ANT USER'S GUIDE

Although this guide contains many HTML tips and formatting suggestions, it is not intended as an instruction guide for HTML. If you are already familiar with HTML coding, the features will (I hope) seem "intuitive" and enable you to click on a tool and achieve the expected result.

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 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.

ADDRESS STYLE:
The ADDRESS TOOL formats selected text within paragraphs 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. (The Address Style is not available via the StyleBox because Word for Windows StyleBox styles format entire paragraphs, thus prohibiting < Address> tags from being used in conjunction with other paragraph styles.)

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 > & < 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. It's frequently used to create tables. (The HTML language requires that you remove the formatting (i.e. the table itself) from your Word table. [If you find this somewhat unsettling, go and have a toddy or a hot bath or both and concentrate on all the things the HTML language does permit one to do. This is just a suggestion and not a formal instruction, however. You are expected to bathe and toddy at your own risk.])

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. the Ant 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 and a Word line break 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.)

The CONVERT AND SAVE TOOL or the CHECK STYLES FOR HTML CODES TOOL will insert these for you wherever you have inserted a line break (SHIFT+ENTER) if the <BR> tags are not already there.

Bold and Italic Text

Use the standard BOLD and ITALIC TOOLS in any combination.. HTML codes will be inserted during conversion with the CONVERT AND SAVE TOOL.
When using bold and italic formatting in combination with headings and other styles, use the toolbar tools to apply the headings and styles first.
(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

Allow the template to enter the <LI> tag to each list item entry for you. If you insert it yourself, the appropriate <OL> or <UL> tags may not be inserted.

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

Discursive Lists

The DISCURSIVE 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 Discursive List entry:

This is the title

This is the first paragraph of a Discursive 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 till 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.

Forms

The FORM TOOL presents a dialog box with a list you can scroll to choose a form tag. The tool inserts the tag into a text box which you can edit if you like. You may alter or add to any of the entries inside the dialog box, or add text later, after the tag has been inserted into your document. (If you wish to alter or add to the form entries before inserting them into your document, you may either type the text you want or paste it directly into the form tag.) An optional < P> tag can be automatically inserted at the end of the form entry if you so choose. The ANT_PLUS template contains a comprehensive list of possible form tag entries. The ANT_HTML template gives you a taste.

A simple fill-out form with two text entry fields and no default value:

A single text entry field goes here:

Another text entry field goes here:

To submit the query, press this button:

The HTML code for the fill-out form above looks like this:

<FORM METHOD="POST" ACTION="http://www.your.site/somebin-post/post query">
A single text entry field goes here: <INPUT NAME="entry1" > <P>
Another text entry field goes here: <INPUT NAME="entry2" > <P>
To submit the query, press this button: <INPUT TYPE="submit" VALUE="Submit Query" > <P>
</FORM>


A checkbox form with three user options:

A single text entry field goes here:

Another text entry field goes here:

To submit the query, press this button:

To reset the checkboxes to their default states, press this button:

The HTML code for the checkbox form with three user options looks like this:

<FORM METHOD="POST" ACTION="http://www.your.site/somebin-post/post query">
A single text entry field goes here: <INPUT NAME="entry1" > <P>
Another text entry field goes here: <INPUT NAME="entry2" > <P>
<OL>
<LI> <INPUT TYPE="checkbox" NAME="box1" VALUE="activated" CHECKED>
<LI> <INPUT TYPE="checkbox" NAME="box2" VALUE="primed" >
<LI> <INPUT TYPE="checkbox" NAME="box3" CHECKED>
</OL>
To submit the query, press this button: <INPUT TYPE="submit" VALUE="Submit Query" > <P>
To reset the checkboxes to their default states, press this button: <INPUT TYPE="reset" VALUE="Reset To Default Values"><P>
</FORM>

The first checkbox above is on by default.
The second checkbox is off by default.
The third checkbox is on by default.

For more information and an online series of examples, see "Form Entries" in Resources

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 or paste the URL destination.



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://calliope.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.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 template will display a dialog box reminding you of this if you choose to save it immediately after the conversion.)

After clicking the CONVERT AND SAVE TOOL, a dialog box will appear which contains conversion options. You may choose whether or not you wish to have each entry checked for tags. If you are creating a new HTML document, the settings you'll need are already set as the defaults. If you have imported a previously coded HTML document, and the HTML tags are just the way you want them, you may wish to choose the Quick Save option. The file will be saved "as is" with an .HTM extension.

(Word imports all text in HTML documents as "Normal" style, so headings, list items and other entries which do not require < P> tags will automatically receive < P> tags if you are editing a previously coded document and do not use the Quick Save option. You may just delete them and select File, Save after the conversion, if you don't wish to use the Quick Save option.) If you experience any temporary embogglement at the apparent complexity of the options, please note that they're easier done than said. Try them.. Some HTML editors do not permit any editing of HTML documents and thus happily avoid the necessity of presenting the user with explanations and descriptions of possible choices. I hope the options and features of the Ant template will compensate.


More Tools

In addition to the HTML to WYSIWYG Tool and the Form Tool, the following three tools are available in the complete versions of the templates:

Removing Hidden Codes

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

ZAP CODES FROM THE SELECTION, when selected, deletes the HTML tags from whatever text you have selected. (It deletes all brackets and all text in between the beginning and the ending bracket, whether the text is hidden or unhidden, to simplify removing the tags from non-WYSIWYGed as well as WYSIWYGed HTML documents.)

ZAP CODES FROM DOCUMENT, when selected, deletes all the HTML tags from the entire document. When you select this menu item, a message will ask you if you're sure you wish to continue (Like the other Zap macro, it deletes all brackets and all text in between the beginning and the ending bracket, whether the text is hidden or unhidden, to simplify removing the tags from non-WYSIWYGed as well as WYAISYGed HTML documents.)
NOTE to ANT_PLUS users: Click the HTML to WYSIWYG Tool first if you wish to WYSIWYG an HTML document. The tool depends on the presence of the HTML tags.

CONVERT SPECIAL CHARACTERS TOOL, when selected from the ANT TOOLS MENU, converts the converts the ISO Latin 1 Entities in HTML in order that they can be made visible to HTML browsers. Not all HTML browsers support these characters. Four special characters are NOT converted when you select this tool. They are the left angle bracket ( < ), the right angle bracket ( > ), the ampersand ( & ) and the double quote character ( " ). You may convert these four characters during the Convert and Save process, if you choose.


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 Tool

When clicked...displays Ant info.

Tips and Notes

Back to Index

If the ANT 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 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. You may use these characters in your document. The CONVERT AND SAVE tool will, (if they do not appear as red or as hidden text in your document) display a dialog box asking you whether or not you wish to convert brackets and ampersands into code that HTML browsers can read.
See RESOURCES for specific code information and for information regarding foreign characters.

The Cut (or Copy) and Paste method is the recommended method for importing an HTML document into the template. An easy way to select the text in an entire document is to triple click the left margin of the document with the left mouse button.

Although there are a variety of ways (and personal styles used) to create an HTML document, and although the template is designed to accommodate most of them, you might discover an exception. If for any reason, during the Convert and Save process, the macro continues to run in an endless loop condition, you may stop it by pressing the ESC key.

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

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

Just so you don't puzzle over it, HTML language (and therefore, browsers) ignore extraneous spaces, tabs and paragraph marks (unless they're inside your HTML codes) . Among other things, this means that tables and other special formatting features possible in Word but not supported by the HTML language, must be created in some work-around manner. You can create the appearance of tabs with "< UL> " tags and create tables with "< Pre> " tags.

The macros are locked, as in other programs, for several reasons. One of them (but only one) is that it encourages some users to provide valuable feedback about the program.

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?

Resources

More Information is available through the following hyperlinks:

Back to Index

Back to Tips and Notes


The name "ANT" 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.

Special Thanks

Special thanks to Eileen Wharmby of Pincliffe International (the WOPR folks) for helping to make this version international and cross-platform.
Many thanks also to Brian Moura and Woody Leonhard for introducing me to Eileen.

( What is the liklihood that it is not mere coincidence that, conjointly, each of your first initials spell "WEB" ?!?)

Much gratefulness to Phil Davis, who helped test the MAC maneuvers.
Phil's help made the cross-platform idea fly.
(Although it completely ruined the "coincidental" WEB acronym when he refused to change his first name to W. Wally, William, Wilbur or even Wonderguy.)

Copyright and Warranty

You may distribute the ANT_DEMO.ZIP file in it's entirety for use in non-commercial ventures provided that it's source is acknowledged and provided that the template or the other files included in the zip file are not changed in any way. Under no circumstances may copies be sold or incorporated in other materials which are sold without prior permission from the author, Jill Swift.

The ANT_HTML.ZIP file is available at a cost of $15. The ANT_PLUS.ZIP file (which contains the ANT_HTML tools in addition to the HTML to WYSIWYG utility and other features) is currently available for an additional $5. See the README.WRI file or contact me for more information. None of the ANT templates, nor any ANT zip file, other than the ANT_DEMO.ZIP file may be distributed by any method, except by the author, unless written permission is obtained from the author.

This software is distributed as is and no warranty of any kind is made. Please feel free to send any email to me at jswift@freenet.fsu.edu. No promises are made regarding responses, but I will try to respond to questions as promptly as possible.


Jill Swift
P. O. Box 213
Montgomery, Texas 77356
jswift@freenet.fsu.edu

January 12, 1994

Back to Index