![[Word Processing Conversion - InterScript]](aci.gif)
656 Kreag Road - Pittsford, NY 14534-3730 - USA
PHONE: (US)-585-385-3810
FAX: (US)-585-385-6822
WEB: www.acii.com
InterScript - Document Description Language
Table of Contents
1 - What is InterScript?
InterScript is a language to efficiently describe the textual, layout and formatting content of word processing documents. The InterScript file format is designed to be as simple as possible, while at the same time support even advanced and complex document formatting functions.
An InterScript reader/writer converts InterScript files to popular word processor and other industry-standard document file formats (such as MS Word, HTML, RTF, etc), as well as the other way around. This is very useful for software developers and programmers who develop applications that need to read or write formatted documents in these different file formats. By incorporating InterScript read/write technology into their own product, they now need to read or write only one file format - InterScript .
1.1 - Standard vs. Customized InterScript
Basically, InterScript files represent formatting and control functions by means of mark-up tags . Standard InterScript refers to an implementation of InterScript which uses the standard tags as described in this document, and which does not translate tags or characters in a non-standard fashion.
However, InterScript gives you the flexibility of defining your own tags in place of the standard ones, including changing the tag markers. It also allows customized translation at the character level, for example to accommodate a specific character set or code page. Implementations of InterScript that take advantage of such customization features are called Customized InterScript . Thus, you can actually tailor the InterScript language to closely resemble a customized mark-up file format that may be peculiar to a particular application.
2 - Basic Components of InterScript
This chapter discusses the basics of InterScript structure, and its two basic components: text and commands.
2.1 - Text Representation
Text is represented in Standard InterScript by printable ASCII characters in the range 32 through 127. Other characters in the file have no significance. Therefore, for example, carriage returns (ASCII code 13) and line feeds (ASCII code 10) may be inserted in Standard InterScript files to improve readability, but they have no semantic significance. Similarly, the tab character (ASCII code 9), formfeed character (ASCII code 12), bell (ASCII code 7), backspace (ASCII code 8), etc., have no semantic significance in Standard InterScript . If such characters are encountered, they are ignored.
It is important to note that unlike standard ASCII files, a line ending in a Standard InterScript file is not an implied space or a word break. If a space is desired following the word just before a line ending, it must be explicitly included in the file.
In Customized InterScript , any character in the range 1-255 may be assigned special significance. This feature enables the use of non-ASCII codes to represent special functions. It may also be used to assign special significance to printable ASCII characters. For example, the standard ASCII character "<" may be used to represent a hard return. Similarly, characters in the upper 128 set may be assigned to represent frequently used symbols, or to directly supporting an extended character set such as a Dos Code Page or the ANSI set.
2.2 - Command Sequences
In Standard InterScript , all document characteristics other than straight ASCII text are represented by tags, also known as command sequences. In Standard InterScript , a command sequence begins with the opening curly parenthesis ({), and terminates with the closing one (}). Any number of command sequences may be entered between the opening and closing parentheses. In Customized InterScript this convention may be changed, and document formatting functions may be implemented by command sequences, by single bytes, or combinations of these.
A command sequence consists of a command word, followed by parameters (also called values or arguments) if necessary. Commands and parameters must be separated from each other by at least one space. Similarly, multiple command sequences must be separated from each other by at least one space. In general, missing numeric arguments are assumed to be 0, except for exceptions noted herein.
Here is an example of InterScript text containing command sequences:
In this example, {bold+}this portion is boldfaced{bold-}.
It is also possible to {bold+ ital+}boldface and
italicize{ital- bold-} at the same time.
This Standard InterScript segment, when printed after conversion, may appear something like this:
In this example, this portion is boldfaced. It
is also possible to boldface and italicize at
the same time.
Command words may be entered in upper, lower or mixed case. The case is insignificant as far as InterScript is concerned. The only exception to this is 2-letter commands representing accented letters as described later.
3 - Command Arguments
As described in the previous section, many InterScript commands take one or more arguments. These arguments may be of many different types. This chapter discusses the different types of these arguments in general, and how they are specified.
3.1 - Numeric arguments
Some commands require a numeric argument. This argument is simply entered as a number (base 10). For example:
{nunln 2} --- specifies double-underline.
3.2 - Single characters
Some commands require a single character as an argument. This argument is simply entered as the character. For example:
{ovschr /} --- specifies the slash character for overstrike.
3.3 - Character strings
Some commands require a character string argument (e.g., a font name is a character string). If the string is a single simple word (i.e., it does not contain any spaces or curly parentheses), it may be entered as is. Otherwise, it must be entered as a string delimited by single- or double-quotes. In the latter case, if the delimiter character also occurs inside the string, it should be entered twice within in the string.
The leading quote character may be used to enter line or page control characters as follows:
- `r -- Carriage Return (ASCII code 13).
- `n -- New line (line feed - ASCII code 10).
- `t -- Tab (ASCII code 9).
- `f -- Form feed (ASCII code 12).
If the leading quote is not followed by one of the characters r, n, t, or f, the quote itself is ignored but the following character is output as is. Therefore, to enter the leading quote itself, it must be entered twice.
If a backslash is the first character of a string, the following character is taken literally.
Here are some examples of commands taking string arguments:
{fontnm Arial} --- The font name string is a simple word.
{fontnm "Times New Roman"} --- The font name contains spaces, so is enclosed in quotation marks.
{fontnm "Typographic ""Classic"" Bold"} --- The font name is Typographic "Classic" Bold.
{asc_lend `n`r} --- ASCII line ending is line-feed followed by carriage-return.
3.4 - Measurement values
Some commands take measurement values as one or more arguments. For example, the left margin command requires a value to specify the left margin, as in {lmar 1.5"}. Values may be specified with or without a decimal point, and may additionally be immediately followed by any of the following modifiers entered in upper or lower case. These modifiers denote the unit of measurement, and are called unit descriptors:
- " or i -- Specifies value in inches.
- c -- Specifies value in centimeters.
- m -- Specifies value in millimeters.
- p -- Specifies value in printer points (1/72 inch).
- t -- Specifies value in "twips" (twentieth of a point, i.e. 1/1440 inch).
- u -- Specifies value in character units, i.e., character width for horizontal measurements and character height for vertical measurements.
The first five modes of measurement are absolute, while the last one is relative to the character size in effect at that point in the document. If no unit descriptor is given, a default is used. In Standard InterScript the default measure is in inches, but this may be changed as described later.
Whether specified using absolute or character-relative measure, these parameters are internally converted to absolute measurements using the current value for character width (horizontal measure) or line height (vertical measure). For example, {lmar 10u} specifies a left margin of 10 characters. Assuming that the character width at the point the command is specified is 0.1" (10 characters per inch), that translates to a left margin of one inch. Later in the document, if the character width is changed (say, to 15 characters per inch), the left margin will stay at one inch because it is internally stored as an absolute value. Character width and Line height values must be specified using absolute measurement, since these values cannot be specified relative to themselves.
Here are some examples of Standard InterScript commands that take measurement values as arguments:
{lmar 12u} --- Set left margin to 12 character positions.
{rmar 1.25"} --- Set right margin at 1.25 inches.
{colgut 144t} --- Set column gutter to 144 twips (1/10 inch).
{rind 2c} --- Set right indent to 2 centimeters.
{lht 12p} --- Set line height to 12 printer points.
3.5 - Line Spacing values
Line spacing (which is the ratio of inter-line spacing to line height) for various components of a document may be specified using a decimal point, or as a fraction by using the divide (/) operator. For example:
{lsp 3/2} --- Line spacing one and a half.
{lsp 1.5} --- Also one and a half line spacing.
3.6 - Horizontal alignment
Horizontal alignment is specified by one of the following arguments:
- l -- Left-align.
- c -- Center.
- r -- Right-align.
3.7 - Basic Horizontal Placement arguments
Basic horizontal placement with respect to the currently effective margins is specified by one of the following arguments:
- l -- Left-align.
- c -- Center.
- r -- Right-align.
- s -- Stretch to align at both margins.
3.8 - Basic Vertical Placement arguments
Basic vertical placement with respect to the currently effective margins is specified by one of the following arguments:
- t -- Top-align.
- m -- Middle-align.
- b -- Bottom-align.
- s -- Stretch to align at top and bottom margins.
3.9 - Complete Horizontal Placement arguments
Complete horizontal placement takes into account all the details about placing an object (such as an image) with respect to any of the page's horizontal milestones.
The horizontal milestones of a page (denoted here by href) are:
- cur -- Current (cursor) position.
- pg_l -- Left edge of page.
- mar_l -- Left margin.
- col_l -- Left edge of current column (if in column mode).
- tbl_l -- Left edge of table (if within a table).
- cell_l -- Left edge of current cell (if within a table).
- para_l -- Left edge of current paragraph.
- para_r -- Right edge of current paragraph.
- cell_r -- Right edge of current cell (if within a table).
- tbl_r -- Right edge of table (if within a table).
- col_r -- Right edge of current column (if in column mode).
- mar_r -- Right margin.
- pg_r -- Right edge of page.
A complete horizontal placement specification can take any of the following forms:
- l:href:ofs -- Place the object in such a way that its left edge is aligned with the horizontal milestone denoted by href. ofs, if specified, denotes the offset of the left edge of the object from this horizontal milestone, and is entered as a horizontal measure. If ofs is not specified, it is assumed to be 0.
- c:href:ofs -- Place the object in such a way that its horizontal center is aligned with the horizontal milestone denoted by href. ofs, if specified, denotes the offset of the horizontal center of the object from this horizontal milestone, and is entered as a horizontal measure. If ofs is not specified, it is assumed to be 0.
- r:href:ofs -- Place the object in such a way that its right edge is aligned with the horizontal milestone denoted by href. ofs, if specified, denotes the offset of the right edge of the object from this horizontal milestone, and is entered as a horizontal measure. If ofs is not specified, it is assumed to be 0.
- lb:href1:href2:ofs -- Place the object in such a way that its left edge is aligned between (at the mid-point of) the horizontal milestones denoted by href1 and href2. ofs, if specified, denotes the offset of the left edge of the object from this mid-point, and is entered as a horizontal measure. If ofs is not specified, it is assumed to be 0.
- cb:href1:href2:ofs -- Place the object in such a way that its horizontal center is aligned between (at the mid-point of) the horizontal milestones denoted by href1 and href2. ofs, if specified, denotes the offset of the horizontal center of the object from this mid-point, and is entered as a horizontal measure. If ofs is not specified, it is assumed to be 0.
- rb:href1:href2:ofs -- Place the object in such a way that its right edge is aligned between (at the mid-point of) the horizontal milestones denoted by href1 and href2. ofs, if specified, denotes the offset of the right edge of the object from this mid-point, and is entered as a horizontal measure. If ofs is not specified, it is assumed to be 0.
- sb:href1:href2:ofs1:ofs2 -- Place and stretch the object in such a way that its left edge is aligned at the horizontal milestone href1 and its right edge is aligned at the horizontal milestone href2. ofs1 and ofs2, if specified, denote the offsets of the left and right edges of the object from the respective milestones, and are entered as horizontal measures. If ofs1 and/or ofs2 is not specified, it is assumed to be 0.
3.10 - Complete Vertical Placement arguments
Complete vertical placement takes into account all the details about placing an object (such as an image) with respect to any of the page's vertical milestones.
The vertical milestones of a page (denoted here by vref) are:
- bsl -- Current (text baseline) position.
- pg_t -- Top edge of page.
- hdr_t -- Header top.
- hdr_b -- Header bottom.
- body_t -- Body text top.
- tbl_t -- Table top (if inside a table).
- cell_t -- Cell top (if inside a table).
- para_t -- Top of current paragraph.
- line_t -- Top of current text line.
- line_b -- Bottom of current text line.
- para_b -- Bottom of current paragraph.
- cell_b -- Bottom of cell (if inside a table).
- tbl_b -- Bottom of table (if inside a table).
- body_b -- Body text bottom.
- ftr_t -- Footer top.
- ftr_b -- Footer bottom.
- pg_b -- Bottom edge of page.
A complete vertical placement specification can take any of the following forms:
- t:vref:ofs -- Place the object in such a way that its top edge is aligned with the vertical milestone denoted by vref. ofs, if specified, denotes the offset of the top edge of the object from this vertical milestone, and is entered as a vertical measure. If ofs is not specified, it is assumed to be 0.
- m:vref:ofs -- Place the object in such a way that its vertical middle is aligned with the vertical milestone denoted by vref. ofs, if specified, denotes the offset of the vertical middle of the object from this vertical milestone, and is entered as a vertical measure. If ofs is not specified, it is assumed to be 0.
- b:vref:ofs -- Place the object in such a way that its bottom edge is aligned with the vertical milestone denoted by vref. ofs, if specified, denotes the offset of the bottom edge of the object from this vertical milestone, and is entered as a vertical measure. If ofs is not specified, it is assumed to be 0.
- tb:vref1:vref2:ofs -- Place the object in such a way that its top edge is aligned between (at the mid-point of) the vertical milestones denoted by vref1 and vref2. ofs, if specified, denotes the offset of the top edge of the object from this mid-point, and is entered as a vertical measure. If ofs is not specified, it is assumed to be 0.
- mb:vref1:vref2:ofs -- Place the object in such a way that its vertical middle is aligned between (at the mid-point of) the vertical milestones denoted by vref1 and vref2. ofs, if specified, denotes the offset of the vertical middle of the object from this mid-point, and is entered as a vertical measure. If ofs is not specified, it is assumed to be 0.
- bb:vref1:vref2:ofs -- Place the object in such a way that its bottom edge is aligned between (at the mid-point of) the vertical milestones denoted by vref1 and vref2. ofs, if specified, denotes the offset of the bottom edge of the object from this mid-point, and is entered as a vertical measure. If ofs is not specified, it is assumed to be 0.
- sb:vref1:vref2:ofs1:ofs2 -- Place and stretch the object in such a way that its top edge is aligned at the vertical milestone vref1 and its bottom edge is aligned at the vertical milestone vref2. ofs1 and ofs2, if specified, denote the offsets of the top and bottom edges of the object from the respective milestones, and are entered as vertical measures. If ofs1 and/or ofs2 is not specified, it is assumed to be 0.
3.11 - Color specification
Color is specified by its red, green, blue and opacity components, in that order. The red, green and blue components can range from 0 (minimum) to 255 (maximum), while opacity ranges from 0 (minimum) to 200 (maximum). The values are specified one after the other, separated by the colon character, with no intervening spaces. For example:
{fontco 255:0:0:200} --- Red color with 100% opacity.
Note that an opacity of 0 means no color. Usually, the value 0:0:0:0 is used to denote no color.
An opacity value greater than 200 means no enforcement of color. In this case, the color is not altered, but stays at whatever color has been inherited by the document at that point in the file.
3.12 - Line Style Arguments
Line Style arguments describe line segments used in borders that enclose text or other items (such as paragraph or table cell borders), as well as horizontal or vertical lines more generally inserted in a document. A line style is specified by means of a group of characters forming a single word. The constituent letters are as follows:
- 0-7 -- a digit from 0 to 7, indicating number of line segments.0 means no line, while 7 means no enforcement.
- - -- line has a dashed style. It may be combined with "." for a dash-dot style.
- . -- line has a dotted style. It may be combined with "-" for a dash-dot style.
- i -- line segment thickness increase from left to right (horizontal lines), top to bottom (vertical lines) or inside to outside (borders).
- d -- line segment thickness decrease from left to right (horizontal lines), top to bottom (vertical lines) or inside to outside (borders).
- r -- raised.
- l -- lowered.
3.13 - White Space specification
White space in text is the space between words. InterScript recognizes three categories of white space, and each is denoted by a representative letter:
- s -- space character
- t -- tab character
- i -- indents
A whitespace specification is a string of one or more of these characters (no intervening spaces), or "n" if none of the three is intended. For example:
{aunln st} --- Also underline spaces and tabs.
{aovstk sti} --- Also strikeout whitespace produced by spaces, tabs and indents.
{aunln n} --- Do not underline any white space.
3.14 - Number Style arguments
Some commands indicate the style in which automatic numbers should be generated (e.g., automatic page numbers, footnote or endnote numbers, automatic paragraph numbers, outline tags, etc.). These commands take a single letter as an argument. The case (upper or lower) of the argument is significant as described below:
- 1 -- Arabic numbering (1, 2, 3, 4 ...)
- i -- Lower case Roman numbers (i, ii, iii, iv ...)
- I -- Upper case Roman numbers (I, II, III, IV ...)
- a -- Lower case alphabetic numbering (a, b, c, d ...)
- A -- Upper case alphabetic numbering (A, B, C, D ...)
For example, the Standard InterScript sequence {pgnstyle A} denotes that pages should be numbered using the upper case alphabetic numbering scheme.
4 - Command Translation
InterScript lets you replace a command by a replacement sequence. This replacement sequence is specified as a string of InterScript commands. The InterScript command to effect such a replacement is of the form cmd> where cmd represents the command being replaced. For example, the command sequence {bold+> "shad+ ital+" bold-> "ital- shad-"} indicates that {bold+} should be replaced by the command sequence {shad+ ital+}, while {bold-} should be replaced by {ital- shad-}. This replacement process is called command translation, and is usually done in conversion customization files so that specific document functions may be converted in a special way. The replacement string is called the InterScript command translation string. There are some special cases:
- If the InterScript command translation string is "*" (i.e., just an asterisk), it means no translation.
- If the InterScript command string is empty (i.e., ""), it means translate to nothing. In other words, it causes the translated command to be ignored.
- The InterScript command translation string may include text enclosed in reversed curly parentheses. For example, the command sequence
{bold+> "}({ bold-> "}){"} causes boldfaced text to be translated to normal text but enclosed in brackets.
InterScript command translation is non-recursive, so the replacement string may contain the command being replaced without causing infinite recursion. This includes a check on self-recursion as well as cross-recursion. Therefore, for example, the command string {bold+> "bold+ ital+" bold-> "ital- bold-"} is valid, and causes boldfacing to be replaced by boldface and italics.
5 - Special Characters
This chapter discusses how special characters such as mathematical symbols, typographic symbols, non-English characters, accents (such as umlaut, grave, etc.), decorative symbols, etc. are represented in InterScript .
5.1 - Non-ASCII Characters
A character that does not belong to the ASCII range 32-126 (decimal) is represented in Standard InterScript by the command #..., where ... represents one of the following:
- The InterScript name of the symbol. A leading period denotes capitalization.
- The InterScript number of the symbol in decimal format. In the range 0-255, this is the same as Dos Code Page 437.
- u:d where d is the symbol's UniCode in decimal format.
- a:d where d is the symbol's code in the ANSI character set.
- s:d where d is the symbol's code in the Windows Symbol character set.
- w:d where d is the symbol's code in the Windows Wingding character set.
- *:d where d is the symbol's code in the character set of the currently active font.
ASCII characters in the range 32-126 may also be represented this way. Therefore, curly parentheses (which otherwise have special significance in InterScript ) may be represented by their decimal codes 123 and 125 respectively. For example, the text One, [two] and {three} would be represented in Standard InterScript as One, [two] and {#123}three{#125}.
5.2 - Accented Characters
Accented characters may be represented in InterScript using the #... command described above, or using special two-character commands. In these 2-character commands, the first character represents the accent as follows:
============================
CHAR Accent Represented
----------------------------
' Acute
, Cedilla
^ Circumflex
` Grave
/ Stroke
~ Tilde
" Umlaut
============================
The second character is the letter to be accented. For example, the letter "e-circumflex" may be represented as {^e}. Note that the case (upper or lower) of the second character is significant.
5.3 - Character Translation
InterScript permits the replacement of any character by any user-defined sequence of text and/or commands. This is particularly useful to replace specific extended characters by a different character, or in fact by any custom text. The command to do this is:
- {charmap charname string} -- This command specifies that all characters specified by charname should be replaced by the InterScript sequence give in string.
6 - Page Size and Margin Commands
The commands in this chapter relate to page size, and the left, right, top and bottom margins. Note that all margin settings are measured from the nearest page edge.
- {pprwid val} -- Sets the paper width to the horizontal measure argument specified (val). The default value is 8.5", i.e., U.S. letter size.
- {pprwid> str} -- Specifies the InterScript translation string to replace
{pprwid}.
- {pprht val} -- Sets the paper height to the vertical measure argument specified (val). The default value is 11", i.e., U.S. letter size.
- {pprht> str} -- Specifies the InterScript translation string to replace
{pprht}.
- {lmar val} -- Sets the left margin to the horizontal measure argument specified (val). The default value is 1", i.e., one inch.
- {lmar> str} -- Specifies the InterScript translation string to replace
{lmar}.
- {rmar val} -- Sets the right margin to the horizontal measure argument specified (val). The default value is 1", i.e., one inch.
- {rmar> str} -- Specifies the InterScript translation string to replace
{rmar}.
- {bdytop val} -- Sets the distance from the top of the page to the first line of body text to the vertical measure argument specified (val). The default value is 1", i.e., one inch.
- {bdytop> str} -- Specifies the InterScript translation string to replace
{bdytop}.
- {bdybot val} -- Sets the distance from the last line of body text and the bottom of the page to the vertical measure argument specified (val). The default value is 1", i.e., one inch.
- {bdybot> str} -- Specifies the InterScript translation string to replace
{bdybot}.
The following commands determine if the left margin in the converted document should be based on the native setting provided by certain destination applications, or if that formatting should be overridden by that specified in the source document.
The following commands determine if the right margin in the converted document should be based on the native setting provided by certain destination applications, or if that formatting should be overridden by that specified in the source document.
7 - Character Format Commands
Character format commands are those that affect the appearance of characters in a document. This chapter discusses these commands.
7.1 - Print Enhancement
The commands described in this section cause text to be printed or displayed using enhanced functions, or control such enhancements.
The following commands control boldfacing:
The following commands control italics:
The following commands control underlining:
- {unln+} -- Turns underline on.
- {unln-} -- Turns underline off. This is the default.
- {unln+> str} -- Specifies the InterScript translation string to replace
{unln+}.
- {unln-> str} -- Specifies the InterScript translation string to replace
{unln-}.
- {nunln n} -- Sets the number of underlines to the argument specified (n). The default value is 1, i.e., single underline.
- {nunln> str} -- Specifies the InterScript translation string to replace
{nunln}.
- {aunln wsp} -- Sets the whitespace components to be underlined to those specified in wsp. The default value is s, i.e., spaces are underlined but not tabs or indents.
- {aunln> str} -- Specifies the InterScript translation string to replace
{aunln}.
- {xunln str} -- Sets the string containing characters that should not be underlined to the argument specified (str). The default value is "", i.e., empty string, meaning that all characters are underlined. str should not exceed 64 characters in length.
- {xunln> str} -- Specifies the InterScript translation string to replace
{xunln}.
The following commands control overlining (this is like underlining, except that the line(s) are printed above rather than under the emphasized text):
- {ovln+} -- Turns overline on.
- {ovln-} -- Turns overline off. This is the default.
- {ovln+> str} -- Specifies the InterScript translation string to replace
{ovln+}.
- {ovln-> str} -- Specifies the InterScript translation string to replace
{ovln-}.
- {novln n} -- Sets the number of overlines to the argument specified (n). The default value is 1, i.e., single overline.
- {novln> str} -- Specifies the InterScript translation string to replace
{novln}.
- {aovln wsp} -- Sets the whitespace components to be overlined to those specified in wsp. The default value is s, i.e., spaces are overlined but not tabs or indents.
- {aovln> str} -- Specifies the InterScript translation string to replace
{aovln}.
- {xovln str} -- Sets the string containing characters that should not be overlined to the argument specified (str). The default value is "", i.e., empty string, meaning that all characters are overlined. str should not exceed 64 characters in length.
- {xovln> str} -- Specifies the InterScript translation string to replace
{xovln}.
The following commands control highlighting. This is a form of emphasis where the emphasized text prints with a color around it, as if it has been highlighted with a highlighter marker.
- {hilite+} -- Turns highlight on.
- {hilite-} -- Turns highlight off. This is the default.
- {hilite+> str} -- Specifies the InterScript translation string to replace
{hilite+}.
- {hilite-> str} -- Specifies the InterScript translation string to replace
{hilite-}.
- {hilitec color} -- Sets the highlight color to the argument specified (color). The default value is 255:255:0:100, i.e., yellow with 50% opacity.
- {hilitec> str} -- Specifies the InterScript translation string to replace
{hilitec}.
- {ahilite wsp} -- Sets the whitespace components to be highlighted to those specified in wsp. The default value is s, i.e., spaces are highlighted but not tabs or indents.
- {ahilite> str} -- Specifies the InterScript translation string to replace
{ahilite}.
- {xhilite str} -- Sets the string containing characters that should not be highlighted to the argument specified (str). The default value is "", i.e., empty string, meaning that all characters are highlighted. str should not exceed 64 characters in length.
- {xhilite> str} -- Specifies the InterScript translation string to replace
{xhilite}.
The following commands control turning overstriking on or off, and the character used for overstriking. This function is also called strikeout.
The following commands control outline-styled characters:
The following commands control shadow-styled characters:
The following commands control upper-case translation:
The following commands control the appearance of characters in small capitals:
The following commands control the marking of text as inserted. This refers to text that has been inserted in revision mode.
The following commands control the marking of text as deleted. This refers to text that has been deleted in revision mode. It is also referred to as redlined text.
The following commands control the appearance of text in reverse video. This mode is sometimes used to make selected text stand out on the screen.
The following commands control the blinking of text when it is displayed on the screen. They generally have no effect on the printed document.
The following commands control engraved appearance of text.
The following commands control embossed appearance of text.
The following commands control hidden text.
The following Standard InterScript segment serves as an example of the use of print enhancement functions:
We can {bold+}boldface{bold-} and
{ital+}italicize{ital-} text. We can also
{bold+}{ital+}do boldface and italics{ital-}{bold-}
at the same time.
This Standard InterScript segment, when printed after conversion, may appear something like this:
We can boldface and italicize text.
We can also do boldface and italics at the
same time.
7.2 - Superscript & Subscript Commands
Many word processors treat superscript and subscript like other print enhancement functions, in that they may be toggled or turned on or off. However, InterScript provides more advanced treatment of superscripts and subscripts in that it is possible to have multiple levels of superscripts and subscripts. For example, a superscript on a superscript would be a level-2 superscript. InterScript addresses this by defining a superscript/subscript level called the supsub level. Normal baseline text has a supsub level of 0. A simple superscript has a supsub level of 1, while a simple subscript has a supsub level of 0. Higher level superscripts have supsub values of 2, 3, etc., while lower-level subscripts have supsub levels of -2, -3, etc.
- {sup} -- Toggles superscript. More precisely, if superscript is currently on (at any level), this command sets the supsub level to zero (i.e., turns superscript off); otherwise it sets the supsub level to 1 (i.e., turns on simple superscript). This has the effect of toggling the superscript condition while accommodating multiple levels of superscripts.
- {sup+} -- Increments the supsub level by 1.
- {sup-} -- Decrements the supsub level by 1.
- {sub} -- Toggles subscript. More precisely, if subscript is currently on (at any level), this command sets the supsub level to zero (i.e., turns subscript off); otherwise it sets the supsub level to -1 (i.e., turns on simple subscript). This has the effect of toggling the subscript condition while accommodating mjultiple levels of subscripts.
- {sub+} -- Decrements the supsub level by 1.
- {sub-} -- Increments the supsub level by 1.
- {supsub n} -- Sets the supsub level to the argument specified (n). The default value is 0, i.e., no super- or sub-script.
- {supsub> str} -- Specifies the InterScript translation string to replace
{supsub}.
For example, the mathematical expression a raised to (n squared) may be represented in Standard InterScript as a{sup+}n{sup+}2{sup- sup-}, or as a{sup+}n{sup+}2{sup}. The function ((a squared) + (b squared)) may be represented simply by a{sup}2{sup} + b{sup}2{sup}.
7.3 - Fonts
InterScript supports specification of font name, size and color. The various font commands are:
- {font name ptsiz color} -- Specifies a font as follows:
- name is the font name (see string argument).
- ptsiz is the font point size. Fractional point sizes may be specified using a decimal point.
- color is the color of the font (see color specification).
An asterisk (*) may be used for any of the above three fields to denote that the field stays unchanged. Further, any field may be omitted to leave it unchanged provided all fields after it are also omitted.
- {cpi value} -- Specifies character pitch, leaving the font name and color unchanged.
- {fontnm str} -- Sets the font name to the argument specified (str). The default value is TmsRmn, i.e., the Windows "Times New Roman" font. str should not exceed 64 characters in length.
- {fontnm> str} -- Specifies the InterScript translation string to replace
{fontnm}.
- {fontsz meas} -- Sets the font size to the vertical measure argument specified (meas). The default value is 12p, i.e., 12 points.
- {fontsz> str} -- Specifies the InterScript translation string to replace
{fontsz}.
- {fscale num} -- Sets the font size scaling to the argument specified (num). The default value is 100, i.e., 100%, i.e., no scaling.
- {fscale> str} -- Specifies the InterScript translation string to replace
{fscale}.
- {fontco color} -- Sets the font color to the argument specified (color). The default value is 0:0:0:200, i.e., black.
- {fontco> str} -- Specifies the InterScript translation string to replace
{fontco}.
7.4 - Hard and Soft Character Codes
This chapter describes commands that insert special codes which act like printed characters but carry special significance.
- {hardsp} -- Inserts a hard space (binding space) between words which should not be separated by word wrap.
- {hardsp> str} -- Specifies the InterScript translation string to replace
{hardsp}.
- {hardhyp} -- Inserts a hard hyphen (binding hyphen) where no break should occur due to word wrap.
- {hardhyp> str} -- Specifies the InterScript translation string to replace
{hardhyp}.
- {softhyp} -- Inserts a soft hyphen, which marks the location where a word may be hyphenated if necessary at the end of a line.
- {softhyp> str} -- Specifies the InterScript translation string to replace
{softhyp}.
- {wbreak} -- Inserts a word break code, marking the location where a word may be broken (without hyphenation) if necessary at the end of a line.
- {wbreak> str} -- Specifies the InterScript translation string to replace
{wbreak}.
8 - Paragraph Format Commands
Paragraph format commands are those that affect the appearance of paragraphs in a document. This chapter discusses these commands.
8.1 - Paragraph Alignment & Justification
Alignment refers to how the lines in a paragraph are horizontally aligned with respect to each other (i.e., aligned at the left, center or right). Justification refers to whether or not lines are stretched (or compressed) to make them all the same length so that both the left and right margins are even.
The following commands affect paragraph alignment:
- {lal}or{l} -- Left align (i.e., ragged right margin).
- {cen}or{c} -- Center (ragged left and right margins).
- {ral}or{r} -- Right align (i.e., ragged left margin).
- {algn val} -- Sets the paragraph alignment to the argument specified (val). The default value is l, i.e., left-aligned.
- {algn> str} -- Specifies the InterScript translation string to replace
{algn}.
The following commands affect justification, and are relevant if the paragraph alignment mode is left-align. Justification refers to stretching (and possibly compressing) lines so that the left and the right margins are even. Further, a paragraph may be partially justified by specifying the justification percentage. For example, if a paragraph is 50% justified, the raggedness of the right margin is about half-way between normal ragged right (no justification) and completely even (100% justification). This may be used to create the appearance of unjustified text while at the same time minimizing the unevenness of the right margin.
8.2 - Line spacing, line height and leading
Line spacing refers to the distance between the lines in a paragraph expressed in terms of ratio to the size of the characters used in the lines. Line height refers to the actual height of a line. Leading refers to additional space inserted between lines.
The following commands affect line spacing before, within and after a paragraph:
- {lsp val} -- Sets the line spacing within a paragraph to the argument specified (val). The default value is 1, i.e., single-line spacing.
- {lsp> str} -- Specifies the InterScript translation string to replace
{lsp}.
- {lsp_b val} -- Sets the additional line spacing before a paragraph to the argument specified (val). The default value is 0, i.e., no additional spacing.
- {lsp_b> str} -- Specifies the InterScript translation string to replace
{lsp_b}.
- {lsp_a val} -- Sets the additional line spacing after a paragraph to the argument specified (val). The default value is 0, i.e., no additional spacing.
- {lsp_a> str} -- Specifies the InterScript translation string to replace
{lsp_a}.
The following commands determine whether the line height is automatically adjusted based on the font size of the characters in a line, or whether it is an absolute value. The absolute line height value is used if automatic line height adjustment is off.
The following commands determine the leading:
8.3 - Indents
An Indent refers to the space inserted between the edge of a line and the margin setting. This may refer to space on the left of a line (left indent) or right (right indent). If the left indent of the first line of a paragraph is less than that of the subsequent lines, it is also referred to as a hanging indent.
The following commands affect the indentation of a paragraph:
8.4 - Paragraph Protection
This section refers to commands that protect parts of a paragraph from soft page breaks.
The following commands prevent widows in a paragraph, which are isolated lines at the start of a paragraph (usually the first one or two lines) appearing at the bottom of a page while the rest of the paragraph appears on the following page:
The following commands prevent orphans in a paragraph, which are isolated lines at the end of a paragraph (usually the last one or two lines) appearing at the start of a page while the rest of the paragraph was on the preceding page:
8.5 - Paragraph Borders
The following commands affect the style of paragraph borders. A value of 0 means no border. This portion of InterScript is currently under construction.
- {para_lbsty num} -- Sets the left border style to the argument specified (num). The default value is 0, i.e., no left border.
- {para_lbsty> str} -- Specifies the InterScript translation string to replace
{para_lbsty}.
- {para_tbsty num} -- Sets the top border style to the argument specified (num). The default value is 0, i.e., no top border.
- {para_tbsty> str} -- Specifies the InterScript translation string to replace
{para_tbsty}.
- {para_rbsty num} -- Sets the right border style to the argument specified (num). The default value is 0, i.e., no right border.
- {para_rbsty> str} -- Specifies the InterScript translation string to replace
{para_rbsty}.
- {para_bbsty num} -- Sets the bottom border style to the argument specified (num). The default value is 0, i.e., no bottom border.
- {para_bbsty> str} -- Specifies the InterScript translation string to replace
{para_bbsty}.
The following commands affect the thickness of paragraph borders. A value of 0 means a hairline border (i.e., the thinnest border supported on any output device).
The following commands affect the gutters of paragraph borders:
The following commands affect the paragraph border colors:
8.6 - Heading Level
The following commands affect the heading level of a paragraph. The highest level is number 1, next lowest is number 2, etc. Level 1 is usually the title of the entire document (e.g., title of a book). Level 2 usually refers to chapters, level 3 to sections within a chapter, level 4 to sub-sections, and so on. A level of 0 refers to normal paragraphs that are not headings.
The following commands determine if heading-level paragraphs should use the native formatting provided by the destination application, or if that formatting should be overridden by that specified in the source document.
8.7 - Miscellaneous Paragraph Formatting
The following commands affect the color used for the background of a paragraph of text.
- {parafilc color} -- Sets the paragraph background color to the argument specified (color). The default value is 0:0:0:0, i.e., no color.
- {parafilc> str} -- Specifies the InterScript translation string to replace
{parafilc}.
9 - Line Ending Commands
This chapter describes commands that insert different kinds of line endings, and result in a move to a new line.
- {epara} -- Inserts a hard return (paragraph ending).
- {epara> str} -- Specifies the InterScript translation string to replace
{epara}.
- {eline} -- Inserts a hard return which is not necessarily a paragraph break (e.g., at the end of a row of table data).
- {eline> str} -- Specifies the InterScript translation string to replace
{eline}.
- {zicr} -- Inserts a hard return without an accompanying line feed (zero-index carriage return).
- {zicr> str} -- Specifies the InterScript translation string to replace
{zicr}.
- {cepara} -- Inserts a hard return unless there is no text in the line (conditional end of para).
- {sline} -- If possible, inserts a soft line break.
- {sline> str} -- Specifies the InterScript translation string to replace
{sline}.
10 - Column Ending Commands
This chapter describes commands that insert different kinds of column endings, and result in a move to a new column.
- {newcol} -- Terminates the current column and starts a new one.
- {newcol> str} -- Specifies the InterScript translation string to replace
{newcol}.
- {cnewcol value} -- Conditional new column, i.e., move to new column if less than value vertical space remains in this column.
- {scol} -- If possible, inserts a soft column break.
- {scol> str} -- Specifies the InterScript translation string to replace
{scol}.
11 - Page Ending Commands
This chapter describes commands that insert different kinds of page endings, and result in a move to a new page.
- {newpg} -- Finishes the current page and starts a new one.
- {newpg> str} -- Specifies the InterScript translation string to replace
{newpg}.
- {oddpg} -- Finishes the current page and moves to the next odd page.
- {oddpg> str} -- Specifies the InterScript translation string to replace
{oddpg}.
- {evenpg} -- Finishes the current page and moves to the next even page.
- {evenpg> str} -- Specifies the InterScript translation string to replace
{evenpg}.
- {cnewpg value} -- Finishes the current page if less than value vertical space remains on this page.
- {spage} -- If possible, inserts a soft page break.
- {spage> str} -- Specifies the InterScript translation string to replace
{spage}.
12 - Tabs
These commands affect tab settings. InterScript recognizes different kinds of tabs, including centered, right-aligned etc. Some tabs are defined as "character-aligned", i.e., a specific text character lines up at that location. That character is called the alignment character. Decimal tabs are a special case of these, where the alignment character is a decimal point. Some tabs are defined with leaders, i.e., a special character called the leader character is used to fill the white space when positioning to those tab points.
The following commands clear or set tabs:
- {clrtab} -- Clears all tabs.
- {clrtab> str} -- Specifies the InterScript translation string to replace
{clrtab}.
- {dftwid spacing} -- Specifies the spacing (width) of default tabs. A default tab stop is one that is tabbed to only if no further tabs have been defined to the right of the current cursor position.
- {dftwid> str} -- Specifies the InterScript translation string to replace
{dftwid}.
- {tab type pos} -- Sets a tab of the specified type at the specified position. type denotes the kind of tab, and pos is the horizontal location of the tab.
- type -- consists of one or two characters, with no intervening space. The first character may be:
- l -- text left-aligns at the tab position.
- c -- text centers at the tab position.
- r -- text right-aligns at the tab position.
- d -- text character-aligns at the tab position (decimal tab is a special case of this).
- b -- bar tab.
The second character is optional. It may be:
- * -- position is referenced to current paragraph edges.
- p -- position is referenced to the left edge of the page.
- m -- position is referenced to the left margin.
- c -- position is referenced to left edge of the current column (multi-column layout).
- t -- position is referenced to the left edge of the table (tabular layout).
- l -- position is referenced to the left edge of the cell (tabular layout).
If the second character is not specified, it has the same effect as *, i.e., the defined tab is relative to the edges of the current paragraph.
- pos -- specifies the horizontal measurement to indicate the tab position.
- {tab> str} -- Specifies the InterScript translation string to replace
{tab}.
The following commands specify the alignment character (for character-aligned tabs), and the leader-fill character (for leader tabs).
The following commands turn leaders on or off. When leaders are on, the leader fill character specified in the last {ldrfchr} command is used as a filler when positioning horizontally. Also, any tab defined when leader-fill is turned on is defined to be a leader tab using the current leader character.
13 - Horizontal Positioning
These commands represent "tab functions", enabling horizontal positioning of subsequent text, as well as defining centered, right-aligned, decimal-aligned or character-aligned fields. In all these cases, the argument represents the distance from the left edge of the current paragraph to the position point. Further, if leader fill is turned on (see {ldrf+}), then the most recently defined leader character (see {ldrfchr}) is used to fill the white space when positioning subsequent text.
It is not necessary to set tabs when using these commands. InterScript processors automatically set tabs at the appropriate positions if required to ensure correct positioning.
Centered, right-aligned and character-aligned (of which decimal-aligned is a special case) fields terminate implicitly on any end-of-line kind of code or another horizontal positioning code. Or, they may be explicitly terminated by the {endfld} command described below.
- {totab n} -- Positions to a defined tab. If n is 0 (the most common case), it positions to the next tab stop. If n>0, it skips n tabs in the process of positioning. If n<0, it positions in the reverse direction (i.e., to previous tab stops).
- {totab> str} -- Specifies the InterScript translation string to replace
{totab}.
- {pos hm} -- Positions (left aligns) subsequent text at hm.
- {pos> str} -- Specifies the InterScript translation string to replace
{pos}.
- {cenfld hm} -- Begins a field centered at hm.
- {cenfld> str} -- Specifies the InterScript translation string to replace
{cenfld}.
- {ralfld hm} -- Begins a field right aligned at hm.
- {ralfld> str} -- Specifies the InterScript translation string to replace
{ralfld}.
- {calfld hm} -- Begins a field which is character-aligned at hm, i.e., the field is positioned such that the alignment character (see
{algnchr} command) contained within it is positioned at hm.
- {calfld> str} -- Specifies the InterScript translation string to replace
{calfld}.
- {endfld} -- Ends a field initiated by
cenfld, ralfld or calfld. This command is not normally required.
- {endfld> str} -- Specifies the InterScript translation string to replace
{endfld}.
- {justfld+} -- This command begins a right- and left-justified field.
- {justfld+> str} -- Specifies the InterScript translation string to replace
{justfld+}.
- {justfld- hm} -- This command ends a right- and left-justified field. hm is the horizontal measure with respect to the current left margin where the right end of the field should be justified.
- {justfld-> str} -- Specifies the InterScript translation string to replace
{justfld-}.
- {hadv hm} -- Skips (advances horizontally) the amount of space specified by hm.
- {hadv> str} -- Specifies the InterScript translation string to replace
{hadv}.
- {lind hm} -- Positions (left-aligns) subsequent text at hm, and also sets the left-indent to that point.
- {lind> str} -- Specifies the InterScript translation string to replace
{lind}.
The following commands affect positioning of subsequent text in relation to the current effective margins, which are defined as the horizontal limts of the current paragraph (excluding the left and right indents):
The following commands control whether or not reverse-positioning is allowed to take place. When reverse-positioning is enabled, the destination wordprocessor may backspace or reverse-tab in order to move to the left of the current position:
14 - Headers and Footers
This chapter describes commands that affect document headers and footers. Headers are relatively constant text that is repeated at the top of each page while the header is active. Similarly, footers are repeated at the bottom of each page while active.
Many of these commands work identically to the corresponding commands in the main document (body) text. Note that the commands described in this chapter appear outside headers or footers, but their effect applies to headers and/or footers. In general, most commands that can be applied to body text (e.g., print enhancements, font changes, paragraph formatting, etc.) can also occur inside headers and footers, and have their usual effect on formatting of the header/footer contents. Those commands have not been repeated in this chapter.
14.1 - Header/Footer Margins
The following commands affect header/footer margins, which refer to the distances from the edges of the header or footer to the nearest paper edge.
- {hdrlmar val} -- Sets the header left margin to the horizontal measure argument specified (val). The default value is 1", i.e., one inch.
- {hdrlmar> str} -- Specifies the InterScript translation string to replace
{hdrlmar}.
- {hdrrmar val} -- Sets the header right margin to the horizontal measure argument specified (val). The default value is 1", i.e., one inch.
- {hdrrmar> str} -- Specifies the InterScript translation string to replace
{hdrrmar}.
- {hdrtop val} -- Sets the distance from the top of the page and the first line of the header to the vertical measure argument specified (val). The default value is 0.5", i.e., half inch.
- {hdrtop> str} -- Specifies the InterScript translation string to replace
{hdrtop}.
- {hdrbot val} -- Sets the distance from the top of the page and the last line of the header to the vertical measure argument specified (val). The default value is 1", i.e., one inch.
- {hdrbot> str} -- Specifies the InterScript translation string to replace
{hdrbot}.
- {ftrlmar val} -- Sets the footer left margin to the horizontal measure argument specified (val). The default value is 1", i.e., one inch.
- {ftrlmar> str} -- Specifies the InterScript translation string to replace
{ftrlmar}.
- {ftrrmar val} -- Sets the footer right margin to the horizontal measure argument specified (val). The default value is 1", i.e., one inch.
- {ftrrmar> str} -- Specifies the InterScript translation string to replace
{ftrrmar}.
- {ftrtop val} -- Sets the distance from the top of the footer to the bottom edge of the page to the vertical measure argument specified (val). The default value is 1", i.e., one inch.
- {ftrtop> str} -- Specifies the InterScript translation string to replace
{ftrtop}.
- {ftrbot val} -- Sets the distance from the bottom of the footer to the bottom edge of the page to the vertical measure argument specified (val). The default value is 0.5", i.e., half inch.
- {ftrbot> str} -- Specifies the InterScript translation string to replace
{ftrbot}.
14.2 - Header/Footer Paragraph Formatting
The following commands affect paragraph alignment and justification within headers/footers.
The following commands affect line spacing and line height within headers/footers:
14.3 - Header/Footer Character Formatting
The following commands affect fonts within headers/footers:
- {hdrfont name ptsiz color} -- Specifies the header font in the same way as the command
{font} is used within the body text.
- {hdrfontnm str} -- Sets the font name to the argument specified (str). The default value is Arial, i.e., the Windows "Arial" font. str should not exceed 64 characters in length.
- {hdrfontnm> str} -- Specifies the InterScript translation string to replace
{hdrfontnm}.
- {hdrfontsz meas} -- Sets the font size to the vertical measure argument specified (meas). The default value is 10p, i.e., 10 points.
- {hdrfontsz> str} -- Specifies the InterScript translation string to replace
{hdrfontsz}.
- {hdrfontco color} -- Sets the font color to the argument specified (color). The default value is 0:0:0:200, i.e., black.
- {hdrfontco> str} -- Specifies the InterScript translation string to replace
{hdrfontco}.
- {ftrfont name ptsiz color} -- Specifies the footer font in the same way as the command
{font} is used within the body text.
- {ftrfontnm str} -- Sets the font name to the argument specified (str). The default value is Arial, i.e., the Windows "Arial" font. str should not exceed 64 characters in length.
- {ftrfontnm> str} -- Specifies the InterScript translation string to replace
{ftrfontnm}.
- {ftrfontsz meas} -- Sets the font size to the vertical measure argument specified (meas). The default value is 10p, i.e., 10 points.
- {ftrfontsz> str} -- Specifies the InterScript translation string to replace
{ftrfontsz}.
- {ftrfontco color} -- Sets the font color to the argument specified (color). The default value is 0:0:0:200, i.e., black.
- {ftrfontco> str} -- Specifies the InterScript translation string to replace
{ftrfontco}.
14.4 - Other Header/Footer Commands
The following commands define headers/footers, or turn them on or off:
- {hdr+ code} ... text & commands ... {hdr-} -- Defines the header for all pages. code is the sum of the following numbers, as appropriate:
- 1 -- for first odd page.
- 2 -- for first even page.
- 4 -- for all odd pages after the first.
- 8 -- for all even pages after the first.
- {hdr-} -- This command terminates the definition of a header, as shown in the commands above.
- {supr_hdr} -- Suppress the header for the page on which this command is encountered.
- {supr_hdr> str} -- Specifies the InterScript translation string to replace
{supr_hdr}.
- {ftr+ code} ... text & commands ... {ftr-} -- Defines the footer for all pages. code is the sum of the following numbers, as appropriate:
- 1 -- for first odd page.
- 2 -- for first even page.
- 4 -- for all odd pages after the first.
- 8 -- for all even pages after the first.
- {ftr-} -- This command terminates the definition of a footer, as shown in the commands above.
- {supr_ftr} -- Suppress the footer for the page on which this command is encountered.
- {supr_ftr> str} -- Specifies the InterScript translation string to replace
{supr_ftr}.
15 - Footnotes/Endnotes
This chapter describes commands that affect footnotes/endnotes. Many of these commands work identically to the corresponding commands in the main document (body) text.
Note that the commands described in this chapter appear outside footnotes or endnotes, but their effect applies to footnotes/endnotes. In general, most commands that can be applied to body text (e.g., print enhancements, font changes, paragraph formatting, etc.) can also occur inside footnotes and endnotes, and have their usual effect on formatting of the footnote/endnote contents. Those commands have not been repeated in this chapter.
15.1 - Footnote/Endnote Margins
The following commands affect footnote/endnote margins, which refer to the distances from the edges of the footnote or endnote to the nearest paper edge.
15.2 - Footnote/Endnote Paragraph Formatting
The following commands affect paragraph alignment and justification within footnotes and endnotes.
The following commands affect line spacing and line height within footnotes and endnotes:
- {ftnlsp val} -- Sets the line spacing within footnotes to the argument specified (val). The default value is 1, i.e., single-line spacing.
- {ftnlsp> str} -- Specifies the InterScript translation string to replace
{ftnlsp}.
- {ftn_aulht+} -- Turns automatic line height adjustment within footnotes on. This is the default.
- {ftn_aulht-} -- Turns automatic line height adjustment within footnotes off.
- {ftn_aulht+> str} -- Specifies the InterScript translation string to replace
{ftn_aulht+}.
- {ftn_aulht-> str} -- Specifies the InterScript translation string to replace
{ftn_aulht-}.
- {ftnlht val} -- Sets the line height within footnotes to the vertical measure argument specified (val). The default value is 12p, i.e., 12 points or 6 lines per inch.
- {ftnlht> str} -- Specifies the InterScript translation string to replace
{ftnlht}.
- {iftnlsp val} -- Sets the additional inter-footnote line spacing to the argument specified (val). The default value is 0.5, i.e., footnotes are spaced 1.5 lines apart.
- {iftnlsp> str} -- Specifies the InterScript translation string to replace
{iftnlsp}.
- {ennlsp val} -- Sets the line spacing within endnotes to the argument specified (val). The default value is 1, i.e., single-line spacing.