Docs fixes

Fixes #2059
Fixes #1946
Fixes #1936
Fixes #1862
Fixes #1820
Fixes #1383
This commit is contained in:
Laurenz 2023-09-04 13:18:35 +02:00
parent be83b2cc66
commit 7c42c9bab0
7 changed files with 34 additions and 28 deletions

View File

@ -63,6 +63,7 @@ pub fn repr(
/// ///
/// Display: Panic /// Display: Panic
/// Category: foundations /// Category: foundations
/// Keywords: error
#[func] #[func]
pub fn panic( pub fn panic(
/// The values to panic with. /// The values to panic with.

View File

@ -23,6 +23,11 @@ use super::GridLayouter;
/// 5. I am confused. /// 5. I am confused.
/// + Moving on ... /// + Moving on ...
/// ///
/// Multiple lines:
/// + This enum item has multiple
/// lines because the next line
/// is indented.
///
/// Function call. /// Function call.
/// #enum[First][Second] /// #enum[First][Second]
/// ``` /// ```

View File

@ -11,15 +11,17 @@ use super::GridLayouter;
/// ///
/// ## Example { #example } /// ## Example { #example }
/// ```example /// ```example
/// - *Content* /// Normal list.
/// - Text /// - Text
/// - Math /// - Math
/// - Layout /// - Layout
/// - Visualize /// - ...
/// - Meta
/// - Symbols
/// ///
/// - *Compute* /// Multiple lines.
/// - This list item spans multiple
/// lines because it is indented.
///
/// Function call.
/// #list( /// #list(
/// [Foundations], /// [Foundations],
/// [Calculate], /// [Calculate],

View File

@ -75,20 +75,18 @@ pub struct ParElem {
/// appearance of the text. /// appearance of the text.
/// ///
/// ```example /// ```example
/// #set page(width: 190pt) /// #set page(width: 207pt)
/// #set par(linebreaks: "simple") /// #set par(linebreaks: "simple")
/// Some texts are frustratingly /// Some texts feature many longer
/// challenging to break in a /// words. Those are often exceedingly
/// visually pleasing way. This /// challenging to break in a visually
/// very aesthetic example is one /// pleasing way.
/// of them.
/// ///
/// #set par(linebreaks: "optimized") /// #set par(linebreaks: "optimized")
/// Some texts are frustratingly /// Some texts feature many longer
/// challenging to break in a /// words. Those are often exceedingly
/// visually pleasing way. This /// challenging to break in a visually
/// very aesthetic example is one /// pleasing way.
/// of them.
/// ``` /// ```
#[default] #[default]
pub linebreaks: Smart<Linebreaks>, pub linebreaks: Smart<Linebreaks>,

View File

@ -6,7 +6,7 @@ use crate::prelude::*;
/// from the command with [`typst query`]($reference/meta/query/#cli-queries). /// from the command with [`typst query`]($reference/meta/query/#cli-queries).
/// Its purpose is to expose an arbitrary value to the introspection system. To /// Its purpose is to expose an arbitrary value to the introspection system. To
/// identify a metadata value among others, you can attach a /// 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 /// The `metadata` element is especially useful for command line queries because
/// it allows you to expose arbitrary values to the outside world. /// it allows you to expose arbitrary values to the outside world.

View File

@ -88,7 +88,7 @@ fantasy encyclopedia.
```example ```example
#set heading(numbering: "(I)") #set heading(numbering: "(I)")
#show heading: it => block[ #show heading: it => [
#set align(center) #set align(center)
#set text(font: "Inria Serif") #set text(font: "Inria Serif")
\~ #emph(it.body) \~ #emph(it.body)

View File

@ -60,7 +60,7 @@ You can convert a value to an integer with the [`int`]($func/int) function.
``` ```
# Float # Float
A floating-pointer number. A floating-point number.
A limited-precision representation of a real number. Typst uses 64 bits to 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 store floats. Wherever a float is expected, you can also pass an