summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/layout/spacing.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-library/src/layout/spacing.rs')
-rw-r--r--crates/typst-library/src/layout/spacing.rs16
1 files changed, 5 insertions, 11 deletions
diff --git a/crates/typst-library/src/layout/spacing.rs b/crates/typst-library/src/layout/spacing.rs
index 69a5d952..868b3d50 100644
--- a/crates/typst-library/src/layout/spacing.rs
+++ b/crates/typst-library/src/layout/spacing.rs
@@ -8,20 +8,17 @@ use crate::prelude::*;
/// remaining space on the line is distributed among all fractional spacings
/// according to their relative fractions.
///
-/// ## Example { #example }
+/// # Example
/// ```example
/// First #h(1cm) Second \
/// First #h(30%) Second \
/// First #h(2fr) Second #h(1fr) Third
/// ```
///
-/// ## Mathematical Spacing { #math-spacing }
+/// # Mathematical Spacing { #math-spacing }
/// In [mathematical formulas]($category/math), you can additionally use these
/// constants to add spacing between elements: `thin`, `med`, `thick`, `quad`.
-///
-/// Display: Spacing (H)
-/// Category: layout
-#[element(Behave)]
+#[elem(title = "Spacing (H)", Behave)]
pub struct HElem {
/// How much spacing to insert.
#[required]
@@ -79,7 +76,7 @@ impl Behave for HElem {
/// the remaining space on the page is distributed among all fractional spacings
/// according to their relative fractions.
///
-/// ## Example { #example }
+/// # Example
/// ```example
/// #grid(
/// rows: 3cm,
@@ -93,10 +90,7 @@ impl Behave for HElem {
/// [A #v(1fr) B],
/// )
/// ```
-///
-/// Display: Spacing (V)
-/// Category: layout
-#[element(Behave)]
+#[elem(title = "Spacing (V)", Behave)]
pub struct VElem {
/// How much spacing to insert.
#[required]