mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
Documentation fixes
This commit is contained in:
parent
7597b99789
commit
aa8a5bf42f
@ -680,11 +680,9 @@ Returns the values of the dictionary as an array in key-order.
|
|||||||
- returns: array
|
- returns: array
|
||||||
|
|
||||||
### pairs()
|
### pairs()
|
||||||
Call a function for each key-value pair and return the results in an array.
|
Returns the keys and values of the dictionary as an array of pairs. Each pair is
|
||||||
|
represented as an array of length two.
|
||||||
|
|
||||||
- mapper: function (positional, required)
|
|
||||||
The function to apply to each pair. Gets passed the key and value as two
|
|
||||||
separate arguments.
|
|
||||||
- returns: array
|
- returns: array
|
||||||
|
|
||||||
### remove()
|
### remove()
|
||||||
|
@ -86,8 +86,8 @@ pub fn panic(args: &mut Args) -> SourceResult<Value> {
|
|||||||
/// produce any output in the document.
|
/// produce any output in the document.
|
||||||
///
|
///
|
||||||
/// ## Example
|
/// ## Example
|
||||||
/// ```example
|
/// ```typ
|
||||||
/// #assert(1 < 2, message: "one is")
|
/// #assert(1 < 2, message: "math broke")
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// ## Parameters
|
/// ## Parameters
|
||||||
@ -119,9 +119,9 @@ pub fn assert(args: &mut Args) -> SourceResult<Value> {
|
|||||||
///
|
///
|
||||||
/// ## Example
|
/// ## Example
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #eval("1 + 2") \
|
/// #eval("1 + 1") \
|
||||||
/// #eval("[*Strong text*]") \
|
/// #eval("(1, 2, 3, 4)").len() \
|
||||||
/// #eval("(1, 2, 3)").len()
|
/// #eval("[*Strong text*]")
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// ## Parameters
|
/// ## Parameters
|
||||||
|
@ -11,20 +11,19 @@ use crate::text::TextNode;
|
|||||||
/// ## Example
|
/// ## Example
|
||||||
/// ```example
|
/// ```example
|
||||||
/// - *Content*
|
/// - *Content*
|
||||||
/// - Basics
|
|
||||||
/// - Text
|
/// - Text
|
||||||
/// - Math
|
/// - Math
|
||||||
/// - Layout
|
/// - Layout
|
||||||
/// - Visualize
|
/// - Visualize
|
||||||
/// - Meta
|
/// - Meta
|
||||||
|
/// - Symbols
|
||||||
///
|
///
|
||||||
/// - *Compute*
|
/// - *Compute*
|
||||||
/// #list(
|
/// #list(
|
||||||
/// [Foundations],
|
/// [Foundations],
|
||||||
/// [Calculate],
|
/// [Calculate],
|
||||||
/// [Create],
|
/// [Construct],
|
||||||
/// [Data Loading],
|
/// [Data Loading],
|
||||||
/// [Utility],
|
|
||||||
/// )
|
/// )
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
|
@ -32,7 +32,7 @@ use crate::text::{
|
|||||||
/// integer value of $n > 2$.
|
/// integer value of $n > 2$.
|
||||||
///
|
///
|
||||||
/// Without loss of generality,
|
/// Without loss of generality,
|
||||||
/// let a be the smallest of the
|
/// let $a$ be the smallest of the
|
||||||
/// three integers. Then, we ...
|
/// three integers. Then, we ...
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
|
@ -312,8 +312,7 @@ impl Case {
|
|||||||
/// Display text in small capitals.
|
/// Display text in small capitals.
|
||||||
///
|
///
|
||||||
/// _Note:_ This enables the OpenType `smcp` feature for the font. Not all fonts
|
/// _Note:_ This enables the OpenType `smcp` feature for the font. Not all fonts
|
||||||
/// support this feature (including Typst's current default font,
|
/// support this feature. Sometimes smallcaps are part of a dedicated font and
|
||||||
/// unfortunately). Sometimes smallcaps are part of a dedicated font and
|
|
||||||
/// sometimes they are not available at all. In the future, this function will
|
/// sometimes they are not available at all. In the future, this function will
|
||||||
/// support selecting a dedicated smallcaps font as well as synthesizing
|
/// support selecting a dedicated smallcaps font as well as synthesizing
|
||||||
/// smallcaps from normal letters, but this is not yet implemented.
|
/// smallcaps from normal letters, but this is not yet implemented.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user