home *** CD-ROM | disk | FTP | other *** search
-
- (Note: this file has been enhanced for EPM. For best results, use Info-Zip to
- unpack the zipfile, which will save the extended attributes, and use black type on a
- light grey background in EPM.)
-
- kenHTepm
-
- Thanks for trying this EPM macro!
-
- Overview:
- First of all, I want to acknowledge the work done by Larry Margolis and Eduardo
- Areitio. Their HTML macros (HTMLTAGS.E and HTMEPM98, respectively) contained
- stunning code which I could never have written in a million years. I used Larry's
- URL-management code as a library routine in many areas (and also his drag&drop
- routines); and Eduardo's code for generating tables, checkboxes, and radio buttons.
- Thanks to both for their kind permission to use their source code!
- My goal with kenHTepm was to take the best features of each of those macros and
- combine them; adding more functionality, a more logical menu layout, updating the
- HTML tags to support the HTML3.2 (Wilbur) "standard", as well as providing
- accommodations for the proposed "Cougar" enhancements.
-
- New in this release (version 1.4):
- 1. Changes to the "Table" function:
- a. Now uses the vertical bar (|) instead of a comma for the initial
- separation of data items. This means that data containing commas can now
- be entered (!).
- b. New context-sensitive prompt for the location of header cells. Can be:
- top row only, left column only, both, or none.
- c. Added warnings if the data has not been line-marked.
- 2. Inoperative menu items are now greyed out.
- 3. Re-wrote "Connections" prompt messages as more general descriptions.
-
- Features:
- 1. Easy table creation -- enter the data in a simple, straightforward manner
- and let the macro do all the tedious work. Header cells can be specified as: top
- row only, left column only, both, or none.
- 2. Quick & easy insertion of paragraph tags and list tags around imported text.
- 3. Full frames support.
- 4. Complete forms support, including all input methods.
- 5. Support for new NetScape3.0 tags: multi-column, spacers, and
- embedded LiveAudio, LiveVideo, Live3D, and Quicktime.
- 6. Support for other NetScape tags: "big", "small", "blinking", font colour,
- font face, and basefont.
- 7. Context-sensitive prompts, including maintaining lists of frequently used
- URL's, target names and customized user tags.
- 8. Java applet tags.
- 9. Full complement of HTML special characters, including accented characters,
- math symbols, currency, etc.
- 10. "One-click" Internet connectivity for your FTP, Telnet, browser and comm
- programs.
- 11. Menu access for external HTML utilities such as syntax-checking,
- references, and removing HTML tags from a document.
- 12. Quick preview of the document in your favourite browser.
-
- Features that aren't obvious:
- 1. You can drag&drop an image file, a HTML document, or a WebEx URL item and the
- appropriate location info will be inserted at the cursor, using relative links when
- appropriate.
- 2. The "Paragraph" menu item has an "auto-tags" feature. If you've imported some
- straight ASCII text into your HTML document, mark all the appropriate lines (using
- line-marking) and select the "Paragraph" menu item. Opening & closing paragraph tags
- will automatically be inserted around each paragraph. Paragraphs will be found if
- they are separated by an empty line, and/or if they start with a blank space or a tab
- character.
- 3. The five "List" items (ordered, unordered, directory, menu, and definition)
- also have "auto-tags" capabilities. After line-marking the appropriate lines,
- selecting one of the "List" menu items will bracket the group of lines with opening &
- closing tags and insert either a list item tag or a definition list term tag at the
- beginning of each line.
- 4. Pressing <Ctrl>+<Alt> and single-clicking mouse button 2 will bring up a
- selection list for commonly used HTML tags. This is especially handy for generating
- tables, or paragraphs and lists from imported text, since the initial data must first
- be line-marked, usually by dragging MB2 over the lines.
-
- What doesn't work yet:
- 1. "Divisions" on the "Separators" menu currently adds only the alignment option.
- As/if more options are agreed to by the W3C standards committee, they will be added
- here. (Not all browsers support the ALIGN=CENTER tag.)
- 2. "Object" under the "Links, objects" menu is inoperative, again pending more
- definitive info from the W3C and more general implementation by browsers. The same
- is true for the "Button" input type in the "Forms" menu, and the "Fieldset" and
- "Label" items in the "Form"s menu.
- 3. Several entities under the "Special Characters" menu and its sub-menus
- ("trademark" and various spaces & dashes) are also inoperative because their
- respective codes are proposals only and are subject to further review and could
- change. Not many (if any) browsers currently support 'em, anyway.
- (N.B.: the symbols used for displaying the special characters in the menus vary
- according to the codepage your system is using. <sigh> Codepage 850 displays most
- of 'em, but misses a couple. Codepage 437 (USA) gets those, but misses most of the
- rest.)
- 4. The "Span" and "Style" items (under the "Documents" menu) currently insert the
- basic opening & closing tags. As these elements become better defined (and
- implemented by browsers), I'll add more functionality.
-
- Getting Started
- Requirements: You'll need the matching ETPM.EXE compiler for your version of
- EPM, and the "base" *.E macros must be available to it at compile time. I'm using
- EPM6.03b, but I don't see why earlier versions shouldn't work.
- EPM6.03b is available on the Hobbes site (ftp://ftp-os2.nmsu.edu/os2/editors)
- as several files named EPM*.ZIP. The file EPMBBS.TXT is a packing list, and
- describes the contents of the zip files. The base *.E macros are in EPMMAC.ZIP.
- Configuration: This is a three-step process: adding your customizations to the
- KENHTEPM.E file; compiling that file into a KENHTEPM.EX file; and linking KENHTEPM.EX
- into your running copy of EPM.
-
- Customizing your copy
- If you're unfamiliar with the E macro language, there's plenty of info available
- in the EPMUSERS.INF and EPMTECH.INF references. For our purposes here, you need to
- know:
- 1. Putting a semi-colon in the first column of a line makes that line a comment
- and it's ignored. (This is a good way to customize parameters by adding your own
- lines without losing the original lines.)
- 2. Any literal string you want passed to the application (or to OS/2) must be
- enclosed in quotes.
-
- There are some settings you will need to make to customize kenHTepm for your
- system -- these are the "MY_*" constants near the beginning of the file:
- 1. If you define a MY_HTML_ADDRESS constant, that info will be automatically
- added at the end of new documents. (See examples at the beginning of KENHTEPM.E.)
- 2. MY_TIMEZONE is used to append your time zone at the end of the "Last
- updated" line, if you use that line in your HTML file.
- 3. WANT_HTML_MONOFONT if set to '1' will automatically use your default
- monospaced font for HTML documents.
- 4. MY_HTML_MARGINS allows you to set the default first column, margins, and new
- paragraph firstline indentations. (For consistent formatting, it's best to keep the
- first column and firstline indent the same.)
- 5. MY_HTML_TABS lets you set the default tab space. Since kenHTepm uses 3 spaces
- for its multi-line formatting, it's recommended you leave this set for '3'.
- 6. MY_HTML_STRIP defines the program and parameters (if any) to use to strip
- out the HTML tags. (kenHTepm contains code for using Don Hawkinson's excellent
- UNH.EXE, and will automatically specify the target file & URL file names that that
- program can generate.)
- 7. MY_HTML_CHECK does likewise for the WebLint syntax-checking program. If
- you don't have WebLint on your system, using something like:
- MY_HTML_CHECK='linkup.exe explore.exe -t 8 -q http://<location for validator>'
- should work for accessing a validation service on the 'Net.
- 8. MY_COM_PROG takes the name (and parameters) of your favourite com program.
- 9. MY_TELNET does likewise for telnet.
- 10. MY_FTP ditto for your FTP program. If you use FTPPM.EXE (recommended),
- you don't need to add any additional parameters after the program name -- once you've
- connected to the FTP site, your local directory will be automatically set to the
- directory containing your HTML file and the transfer mode will be set to "binary".
- Then you can simply drag&drop files from one window to the other (in FTPPM) to do the
- transfer.
- 11. MY_BROWSER takes the name and parameters for your browser.
- 12. MY_COLOR_REF is the program you use for testing colour combinations, and
- MY_HTML_REF is your reference app for HTML tags. You can see how I've configured
- mine for a couple of Windows apps.
- That's it!
-
- Compiling kenHTepm
- Re-compile kenHTepm.e (as "htmltags.ex" if you're already autoloading
- a file by that name into EPM, or as "kenHTepm.ex" if you're going to link it in
- manually.) The syntax is
- ETPM <source drive\path\>kenHTepm.e <target drive\path\>kenHTepm.ex
- Use the same directory the other EPM *.ex files are in as your target directory.
-
- Linking kenHTepm
- There are a few different ways to do it:
- 1. Bring up an EPM command line and enter:
- link kenHTepm
- This will add the "kHTML" item to the main menu bar.
- or
- 2. If you're using a PROFILE.ERX, and want kenHTepm loaded when you start
- EPM, add the following line to PROFILE.ERX (the quotes are necessary):
- 'link kenHTepm.ex'
- or
- 3. If you've been re-compiling the main EPM macros to add your customizations,
- add the following line to your MYSTUFF.E file (the quotes are necessary):
- 'link kenHTepm.ex'
-
- If you want to remove the macro, at an EPM command line enter:
- unlink kenHTepm
- That will remove the functionality of the macro and, in most cases, also remove the
- "kHTML" item from the menu bar.
-
- That's all there is to it --
- Enjoy!
- Send any comments or suggestions to:
- Ken Arway
- arway@wwa.com
-
- DISCLAIMER: I make no claims, expressed
- or implied, as to the fitness of this
- code or its suitability for any purpose
- whatsoever. I will not be liable for any
- damages of any kind resulting from the
- use of this code by anybody at all. Use
- of this code is entirely at your own risk.
-