diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-08-07 15:02:50 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-08-07 15:58:16 +0200 |
| commit | 07c80e9a815750079b9a091fdc434ec498bc4cd0 (patch) | |
| tree | f0ccb4472e1f6491212bf39509a5f947bfdeb5ef /crates/typst-library/src/layout | |
| parent | 800744ed9d3923eecf3436f2029e77033e8f1b6a (diff) | |
Touch up docs
Diffstat (limited to 'crates/typst-library/src/layout')
| -rw-r--r-- | crates/typst-library/src/layout/align.rs | 15 | ||||
| -rw-r--r-- | crates/typst-library/src/layout/enum.rs | 4 | ||||
| -rw-r--r-- | crates/typst-library/src/layout/list.rs | 2 | ||||
| -rw-r--r-- | crates/typst-library/src/layout/stack.rs | 10 |
4 files changed, 15 insertions, 16 deletions
diff --git a/crates/typst-library/src/layout/align.rs b/crates/typst-library/src/layout/align.rs index fecc7e33..5f7e8bc0 100644 --- a/crates/typst-library/src/layout/align.rs +++ b/crates/typst-library/src/layout/align.rs @@ -33,8 +33,8 @@ pub struct AlignElem { /// - `horizon` /// - `bottom` /// - /// You may use the `axis` method on a single-axis alignment to obtain - /// whether it is `{"horizontal"}` or `{"vertical"}`. You may also use the + /// You can use the `axis` method on a single-axis alignment to obtain + /// whether it is `{"horizontal"}` or `{"vertical"}`. You can also use the /// `inv` method to obtain its inverse alignment. For example, /// `{top.axis()}` is `{"vertical"}`, while `{top.inv()}` is equal to /// `{bottom}`. @@ -43,12 +43,11 @@ pub struct AlignElem { /// the `+` operator to get a `2d alignment`. For example, `top + right` /// aligns the content to the top right corner. /// - /// For 2d alignments, you may use the `x` and `y` fields to access their - /// horizontal and vertical components, respectively. Additionally, you may - /// use the `inv` method to obtain a 2d alignment with both components - /// inverted. For instance, `{(top + right).x}` is `right`, - /// `{(top + right).y}` is `top`, and `{(top + right).inv()}` is equal to - /// `bottom + left`. + /// For 2d alignments, the `x` and `y` fields hold their horizontal and + /// vertical components, respectively. Additionally, you can use the `inv` + /// method to obtain a 2d alignment with both components inverted. For + /// instance, `{(top + right).x}` is `right`, `{(top + right).y}` is `top`, + /// and `{(top + right).inv()}` is equal to `bottom + left`. /// /// ```example /// #set page(height: 6cm) diff --git a/crates/typst-library/src/layout/enum.rs b/crates/typst-library/src/layout/enum.rs index d66477fc..3d0b0973 100644 --- a/crates/typst-library/src/layout/enum.rs +++ b/crates/typst-library/src/layout/enum.rs @@ -56,8 +56,8 @@ use super::GridLayouter; /// numbered enumeration item. /// /// Enumeration items can contain multiple paragraphs and other block-level -/// content. All content that is indented more than an item's plus sign or dot -/// becomes part of that item. +/// content. All content that is indented more than an item's marker becomes +/// part of that item. /// /// Display: Numbered List /// Category: layout diff --git a/crates/typst-library/src/layout/list.rs b/crates/typst-library/src/layout/list.rs index e39ec3f5..4a7c40b7 100644 --- a/crates/typst-library/src/layout/list.rs +++ b/crates/typst-library/src/layout/list.rs @@ -32,7 +32,7 @@ use super::GridLayouter; /// This functions also has dedicated syntax: Start a line with a hyphen, /// followed by a space to create a list item. A list item can contain multiple /// paragraphs and other block-level content. All content that is indented -/// more than an item's hyphen becomes part of that item. +/// more than an item's marker becomes part of that item. /// /// Display: Bullet List /// Category: layout diff --git a/crates/typst-library/src/layout/stack.rs b/crates/typst-library/src/layout/stack.rs index 8d536638..52a2f289 100644 --- a/crates/typst-library/src/layout/stack.rs +++ b/crates/typst-library/src/layout/stack.rs @@ -27,11 +27,11 @@ pub struct StackElem { /// - `{ttb}`: Top to bottom. /// - `{btt}`: Bottom to top. /// - /// You may use the `start` and `end` methods to obtain the initial and - /// final points (respectively) of a direction, as `alignment`. You may - /// also use the `axis` method to obtain whether a direction is - /// `{"horizontal"}` or `{"vertical"}`. Finally, the `inv` method returns - /// its inverse direction. + /// You cab use the `start` and `end` methods to obtain the initial and + /// final points (respectively) of a direction, as `alignment`. You can also + /// use the `axis` method to determine whether a direction is + /// `{"horizontal"}` or `{"vertical"}`. The `inv` method returns a + /// direction's inverse direction. /// /// For example, `{ttb.start()}` is `top`, `{ttb.end()}` is `bottom`, /// `{ttb.axis()}` is `{"vertical"}` and `{ttb.inv()}` is equal to `btt`. |
