BetaCalendars.GridAlgebra.Paper
- Package
- purescript-betacalendars-grid-algebra
- Repository
- mateopedersen/purescript-betacalendars-grid-algebra
Nominal paper dimensions and checked printable-grid geometry.
All measurements use millimeters. The output describes a geometric model with explicit reserved areas; it does not claim to measure a printer or a person's writing experience. Project context: Beta Calendars. Example references: blank, January, April, July, and October.
#Millimeters Source
#millimeters Source
millimeters :: Number -> Maybe MillimetersConstruct a non-negative finite millimeter value.
#millimeterValue Source
millimeterValue :: Millimeters -> NumberRead the numeric millimeter measurement.
#PaperSize Source
data PaperSizeStandard ISO and US paper formats, or a custom width and height.
Constructors
Instances
#Margins Source
type Margins = { bottom :: Millimeters, left :: Millimeters, right :: Millimeters, top :: Millimeters }Four non-negative page margins.
#LayoutSpec Source
type LayoutSpec = { columns :: Int, margins :: Margins, notesHeight :: Millimeters, orientation :: Orientation, paper :: PaperSize, rows :: Int, titleHeight :: Millimeters, weekdayHeaderHeight :: Millimeters }Input parameters for a printable grid model.
#LayoutMetrics Source
type LayoutMetrics = { cellArea :: Number, cellHeight :: Millimeters, cellWidth :: Millimeters, gridHeight :: Millimeters, gridWidth :: Millimeters, pageHeight :: Millimeters, pageWidth :: Millimeters, printableHeight :: Millimeters, printableWidth :: Millimeters, writingArea :: Number }Derived page and cell geometry.
#LayoutError Source
data LayoutErrorFailures that prevent a physically meaningful grid calculation.
Constructors
Instances
#paperDimensions Source
paperDimensions :: PaperSize -> Orientation -> { height :: Number, width :: Number }Dimensions in the requested orientation. Letter and Legal are the US nominal dimensions in millimeters.
#layoutMetrics Source
layoutMetrics :: LayoutSpec -> Either LayoutError LayoutMetricsCalculate layout geometry after validating all reserved areas and shape.
#defaultMargins Source
defaultMargins :: MarginsCommon model margins used in examples: 10 mm on each side.
- Modules
- BetaCalendars.
GridAlgebra - BetaCalendars.
GridAlgebra. Blank - BetaCalendars.
GridAlgebra. Boundary2027 - BetaCalendars.
GridAlgebra. Civil - BetaCalendars.
GridAlgebra. Grid - BetaCalendars.
GridAlgebra. Paper - BetaCalendars.
GridAlgebra. Validation - BetaCalendars.
GridAlgebra. WeekStart - BetaCalendars.
GridAlgebra. Year2027