MyST-Parser
MyST-Parser copied to clipboard
amsmath label is not aligning to right end
Adding equation in markdown with labels with referencing. Below is the code. $$ \begin{split} x = y+z \end{split} $$ (eqn:coordinate)
The label unfortunately is generated as shown below at the left of the equation instead of aligning to right end. This is generated with sphinx, sphinx_rtd_theme. The equations were also initially aligning to the right but have resolved it by adding the following custom css. Please advise if there is a way to update the label to align at the right .math { margin-left: auto !important; margin-right: auto !important; width: fit-content !important; text-align: right !important; }
Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:
@wzleong , I don't know how relevant it is, but this problem may be related to the theme used. For example https://github.com/readthedocs/sphinx_rtd_theme/pull/383 . My own style helped me (for sphinx-rtd-theme):
.eqno {
margin-left: 5px;
float: right;
}
.math .headerlink {
display: none;
visibility: hidden;
}
.math:hover .headerlink {
display: inline-block;
visibility: visible;
margin-right: -0.7em;
}