Skip to content

FEAT: linkable math from code-blocks #88

@mmcky

Description

@mmcky

a user would like to ability to for example have the following math and then use the label in code blocks for link-able references

.. math::
    :label: ma_inf

    X_t = \sum_{j=0}^{\infty} \psi_j \epsilon_{t-j},
    \qquad t \in \mathbb Z

such as

.. code-block: python
    
   <code> # :eq:`ma_inf`

we do have access to the contents of code-blocks but they do get moved out to pygments for rendering. So perhaps we can intercept on return of that process (in html format to insert the equation clickable link). I'll open as a FEATURE request on the sphinxcontrib-jupyter repo.

rather than looking for many tags it would be best to use a convention such as:

:rst:eq:`ma_inf`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions