mirror of
https://github.com/typst/typst
synced 2025-06-25 23:02:52 +08:00
Improve equation reference example (#6481)
This commit is contained in:
parent
87c5686560
commit
f162c37101
@ -91,16 +91,13 @@ use crate::text::TextElem;
|
|||||||
/// #show ref: it => {
|
/// #show ref: it => {
|
||||||
/// let eq = math.equation
|
/// let eq = math.equation
|
||||||
/// let el = it.element
|
/// let el = it.element
|
||||||
/// if el != none and el.func() == eq {
|
/// // Skip all other references.
|
||||||
/// // Override equation references.
|
/// if el == none or el.func() != eq { return it }
|
||||||
/// link(el.location(),numbering(
|
/// // Override equation references.
|
||||||
/// el.numbering,
|
/// link(el.location(), numbering(
|
||||||
/// ..counter(eq).at(el.location())
|
/// el.numbering,
|
||||||
/// ))
|
/// ..counter(eq).at(el.location())
|
||||||
/// } else {
|
/// ))
|
||||||
/// // Other references as usual.
|
|
||||||
/// it
|
|
||||||
/// }
|
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// = Beginnings <beginning>
|
/// = Beginnings <beginning>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user