diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-05-15 10:36:03 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-05-15 10:36:03 +0200 |
| commit | 1fa56a317c8d8da76546e6b5e19b279d84380837 (patch) | |
| tree | 5bc0acad0b881898511bdf66dc6384f1b5e83de3 /library/src/meta | |
| parent | 156aef10c463f81ca0016583a9df83d7b8560e59 (diff) | |
Extract category definitions into individual functions
Diffstat (limited to 'library/src/meta')
| -rw-r--r-- | library/src/meta/mod.rs | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/library/src/meta/mod.rs b/library/src/meta/mod.rs index 279fe54a..61028bf5 100644 --- a/library/src/meta/mod.rs +++ b/library/src/meta/mod.rs @@ -26,8 +26,27 @@ pub use self::query::*; pub use self::reference::*; pub use self::state::*; -use typst::doc::Lang; -use typst::doc::Region; +use crate::prelude::*; + +/// Hook up all meta definitions. +pub(super) fn define(global: &mut Scope) { + global.define("document", DocumentElem::func()); + global.define("ref", RefElem::func()); + global.define("link", LinkElem::func()); + global.define("outline", OutlineElem::func()); + global.define("heading", HeadingElem::func()); + global.define("figure", FigureElem::func()); + global.define("cite", CiteElem::func()); + global.define("bibliography", BibliographyElem::func()); + global.define("locate", locate); + global.define("style", style); + global.define("layout", layout); + global.define("counter", counter); + global.define("numbering", numbering); + global.define("state", state); + global.define("query", query); + global.define("selector", selector); +} /// The named with which an element is referenced. pub trait LocalName { |
