# type: ignore r""" A directive for including Manim slides in a Sphinx document =========================================================== .. warning:: This Sphinx extension requires Manim to be installed, and won't probably work on ManimGL examples. .. note:: The current implementation is highly inspired from Manim's own sphinx directive, from v0.17.3. When rendering the HTML documentation, the ``.. manim-slides::`` directive implemented here allows to include rendered videos. Its basic usage that allows processing **inline content** looks as follows:: .. manim-slides:: MySlide class MySlide(Scene): def construct(self): ... It is required to pass the name of the class representing the scene to be rendered to the directive. As a second application, the directive can also be used to render scenes that are defined within doctests, for example:: .. manim-slides:: DirectiveDoctestExample :ref_classes: Dot >>> from manim import Create, Dot, RED, Scene >>> dot = Dot(color=RED) >>> dot.color >>> class DirectiveDoctestExample(Scene): ... def construct(self): ... self.play(Create(dot)) Options ------- Options can be passed as follows:: .. manim-slides:: :