mirror of
https://github.com/typst/typst
synced 2025-08-24 03:34:14 +08:00
Make links to $grid
in table
docs more specific (#6776)
Co-authored-by: PgBiel <9021226+PgBiel@users.noreply.github.com>
This commit is contained in:
parent
206792bf38
commit
0b0c4cdb5f
@ -36,7 +36,11 @@ use crate::visualize::{Paint, Stroke};
|
||||
/// in the document flow. Set and show rules on one of these elements do not
|
||||
/// affect the other.
|
||||
///
|
||||
/// # Sizing the tracks { #track-size }
|
||||
///
|
||||
/// A grid's sizing is determined by the track sizes specified in the arguments.
|
||||
/// There are multiple sizing parameters: [`columns`]($grid.columns),
|
||||
/// [`rows`]($grid.rows) and [`gutter`]($grid.gutter).
|
||||
/// Because each of the sizing parameters accepts the same values, we will
|
||||
/// explain them just once, here. Each sizing argument accepts an array of
|
||||
/// individual track sizes. A track size is either:
|
||||
@ -143,21 +147,26 @@ pub struct GridElem {
|
||||
/// with that many `{auto}`-sized columns. Note that opposed to rows and
|
||||
/// gutters, providing a single track size will only ever create a single
|
||||
/// column.
|
||||
///
|
||||
/// See the [track size section](#track-size) above for more details.
|
||||
pub columns: TrackSizings,
|
||||
|
||||
/// The row sizes.
|
||||
///
|
||||
/// If there are more cells than fit the defined rows, the last row is
|
||||
/// repeated until there are no more cells.
|
||||
///
|
||||
/// See the [track size section](#track-size) above for more details.
|
||||
pub rows: TrackSizings,
|
||||
|
||||
/// The gaps between rows and columns.
|
||||
/// The gaps between rows and columns. This is a shorthand to set
|
||||
/// [`column-gutter`]($grid.column-gutter) and [`row-gutter`]($grid.row-gutter)
|
||||
/// to the same value.
|
||||
///
|
||||
/// If there are more gutters than defined sizes, the last gutter is
|
||||
/// repeated.
|
||||
///
|
||||
/// This is a shorthand to set `column-gutter` and `row-gutter` to the same
|
||||
/// value.
|
||||
/// See the [track size section](#track-size) above for more details.
|
||||
#[external]
|
||||
pub gutter: TrackSizings,
|
||||
|
||||
|
@ -22,8 +22,8 @@ use crate::visualize::{Paint, Stroke};
|
||||
///
|
||||
/// Because tables are just grids with different defaults for some cell
|
||||
/// properties (notably `stroke` and `inset`), refer to the [grid
|
||||
/// documentation]($grid) for more information on how to size the table tracks
|
||||
/// and specify the cell appearance properties.
|
||||
/// documentation]($grid/#track-size) for more information on how to size the
|
||||
/// table tracks and specify the cell appearance properties.
|
||||
///
|
||||
/// If you are unsure whether you should be using a table or a grid, consider
|
||||
/// whether the content you are arranging semantically belongs together as a set
|
||||
@ -115,22 +115,22 @@ use crate::visualize::{Paint, Stroke};
|
||||
/// ```
|
||||
#[elem(scope, LocalName, Figurable)]
|
||||
pub struct TableElem {
|
||||
/// The column sizes. See the [grid documentation]($grid) for more
|
||||
/// information on track sizing.
|
||||
/// The column sizes. See the [grid documentation]($grid/#track-size) for
|
||||
/// more information on track sizing.
|
||||
pub columns: TrackSizings,
|
||||
|
||||
/// The row sizes. See the [grid documentation]($grid) for more information
|
||||
/// on track sizing.
|
||||
/// The row sizes. See the [grid documentation]($grid/#track-size) for more
|
||||
/// information on track sizing.
|
||||
pub rows: TrackSizings,
|
||||
|
||||
/// The gaps between rows and columns. This is a shorthand for setting
|
||||
/// `column-gutter` and `row-gutter` to the same value. See the [grid
|
||||
/// documentation]($grid) for more information on gutters.
|
||||
/// documentation]($grid.gutter) for more information on gutters.
|
||||
#[external]
|
||||
pub gutter: TrackSizings,
|
||||
|
||||
/// The gaps between columns. Takes precedence over `gutter`. See the
|
||||
/// [grid documentation]($grid) for more information on gutters.
|
||||
/// [grid documentation]($grid.gutter) for more information on gutters.
|
||||
#[parse(
|
||||
let gutter = args.named("gutter")?;
|
||||
args.named("column-gutter")?.or_else(|| gutter.clone())
|
||||
@ -138,7 +138,7 @@ pub struct TableElem {
|
||||
pub column_gutter: TrackSizings,
|
||||
|
||||
/// The gaps between rows. Takes precedence over `gutter`. See the
|
||||
/// [grid documentation]($grid) for more information on gutters.
|
||||
/// [grid documentation]($grid.gutter) for more information on gutters.
|
||||
#[parse(args.named("row-gutter")?.or_else(|| gutter.clone()))]
|
||||
pub row_gutter: TrackSizings,
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user