diff options
| author | MALO <57839069+MDLC01@users.noreply.github.com> | 2023-06-24 14:33:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-24 14:33:17 +0200 |
| commit | b96b7b7ee12a5d1c8e8c24c95b58b7ca03cec44b (patch) | |
| tree | a8884268565be8540c509e53f0fdbccd5e73b89f /library/src/layout | |
| parent | 48c25f4da01aa5cbd5e49145f591c85b676e8a54 (diff) | |
Use third person in documentation (#1560)
Diffstat (limited to 'library/src/layout')
| -rw-r--r-- | library/src/layout/align.rs | 2 | ||||
| -rw-r--r-- | library/src/layout/columns.rs | 4 | ||||
| -rw-r--r-- | library/src/layout/container.rs | 8 | ||||
| -rw-r--r-- | library/src/layout/flow.rs | 6 | ||||
| -rw-r--r-- | library/src/layout/grid.rs | 12 | ||||
| -rw-r--r-- | library/src/layout/hide.rs | 2 | ||||
| -rw-r--r-- | library/src/layout/measure.rs | 2 | ||||
| -rw-r--r-- | library/src/layout/pad.rs | 7 | ||||
| -rw-r--r-- | library/src/layout/par.rs | 2 | ||||
| -rw-r--r-- | library/src/layout/place.rs | 2 | ||||
| -rw-r--r-- | library/src/layout/spacing.rs | 16 | ||||
| -rw-r--r-- | library/src/layout/stack.rs | 2 | ||||
| -rw-r--r-- | library/src/layout/table.rs | 24 | ||||
| -rw-r--r-- | library/src/layout/transform.rs | 16 |
14 files changed, 51 insertions, 54 deletions
diff --git a/library/src/layout/align.rs b/library/src/layout/align.rs index 4c9beb63..bbfe9f7e 100644 --- a/library/src/layout/align.rs +++ b/library/src/layout/align.rs @@ -1,6 +1,6 @@ use crate::prelude::*; -/// Align content horizontally and vertically. +/// Aligns content horizontally and vertically. /// /// ## Example { #example } /// ```example diff --git a/library/src/layout/columns.rs b/library/src/layout/columns.rs index 984c9673..d2138491 100644 --- a/library/src/layout/columns.rs +++ b/library/src/layout/columns.rs @@ -1,7 +1,7 @@ use crate::prelude::*; use crate::text::TextElem; -/// Separate a region into multiple equally sized columns. +/// Separates a region into multiple equally sized columns. /// /// The `column` function allows to separate the interior of any container into /// multiple columns. It will not equalize the height of the columns, instead, @@ -127,7 +127,7 @@ impl Layout for ColumnsElem { } } -/// A forced column break. +/// Forces a column break. /// /// The function will behave like a [page break]($func/pagebreak) when used in a /// single column layout or the last column on a page. Otherwise, content after diff --git a/library/src/layout/container.rs b/library/src/layout/container.rs index d28c8b5e..c79669d0 100644 --- a/library/src/layout/container.rs +++ b/library/src/layout/container.rs @@ -169,7 +169,7 @@ impl Layout for BoxElem { /// A block-level container. /// -/// Such a container can be used to separate content, size it and give it a +/// Such a container can be used to separate content, size it, and give it a /// background or border. /// /// ## Examples { #examples } @@ -214,9 +214,9 @@ pub struct BlockElem { /// ``` pub width: Smart<Rel<Length>>, - /// The block's height. When the height is larger than the remaining space on - /// a page and [`breakable`]($func/block.breakable) is `{true}`, the block - /// will continue on the next page with the remaining height. + /// The block's height. When the height is larger than the remaining space + /// on a page and [`breakable`]($func/block.breakable) is `{true}`, the + /// block will continue on the next page with the remaining height. /// /// ```example /// #set page(height: 80pt) diff --git a/library/src/layout/flow.rs b/library/src/layout/flow.rs index fdce7c0b..c173ef1a 100644 --- a/library/src/layout/flow.rs +++ b/library/src/layout/flow.rs @@ -10,10 +10,10 @@ use crate::visualize::{ SquareElem, }; -/// Arrange spacing, paragraphs and block-level elements into a flow. +/// Arranges spacing, paragraphs and block-level elements into a flow. /// -/// This element is responsible for layouting both the top-level content flow and -/// the contents of boxes. +/// This element is responsible for layouting both the top-level content flow +/// and the contents of boxes. /// /// Display: Flow /// Category: layout diff --git a/library/src/layout/grid.rs b/library/src/layout/grid.rs index ed4c75b4..4f5175e9 100644 --- a/library/src/layout/grid.rs +++ b/library/src/layout/grid.rs @@ -3,7 +3,7 @@ use crate::text::TextElem; use super::Sizing; -/// Arrange content in a grid. +/// Arranges content in a grid. /// /// The grid element allows you to arrange content in a grid. You can define the /// number of rows and columns, as well as the size of the gutters between them. @@ -63,7 +63,7 @@ use super::Sizing; /// Category: layout #[element(Layout)] pub struct GridElem { - /// Defines the column sizes. + /// The column sizes. /// /// Either specify a track size array or provide an integer to create a grid /// with that many `{auto}`-sized columns. Note that opposed to rows and @@ -71,26 +71,26 @@ pub struct GridElem { /// column. pub columns: TrackSizings, - /// Defines the row sizes. + /// The row sizes. /// /// If there are more cells than fit the defined rows, the last row is /// repeated until there are no more cells. pub rows: TrackSizings, - /// Defines the gaps between rows & columns. + /// The gaps between rows & columns. /// /// If there are more gutters than defined sizes, the last gutter is repeated. #[external] pub gutter: TrackSizings, - /// Defines the gaps between columns. Takes precedence over `gutter`. + /// The gaps between columns. Takes precedence over `gutter`. #[parse( let gutter = args.named("gutter")?; args.named("column-gutter")?.or_else(|| gutter.clone()) )] pub column_gutter: TrackSizings, - /// Defines the gaps between rows. Takes precedence over `gutter`. + /// The gaps between rows. Takes precedence over `gutter`. #[parse(args.named("row-gutter")?.or_else(|| gutter.clone()))] pub row_gutter: TrackSizings, diff --git a/library/src/layout/hide.rs b/library/src/layout/hide.rs index 7c954401..c6e83e0c 100644 --- a/library/src/layout/hide.rs +++ b/library/src/layout/hide.rs @@ -1,6 +1,6 @@ use crate::prelude::*; -/// Hide content without affecting layout. +/// Hides content without affecting layout. /// /// The `hide` function allows you to hide content while the layout still 'sees' /// it. This is useful to create whitespace that is exactly as large as some diff --git a/library/src/layout/measure.rs b/library/src/layout/measure.rs index 4cbd1698..eb8e509e 100644 --- a/library/src/layout/measure.rs +++ b/library/src/layout/measure.rs @@ -1,6 +1,6 @@ use crate::prelude::*; -/// Measure the layouted size of content. +/// Measures the layouted size of content. /// /// The `measure` function lets you determine the layouted size of content. /// Note that an infinite space is assumed, therefore the measured height/width diff --git a/library/src/layout/pad.rs b/library/src/layout/pad.rs index c7f9ead8..a3d5646b 100644 --- a/library/src/layout/pad.rs +++ b/library/src/layout/pad.rs @@ -1,10 +1,9 @@ use crate::prelude::*; -/// Add spacing around content. +/// Adds spacing around content. /// -/// The `pad` function adds spacing around content. The spacing can be specified -/// for each side individually, or for all sides at once by specifying a -/// positional argument. +/// The spacing can be specified for each side individually, or for all sides at +/// once by specifying a positional argument. /// /// ## Example { #example } /// ```example diff --git a/library/src/layout/par.rs b/library/src/layout/par.rs index 2d6bd96d..6b914e80 100644 --- a/library/src/layout/par.rs +++ b/library/src/layout/par.rs @@ -18,7 +18,7 @@ use crate::text::{ SpaceElem, TextElem, }; -/// Arrange text, spacing and inline-level elements into a paragraph. +/// Arranges text, spacing and inline-level elements into a paragraph. /// /// Although this function is primarily used in set rules to affect paragraph /// properties, it can also be used to explicitly render its argument onto a diff --git a/library/src/layout/place.rs b/library/src/layout/place.rs index 215eb5e1..6602948c 100644 --- a/library/src/layout/place.rs +++ b/library/src/layout/place.rs @@ -1,6 +1,6 @@ use crate::prelude::*; -/// Place content at an absolute position. +/// Places content at an absolute position. /// /// Placed content will not affect the position of other content. Place is /// always relative to its parent container and will be in the foreground of all diff --git a/library/src/layout/spacing.rs b/library/src/layout/spacing.rs index 0cbf6641..e7dc24fb 100644 --- a/library/src/layout/spacing.rs +++ b/library/src/layout/spacing.rs @@ -2,7 +2,7 @@ use std::cmp::Ordering; use crate::prelude::*; -/// Insert horizontal spacing into a paragraph. +/// Inserts horizontal spacing into a paragraph. /// /// The spacing can be absolute, relative, or fractional. In the last case, the /// remaining space on the line is distributed among all fractional spacings @@ -27,7 +27,7 @@ pub struct HElem { #[required] pub amount: Spacing, - /// If true, the spacing collapses at the start or end of a paragraph. + /// If `{true}`, the spacing collapses at the start or end of a paragraph. /// Moreover, from multiple adjacent weak spacings all but the largest one /// collapse. /// @@ -62,7 +62,7 @@ impl Behave for HElem { } } -/// Insert vertical spacing into a flow of blocks. +/// Inserts vertical spacing into a flow of blocks. /// /// The spacing can be absolute, relative, or fractional. In the last case, /// the remaining space on the page is distributed among all fractional spacings @@ -91,10 +91,10 @@ pub struct VElem { #[required] pub amount: Spacing, - /// If true, the spacing collapses at the start or end of a flow. Moreover, - /// from multiple adjacent weak spacings all but the largest one collapse. - /// Weak spacings will always collapse adjacent paragraph spacing, even if the - /// paragraph spacing is larger. + /// If `{true}`, the spacing collapses at the start or end of a flow. + /// Moreover, from multiple adjacent weak spacings all but the largest one + /// collapse. Weak spacings will always collapse adjacent paragraph spacing, + /// even if the paragraph spacing is larger. /// /// ```example /// The following theorem is @@ -107,7 +107,7 @@ pub struct VElem { #[external] pub weak: bool, - /// The elements's weakness level, see also [`Behaviour`]. + /// The element's weakness level, see also [`Behaviour`]. #[internal] #[parse(args.named("weak")?.map(|v: bool| v as usize))] pub weakness: usize, diff --git a/library/src/layout/stack.rs b/library/src/layout/stack.rs index f8670026..97305ddf 100644 --- a/library/src/layout/stack.rs +++ b/library/src/layout/stack.rs @@ -1,7 +1,7 @@ use super::{AlignElem, Spacing}; use crate::prelude::*; -/// Arrange content and spacing horizontally or vertically. +/// Arranges content and spacing horizontally or vertically. /// /// The stack places a list of items along an axis, with optional spacing /// between each item. diff --git a/library/src/layout/table.rs b/library/src/layout/table.rs index 9977af28..c2faedba 100644 --- a/library/src/layout/table.rs +++ b/library/src/layout/table.rs @@ -39,36 +39,36 @@ use crate::prelude::*; /// Category: layout #[element(Layout, LocalName, Figurable)] pub struct TableElem { - /// Defines the column sizes. See the [grid documentation]($func/grid) for - /// more information on track sizing. + /// The column sizes. See the [grid documentation]($func/grid) for more + /// information on track sizing. pub columns: TrackSizings, - /// Defines the row sizes. See the [grid documentation]($func/grid) for more + /// The row sizes. See the [grid documentation]($func/grid) for more /// information on track sizing. pub rows: TrackSizings, - /// Defines the gaps between rows & columns. See the [grid + /// The gaps between rows & columns. See the [grid /// documentation]($func/grid) for more information on gutters. #[external] pub gutter: TrackSizings, - /// Defines the gaps between columns. Takes precedence over `gutter`. See - /// the [grid documentation]($func/grid) for more information on gutters. + /// The gaps between columns. Takes precedence over `gutter`. See the [grid + /// documentation]($func/grid) for more information on gutters. #[parse( let gutter = args.named("gutter")?; args.named("column-gutter")?.or_else(|| gutter.clone()) )] pub column_gutter: TrackSizings, - /// Defines the gaps between rows. Takes precedence over `gutter`. See the - /// [grid documentation]($func/grid) for more information on gutters. + /// The gaps between rows. Takes precedence over `gutter`. See the [grid + /// documentation]($func/grid) for more information on gutters. #[parse(args.named("row-gutter")?.or_else(|| gutter.clone()))] pub row_gutter: TrackSizings, /// How to fill the cells. /// /// This can be a color or a function that returns a color. The function is - /// passed the cell's column and row index, starting at zero. This can be + /// passed the cells' column and row index, starting at zero. This can be /// used to implement striped tables. /// /// ```example @@ -87,11 +87,11 @@ pub struct TableElem { /// ``` pub fill: Celled<Option<Paint>>, - /// How to align the cell's content. + /// How to align the cells' content. /// /// This can either be a single alignment, an array of alignments /// (corresponding to each column) or a function that returns an alignment. - /// The function is passed the cell's column and row index, starting at zero. + /// The function is passed the cells' column and row index, starting at zero. /// If set to `{auto}`, the outer alignment is used. /// /// ```example @@ -117,7 +117,7 @@ pub struct TableElem { #[default(Some(PartialStroke::default()))] pub stroke: Option<PartialStroke>, - /// How much to pad the cells's content. + /// How much to pad the cells' content. #[default(Abs::pt(5.0).into())] pub inset: Rel<Length>, diff --git a/library/src/layout/transform.rs b/library/src/layout/transform.rs index f1f1e94a..a57a5edc 100644 --- a/library/src/layout/transform.rs +++ b/library/src/layout/transform.rs @@ -2,11 +2,11 @@ use typst::geom::Transform; use crate::prelude::*; -/// Move content without affecting layout. +/// Moves content without affecting layout. /// /// The `move` function allows you to move content while the layout still 'sees' -/// it at the original positions. Containers will still be sized as if the content -/// was not moved. +/// it at the original positions. Containers will still be sized as if the +/// content was not moved. /// /// ## Example { #example } /// ```example @@ -53,9 +53,9 @@ impl Layout for MoveElem { } } -/// Rotate content without affecting layout. +/// Rotates content without affecting layout. /// -/// Rotate an element by a given angle. The layout will act as if the element +/// Rotates an element by a given angle. The layout will act as if the element /// was not rotated. /// /// ## Example { #example } @@ -126,11 +126,9 @@ impl Layout for RotateElem { } } -/// Scale content without affecting layout. -/// -/// The `scale` function allows you to scale and mirror content without -/// affecting the layout. +/// Scales content without affecting layout. /// +/// Lets you mirror content by specifying a negative scale on a single axis. /// /// ## Example { #example } /// ```example |
