Module resilient.layouts.base

Base page layout class.

Info:

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

Class resilient.layouts.base

layout:_init (_) (Constructor) Create a new layout instance.
layout:setPaperHack (W, H) Set the paper size.
layout:setOffset (offset) Set the binding offset.
layout:frameset () Compute the frameset for this layout.
layout:textblock (isOdd) Return the textblock frame specification.
layout:content (_) Return the content frame specification.
layout:footnotes (_) Return the footnotes frame specification.
layout:footer (_) Return the footer frame specification.
layout:header (_) Return the header frame specification.
layout:margins (odd) Return the margins frame specification.
layout:gutter (isOdd) Return the binding gutter frame specification.
layout:draw (W, H, options) Draw a layout graph in the document.


Class resilient.layouts.base

Base layout class.
layout:_init (_)
(Constructor) Create a new layout instance.

Parameters:

  • _ table Options (not used here)
layout:setPaperHack (W, H)
Set the paper size.

This is sort of a hack, as some layouts are hard to implement with SILE's frame specification model (and Cassowary constraints).

Parameters:

  • W SILE.types.measurement Paper width
  • H SILE.types.measurement Paper height
layout:setOffset (offset)
Set the binding offset.

Parameters:

  • offset SILE.types.measurement Binding offset
layout:frameset ()
Compute the frameset for this layout.

Returns:

  1. table odd Frameset for odd pages
  2. table even Frameset for even pages
layout:textblock (isOdd)
Return the textblock frame specification.

Parameters:

  • isOdd boolean Whether this is for an odd page

Returns:

    table Frame specification
layout:content (_)
Return the content frame specification.

Parameters:

  • _ boolean Whether this is for an odd page (unused here)

Returns:

    table Frame specification
layout:footnotes (_)
Return the footnotes frame specification.

Parameters:

  • _ boolean Whether this is for an odd page (unused here)

Returns:

    table Frame specification
layout:footer (_)
Return the footer frame specification.

Parameters:

  • _ boolean Whether this is for an odd page (unused here)

Returns:

    table Frame specification
layout:header (_)
Return the header frame specification.

Parameters:

  • _ boolean Whether this is for an odd page (unused here)

Returns:

    table Frame specification
layout:margins (odd)
Return the margins frame specification.

Parameters:

  • odd boolean Whether this is for an odd page

Returns:

    table Frame specification
layout:gutter (isOdd)
Return the binding gutter frame specification.

Parameters:

  • isOdd boolean Whether this is for an odd page

Returns:

    table Frame specification
layout:draw (W, H, options)
Draw a layout graph in the document.

Parameters:

  • W SILE.types.measurement Width of the drawing area
  • H SILE.types.measurement Height of the drawing area
  • options table Drawing options
generated by LDoc 1.5.0 Last updated 2025-09-14 22:28:52