Skip to content

Conversation

@iamgio
Copy link
Owner

@iamgio iamgio commented Sep 21, 2025

This PR introduces cross-references:

  • Headings

    # Text {#my-ref}
  • Figures

    ![alt](img.png "Caption") {#my-ref}
  • Tables

    | A | B | C |
    |---|---|---|
    | D | E | F |
    "Caption" {#my-ref}
  • Code blocks

    ```javascript {#my-ref}
    console.log("Hello");
    ```
  • Custom .numbered blocks:

    .numbered key:{abc} ref:{my-ref}
        Hello
    

Support for math equations (#185) will be added in a subsequent PR, which will also introduce equation numbering.

Elements can be cross-referenced via the .ref function. Cross-referencing works best when combined with numbering.

.numbering
  - headings: 1.1

# Title

## First

For more info, see .ref {second}.

## Second {#second}

...

Output:

...
For more info, see Section 1.2.
...

@iamgio iamgio added the enhancement New feature or request label Sep 21, 2025
@iamgio iamgio linked an issue Sep 21, 2025 that may be closed by this pull request
@iamgio iamgio marked this pull request as draft September 22, 2025 15:02
@iamgio iamgio marked this pull request as ready for review September 23, 2025 21:38
@iamgio iamgio merged commit 8586d96 into main Sep 23, 2025
3 checks passed
@iamgio iamgio deleted the cross-reference branch September 23, 2025 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Cross Reference

2 participants