CU_HTML.DOT (Version 1.5)
CU_HTML.DOT is a Microsoft Word for Windows document template (for Word 2.0 and 6.0) that allows
users to create HTML documents inside Word in a WYSIWYG manner and generate a corresponding
HTML file.
You can assign different formatting tags to the paragraphs by simply pointing and clicking. You can also
insert inline GIF images and specify hyperlinks by choosing the target file from a dialog box. The inline
GIF images will also appear in the Word document.
By using the template, you can create HTML documents with little knowledge on the HTML syntax.
Existing word processor features such as spell checking, printing, cut & paste, macro automation,
etc. can be used. And you can avoid many errors using the template than typing the HTML manually.
The current release is version 1.5. (10 Novemeber, 94)
In this documentation, Word 2.0 specific information will be preceded by this icon , and this one for Word 6.0.
Word for Macintosh version 6.0 not available yet.
Author:
Kenneth Wong and Anton Lam
The Chinese University of Hong Kong
Features
- Easy to use. Intuitive for existing Word users.
- WYSIWYG (almost). Inline GIF images can be displayed inside Word.
- The following HTML tags are supported:
- < H1> - < H6> Heading 1 - 6
- < OL> Numbered (Nested) list 1 - 4
- < UL> Unnumbered (Nested) list 1 - 4
- < ADDRESS> Address
- < PRE> Preformatted text
- < TITLE> Title
- < HR> Horizontal rule
- < IMG SRC...> Inline GIF image
- < A HREF...> HREF
- < B> < I> < U> Bold, italic and underline
- < BR> Line break
- < P> Paragraph break
Back to content
Installation
- Get the most updated copy of CU_HTML.ZIP from ftp.cuhk.hk
- PKUNZIP the file to a temp directory
- Copy CU_HTML.DLL, CU_HTML.INI and GIF.DLL to the Windows directory. (e.g.
C:\WINDOWS).
- Copy CU_HTML2.DOT as CU_HTML.DOT.
- Copy CU_HTML6.DOT as CU_HTML.DOT.
- Copy CU_HTML.DOT to the Word template directory.
Back to content
User
Guide
- Creating a new document
- Converting an existing document
- Using the styles
- Inserting inline images
- Specifying hyperlinks
- Deleting hyperlinks
- Generating the final HTML
- Options
Creating a
new document
- Run Microsoft Word. Choose FILE, NEW. Type CU_HTML in the New Document dialog box.
You'll see 6 new buttons on the toolbar ,
and 8 new items under the Tools menu.
- A new HTML toolbar, with 6 buttons
will be available, and a new menu HTML with 8 items.
- A bunch of new style names will also be available in the Style pull-down list.
Back to user guide
Converting an existing
document
- The safest way is to copy and paste the content of the old document into a new one which uses
CU_HTML.DOT.
- You should delete all the styles that do not come with CU_HTML.DOT, or otherwise
unexpected results may occur.
Back to user guide
Using the
styles
- Bold
, italic, underline and combinations
of them can be specified using standard MS Word commands.
(But Mosaic cannot display underline correctly.)
- Select the desirable styles from the Style pull-down list. The available styles are listed below:
Address
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Horizontal Rule
Normal
- Num List 1 (Item 1)
- Num List 1 (Item 2)
- Num List 2 (Item 1)
- Num List 2 (Item 2)
- Num List 3
- Num List 4
Preformatted Text
Title (The paragraph with the Title style should be shown in the title box in Mosaic)
- Unnum List 1 (Item 1)
- Unnum List 1 (Item 2)
- Unnum List 2 (Item 1)
- Unnum List 2 (Item 2)
- Unnum List 2 (Item 3)
- Unnum List 1 (Item 3)
Back to user guide
Inserting
inline images
- To insert an inline GIF image, place the cursor at the position where the GIF should be, then
click this button , and then select the GIF file from the dialog box. The GIF
image must exists in your file system. The GIF image will then be displayed in the Word document.
- To delete an inline GIF, just click to select it and press DEL.
Back to user guide
Specifying
hyperlinks
- To insert a linkage, highlight the hotwords first. The hotwords can be text, graphics or a
combination of both.
- Link to another HTML, sound file, video clip, etc.
- Click this button , and then select the target file (HTML, sound,
video, etc) from the dialog box. You can type in a file name that does not exist in your file
system, but the name must be valid to DOS, and remember to copy the target file back later.
After the OK button is clicked, the hotwords will turn blue.
-
- Link to another HTTP server, FTP, GOPHER, etc.
- You can also associate an URL to a hotword. Click this button ,
and then type the desired URL.
- Link to another part in the same document
- You can create a hotword (source) that, when bring clicked, jump to another part in the
same document (destination).
- First you have to insert a bookmark at the desination. To do so, place the cursor at the
destination, then choose "Bookmark..." from the "Insert" menu, and type a name for the
bookmark.
- Highlight the source, then click this button and select the
destination bookmark from the list.
Back to user guide
Deleting
hyperlinks
- If you want to delete a linkage, may it be linked to a local file or an URL or another part of the
same document, place the cursor somewhere within the hotwords (which should be blue in color),
then click this button . A dialog box will pop out showing the linkage.
Press Yes if you really want to delete the link. If so, the old hotwords will turn black again.
Back to user guide
Generating the final
HTML
- After all the editing have been made, save your document first. Then press this button to save the document as an HTML file. The HTML file will have the same name
as the Word document, with the extension ".HTM".
Back to user guide
Options
- Choose "CU_HTML Options..." from "Tools" menu.
- Choose "CU_HTML Options..." from "HTML" menu.
- Treat MS Word files as HTML files
- When this option is on, "*.doc" files will also be listed out as HTML files in the "Insert
Link" dialog box. If you choose "myhtml.doc" from the dialog box, the name "myhtml.htm"
will be saved.
- This option is useful if you have several DOC files but not yet converted to HTM files.
- This option will not affect the URL inserted in "Insert URL."
- Assume HTML files have .html extension
- If you will put the final HTML files on UNIX servers and want to have .html extensions,
check this option. If you choose "myhtml.htm" from the "Insert Link" dialog box, the name
"myhtml.html" will be saved.
- This option only affects the path name saved inside the document. You still have to
rename all .htm into .html on UNIX servers. I prefer to retain the .htm extension to avoid the
complications.
- This option will not affect the URL inserted in "Insert URL".
- Verify path after selecting from dialog
- When this option is on, a dialog box will pop up to let you confirm the path name to be
saved after a file is chosen from the "Insert GIF" or "Insert Link" dialog boxes.
- You can use it to check if the relative path name is correct.
- If you want to jump to a specific anchor in another document, you can append the anchor
name in the dialog box. For example "myhtml.htm#myanchor".
- Language Dependent
- This section lets you change the style names to suit different languages.
- As far as I know, you should change the followings if you're using a version other then
English
- Heading
- This is a standard style name that I erroneously used. Please change it to the
corresponding name in your system. For example, it should be "Titre" in French, and
I will assume the styles to be "Titre 1" to "Titre 6".
- Macrobutton
- There is a field named "macrobutton" which I used it to display GIF inside the
document. Please change it to the corresponding field name in your language.
- You may change the other style names even if they do not cause any problem. But it you
do so, please remember to change the style name in the template also (select "Style" from
"Format" menu). My recommendation is not to change them.
- Since I do not have versions other than English, I did not check if it works.
- These options will be saved in CU_HTML.INI.
Back to user guide
Back to content
Tips
- Save your new document at least once before inserting any links or images
- The directory relative to the current document will be saved, so I must know where the
current document is saved first.
- If the document is C:\WWW\HTML\INDEX.HTM
and the inline GIF is C:\WWW\HTML\GIF\LOGO.GIF
then the path "gif/logo.gif" will be saved.
- If the document is C:\WWW\HTML\INDEX.HTM
and the inline GIF is X:\OTHERDIR\GIF\LOGO.GIF
then the path "../../otherdir/gif/logo.gif" will be saved.
- Put all the files under the same directory
- Many people will put their HTMLs on Unix, if all documents were saved under one
directory (and the subdirectories inside), then the HTMLs will be easier to maintain.
- All the file names should be in lowercase
- Here I mean if you are going to put the HTMLs on a Unix, Windows NT, Macintosh or
OS/2 server, the HTML file names should be in lowercase and conform to the DOS's 8.3 format
because I will convert the names of all linkage files and inline GIF to lowercase. But for the
URLs you entered directly in "Insert URL", what you type is what you get.
- Always add an extra Carriage-Return at the end of document
- Otherwise, you may encounter strange results when selecting the whole last line and insert
a linkage file to it.
- Don't add extra colors
- The blue color I added for the hotwords is meaningful to the program. Don't try to modify
(shrink/extend/delete/change) the color.
- If you want to delete the link from a hotword, then select the hotword and press .
- You can edit the hotword as usual, as long as it remains blue.
- View field codes
- In case of any doubt on the links or inline images, choose
'Field Codes' from the 'View' menu, or choose 'Options' from the
'Tools" menu and turn on the "Field Codes" checkbox. You will see the actual file name that
will be saved. Don't modify characters other than the file name inside the fields.
- User picture placeholders
- Just if you feel your computer is slow. Select 'Options' from the 'Tools' menu, then check
the 'Picture placeholders' checkbox in the 'View' category.
- Resize you document window before generating the HTML file
- Make the document window as small as you can. Again, just if you feel your computer is
slow. This is to minimize the area Word needs to redraw. For a slow display card, the time
difference is significant.
- If there are errors in writing the final HTML...
- Bugs are unavoidable, so if you encounter errors generating the HTML (e.g. endless loop,
or an error dialog pops up), press ESC to stop the macro and DISCARD your document. You
should have saved your original document just before pressing the button .
- If possible, mail the document to me (anton-lam@cuhk.hk) for error diagnosis. But don't
expect this to be an official support. The software is provided as is.
- Test with Windows Mosaic
- Select 'Open Local File' from the 'File' menu in Windows Mosaic to test the generated
HTML. You will instantly know that what you see in Word is almost what you get in
Mosaic.
- Why the document in Mosaic is different from the one in Word
- The styles defined in CU_HTML.DOT is based on the default font and styles used in
Windows Mosaic. Every Mosaic user may have his/her choice of font.
- There is no convenient support of bullet or numbered list in Word 2.0. Word 6.0 has it
now.
- You will find more differences when viewing from X Window or Mac Mosaic.
Back to content
Release Notes
November 10, 94
- GIF.DLL re-written. GIF files with 1 to 8 bits per pixel can now be inserted. (That's why we
don't use the GIF filter comes with Word 6.0)
April 16, 94
- Version 1.0 released.
- Converted to Word for Windows 6.0 version.
- Hyperlinks to the same document enabled. (So this document contains only one HTML now!)
- Treat Word documents as HTML files option.
- Assume ".html" extension option.
- Verify path option.
- Users definable language dependent style names and macro button name.
- Inline GIF images can be included in "Address" and "Horizontal Rule" styles correctly.
- Some potential endless loop during "Write HTML" fixed.
March 9, 94
Back to content
Copyright &
Warranty
The software is provided as is. There is no warranty and no support in any form will be entertained. You
use this software at you own risk. You can send comments and wish-lists to anton-lam@cuhk.hk.
The Computer Services Centre of The Chinese University of Hong
Kong holds the copyright of CU_HTML.DOT, GIF.DLL and CU_HTML.DLL. It may not be
distributed in conjunction with any commercial or for-fee product. You must distribute this copyright
notice together with the software.
Back to content
Anton Lam (anton-lam@cuhk.hk)
Computer Services Centre
The Chinese University of Hong Kong
16 April, 1994