mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Small improvements to heading parameter docs (#3660)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
This commit is contained in:
parent
bd8a029725
commit
1084bce4e8
@ -69,14 +69,14 @@ pub struct HeadingElem {
|
|||||||
/// combined with `{offset}` to compute the actual `{level}`.
|
/// combined with `{offset}` to compute the actual `{level}`.
|
||||||
///
|
///
|
||||||
/// This is set by the heading syntax, such that `[== Heading]` creates a
|
/// This is set by the heading syntax, such that `[== Heading]` creates a
|
||||||
/// heading with logical depth 2, but actual level `{offset + 2}`. If you
|
/// heading with logical depth of 2, but actual level `{offset + 2}`. If you
|
||||||
/// construct a heading manually, you should typically prefer this over
|
/// construct a heading manually, you should typically prefer this over
|
||||||
/// setting the absolute `level`.
|
/// setting the absolute level.
|
||||||
#[default(NonZeroUsize::ONE)]
|
#[default(NonZeroUsize::ONE)]
|
||||||
pub depth: NonZeroUsize,
|
pub depth: NonZeroUsize,
|
||||||
|
|
||||||
/// The starting offset of each heading's level, used to turn its relative
|
/// The starting offset of each heading's `{level}`, used to turn its
|
||||||
/// `{depth}` into its absolute `{level}`.
|
/// relative `{depth}` into its absolute `{level}`.
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// = Level 1
|
/// = Level 1
|
||||||
@ -126,7 +126,7 @@ pub struct HeadingElem {
|
|||||||
///
|
///
|
||||||
/// Note that this property, if set to `{true}`, ensures the heading is also
|
/// Note that this property, if set to `{true}`, ensures the heading is also
|
||||||
/// shown as a bookmark in the exported PDF's outline (when exporting to
|
/// shown as a bookmark in the exported PDF's outline (when exporting to
|
||||||
/// PDF). To change that behaviour, use the `bookmarked` property.
|
/// PDF). To change that behavior, use the `bookmarked` property.
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #outline()
|
/// #outline()
|
||||||
@ -148,7 +148,7 @@ pub struct HeadingElem {
|
|||||||
/// appear in the exported PDF's outline if its `outlined` property is set
|
/// appear in the exported PDF's outline if its `outlined` property is set
|
||||||
/// to `{true}`, that is, if it would also be listed in Typst's [outline].
|
/// to `{true}`, that is, if it would also be listed in Typst's [outline].
|
||||||
/// Setting this property to either `{true}` (bookmark) or `{false}` (don't
|
/// Setting this property to either `{true}` (bookmark) or `{false}` (don't
|
||||||
/// bookmark) bypasses that behaviour.
|
/// bookmark) bypasses that behavior.
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #heading[Normal heading]
|
/// #heading[Normal heading]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user