From 5b1e75af889b1c56bd1165516882bbba7f652bd1 Mon Sep 17 00:00:00 2001 From: Andrew Voynov Date: Thu, 12 Jun 2025 03:47:49 +0300 Subject: [PATCH] Added explanation example for outline.indent --- crates/typst-library/src/model/outline.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/crates/typst-library/src/model/outline.rs b/crates/typst-library/src/model/outline.rs index 194e4a051..0e62975c5 100644 --- a/crates/typst-library/src/model/outline.rs +++ b/crates/typst-library/src/model/outline.rs @@ -452,6 +452,23 @@ impl OutlineEntry { /// If the outline's indent is a fixed value or a function, the prefixes are /// indented, but the inner contents are simply offset from the prefix by /// the specified `gap`, rather than aligning outline-wide. + /// + /// ```example + /// >>> #show heading: none + /// #set heading(numbering: "I-I.") + /// #set outline(title: none) + /// + /// #outline() + /// #line(length: 100%) + /// #outline(indent: 3em) + /// + /// = Software engineering technologies + /// == Requirements + /// == Tools and technologies + /// == Analyzing alternatives + /// = Designing software components + /// = Testing and integration + /// ``` #[func(contextual)] pub fn indented( &self,