break-width preferred-width (to maximum-width)?
open stream-identifier with break-width preferred-width (to maximum-width)?
set stream-identifier with (break-width preferred-width (to maximum-width)?) to stream-expression

Argument definitions

A positive integer. This is the preferred output line width, expressed as a character count. (OmniMark will try to break lines with more than this number of characters.)
A positive integer. This value is optional. It gives the maximum acceptable output line width. If this number is given, an error occurs if the output line exceeds the value and OmniMark can't find an acceptable place to break it. Obviously, the maximum-width value must be greater than the preferred-width value.
The name of a stream variable.


Defines acceptable line widths for all streams. Used in conjunction with replacement-break or insertion-break.

You can use break-width either as a declaration or as a modifier for open. If you use break-width in a declaration, it applies only to #main-output. If you use break-width as a modifier to the open keyword, it applies only to the stream being opened. You must also use %/ to show each breakable point (except for data coming from the markup parser, such as PCDATA from an SGML document instance).

For example:

  break-width 35 to 45
  replacement-break "%_" "%n"
     submit "A narrow column this shall be; at position 36, a break you'll see."
  find space => space-in-line
     output "%/" || space-in-line
  ; A narrow column this shall be; at
  ; position 36, a break you'll see.

An OmniMark program can have only one break-width declaration.

Unlike the other open modifiers, break-width must be parenthesized within a set action. This avoids potential ambiguity in the interpretation of the to keyword.

Older versions of OmniMark allowed you to omit the keyword to when specifying the maximum width. This use is now deprecated.

Related Concepts