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/text | |
| parent | 48c25f4da01aa5cbd5e49145f591c85b676e8a54 (diff) | |
Use third person in documentation (#1560)
Diffstat (limited to 'library/src/text')
| -rw-r--r-- | library/src/text/deco.rs | 27 | ||||
| -rw-r--r-- | library/src/text/misc.rs | 8 | ||||
| -rw-r--r-- | library/src/text/mod.rs | 8 | ||||
| -rw-r--r-- | library/src/text/shift.rs | 4 |
4 files changed, 25 insertions, 22 deletions
diff --git a/library/src/text/deco.rs b/library/src/text/deco.rs index 329d3f85..8b8ce7fd 100644 --- a/library/src/text/deco.rs +++ b/library/src/text/deco.rs @@ -4,7 +4,7 @@ use ttf_parser::{GlyphId, OutlineBuilder}; use super::TextElem; use crate::prelude::*; -/// Underline text. +/// Underlines text. /// /// ## Example { #example } /// ```example @@ -32,8 +32,8 @@ pub struct UnderlineElem { #[fold] pub stroke: Smart<PartialStroke>, - /// Position of the line relative to the baseline, read from the font tables - /// if `{auto}`. + /// The position of the line relative to the baseline, read from the font + /// tables if `{auto}`. /// /// ```example /// #underline(offset: 5pt)[ @@ -43,7 +43,8 @@ pub struct UnderlineElem { #[resolve] pub offset: Smart<Length>, - /// Amount that the line will be longer or shorter than its associated text. + /// The amount by which to extend the line beyond (or within if negative) + /// the content. /// /// ```example /// #align(center, @@ -81,7 +82,7 @@ impl Show for UnderlineElem { } } -/// Add a line over text. +/// Adds a line over text. /// /// ## Example { #example } /// ```example @@ -110,8 +111,8 @@ pub struct OverlineElem { #[fold] pub stroke: Smart<PartialStroke>, - /// Position of the line relative to the baseline, read from the font tables - /// if `{auto}`. + /// The position of the line relative to the baseline. Read from the font + /// tables if `{auto}`. /// /// ```example /// #overline(offset: -1.2em)[ @@ -121,7 +122,8 @@ pub struct OverlineElem { #[resolve] pub offset: Smart<Length>, - /// Amount that the line will be longer or shorter than its associated text. + /// The amount by which to extend the line beyond (or within if negative) + /// the content. /// /// ```example /// #set overline(extent: 4pt) @@ -164,7 +166,7 @@ impl Show for OverlineElem { } } -/// Strike through text. +/// Strikes through text. /// /// ## Example { #example } /// ```example @@ -192,8 +194,8 @@ pub struct StrikeElem { #[fold] pub stroke: Smart<PartialStroke>, - /// Position of the line relative to the baseline, read from the font tables - /// if `{auto}`. + /// The position of the line relative to the baseline. Read from the font + /// tables if `{auto}`. /// /// This is useful if you are unhappy with the offset your font provides. /// @@ -205,7 +207,8 @@ pub struct StrikeElem { #[resolve] pub offset: Smart<Length>, - /// Amount that the line will be longer or shorter than its associated text. + /// The amount by which to extend the line beyond (or within if negative) + /// the content. /// /// ```example /// This #strike(extent: -2pt)[skips] parts of the word. diff --git a/library/src/text/misc.rs b/library/src/text/misc.rs index 2af7a212..811b027e 100644 --- a/library/src/text/misc.rs +++ b/library/src/text/misc.rs @@ -187,7 +187,7 @@ impl Fold for Toggle { } } -/// Convert text or content to lowercase. +/// Converts text or content to lowercase. /// /// ## Example { #example } /// ```example @@ -206,7 +206,7 @@ pub fn lower( case(text, Case::Lower) } -/// Convert text or content to uppercase. +/// Converts text or content to uppercase. /// /// ## Example { #example } /// ```example @@ -270,7 +270,7 @@ impl Case { } } -/// Display text in small capitals. +/// Displays text in small capitals. /// /// _Note:_ This enables the OpenType `smcp` feature for the font. Not all fonts /// support this feature. Sometimes smallcaps are part of a dedicated font and @@ -303,7 +303,7 @@ pub fn smallcaps( body.styled(TextElem::set_smallcaps(true)) } -/// Create blind text. +/// Creates blind text. /// /// This function yields a Latin-like _Lorem Ipsum_ blind text with the given /// number of words. The sequence of words generated by the function is always diff --git a/library/src/text/mod.rs b/library/src/text/mod.rs index bde5dbac..ff8cbad8 100644 --- a/library/src/text/mod.rs +++ b/library/src/text/mod.rs @@ -39,11 +39,11 @@ pub(super) fn define(global: &mut Scope) { global.define("lorem", lorem_func()); } -/// Customize the look and layout of text in a variety of ways. +/// Customizes the look and layout of text in a variety of ways. /// -/// This function is used often, both with set rules and directly. While the set -/// rule is often the simpler choice, calling the text function directly can be -/// useful when passing text as an argument to another function. +/// This function is used frequently, both with set rules and directly. While +/// the set rule is often the simpler choice, calling the `text` function +/// directly can be useful when passing text as an argument to another function. /// /// ## Example { #example } /// ```example diff --git a/library/src/text/shift.rs b/library/src/text/shift.rs index cdf18caf..65e309e1 100644 --- a/library/src/text/shift.rs +++ b/library/src/text/shift.rs @@ -1,7 +1,7 @@ use super::{variant, SpaceElem, TextElem, TextSize}; use crate::prelude::*; -/// Set text in subscript. +/// Renders text in subscript. /// /// The text is rendered smaller and its baseline is lowered. /// @@ -64,7 +64,7 @@ impl Show for SubElem { } } -/// Set text in superscript. +/// Renders text in superscript. /// /// The text is rendered smaller and its baseline is raised. /// |
