Skip to content

More flexibile customisation of cross reference text #2480

@JimMadge

Description

@JimMadge

Proposal

Spoke about this with @agoose77
Related to #168

Currently, there is some ability to customise how the visible cross reference text is created.
You can do this inline, like [Section {name}(#my-label) or in the front matter like

---
numbering:
  figure:
    template: fig (%s)
---

The templating language allows you to get (I believe) the number %s and the value of the name attribute {name}. And there are some extra options for the numbering behaviour.

It would be nice to have more flexibility in the label text creation. Perhaps allowing you to use any attribute from a node.
Related to #168, perhaps you could specify rules for a particular class of node. So, if you had a set of (team:my-team)= labels which reference to table nodes, but semantically are teams you might want just those tables to render like Team <name> rather than Table <number>.

Additional notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions