Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple labels inside math directives #12379

Open
tuncbkose opened this issue May 17, 2024 · 1 comment
Open

Multiple labels inside math directives #12379

tuncbkose opened this issue May 17, 2024 · 1 comment
Labels
type:proposal a feature suggestion

Comments

@tuncbkose
Copy link

Is your feature request related to a problem? Please describe.
I'd like to label and refer to individual lines inside math directives.

Describe the solution you'd like
Something like a :labels: option discussed here could work.

Describe alternatives you've considered
I've tried thinking of sufficiently good workarounds, but nothing will work as well as a proper solution in Sphinx.
I'm working on a document where both the HTML and LaTeX outputs matter and I couldn't devise a band-aid solution that works for both. But if one cares only about one of them, for example HTML, one could probably label/tag manually with LaTeX, and refer to them with {math}`\eqref{...}` .

@tuncbkose tuncbkose added the type:proposal a feature suggestion label May 17, 2024
@tuncbkose tuncbkose changed the title <short description for the feature> Multiple labels inside math directives May 17, 2024
@tuncbkose
Copy link
Author

I was looking around to find the relevant part of the code, which seems to be patches.py.

The current behavior is due to the reference targeting the entire math_block. In order to label individual lines, I imagine one needs to break the math_block into pieces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:proposal a feature suggestion
Projects
None yet
Development

No branches or pull requests

1 participant