summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/layout
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2025-02-05 14:24:10 +0100
committerGitHub <noreply@github.com>2025-02-05 13:24:10 +0000
commit029ae4a5ea7ad1e52112ce26b6d38ce1750dae3f (patch)
tree0c56e8c9898efff5e6735750e4291605e25a0d3f /crates/typst-library/src/layout
parent25f6a7ab161b2106c22a9997a68afee60ddb7412 (diff)
Export target docs (#5812)
Co-authored-by: Martin Haug <3874949+reknih@users.noreply.github.com>
Diffstat (limited to 'crates/typst-library/src/layout')
-rw-r--r--crates/typst-library/src/layout/mod.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/crates/typst-library/src/layout/mod.rs b/crates/typst-library/src/layout/mod.rs
index 57518fe7..ef1ecdb3 100644
--- a/crates/typst-library/src/layout/mod.rs
+++ b/crates/typst-library/src/layout/mod.rs
@@ -64,17 +64,11 @@ pub use self::spacing::*;
pub use self::stack::*;
pub use self::transform::*;
-use crate::foundations::{category, Category, Scope};
-
-/// Arranging elements on the page in different ways.
-///
-/// By combining layout functions, you can create complex and automatic layouts.
-#[category]
-pub static LAYOUT: Category;
+use crate::foundations::Scope;
/// Hook up all `layout` definitions.
pub fn define(global: &mut Scope) {
- global.start_category(LAYOUT);
+ global.start_category(crate::Category::Layout);
global.define_type::<Length>();
global.define_type::<Angle>();
global.define_type::<Ratio>();
@@ -103,4 +97,5 @@ pub fn define(global: &mut Scope) {
global.define_elem::<HideElem>();
global.define_func::<measure>();
global.define_func::<layout>();
+ global.reset_category();
}