diff options
Diffstat (limited to 'crates/typst-library/src/layout/align.rs')
| -rw-r--r-- | crates/typst-library/src/layout/align.rs | 15 |
1 files changed, 7 insertions, 8 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) |
