Documentation fixes (#2543)

This commit is contained in:
MALO 2023-11-02 11:01:46 +01:00 committed by GitHub
parent c47757d6d4
commit 51d9fe2d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 12 deletions

View File

@ -55,7 +55,7 @@ pub struct QuoteElem {
/// - `{false}`: Do not wrap this quote in double quotes.
/// - `{auto}`: Infer whether to wrap this quote in double quotes based on
/// the `block` property. If `block` is `{false}`, double quotes are
/// auomatically added.
/// automatically added.
///
/// ```example
/// #set text(lang: "de")

View File

@ -171,6 +171,7 @@ impl Dict {
#[func]
pub fn remove(
&mut self,
/// The key of the pair to remove.
key: Str,
/// A default value to return if the key does not exist.
#[named]

View File

@ -117,8 +117,8 @@ const ANGLE_EPSILON: f32 = 1e-5;
/// Some popular presets are not included because they are not available under a
/// free licence. Others, like
/// [Jet](https://jakevdp.github.io/blog/2014/10/16/how-bad-is-your-colormap/),
/// are not included because they are not not color blind friendly. Feel free to
/// use or create a package with other presets that are useful to you!
/// are not included because they are not color blind friendly. Feel free to use
/// or create a package with other presets that are useful to you!
///
/// ```preview
/// #set page(width: auto, height: auto)

View File

@ -71,10 +71,10 @@ use crate::syntax::{Span, Spanned};
/// # Relativeness
/// The location of the `{0%}` and `{100%}` stops is dependant on the dimensions
/// of a container. This container can either be the shape they are painted on,
/// or to the closest surrounding container. This is controlled by the
/// `relative` argument of a gradient constructor. By default, gradients are
/// relative to the shape they are painted on, unless the gradient is applied on
/// text, in which case they are relative to the closest ancestor container.
/// or the closest surrounding container. This is controlled by the `relative`
/// argument of a gradient constructor. By default, gradients are relative to
/// the shape they are painted on, unless the gradient is applied on text, in
/// which case they are relative to the closest ancestor container.
///
/// Typst determines the ancestor container as follows:
/// - For shapes that are placed at the root/top level of the document, the
@ -137,9 +137,9 @@ use crate::syntax::{Span, Spanned};
///
/// # Direction
/// Some gradients are sensitive to direction. For example, a linear gradient
/// has an angle that determines the its direction. Typst uses a clockwise
/// angle, with 0° being from left-to-right, 90° from top-to-bottom, 180° from
/// right-to-left, and 270° from bottom-to-top.
/// has an angle that determines its direction. Typst uses a clockwise angle,
/// with 0° being from left to right, 90° from top to bottom, 180° from right to
/// left, and 270° from bottom to top.
///
/// ```example
/// >>> #set square(size: 50pt)
@ -252,7 +252,7 @@ impl Gradient {
///
/// Using these four values, also called the focal point for the starting
/// circle and the center and radius for the end circle, we can define a
/// gradient with more interesting properties than a basic radial gradient:
/// gradient with more interesting properties than a basic radial gradient.
///
/// ```example
/// >>> #set circle(radius: 30pt)

View File

@ -173,7 +173,7 @@ description: |
mode when before a digit. This improves, in particular, how negative integer
values are displayed in math mode.
- Added support for specifying a default value instead of failing for
[`remove`] function in [array]($array.remove) and
`remove` function in [array]($array.remove) and
[dictionary]($dictionary.remove)
- Simplified page setup guide examples
- Switched the documentation from using the word "hashtag" to the word "hash"