insertion-break
Full Description
swirl
Syntax
  insertion-break string condition?


Purpose

Used to break data content regardless of the character following the break point.

The string contains the text to be inserted to break the line. The string can contain only static text (that is, it may not contain any dynamic format items such as "%d" that cannot be evaluated by the OmniMark compiler).

When a long line is encountered, OmniMark can insert the string specified in the applicable insertion-break declaration at any "break-point" that will keep the line within the desired length. A break point is any point marked in a format by a "%/" format item, and any point in text copied from the input stream that is not under the control of the "h" modifier or break suppression. In order that the result will be distributed over two output lines, this string must contain at least one end-of-line sequence indicated by "%n".

Often, the end-of-line sequence is preceded by an indication that the line break results from the line-length limitation. In such cases, the line break may not occur at a word boundary. The form of this indication, of course, depends on the program that will process the resulting file.

For example, the TeX formatter uses a final percent sign on the line to indicate that the line-end is not important. An OmniMark program that prepared TeX source files might include the following declaration:

  insertion-break "%%%n"

If there is more than one insertion-break in a program, their conditions must ensure that, at most, one declaration will apply at any one time.

The condition on an insertion-break rule is not allowed to contain function calls. This rather extreme provision has been made because of the consequences that would otherwise arise from side effects within such functions. Two types of side effects are especially troublesome:

  • output and put actions in a function called from within such a condition make synchronizing output unpredictable.
  • It is not clear what the effect of an output-to in such a condition should be.

When there are no applicable insertion-breaks in a program, the "%/" format items are ignored unless a replacement-break declaration can be applied.

Copyright © OmniMark Technologies Corporation, 1988-1998.