Improve equation reference example (#6481)

This commit is contained in:
Andrew Voynov 2025-06-24 15:49:28 +03:00 committed by GitHub
parent 87c5686560
commit f162c37101
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -91,16 +91,13 @@ use crate::text::TextElem;
/// #show ref: it => {
/// let eq = math.equation
/// let el = it.element
/// if el != none and el.func() == eq {
/// // Skip all other references.
/// if el == none or el.func() != eq { return it }
/// // Override equation references.
/// link(el.location(), numbering(
/// el.numbering,
/// ..counter(eq).at(el.location())
/// ))
/// } else {
/// // Other references as usual.
/// it
/// }
/// }
///
/// = Beginnings <beginning>