HTML_TXT supports two methods of displaying <Hn> headings (where n=1,2,..,7).
- Headings can be "quoted"
- Headings can be used to create a hierarchical outline.
A hierarchical outline refers to headers that identify a section. For example:
I.a.1) Sub subsection
I.b)Sub section 2
In the above example: the I) and I.a) could be used by HTML_TXT to display an
PREH1 and POSTH1 specify the "quote" character to use for |
headings, PREHN and POSTHN specify the "quote" character to use for other <Hn> headings (n=2,..,7).
HN_OUTLINE specifies at what heading level to start the hierarchical index at (i.e.; you probably do not want <H1> headings to be the "top level numbers" of an index)
HN_NUMBERS.n (n=1,2,.,7) specifies numbering styles to use
HTML_TXT supports tabluar display of nested tables. Many (but not all) |
attributes are supported, including:
- Display of CAPTION, either at the top or bottom of the table (depending on the value of the CAPTION ALIGN attribute).
- WIDTH attributes of
|. If WIDTH is not specified, HTML_TXT will "auto-size" columns, assigning more width to columns with wider content (that is, that would have longer lines of text if horizontal space was not limited).
- COLSPAN and ROWSPAN attributes are recognized. ROWSPAN is only partially supported, and may not work properly in complicated tables (tables with lots of ROWSPANs and COLSPANs).
- ALIGN and VALIGN attributes of
- BORDER attribute of
(either a single or double line is drawn, depending on the value of the BORDER= attribute).
- FRAME="VOID" and RULES="NONE" attributes of
(suppress outer and inner border, respectively)
- the ALIGN attribute of
is partially supported:
- ALIGN=LEFT in a top level table (that is not nested in another table) enablers other text (and other tables) to flow around this table. Note that a
will break in this flow (subsequent text is displayed below the table)
- ALIGN=LEFT, RIGHT, or CENTER in a nested table will align the table (relative to the table cell it is nested within). However, text flow will not be attempted -- when nested tables are encountered, a paragraph break (a new line) is always added.
- Empty tables, and empty rows, can be suppressed.
Alternatively, HTML_TXT can display tables (or highly nested tables) as nested lists.
IGNORE_WIDTH can be used to suppress use of WIDTH attributes, and to suppress auto-sizing of columns.
TABLE_BORDER can be used to write a table border by default; it can also be used to override a no border (a BORDER=0) attribute
NOSPAN can be used to suppress COLSPAN and ROWSPAN options.
SUPPRESS_EMPTY_TABLE can be used to enable, or suppress, the display of tables rows.
TABLEMODE, TABLEMODE2, and TABLEMAXNEST can be used to control when (if ever) to convert tables to lists.
TABLEFILLER can be used to fill blank spaces in a table with something other then a space (say, with a white box).
TD_ADD can be used to adjust minimum cell widths
TABLEVERT and TABLEHORIZ can be used to specify characters to use when drawing horizontal and vertical borders. These are only used if high ascii characters are suppressed (using LINEART); otherwise, ascii line-art characters are used to draw table borders.
HTML_TXT displays FORM elements using several tricks, including:
- FILE and TEXT boxes are displayed as a bracketed dotted line.
- TEXTAREA boxes are displayed as a box surrounding default text.
- RADIO and CHECKBOX boxes are displayed using special characters (by default, high-ascii boxes are used)
- SELECT (and it's OPTIONS) are displayed as a bulleted list (with length controlled by the SIZE option of SELECT) -- with special lines bracketing the top and bottom of the list.
- SUBMIT and RESET are displayed as "quoted" strings.
- RADIOBOX and RADIOBOXCHECK can be used to specify which characters to use as radio buttons
- CHECKBOX and CHECKBOXCHECK can be used to specify which characters to use as checkbox boxes
- SUBMITMARK1 and SUBMITMARK2 can be used to specify "quote" characters for SUBMIT and RESET
- TEXTMARK1, TEXTMARK2, and TEXTMARK can be used to specify characters used to construct bracketed dotted lines.
- SHOWALLOPTS can be used to suppress the SIZE attribute of SELECT lists (so as to force display of all OPTIONs).
- FORM_BR is used to force a new line (a BR) after the end of a FORM
alignment instructions are recognized
- LINELEN can be used to specify the width of the text file (in characters). CHARWIDTH is used to map "pixels to character size" -- it is used when interpreting WIDTH attributes.
- NO_WORDWRAP is used to suppress word wrapping in a paragraph. This yields an infinitely long line, which is suitable for reading by a word processor. NO_WORDWRAP is only applied to non-table lines, and to lines that are not CENTERed or RIGHT justified. In addition, indentations (at the beginning of these infinitely long lines) will be replaced with tabs (which can be converted to
indent characters by your word processor).
- TOOLONGWORD controls whether to trim, or wrap, words that won't fit into a line (or into a cell of a table).
- LINEART controls whether to use high ascii characters to draw table borders, list bullets, and "quote characters". LINK_DISPLAY controls whether to create a "reference list" of URLs
- SUPPRESS_BLANKLINES suppresses output of sequential blank lines.
- DISPLAY_ERRORS controls the amount of error reporting (of HTML syntax)
- HTML_TXT ignores embedded <SCRIPT>s and <APPLET>s
As noted in the customization column of the above table, HTML_TXT contains a number of user configurable parameters.
Although the default values of these parameters work well in most cases, you can change them by editing HTML_TXT.CMD with your favorite text editor (look for the "user configurable parameters" section)
Alternatively, you can temporarily changes values using the /VAR command line option. In fact, by specifying a PLIST=file.ext (in the /VAR section), you can create custom instructions for sets of HTML documents.
The following lists the more important parameters. Of particular interest are the NOANSI, LINEART, TABLEMAXNEST, TABLEMODE2 and TOOLONGWORD parameters.
| General Controls
|| Captialization is used to indicate these "logical and physical" elements
|| Spaces are replaced with underscores to indicate these elements
|| "quotes" are used to indidate these elements.
|| Set level of error reporting (of html coding errors encountered)
|| If enabled a line BReak is added after the end of every FORM
|| Create a hierarchical outline from <Hn> elements
|| Controls how <IMG> labels are displayed. For example, you can display the ALT attribute, a , a reference to a list (at the bottom of the document), or you can display nothing (so that the text document ignores all IMG elements)
|| Ignore WIDTH option in || elements (and/or suppress auto-sizing)
|| Suppress use of high ascii (non keyboard) characters.
|| controls whether or not URL information should be displayed (when displaying links). You can suppress display of URL info, display a number into a reference list (that will be written to the end of the text output file), or include the URL in the body of the text.
|| Suppress use of ANSI screen controls.
|| display all OPTIONS in a SELECT list.
|| Suppress display of consecutive blank lines
| TOOLONG WORD
|| trim long strings.
Display of tables, in a tabular format, can be tricky. In particular, nested tables may tax the resources of your 80 character text display. HTML_TXT allows you to modify table specific display options, and convert tables into lists.
|| suppress display of empty rows and empty tables
|| Suppress "tabular" display of tables (use lists instead)
|| Suppress tabular display of nested tables
|| Used to increase minimum cell widths (useful if narrow cells are clipping short words)
|| type of default table borders
<center>Display Controls </center>
Since it's not possible to use italics, bold, font styles, and other such visual aids in a text file, HTML_TXT uses a few tricks instead.
- Capitalization can be used -- by default, Bold, STRONG and TypewriTer emphasis is indicated with capitalization.
- Spaces can be replaced with underscores -- this is used to indicate Underline emphasis
- "quote strings" can be placed around emphasised strings.
The last trick, the use of "quote strings", is frequently used by HTML_TXT; with different sets of quote strings used for different emphasis. For example,
EM and I emphasis,
and < src="xxx" alt="in-line images"> in-line images are indicated with unique sets of "quote strings".
| CHECKBOX and
| Character used as a CHECKBOX button, and a selected CHECKBOX button
|| bullets used in <MENU> lists.
|| bullets used in |
| FLAGSELECT and
| character used to signify OPTION and a selected OPITON (in a SELECT list), respectively
| characters to use when outlining <Hn> headings
|| character used to make large |
|| Characters (i.e.; roman numerals, numbers, or letters) as bullets in |
| PRETITLE and
| Strings used before and after the doucment title
| PREA and
| characters used before and after <A> anchors
| PREH1 and
| characters used before and after |
| PREHN and
| characters used before and after <Hn1> (n>1) headings
| PREIMG and
| characters used before and after <IMGgt; names of in-line images
| QUOTESTRING1 and
| characters used to quote emphasize
| RADIOBOX and
| Character used as a RADIO button, and a selected RADIO button
| SUBMITMARK1 and
| characters used before and after a <SUBMIT> and <RESET> field
| TEXTMARK1, TEXTMARK2,
| characters to use on the left, right, and middle of a FILE and TEXT field.
| TABLEVERT and
| characters to use as vertical, and horizontal, lines in tables (used only when lineart is suppressed)
|| character to used to fill empty spaces in tables and textbox's
For detailed descriptions of these parameters, see HTML_TXT.CMD.
The following lists possible troubles you might have, and suggested solutions.
- � HTML_TXT display all kinds of wierd garbage (such as $ and [ characters)
- You don't have ANSI support installed. You should either install ANSI.SYS (for example, include a DEVICE=C:\OS2\MDOS\ANSI.SYS in your OS/2 CONFIG.SYS file), or set NOANSI=1 (in HTML_TXT.CMD)..
- � Nested tables aren't displaying properly (this is especially likely to happen when running under Regina REXX for DOS).
- You can try using lists instead of tables -- set TABLEMAXNEST=0 (in HTML_TXT.CMD). .
- � Tables have unappealing characters used as vertical and horizontal lines
- Either your output device (say, your printer) does not support high-ascii characters, or your code page is somewhat unusual. You can use standard characters (- and !) for line borders by setting LINEART=0 (in HTML_TXT.CMD)..
- � Unappealing characters are being used as bullets and to "quote" text strings
- This can also occur if your code page is somewhat unusual. You can either change the various "display control parameters" (in HTML_TXT.CMD), or you can set LINEART=-1; in which case some default, standard charactes (such as * and @ for bullets) will be used. .
- � Long words (such as URLs) are being lost.
- You can change the "trimming" action to "word wrap", or to "extend beyond margins", by setting the TOOLONGWORD parameter.
- � The display of headings is not informative
- You can set HN_OUTLINE=2, heading will then be displayed in an "outline format". You can even change the numbering style (say, 2.a.ii versus II.2.b) by changing the HN_NUMBERS.n parameters.
Disclaimer and Contact Information
This is freeware that is to be used at your own risk -- the author and any potentially affiliated institutions disclaim all responsibilties for any consequence arising from the use, misuse, or abuse of this software. You may use this, or subsets of this program, as you see fit, including for commercial purposes; so long as proper attribution is made, and so long as such use does not preclude others from making similar use of this code.
Do you have the [/web/20070824135634/http://www.srehttp.org/apps/html_txt/ latest version of HTML_TXT]?
If you find errors in this program, would like to make suggestions, or otherwise wish to commment.... please contact Daniel Hellerstein