Legacy Documentation

Publicon® (2004)

This is documentation for an obsolete product.
Current products and services

Documentation  / Publicon  / Reference  / Preferences  / Formatting Options  / ...Linebreaking Options  /

LinebreakAdjustments

• LinebreakAdjustments is an option for cells that sets parameters used for calculating where automatic line breaks should be inserted.

• The automatic line breaking of expressions uses a complex algorithm that takes into account many factors that affect the length of lines. Each such factor is assigned a weight, which is then used as a parameter in a global optimization routine that determines the exact positions of the c. By adjusting the parameters, you can control the relative importance given to the different line breaking criteria. For most cases, the default settings provide a good optimal solution, and it is not necessary to adjust the parameters yourself.
• This option is specified as a list of five numbers LinebreakAdjustments Rule {a, b, c, d, e}. Here, a specifies the optimal line width to aim for, expressed as a percentage of the total line width; b is the penalty assigned for deviating from the line width specified by a; c is a penalty based on the depth of the box tree (the deeper in the box tree the line break would occur, the greater the penalty for line breaks); d is a penalty based on how bad the break was at the previous line; e is a penalty based on the total number of lines (the larger the number d, the smaller the number of lines used to format the expression).
• The default setting LinebreakAdjustments Rule {0.85, 2, 12, 1, 1}, represents an empirical choice that works well for most Publicon input. An alternative setting, that gives good results for program code, is LinebreakAdjustments Rule {0.5, 10, 100, 1, 0.5}.