Rewrite outline.indent example (#6383)

Co-authored-by: Laurenz <laurmaedje@gmail.com>
This commit is contained in:
Andrew Voynov 2025-06-24 12:56:58 +03:00 committed by GitHub
parent 87cb8f5094
commit 24293a6c12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -225,25 +225,21 @@ pub struct OutlineElem {
/// to just specifying `{2em}`. /// to just specifying `{2em}`.
/// ///
/// ```example /// ```example
/// #set heading(numbering: "1.a.") /// >>> #show heading: none
/// #set heading(numbering: "I-I.")
/// #set outline(title: none)
/// ///
/// #outline( /// #outline()
/// title: [Contents (Automatic)], /// #line(length: 100%)
/// indent: auto, /// #outline(indent: 3em)
/// )
/// ///
/// #outline( /// = Software engineering technologies
/// title: [Contents (Length)], /// == Requirements
/// indent: 2em, /// == Tools and technologies
/// ) /// === Code editors
/// /// == Analyzing alternatives
/// = About ACME Corp. /// = Designing software components
/// == History /// = Testing and integration
/// === Origins
/// #lorem(10)
///
/// == Products
/// #lorem(10)
/// ``` /// ```
pub indent: Smart<OutlineIndent>, pub indent: Smart<OutlineIndent>,
} }
@ -450,8 +446,9 @@ impl OutlineEntry {
/// at the same level are aligned. /// at the same level are aligned.
/// ///
/// If the outline's indent is a fixed value or a function, the prefixes are /// If the outline's indent is a fixed value or a function, the prefixes are
/// indented, but the inner contents are simply inset from the prefix by the /// indented, but the inner contents are simply offset from the prefix by
/// specified `gap`, rather than aligning outline-wide. /// the specified `gap`, rather than aligning outline-wide. For a visual
/// explanation, see [`outline.indent`]($outline.indent).
#[func(contextual)] #[func(contextual)]
pub fn indented( pub fn indented(
&self, &self,