mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
25 lines
518 B
Rust
25 lines
518 B
Rust
//! PDF-specific functionality.
|
|
|
|
mod embed;
|
|
|
|
pub use self::embed::*;
|
|
|
|
use crate::foundations::{category, Category, Module, Scope};
|
|
|
|
/// PDF-specific functionality.
|
|
#[category]
|
|
pub static PDF: Category;
|
|
|
|
/// Hook up the `pdf` module.
|
|
pub(super) fn define(global: &mut Scope) {
|
|
global.category(PDF);
|
|
global.define("pdf", module());
|
|
}
|
|
|
|
/// Hook up all `pdf` definitions.
|
|
pub fn module() -> Module {
|
|
let mut scope = Scope::deduplicating();
|
|
scope.define_elem::<EmbedElem>();
|
|
Module::new("pdf", scope)
|
|
}
|