From 3284e7fac7c695e42fd2c666befd92742cac96be Mon Sep 17 00:00:00 2001 From: Luis David Licea Torres Date: Mon, 12 Jun 2023 04:46:34 -0600 Subject: Support for inside and outside margins (#1308) Co-authored-by: Laurenz --- docs/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/src/lib.rs b/docs/src/lib.rs index bc3be0cc..5ddb1198 100644 --- a/docs/src/lib.rs +++ b/docs/src/lib.rs @@ -19,8 +19,8 @@ use serde_yaml as yaml; use typst::doc::Frame; use typst::eval::{CastInfo, Func, FuncInfo, Library, Module, ParamInfo, Value}; use typst::font::{Font, FontBook}; -use typst::geom::{Abs, Sides, Smart}; -use typst_library::layout::PageElem; +use typst::geom::{Abs, Smart}; +use typst_library::layout::{Margin, PageElem}; use unscanny::Scanner; static SRC: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/src"); @@ -43,7 +43,7 @@ static LIBRARY: Lazy> = Lazy::new(|| { lib.styles .set(PageElem::set_width(Smart::Custom(Abs::pt(240.0).into()))); lib.styles.set(PageElem::set_height(Smart::Auto)); - lib.styles.set(PageElem::set_margin(Sides::splat(Some(Smart::Custom( + lib.styles.set(PageElem::set_margin(Margin::splat(Some(Smart::Custom( Abs::pt(15.0).into(), ))))); typst::eval::set_lang_items(lib.items.clone()); -- cgit v1.2.3