sphinx-doc / sphinx-doc/sphinx
Create a display math *role*
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
I would like to include an equation inside a paragraph. This is customary in math-y texts, where breaking a paragraph on equation is often incorrect since an equation may be a part of a sentence. Right now display math can only be created using a directive, which necessarily breaks the paragraph.
Describe the solution you'd like
I propose to implement a new role, e.g. :math:display:`content` , or anything alike, which creates a math_block nodes in the doctree.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing display-math directive and the doctree handling for math_block nodes. Determine how a new math role could preserve paragraph flow while producing the requested node, then verify that the role works inside a paragraph and matches existing display-math behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100