swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax   Related Concepts  
modifier  

break-width

 
 

Syntax

  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

preferred-width
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.)
maximum-width
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.
stream-expression
The name of a stream variable.


Purpose

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"
  process
     submit "A narrow column this shall be; at position 36, a break you'll see."

  find space => space-in-line
     output "%/" || space-in-line

  ; OUTPUT:
  ; 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 Syntax
   #main-output
   insertion-break
   replacement-break
 
Related Concepts
   Line breaking
 
 

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

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:44:59 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.