neoscore.core.paper

class neoscore.core.paper.Paper[source]

Bases: object

A specification for a paper geometry used to lay out pages

width: Unit
height: Unit
margin_top: Unit = Unit(0.0)
margin_right: Unit = Unit(0.0)
margin_bottom: Unit = Unit(0.0)
margin_left: Unit = Unit(0.0)
gutter: Unit = Unit(0.0)
live_width: Unit
live_height: Unit
make_rotation() Paper[source]

Create a 90-degree clockwise rotation of this paper.

The gutter field is left unchanged.

modified(width: Optional[Unit] = None, height: Optional[Unit] = None, margin_top: Optional[Unit] = None, margin_right: Optional[Unit] = None, margin_bottom: Optional[Unit] = None, margin_left: Optional[Unit] = None, gutter: Optional[Unit] = None) Paper[source]

Derive a new Paper from this one with any given changed attributes.

__init__(width: Unit, height: Unit, margin_top: Unit = Unit(0.0), margin_right: Unit = Unit(0.0), margin_bottom: Unit = Unit(0.0), margin_left: Unit = Unit(0.0), gutter: Unit = Unit(0.0)) None
neoscore.core.paper.A4 = Paper(width=Mm(210), height=Mm(297), margin_top=Mm(20), margin_right=Mm(20), margin_bottom=Mm(20), margin_left=Mm(20), gutter=Unit(0.0), live_width=Mm(170.0), live_height=Mm(257.0))

Template for A4-sized portrait paper

neoscore.core.paper.LETTER = Paper(width=Inch(8.5), height=Inch(11), margin_top=Inch(1), margin_right=Inch(1), margin_bottom=Inch(1), margin_left=Inch(1), gutter=Unit(0.0), live_width=Inch(6.5), live_height=Inch(9.0))

Template for letter-sized portrait paper