Module packages.resilient.liners

Some "liners" for the SILE typesetting system and re·sil·ient.

This an alternative to some commands from the "rules" package (underline, strikethrough). Rough drawing is supported, using the Grail library (a dependency of the resilient collection).

FIXME TODO: Pretty repetitive code, could be refactored... But early abstraction is often a bad idea, so let's wait for more use cases.

Info:

  • Copyright: (c) 2024-2025 Omikhkeia / Didier Willis
  • License: MIT

Local Functions

getUnderlineParameters () Get the parameters for underlining from the current font.
getStrikethroughParameters () Get the parameters for strikethrough from the current font.
computeBaselineRatio () Compute the baseline ratio for the current font.

Class packages.resilient.liners

package:_init (_) (Constructor) Initialize the package.
package:registerCommands () (Override) Register all commands provided by this package.


Local Functions

getUnderlineParameters ()
Get the parameters for underlining from the current font.

Returns:

  1. number underlinePosition Position of the underline from the baseline
  2. number underlineThickness Thickness of the underline
getStrikethroughParameters ()
Get the parameters for strikethrough from the current font.

Returns:

  1. number yStrikeoutPosition Position of the strikethrough from the baseline
  2. number yStrikeoutSize Thickness of the strikethrough
computeBaselineRatio ()
Compute the baseline ratio for the current font.

Based on font metrics (typographic extents).

Memoized for performance.

Returns:

    number Baseline ratio

Class packages.resilient.liners

The "resilient.liners" package.

Extends SILE's packages.base.

package:_init (_)
(Constructor) Initialize the package.

Parameters:

  • _ table Package options (not used here)
package:registerCommands ()
(Override) Register all commands provided by this package.
generated by LDoc 1.5.0 Last updated 2025-09-14 22:28:52