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
/// Category: foundations
/// Keywords: error
#[func]
pub fn panic(
/// The values to panic with.

View File

@ -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]
/// ```

View File

@ -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 }

View File

@ -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<Linebreaks>,

View File

@ -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.

View File

@ -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)

View File

@ -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