Giter Club home page Giter Club logo

Comments (4)

uwezi avatar uwezi commented on September 13, 2024 1

alternatively you can just set the color for the object afterwards:

class bullets(Scene):
    def construct(self):
        t3 = BulletedList(
            "Low Signal-to-Noise Ratio (SNR)",
            "Low contrast",
            "Low resolution",
            color=BLUE,
            fill_color=BLUE,
            stroke_color=BLUE
        ).set_color(RED)
        self.add(t3)

from manim.

uwezi avatar uwezi commented on September 13, 2024 1

The reason for this behavior is that Manim does not typeset the bulleted list as an itemize in LaTeX, but rather makes individual rows out of the items and places separately generated dots in front of each line - where the dot itself is typeset without passing any **kwargs on to the MathTex object:

        line_separated_items = [s + "\\\\" for s in items]
        super().__init__(
            *line_separated_items, tex_environment=tex_environment, **kwargs
        )
        for part in self:
            dot = MathTex("\\cdot").scale(self.dot_scale_factor)
            dot.next_to(part[0], LEFT, SMALL_BUFF)
            part.add_to_back(dot)
        self.arrange(DOWN, aligned_edge=LEFT, buff=self.buff)

from manim.

kjczarne avatar kjczarne commented on September 13, 2024 1

Gotcha, the workaround you suggested is so much cleaner, thank you!!

from manim.

kjczarne avatar kjczarne commented on September 13, 2024

For now I have worked around the issue as follows:

        tex_template = TexTemplate()
        tex_template.add_to_preamble(r"\usepackage{enumitem,xcolor}")
        t3 = Tex(r"\begin{itemize}[label=\textcolor{black}{\textbullet}] \item Low Signal-to-Noise Ratio (SNR)"
                 r"\item Low contrast \item Low resolution"
                 r"\end{itemize}",
                 color=BLACK,
                 tex_template=tex_template)

from manim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.