You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document the rendering workflow with dollarmath #111
The original js dollarmath plugin is documented on how to use it, but we can't apply that information to Python because the workflow is pretty different (there is a bridge to build between the Python output and the JS).
Proposal
At first I tried to use the renderer parameter, where we supposedely have to craft javascript code for each snippet and render it in-place. Doing that would require inserting a <script> able to identify the position in the DOM, which as far as I can tell might not be doable. Pushing the idea further, we could imagine inserting both a unique <div> marker and the <script> and then rework the DOM when the tag is relocated later on.
That seemed a bit too convoluted so I took a different approach by not setting any renderer and simply added that at the top of my HTML:
This is still not perfect because we loose the display mode information (so the inline double display mode is wrong) but it does seem to work otherwise. Addressing that last issue would probably require using the renderer mechanism to inject some information stripped into that loop but it's unclear to me exactly how.
Is there actually a way of working this out I'm missing here?
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗
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).
I think it would be correct if the inline double is rendered with block instead of inline. Other md to HTML converters such as pandoc seems to use block math for inline double as well.
This seems to be a bug here.
Output from pandoc
Inline math $x^2$, double inline math $$x^2$$.
A block math,
$$x^2$$
<p>Inline math <spanclass="math inline"><em>x</em><sup>2</sup></span>,
double inline math <spanclass="math display"><em>x</em><sup>2</sup></span>.</p><p>A block math,</p><p><spanclass="math display"><em>x</em><sup>2</sup></span></p>
As seen from the above example, it used math display from both inline double and block math.
Activity
welcome commentedon May 17, 2024
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗
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! 🎉
livinNector commentedon Jun 4, 2025
I think it would be correct if the inline double is rendered with block instead of inline. Other md to HTML converters such as pandoc seems to use block math for inline double as well.
This seems to be a bug here.
Output from pandoc
As seen from the above example, it used math display from both inline double and block math.