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
When using manim_directive for including Manim videos in a Sphinx document, the code snippet is duplicated in the rendered output.
For example, given this .rst file:
My Plugin Documentation
=======================
Test
----
TODO
.. manim:: MyScene
class MyScene(Scene):
def construct(self):
circle = Circle()
self.play(Create(circle))
self.wait()
This is the result:
Expected behavior
The second code snippet should not be there. A workaround is removing the relative HTML code, that is:
<predata-manim-binderdata-manim-classname="MyScene">
class MyScene(Scene):
def construct(self):
circle = Circle()
self.play(Create(circle))
self.wait()
</pre>
This is the result:
How to reproduce the issue
Use manim_directive with a simple scene, as shown in the example below.
Render the scene.
System specifications
System Details
OS: macOS 12.7.5 (Monterey)
RAM: 8GB
Python version (python/py/python3 --version): 3.12.6
The text was updated successfully, but these errors were encountered:
I am not sure I would qualify this as a bug -- but you are right, we are using the directive to generate both the default output in the admonition, as well as an extra block for the interactive embed. We need to keep this block for the documentation, but perhaps there should be some sort of configuration option that toggles whether these additional blocks are written.
PRs are welcome!
JasonGrace2282
changed the title
[BUG] manim_directive duplicates code
Manim directive duplicates code
Dec 3, 2024
Description of bug / unexpected behavior
When using manim_directive for including Manim videos in a Sphinx document, the code snippet is duplicated in the rendered output.
For example, given this .rst file:
This is the result:
Expected behavior
The second code snippet should not be there. A workaround is removing the relative HTML code, that is:
This is the result:
How to reproduce the issue
System specifications
System Details
python/py/python3 --version
): 3.12.6The text was updated successfully, but these errors were encountered: