summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-09-04 13:18:35 +0200
committerLaurenz <laurmaedje@gmail.com>2023-09-04 13:18:35 +0200
commit7c42c9bab0b6a6d382b16ba270ebd495ac9d3334 (patch)
treecddb3422071cdf06a052fde1a67b4243d033df30
parentbe83b2cc66bfd3b6114de8efa49754496cd1f527 (diff)
Docs fixes
Fixes #2059 Fixes #1946 Fixes #1936 Fixes #1862 Fixes #1820 Fixes #1383
-rw-r--r--crates/typst-library/src/compute/foundations.rs1
-rw-r--r--crates/typst-library/src/layout/enum.rs5
-rw-r--r--crates/typst-library/src/layout/list.rs30
-rw-r--r--crates/typst-library/src/layout/par.rs20
-rw-r--r--crates/typst-library/src/meta/metadata.rs2
-rw-r--r--docs/reference/styling.md2
-rw-r--r--docs/reference/types.md2
7 files changed, 34 insertions, 28 deletions
diff --git a/crates/typst-library/src/compute/foundations.rs b/crates/typst-library/src/compute/foundations.rs
index b7663113..3d07a3af 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 3d0b0973..8f23b6dc 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 4a7c40b7..8bb8744b 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 5ae7db76..39689477 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<Linebreaks>,
diff --git a/crates/typst-library/src/meta/metadata.rs b/crates/typst-library/src/meta/metadata.rs
index 89d1409a..3e08a9f7 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 668dde63..31e04b24 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 1136bd27..5de4fb0c 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