mirror of
https://github.com/typst/typst
synced 2025-06-28 08:12:53 +08:00
Documentation fixes (#3595)
This commit is contained in:
parent
6e0b3484dd
commit
54f6ee0e53
@ -10,7 +10,10 @@ use crate::foundations::{repr, ty, Content, Scope, Value};
|
|||||||
///
|
///
|
||||||
/// You can access definitions from the module using
|
/// You can access definitions from the module using
|
||||||
/// [field access notation]($scripting/#fields) and interact with it using the
|
/// [field access notation]($scripting/#fields) and interact with it using the
|
||||||
/// [import and include syntaxes]($scripting/#modules).
|
/// [import and include syntaxes]($scripting/#modules). Alternatively, it is
|
||||||
|
/// possible to convert a module to a dictionary, and therefore access its
|
||||||
|
/// contents dynamically, using the
|
||||||
|
/// [dictionary constructor]($dictionary/#constructor).
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```example
|
/// ```example
|
||||||
|
@ -53,7 +53,7 @@ use crate::visualize::{Paint, Stroke};
|
|||||||
///
|
///
|
||||||
/// - `{auto}`: The track will be sized to fit its contents. It will be at most
|
/// - `{auto}`: The track will be sized to fit its contents. It will be at most
|
||||||
/// as large as the remaining space. If there is more than one `{auto}` track
|
/// as large as the remaining space. If there is more than one `{auto}` track
|
||||||
/// which, and together they claim more than the available space, the `{auto}`
|
/// width, and together they claim more than the available space, the `{auto}`
|
||||||
/// tracks will fairly distribute the available space among themselves.
|
/// tracks will fairly distribute the available space among themselves.
|
||||||
///
|
///
|
||||||
/// - A fixed or relative length (e.g. `{10pt}` or `{20% - 1cm}`): The track
|
/// - A fixed or relative length (e.g. `{10pt}` or `{20% - 1cm}`): The track
|
||||||
@ -72,8 +72,8 @@ use crate::visualize::{Paint, Stroke};
|
|||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
/// The example below demonstrates the different track sizing options. It also
|
/// The example below demonstrates the different track sizing options. It also
|
||||||
/// shows how you can use [`grid.cell`]($grid.cell) in to make an individual
|
/// shows how you can use [`grid.cell`]($grid.cell) to make an individual cell
|
||||||
/// cell span two grid tracks.
|
/// span two grid tracks.
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// // We use `rect` to emphasize the
|
/// // We use `rect` to emphasize the
|
||||||
@ -186,7 +186,7 @@ pub struct GridElem {
|
|||||||
/// How to fill the cells.
|
/// How to fill the cells.
|
||||||
///
|
///
|
||||||
/// This can be a color or a function that returns a color. The function is
|
/// This can be a color or a function that returns a color. The function is
|
||||||
/// passed the cells' column and row index, starting at zero. This can be
|
/// passed the cells' column and row indices, starting at zero. This can be
|
||||||
/// used to implement striped grids.
|
/// used to implement striped grids.
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
@ -210,7 +210,7 @@ pub struct GridElem {
|
|||||||
///
|
///
|
||||||
/// This can either be a single alignment, an array of alignments
|
/// This can either be a single alignment, an array of alignments
|
||||||
/// (corresponding to each column) or a function that returns an alignment.
|
/// (corresponding to each column) or a function that returns an alignment.
|
||||||
/// The function is passed the cells' column and row index, starting at
|
/// The function is passed the cells' column and row indices, starting at
|
||||||
/// zero. If set to `{auto}`, the outer alignment is used.
|
/// zero. If set to `{auto}`, the outer alignment is used.
|
||||||
///
|
///
|
||||||
/// You can find an example for this argument at the
|
/// You can find an example for this argument at the
|
||||||
|
@ -11,7 +11,7 @@ use crate::syntax::Span;
|
|||||||
/// (width and height).
|
/// (width and height).
|
||||||
///
|
///
|
||||||
/// The given function must accept a single parameter, `size`, which is a
|
/// The given function must accept a single parameter, `size`, which is a
|
||||||
/// dictionary with keys `width` and `height`, both of type [`length`.
|
/// dictionary with keys `width` and `height`, both of type [`length`].
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #let text = lorem(30)
|
/// #let text = lorem(30)
|
||||||
|
@ -80,7 +80,7 @@ pub struct EquationElem {
|
|||||||
|
|
||||||
/// The alignment of the equation numbering.
|
/// The alignment of the equation numbering.
|
||||||
///
|
///
|
||||||
/// By default, the alignment is `{end} + {horizon}`. For the horizontal
|
/// By default, the alignment is `{end + horizon}`. For the horizontal
|
||||||
/// component, you can use `{right}`, `{left}`, or `{start}` and `{end}`
|
/// component, you can use `{right}`, `{left}`, or `{start}` and `{end}`
|
||||||
/// of the text direction; for the vertical component, you can use
|
/// of the text direction; for the vertical component, you can use
|
||||||
/// `{top}`, `{horizon}`, or `{bottom}`.
|
/// `{top}`, `{horizon}`, or `{bottom}`.
|
||||||
|
@ -152,7 +152,7 @@ pub struct TableElem {
|
|||||||
/// How to fill the cells.
|
/// How to fill the cells.
|
||||||
///
|
///
|
||||||
/// This can be a color or a function that returns a color. The function is
|
/// This can be a color or a function that returns a color. The function is
|
||||||
/// passed the cells' column and row index, starting at zero. This can be
|
/// passed the cells' column and row indices, starting at zero. This can be
|
||||||
/// used to implement striped tables.
|
/// used to implement striped tables.
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
@ -176,8 +176,8 @@ pub struct TableElem {
|
|||||||
///
|
///
|
||||||
/// This can either be a single alignment, an array of alignments
|
/// This can either be a single alignment, an array of alignments
|
||||||
/// (corresponding to each column) or a function that returns an alignment.
|
/// (corresponding to each column) or a function that returns an alignment.
|
||||||
/// The function is passed the cells' column and row index, starting at zero.
|
/// The function is passed the cells' column and row indices, starting at
|
||||||
/// If set to `{auto}`, the outer alignment is used.
|
/// zero. If set to `{auto}`, the outer alignment is used.
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #table(
|
/// #table(
|
||||||
|
@ -114,7 +114,7 @@ description: |
|
|||||||
- Fixed width adjustment of JIS-style Japanse punctuation
|
- Fixed width adjustment of JIS-style Japanse punctuation
|
||||||
- Fixed Finnish translation of "Listing"
|
- Fixed Finnish translation of "Listing"
|
||||||
- Fixed Z-ordering of multiple text decorations (underlines, etc.)
|
- Fixed Z-ordering of multiple text decorations (underlines, etc.)
|
||||||
- Fixed a bug due to with text [features]($text.features) could not be
|
- Fixed a bug due to which text [features]($text.features) could not be
|
||||||
overridden in consecutive set rules
|
overridden in consecutive set rules
|
||||||
|
|
||||||
- Model
|
- Model
|
||||||
|
Loading…
x
Reference in New Issue
Block a user