diff --git a/crates/typst-library/src/compute/foundations.rs b/crates/typst-library/src/compute/foundations.rs index b76631138..3d07a3af6 100644 --- a/crates/typst-library/src/compute/foundations.rs +++ b/crates/typst-library/src/compute/foundations.rs @@ -63,6 +63,7 @@ pub fn repr( /// /// Display: Panic /// Category: foundations +/// Keywords: error #[func] pub fn panic( /// The values to panic with. diff --git a/crates/typst-library/src/layout/enum.rs b/crates/typst-library/src/layout/enum.rs index 3d0b09738..8f23b6dc7 100644 --- a/crates/typst-library/src/layout/enum.rs +++ b/crates/typst-library/src/layout/enum.rs @@ -23,6 +23,11 @@ use super::GridLayouter; /// 5. I am confused. /// + Moving on ... /// +/// Multiple lines: +/// + This enum item has multiple +/// lines because the next line +/// is indented. +/// /// Function call. /// #enum[First][Second] /// ``` diff --git a/crates/typst-library/src/layout/list.rs b/crates/typst-library/src/layout/list.rs index 4a7c40b70..8bb8744b5 100644 --- a/crates/typst-library/src/layout/list.rs +++ b/crates/typst-library/src/layout/list.rs @@ -11,21 +11,23 @@ use super::GridLayouter; /// /// ## Example { #example } /// ```example -/// - *Content* -/// - Text -/// - Math -/// - Layout -/// - Visualize -/// - Meta -/// - Symbols +/// Normal list. +/// - Text +/// - Math +/// - Layout +/// - ... /// -/// - *Compute* -/// #list( -/// [Foundations], -/// [Calculate], -/// [Construct], -/// [Data Loading], -/// ) +/// Multiple lines. +/// - This list item spans multiple +/// lines because it is indented. +/// +/// Function call. +/// #list( +/// [Foundations], +/// [Calculate], +/// [Construct], +/// [Data Loading], +/// ) /// ``` /// /// ## Syntax { #syntax } diff --git a/crates/typst-library/src/layout/par.rs b/crates/typst-library/src/layout/par.rs index 5ae7db761..39689477d 100644 --- a/crates/typst-library/src/layout/par.rs +++ b/crates/typst-library/src/layout/par.rs @@ -75,20 +75,18 @@ pub struct ParElem { /// appearance of the text. /// /// ```example - /// #set page(width: 190pt) + /// #set page(width: 207pt) /// #set par(linebreaks: "simple") - /// Some texts are frustratingly - /// challenging to break in a - /// visually pleasing way. This - /// very aesthetic example is one - /// of them. + /// Some texts feature many longer + /// words. Those are often exceedingly + /// challenging to break in a visually + /// pleasing way. /// /// #set par(linebreaks: "optimized") - /// Some texts are frustratingly - /// challenging to break in a - /// visually pleasing way. This - /// very aesthetic example is one - /// of them. + /// Some texts feature many longer + /// words. Those are often exceedingly + /// challenging to break in a visually + /// pleasing way. /// ``` #[default] pub linebreaks: Smart, diff --git a/crates/typst-library/src/meta/metadata.rs b/crates/typst-library/src/meta/metadata.rs index 89d1409a9..3e08a9f79 100644 --- a/crates/typst-library/src/meta/metadata.rs +++ b/crates/typst-library/src/meta/metadata.rs @@ -6,7 +6,7 @@ use crate::prelude::*; /// from the command with [`typst query`]($reference/meta/query/#cli-queries). /// Its purpose is to expose an arbitrary value to the introspection system. To /// identify a metadata value among others, you can attach a -/// [`label`]($type/label) to it and query for that label. +/// [`label`]($func/label) to it and query for that label. /// /// The `metadata` element is especially useful for command line queries because /// it allows you to expose arbitrary values to the outside world. diff --git a/docs/reference/styling.md b/docs/reference/styling.md index 668dde636..31e04b244 100644 --- a/docs/reference/styling.md +++ b/docs/reference/styling.md @@ -88,7 +88,7 @@ fantasy encyclopedia. ```example #set heading(numbering: "(I)") -#show heading: it => block[ +#show heading: it => [ #set align(center) #set text(font: "Inria Serif") \~ #emph(it.body) diff --git a/docs/reference/types.md b/docs/reference/types.md index 1136bd276..5de4fb0c8 100644 --- a/docs/reference/types.md +++ b/docs/reference/types.md @@ -60,7 +60,7 @@ You can convert a value to an integer with the [`int`]($func/int) function. ``` # Float -A floating-pointer number. +A floating-point number. A limited-precision representation of a real number. Typst uses 64 bits to store floats. Wherever a float is expected, you can also pass an