mirror of
https://github.com/typst/typst
synced 2025-08-20 17:58:32 +08:00
Compare commits
5 Commits
dffe990a24
...
c07310c232
Author | SHA1 | Date | |
---|---|---|---|
|
c07310c232 | ||
|
36ecbb2c8d | ||
|
51ab5b815c | ||
|
f7070b57eb | ||
|
09d35c8254 |
@ -20,7 +20,7 @@ use crate::foundations::{
|
|||||||
///
|
///
|
||||||
/// You can call a function by writing a comma-separated list of function
|
/// You can call a function by writing a comma-separated list of function
|
||||||
/// _arguments_ enclosed in parentheses directly after the function name.
|
/// _arguments_ enclosed in parentheses directly after the function name.
|
||||||
/// Additionally, you can pass any number of trailing content blocks arguments
|
/// Additionally, you can pass any number of trailing content block arguments
|
||||||
/// to a function _after_ the normal argument list. If the normal argument list
|
/// to a function _after_ the normal argument list. If the normal argument list
|
||||||
/// would become empty, it can be omitted. Typst supports positional and named
|
/// would become empty, it can be omitted. Typst supports positional and named
|
||||||
/// arguments. The former are identified by position and type, while the latter
|
/// arguments. The former are identified by position and type, while the latter
|
||||||
|
@ -38,12 +38,12 @@ pub use crate::__select_where as select_where;
|
|||||||
/// A filter for selecting elements within the document.
|
/// A filter for selecting elements within the document.
|
||||||
///
|
///
|
||||||
/// You can construct a selector in the following ways:
|
/// You can construct a selector in the following ways:
|
||||||
/// - you can use an element [function]
|
/// - use an element [function]
|
||||||
/// - you can filter for an element function with
|
/// - filter for an element function with
|
||||||
/// [specific fields]($function.where)
|
/// [specific fields]($function.where)
|
||||||
/// - you can use a [string]($str) or [regular expression]($regex)
|
/// - use a [string]($str) or [regular expression]($regex)
|
||||||
/// - you can use a [`{<label>}`]($label)
|
/// - use a [`{<label>}`]($label)
|
||||||
/// - you can use a [`location`]
|
/// - use a [`location`]
|
||||||
/// - call the [`selector`] constructor to convert any of the above types into a
|
/// - call the [`selector`] constructor to convert any of the above types into a
|
||||||
/// selector value and use the methods below to refine it
|
/// selector value and use the methods below to refine it
|
||||||
///
|
///
|
||||||
@ -148,7 +148,9 @@ impl Selector {
|
|||||||
impl Selector {
|
impl Selector {
|
||||||
/// Turns a value into a selector. The following values are accepted:
|
/// Turns a value into a selector. The following values are accepted:
|
||||||
/// - An element function like a `heading` or `figure`.
|
/// - An element function like a `heading` or `figure`.
|
||||||
|
/// - A [string]($str) or [regular expression]($regex).
|
||||||
/// - A `{<label>}`.
|
/// - A `{<label>}`.
|
||||||
|
/// - A [`location`].
|
||||||
/// - A more complex selector like `{heading.where(level: 1)}`.
|
/// - A more complex selector like `{heading.where(level: 1)}`.
|
||||||
#[func(constructor)]
|
#[func(constructor)]
|
||||||
pub fn construct(
|
pub fn construct(
|
||||||
|
@ -205,7 +205,7 @@
|
|||||||
single or double quotes.
|
single or double quotes.
|
||||||
|
|
||||||
The value is always of type [string]($str). More complex data
|
The value is always of type [string]($str). More complex data
|
||||||
may be parsed manually using functions like [`json.decode`]($json.decode).
|
may be parsed manually using functions like [`json`]($json).
|
||||||
|
|
||||||
- name: sym
|
- name: sym
|
||||||
title: General
|
title: General
|
||||||
|
Loading…
x
Reference in New Issue
Block a user