swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax   Related Concepts  
declaration/definition  

insertion-break

 
 

Syntax

insertion-break string condition?

Argument definitions

string
The text to be inserted to break the line. May 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), and must contain a newline character "(%n").
condition
An optional condition.


Purpose

Used to specify line-break text. Used in conjunction with break-width.

When a long line is encountered, OmniMark can insert a string specified in the applicable insertion-break declaration at any "breakpoint" that will keep the line within the desired length.

In PCDATA in an SGML or XML document instance, you need nothing more than an insertion-break declaration and a break-width to cause line-breaking. Elsewhere, a breakpoint must be indicated explicitly by a "%/" format item. The "%/" format item will not work within PCDATA at any point in the input stream that is under the control of the "h" modifier or break suppression.

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 side effects that would otherwise arise. Two types of side effects are especially troublesome:

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

    Related Syntax
   break-width
   replacement-break
 
Related Concepts
   Line breaking
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:33:48 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.