### 3.1.121 TextScript

TextScript objects are created by: Text_engraver.

Standard settings:

> `avoid-slur` (symbol):

>   `'around`

>   Method of handling slur collisions. Choices are `inside`, `outside`, `around`, and `ignore`. `inside` adjusts the slur if needed to keep the grob inside the slur. `outside` moves the grob vertically to the outside of the slur. `around` moves the grob vertically to the outside of the slur only if there is a collision. `ignore` does not move either. In grobs whose notational significance depends on vertical position (such as accidentals, clefs, etc.), `outside` and `around` behave like `ignore`.

> `direction` (direction):

>   `-1`

>   If `side-axis` is `0` (or `X`), then this property determines whether the object is placed `LEFT`, `CENTER` or `RIGHT` with respect to the other object. Otherwise, it determines whether the object is placed `UP`, `CENTER` or `DOWN`. Numerical values may also be used: `UP`=`1`, `DOWN`=`-1`, `LEFT`=`-1`, `RIGHT`=`1`, `CENTER`=`0`.

> `extra-spacing-width` (pair of numbers):

>   `'(+inf.0 . -inf.0)`

>   In the horizontal spacing problem, we pad each item by this amount (by adding the ‘car’ on the left side of the item and adding the ‘cdr’ on the right side of the item). In order to make a grob take up no horizontal space at all, set this to `(+inf.0 . -inf.0)`.

> `outside-staff-horizontal-padding` (number):

>   `0.2`

>   By default, an outside-staff-object can be placed so that is it very close to another grob horizontally. If this property is set, the outside-staff-object is raised so that it is not so close to its neighbor.

> `outside-staff-priority` (number):

>   `450`

>   If set, the grob is positioned outside the staff in such a way as to avoid all collisions. In case of a potential collision, the grob with the smaller `outside-staff-priority` is closer to the staff.

> `padding` (dimension, in staff space):

>   `0.3`

>   Add this much extra space between objects that are next to each other.

> `script-priority` (number):

>   `200`

>   A key for determining the order of scripts in a stack, by being added to the position of the script in the user input, the sum being the overall priority. Smaller means closer to the head.

> `side-axis` (number):

>   `1`

>   If the value is `X` (or equivalently `0`), the object is placed horizontally next to the other object. If the value is `Y` or `1`, it is placed vertically.

> `slur-padding` (number):

>   `0.5`

>   Extra distance between slur and script.

> `staff-padding` (dimension, in staff space):

>   `0.5`

>   Maintain this much space between reference points and the staff. Its effect is to align objects of differing sizes (like the dynamics p and f) on their baselines.

> `stencil` (stencil):

>   `ly:text-interface::print`

>   The symbol to print.

> `vertical-skylines` (pair of skylines):

>   `#<unpure-pure-container #<primitive-procedure ly:grob::vertical-skylines-from-stencil> >`

>   Two skylines, one above and one below this grob.

> `X-offset` (number):

>   `ly:self-alignment-interface::x-aligned-on-self`

>   The horizontal amount that this object is moved relative to its X-parent.

> `Y-extent` (pair of numbers):

>   `#<unpure-pure-container #<primitive-procedure ly:grob::stencil-height> >`

>   Extent (size) in the Y direction, measured in staff-space units, relative to object’s reference point.

> `Y-offset` (number):

>   `#<unpure-pure-container #<primitive-procedure ly:side-position-interface::y-aligned-side> #<primitive-procedure ly:side-position-interface::pure-y-aligned-side> >`

>   The vertical amount that this object is moved relative to its Y-parent.

This object supports the following interface(s): font-interface, grob-interface, instrument-specific-markup-interface, item-interface, self-alignment-interface, side-position-interface, text-interface and text-script-interface.

#### Internals Reference v2.18.2 (稳定分支).