Types length

SILE length type.

Lengths are composed of 3 measurements: a length, a stretch, and a shrink. Each part internally is just a measurement, but combined describe a flexible length that is allowed to grow up to the amount defined by stretch or compress up to the amount defined by shrink.

Class length

length:_init(spec[, stretch=0[, shrink=0]]) Constructor.


Class length

length:_init(spec[, stretch=0[, shrink=0]])
Constructor.

Parameters:

  • spec measurement A measurement or value that can be cast to a measurement.
  • stretch measurement A measurement describing how much the length is allowed to grow. (default 0)
  • shrink measurement A measurement describing how much the length is allowed to grow. (default 0)

Returns:

    length

Usage:

    SILE.types.length("6em", "4pt", "2pt")
    SILE.types.length("6em plus 4pt minus 2pt")
    SILE.types.length(30, 4, 2)
generated by LDoc 1.5.0 Last updated 1980-01-01 00:00:00