diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-12-15 15:09:09 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-12-15 15:09:09 +0100 |
| commit | f3e461b27c70d34e12f3bcb11cc340a88fc7f102 (patch) | |
| tree | 5d8e21f21aa918bd5ca2c2c8654564f25ab4cd6d /src/lib.rs | |
| parent | 3677e4a97dd08252e2e1172ac60a5ab958f8ee16 (diff) | |
Paper styles and scalable+default margins 📜
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -91,15 +91,16 @@ impl<'p> Typesetter<'p> { /// Layout a syntax tree and return the produced layout. pub fn layout(&self, tree: &SyntaxTree) -> LayoutResult<MultiLayout> { use crate::layout::prelude::*; + let margins = self.style.page.margins(); Ok(layout( &tree, LayoutContext { loader: &self.loader, style: &self.style, - base: self.style.page.dimensions.unpadded(self.style.page.margins), + base: self.style.page.dimensions.unpadded(margins), spaces: smallvec![LayoutSpace { dimensions: self.style.page.dimensions, - padding: self.style.page.margins, + padding: margins, expansion: LayoutExpansion::new(true, true), }], repeat: true, |
